lilypond-user
[Top][All Lists]
Advanced

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

Override baseline-skip according layout-staff-size


From: Rip _Mus
Subject: Override baseline-skip according layout-staff-size
Date: Sun, 29 Jan 2023 10:16:43 +0100

Hello,
please, take a look:

%%%
\version "2.24.0"

xclefon = {
  \set Staff.clefPosition = #3
  \override Staff.Clef.stencil = #(lambda (grob)
                                    (parenthesize-stencil
                                     (grob-interpret-markup grob
                                       #{ \markup
                                          \override #'(baseline-skip . 0.8)
                                          \teeny \center-column {
                                            \musicglyph "noteheads.s2cross"
                                            \musicglyph "noteheads.s2cross"
                                            \musicglyph "noteheads.s2cross"
                                            \musicglyph "noteheads.s2cross"
                                          }
                                       #})
                                     0.1
                                     0.5
                                     0.5
                                     0))
}

\score {
  {
    c'4
    \xclefon
    c'4
  }
  \layout { #(layout-set-staff-size 16) }
}
%%%

in "\override #'(baseline-skip . 0.8)" I'm trying to scale the baseline-skip according to the part staff size (16), in fact 16/20 = 0.8. I'd like to make this snippet more generic.
I tried to point, from within the markup, to the Clef grob staff-symbol property, to get the staff size, but without success.
Could you please help me solve?

Thank you

Rip_mus

reply via email to

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