|
From: | Stefan Thomas |
Subject: | Re: enlarge vertical distance in time signature |
Date: | Sun, 28 Oct 2012 22:42:19 +0100 |
2012/10/28 Stefan Thomas <address@hidden>:
> _______________________________________________> Dear community,
> I would like to know how to enlarge the vertical distance between enumerator
> and denominator of a time signature.
> I hope, this will be possible.
>
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
Hi Stefan,
try:
\version "2.16.0"
spreadTimeSignature =
#(define-music-function (parser location baselineSkip strg
music)(number? string? ly:music?)
(let* ((num (car (string-split strg #\/)))
(denom (cadr (string-split strg #\/))))
#{
\override Staff.TimeSignature #'stencil =
#(lambda (grob)
(grob-interpret-markup grob
#{
\markup %\fontsize #5
\vcenter
\override #`(baseline-skip . ,baselineSkip)
\column {
\number $num
\number $denom
}
#}))
$(make-music
'TimeSignatureMusic
'beat-structure '()
'denominator (string->number denom)
'numerator (string->number num))
$music
#}))
% ---------------- test
\relative c' {
\spreadTimeSignature #8 "2/4"
c8 c c c
\spreadTimeSignature #8 "3/4"
c16 c c c c c c c c4
}
Usage: \spreadTimeSignature #<baseline-skip> "<time>"
Setting \time is integrated in the function.
There might arise a problem because of
'beat-structure '()
If so, delete
$(make-music
'TimeSignatureMusic
'beat-structure '()
'denominator (string->number denom)
'numerator (string->number num))
$music
and use default \time x/y after the function-call.
HTH,
Harm
[Prev in Thread] | Current Thread | [Next in Thread] |