lilypond-user
[Top][All Lists]
Advanced

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

Re: Naturals before restored accidentals


From: David Kastrup
Subject: Re: Naturals before restored accidentals
Date: Tue, 12 Oct 2021 15:24:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Brent Annable <brentannable@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

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