2012/10/28 Thomas Morley <thomasmorle...@googlemail.com>: > 2012/10/28 Stefan Thomas <kontrapunktste...@gmail.com>: >> Dear Thomas, >> thanks for Your code! >> I think the code is not the best for my special aim. >> I just want to have a different time-signature style for a custom percussion >> staff with 6 instead of five lines. >> So, I just would like to change this special thing only in this staff. I >> would like to do this in the "with" block, if possible. >> The timesignatures itself are defined in a global variable. >> >> 2012/10/28 Thomas Morley <thomasmorle...@googlemail.com> >>> >>> 2012/10/28 Stefan Thomas <kontrapunktste...@gmail.com>: >>> > 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 >>> > lilypond-user@gnu.org >>> > 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 >> >> > > How about: > > \version "2.16.0" > > widerTimeSignature = > #(define-music-function (parser location baseline-skip music)(number? > ly:music?) > (let* ((num (number->string (ly:music-property music 'numerator))) > (denom (number->string (ly:music-property music 'denominator)))) > #{ > \override Staff.TimeSignature #'stencil = > #(lambda (grob) > (grob-interpret-markup grob > #{ > \markup > \vcenter > \override #`(baseline-skip . ,baseline-skip) > \column { > \number $num > \number $denom > } > #})) > $music > #})) > > % ---------------- test > > global = { > \widerTimeSignature #3 > \time 15/16 > } > > \new DrumStaff \with { > \override StaffSymbol #'line-count = #6 > % \widerTimeSignature #3 > % \time 15/16 > } > > { \global \drummode { bd4 sn bd toml8 toml bd } } > > With the possibility to place \widerTimeSignature in \global or in \with. > Using the latter there's need to write the TimeSignature after > \widerTimeSignature. > > > Cheers, > Harm
Hi again, I forgot one thing: please change \override Staff.TimeSignature #'stencil = ... into \override DrumStaff.TimeSignature #'stencil = ... This will limit the override to the DrumStaff. Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user