Pierre Perol-Schneider <pierre.schneider.pa...@gmail.com> writes:

> Hi,
>
> I'd like to customize the clefs depending on their glyph-name:
>
> %%
> \version "2.19.46"
>
> my-clef-G = \markup "G"
>
> my-clef-F = \markup "F"
>
> \score {
>   \new PianoStaff <<
>     \new Staff { c' }
>     \new Staff { \clef F c' }
>   >>
>   \layout {
>     \context {
>       \Score
>       \override Clef.stencil =
>         #(lambda (grob)
>            (let ((glyph (ly:grob-property grob 'glyph-name)))
>                  (case glyph
>                    (("clefs.G") (grob-interpret-markup grob my-clef-G))
>                    (("clefs.F") (grob-interpret-markup grob my-clef-F))
>                    (else (ly:clef::print grob)))))
>     }
>   }
> }
> %%
>
> But nothing happend.
> Any idea?

"case" does not work on strings because it compares using eqv? and
(eqv? "x" "x") -> #f

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to