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: Paolo Prete
Subject: Re: Shift vertically a text centered on a hairpin
Date: Sun, 12 Dec 2021 15:05:12 +0100



On Sun, Dec 12, 2021 at 2:56 PM Jean Abou Samra <jean@abou-samra.fr> wrote:


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.


Do you mean ly:stencil-combine-at-edge replaced with ly:stencil-stack ? I tried it, but the result is the same (with \lower #offset inside the markup)

thanks,

Paolo

 

reply via email to

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