lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

creating new accidental styles


From: Caio Barros
Subject: creating new accidental styles
Date: Thu, 9 Aug 2018 10:59:46 -0300

I'm trying to experiment with different accidental styles. So far, I just want to understand how do I customize them, I installed a new instance of lilypond 2.19.82 and tried to tinker with the music-functions.scm file located by default at lilypond/current/scm/

As far as I understand, accidental styles are set in the definition of accidental-styles (line 1769 of the current version). In this definition, there is an alist containing each of the accidental styles. The first thing I tried to do is to change the definition of the "default" style to:

(default #t
              (Staff ,(make-accidental-rule 'same-octave #t)) ;normally it would be 0 instead of #t
              ())

This would, in principle, change the default behaviour to the same as "no-reset" style, but when I try to compile a simple music file, say:

\version "2.19.82"

test = \relative c' {
    cis d e d |
    cis d e d
}

\new Staff \with {
%  \accidentalStyle default %I tried with and without this line
}
{
  \test
}

I see no effect. I thought that lilypond read the definitions in music-functions.scm every time I ran it. Am I wrong?

My end goal is to create a couple of accidental styles that reflect rules I've being usoing in some engravings for contemporary music:
- for music that has bar lines:
-- show the accident for each note, except when immediately repeated (like neo-modern)
-- cancel accidentals no matter how many measures after and (perhaps) no matter in what octave (i have to experiment with this last one to see if it's really necessary)
- for music without bar lines:
-- same rules for note cancellation as the last one, but showing accidentals for each note, even the repeated ones (like forget)

Caio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]