Hello, everyone. Long time since my last post.

I'm trying to mimic the time signature below:

[image: custom_time_signature.png]

It is a transcription of a folk melody in which the author tried to show a
changing in time signature that happens in performance.

So far, I managed to tweak the code by Thomas Morley in an old discussion
from 2012 -
http://lilypond.1069038.n5.nabble.com/Custom-Time-Signature-td138130.html#a138133
and
got the following:

customTimeSignature =
\override Score.TimeSignature #'stencil =
  #(lambda (grob)
    (let* ((four (ly:font-get-glyph (ly:grob-default-font grob) "four"))
           (three (parenthesize-stencil
                      (ly:font-get-glyph (ly:grob-default-font grob)
"three")
                      0.1 0.4 0.4 0.1))
           (staff-space (ly:staff-symbol-staff-space grob))
           (pddng (* 0.5 staff-space))
           (new-stil
             (ly:stencil-combine-at-edge
               four
               X
               RIGHT
               three
               pddng)))
          new-stil))

\relative c' {
 \key d \major
  %\once \override Staff.TimeSignature.style = #'single-digit
  \customTimeSignature
  \time 3/4
  d2 r4 |
  a'4 b cis |
  s4
}

The problem is that the numbers from the time signature appear on the top,
as if it was a whole fraction. As you can see, I tried to use \override
Staff.TimeSignature.style = #'single-digit but in this case it didn't work,
probably because the stencil function is missing something. Any suggestions?

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

Reply via email to