lilypond-user
[Top][All Lists]
Advanced

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

Re: Shift vertically a text centered on a hairpin


From: Jean Abou Samra
Subject: Re: Shift vertically a text centered on a hairpin
Date: Sun, 12 Dec 2021 14:56:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1



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



reply via email to

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