[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:32:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
Hi again,
Anyway, it seems to me that, even before that change, you had no
possibility of writing something like "4 dotted quarter notes". Do you
need that functionality?
So how about:
\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))
(timesig-markup
(markup #:override '(baseline-skip . 0.5)
#:column (#:number (number->string count)
#:override '(style . default)
#:note unit DOWN))))
#{
\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 12 { a8 b c' d' }
}
Internally, this creates a 12/8 time signature (as it should, I think).
Lukas