David,

Many thanks!

Brent.

On Wed, 13 Oct 2021 at 00:24, David Kastrup <d...@gnu.org> wrote:

> Brent Annable <brentanna...@gmail.com> writes:
>
> > Hi all,
> >
> > I'm trying to set the default Lilypond behaviour *not* to print natural
> > signs before restored accidentals, but I can't figure out the proper
> > syntax. Can someone tell me why the \override line in the following
> example
> > doesn't work but the \tweak does, and what I need to do to apply this
> > behaviour to the whole file? Obviously I'm missing something, but I can't
> > figure out what.
> >
> > \version "2.22.1"
> > \relative c' {
> > \key b \major
> > \override Accidental.restore-first = ##f
> > cisis2 cis2
> > cisis2 \tweak Accidental.restore-first ##f cis2
> > }
> >
> > Many thanks as always,
>
> I have been digging through the code, and the Accidental_engraver sets
> this property based on the extraNatural context property.  So because of
> the Accidental_engraver's context location, you need to set
>
> \set Staff.extraNatural = ##f
>
> Now the restore-first property is documented as a "user backend
> property" rather than an internal one, so overriding it in this manner
> seems like a breach of promise.  Directing this behavior through a
> context property, however, would be consistent with where accidental
> rules are normally established.
>
> There is a Documentation snippet that tweaks one instant of
> restore-first (to ##t), strengthening the impression that this is a
> user-level property.
>
> So this is somewhat of a mess.  Setting Staff.extraNatural should
> usually be what you want.
>
> --
> David Kastrup
>

Reply via email to