Am 16.09.2015 um 05:02 schrieb Kieren MacMillan:
Have a look at this LSR snippet: http://lsr.di.unimi.it/LSR/Item?id=642
Yes! That one suffices — and is more elegant — if you don’t need “strange note
values” (like dotted notes) in your denominator(s).
And if you do, you can change the function to make f. e. “2/4.” instead
of 6/8 like this:
%%%%%%%%
\version "2.19.27"
#(define-public (format-time-sig-note grob)
(let* ((frac (ly:grob-property grob 'fraction))
(num (if (pair? frac) (car frac) 4))
(den (if (pair? frac) (cdr frac) 4))
(m
(if (and (< 3 num) (= 0 (modulo num 3)))
(markup #:override '(baseline-skip . 0.5)
#:center-column
(#:concat (#:number (number->string (/ num 3))
#:hspace 0.8)
#:override '(style . default)
#:note (string-append (number->string (/ den 2))
".") DOWN))
(markup #:override '(baseline-skip . 0.5)
#:center-column
(#:number (number->string num)
#:override '(style . default)
#:note (number->string den) DOWN)))))
(grob-interpret-markup grob m)))
\relative c' {
\override Staff.TimeSignature.stencil = #format-time-sig-note
\time 2/8
\repeat unfold 2 c8
\time 3/8
\repeat unfold 3 c8
\time 4/8
\repeat unfold 4 c8
\time 5/8
\repeat unfold 5 c8
\time 6/8
\repeat unfold 6 c8
\time 7/8
\repeat unfold 7 c8
\time 9/8
\repeat unfold 9 c8
\time 12/8
\repeat unfold 12 c8
\time 15/16
\repeat unfold 15 c16
\time 6/4
\repeat unfold 6 c4
\time 6/2
\repeat unfold 6 c2
\bar"|."
}
%%%%%%%%
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user