Le 12/12/2021 à 14:28, Paolo Prete a écrit :
Hello,
it would be good to have more control on the text centered on a hairpin.
For example: I can't shift the text vertically, and I think this is
useful because sometime the text is too near the hairpin.
I tried \lower #offset inside the markup but it doesn't work, how can
I fix this?
Thank you very much!
%%%%%
hairpinWithCenteredText =
#(define-music-function (text) (markup?)
#{
\once \override Voice.Hairpin.after-line-breaking =
#(lambda (grob)
(let* ((stencil (ly:hairpin::print grob))
(par-y (ly:grob-parent grob Y))
(dir (ly:grob-property par-y 'direction))
(new-stencil (ly:stencil-aligned-to
(ly:stencil-combine-at-edge
Try replacing this one with ly:stencil-stack.
Best,
Jean