On 2020-05-12 5:48 am, Sami Amiris wrote:
Hello great people of the list.
One small question: how can I implement a multiplicative time
signature? For
example:
4 x 3/8
where 4 is a nice big integer and 3/8 is a fraction?
Searched for it but couldn't find anything at least relatively recent.
Please excuse this if it has already been solved.
Would something like this work?
%%%%
\version "2.20.0"
#(define (one-or-more? x) (and (integer? x) (< 0 x)))
multipleTime =
#(define-music-function
(multiple fraction)
((one-or-more? 1) fraction?)
(if (< 1 multiple)
#{ \once \override Score.TimeSignature.stencil =
#ly:text-interface::print
\once \override Score.TimeSignature.text =
\markup \number \concat {
\vcenter \fontsize #3 $(number->string multiple)
\vcenter \fontsize #-6 ×
\vcenter \override #'(baseline-skip . 0) \column {
$(number->string (car fraction))
$(number->string (cdr fraction))
}
}
\time $(cons (* multiple (car fraction)) (cdr fraction)) #}
#{ \time $fraction #}))
{
\multipleTime 4 3/8
\repeat unfold 3 { | \repeat unfold 4 { b'8( 8 8) } }
\bar "||"
\multipleTime 5 2/4
\repeat unfold 3 { | \repeat unfold 5 { b'4( 4) } }
\bar "||"
\multipleTime 3/2
\repeat unfold 3 { | b'2( 2 2) }
\bar "|."
}
%%%%
-- Aaron Hill