Am Mi., 17. Dez. 2025 um 22:46 Uhr schrieb Werner LEMBERG <[email protected]>:
>
>
> Hello Tina,
>
>
> thanks for the reply.
>
> >> The hairpin, in spite of being on the opposite side of the staff,
> >> is aligned to the `\pp` sign, i.e., it starts horizontally after
> >> `\pp`. What must I do to break this alignment?
> >> `\breakDynamicSpan` doesn't seem to work, and I would like to avoid
> >> the `shorten-pair` property...
> >
> > as far as I can see there is no way to exclude a dynamic from the line
> > spanner. [...]
>
> Yeah, I suspected the same, and I also came to the same conclusion how
> to solve it by using another Voice.
>
> I've added a snippet to demonstrated the solutions.
>
>
> https://wiki.lilypond.community/wiki/Breaking_horizontal_alignment_of_dynamics_and_textscripts
>
>
> Werner
>
Well, below seems to work:
\version "2.25.29"
tst =
\once \override Hairpin.before-line-breaking =
#(lambda (grob)
(let ((dyn-txt (ly:spanner-bound grob LEFT)))
(ly:spanner-set-bound! grob LEFT (ly:grob-parent dyn-txt X))))
{
\tst
f'_\pp ^\> f' f' f'\! |
}
Not tested further and no security-net so far ...
Cheers,
Harm