[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Center text over a tie?

From: Gilles THIBAULT
Subject: Re: Center text over a tie?
Date: Wed, 10 Jun 2009 23:31:41 +0200

nineroll = \drummode { sn4:32^~ sn }
But to help beginning drummers (like me), the original sheet music
puts a small "9" just above the center of the tie

Try that.

#(define ((myCallBack  number) grob)
(grob-interpret-markup grob
 (if (= (ly:grob-property grob 'direction) 1)
       (markup #:translate '(2 . 3) #:center-column (
           (#:fontsize 4 (number->string number))
           (#:stencil (ly:tie::print grob))))
       (markup #:translate '(2 . 3) #:center-column (
           (#:stencil (ly:tie::print grob))
           (#:fontsize 4 (number->string number)))))))

nineroll = \drummode {
\override  DrumVoice.Tie #'stencil = #(myCallBack 9)
sn4:32^~ sn
\new DrumVoice \nineroll

The drawback is that my knowledge is too low to find the right value for #:translate '(2 . 3) automatically.
(i didn't find any property of grob Tie that can help for that).
So this snippet has to be improved.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]