lilypond-user
[Top][All Lists]
Advanced

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

Re: changes leads to error


From: Lukas-Fabian Moser
Subject: Re: changes leads to error
Date: Sat, 20 Mar 2021 11:56:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Sorry for spamming!

The last version I posted gave worse layout than the original (because I had replaced \center-column by \column which seems to look better for dotted durations in the denominator).

So maybe better to use:

\version "2.22.0"

notetime =
#(define-music-function (count unit) (index? ly:duration?)
   (let* ((unit-length (ly:duration-length unit))
          (unit-numerator (ly:moment-main-numerator unit-length))
          (unit-denominator (ly:moment-main-denominator unit-length))
          (build-column (if (positive? (ly:duration-dot-count unit))
                            make-column-markup make-center-column-markup))
          (timesig-entries (list
                            (markup (#:number (number->string count)))
                            (markup #:note unit DOWN)))
          (timesig-markup (markup
                           #:override '(baseline-skip . 0.5)
                           (build-column timesig-entries))))

     #{
       \once\override Staff.TimeSignature.stencil =
       #(lambda (grob) (grob-interpret-markup grob timesig-markup))
       \time #(cons (* count unit-numerator) unit-denominator)
     #}))

{
  \notetime 4 4
  \repeat unfold 8 { a8 b c' d' e' }
  \notetime 4 4.
  \repeat unfold 8 { a8 b c' d' e' }
}




reply via email to

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