lilypond-user
[Top][All Lists]
Advanced

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

Re: resetting accidentals at word breaks


From: Lukas-Fabian Moser
Subject: Re: resetting accidentals at word breaks
Date: Wed, 15 Apr 2020 16:02:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Hi Benjamin,

Now I need to figure out automatically adding cautionary accidentals the first time the pitch appears after the accidental has been reset.  I've been having trouble finding documentation on defining new accidental Styles, but I will continue looking a bit before turning to the forum for more help.

I didn't search the archives for a ready-made solution, but I just want to point you to the (reasonably well-documented) place where the standard accidentalStyles are defined: They are all in scm/music-functions.scm.

In particular, you could look at the definition of the modern style and tweak its "laziness", since in the definition of make-accidental-rule, we read:

@var{laziness} states over how many bars an accidental should be remembered.
@code{0}@tie{}is the default -- accidental lasts over 0@tie{}bar lines, that
is, to the end of current measure.  A positive integer means that the
accidental lasts over that many bar lines.  @w{@code{-1}} is `forget
immediately', that is, only look at key signature.  @code{#t} is `forever'."

Maybe this is not compatible with your wish to enforce repetition of accidentals after a (invisible) bar line. But since everything is written in Scheme, one should be able to hook into check-pitch-against-signature if push comes to shove.

Best
Lukas


reply via email to

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