lilypond-user
[Top][All Lists]
Advanced

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

Re: show key signature but also alterations


From: David Kastrup
Subject: Re: show key signature but also alterations
Date: Thu, 21 May 2020 14:10:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Pierre Perol-Schneider <address@hidden> writes:

> Hi Frédéric,
> If you want to get a custom style, see Simon's here:
> http://lilypond.1069038.n5.nabble.com/Custom-accidental-styles-td190776.html#a190788
>
> Otherwise you could do:
>
> \version "2.20.0"
>
> \fixed c' {
>   \accidentalStyle dodecaphonic
>   \key d\major
>   c' d' e' f'
>   cis' dis' eis' fis'
>   ces' des' es' fes'
> }
>
> \layout {
>   \context {
>     \Voice
>     \override Accidental.stencil =
>       #(lambda (grob)
>           (let ((glyph (ly:grob-property grob 'glyph-name)))
>            (cond
>             ((equal? glyph "accidentals.natural")
>                (ly:stencil? #f))
>                (else (ly:accidental-interface::print grob)))))
>   }
> }

Seems easier to just do

\key d\major
\set Staff.keyAlterations = #'()
\accidentalStyle dodecaphonic

Namely lie about the printed key signature.

-- 
David Kastrup



reply via email to

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