Hi Aberforth,
Please check:
http://lilypond.1069038.n5.nabble.com/Text-spanner-with-middle-text-td233523.html
HTH, cheers,
Pierre

Le mar. 14 juil. 2020 à 11:04, Aberforth D - Instrumentals <
aberfor...@gmail.com> a écrit :

> Hello,
>
> Further to my yesterday's question I have figured out how to remove the
> repeated words, so that's 1 of 2 problems solved. I would still be very
> happy if somebody could show me how to get the dashes lined up correctly
> between words because I have to do that now manually in InkScape. Below is
> the amended script of my latest attempt.
>
> Thanks,
> Aberforth D
>
> \version "2.20.0"
> \language "english"
>
> spanText =
>   \override TextSpanner.bound-details.left.text = \etc
>
> RH = \repeat unfold 19 { \relative c' { g8[ c e g c g e c] | } }
>
> LH = \transpose c c, { \clef F \RH }
>
> dyn = {
>   \override TextSpanner #'(bound-details left-broken text) = ##f
>   s1\pp
>   \spanText "cresc."
>   s4.\startTextSpan s8 s2
>   s1
>   \spanText "poi"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "a"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "poco"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "a"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "poco"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "sino"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "al"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   s2.. s8\stopTextSpan
>   s1\ff
> }
>
> \score { <<
>   \new PianoStaff <<
>     \new Staff <<
>       \new Voice \RH
>     >>
>   \new Dynamics \dyn
>     \new Staff <<
>       \new Voice \LH
>     >>
>   >>
> >> }
>
>
>
> ---------- Forwarded message ---------
> From: Aberforth D - Instrumentals <aberfor...@gmail.com>
> Date: Mon, 13 Jul 2020 at 11:55
> Subject: Long dynamic spanners
> To: lilypond-user <lilypond-user@gnu.org>
>
>
> Hello,
>
> I'm having problems inserting a long dynamic spanner. It spans a total of
> about 16 bars starting with pp and ending with ff. In between I need dashes
> with regular spaced words: "cresc. poi a poco a poco sino al".
>
> I know how to do this with only 2 words where the first word goes into the
> TextSpanner.bound-details.lef.text and the other goes into the .right.text
> property. But in this case I can't figure out how to do it. Below is my
> best attempt so far but I'm pretty sure I'm doing it the wrong way.
>
> There are 2 problems with my approach:
> 1) The words are repeated after a line break;
> 2) The dashes don't always vertically line up with the next word.
>
> Can somebody point me to a better way to get this done?
>
> Many thanks in advance,
> Aberforth D
>
> %%%%
> \version "2.20.0"
> \language "english"
>
> spanText =
>   \override TextSpanner.bound-details.left.text = \etc
>
> RH = \repeat unfold 19 { \relative c' { g8[ c e g c g e c] | } }
>
> LH = \transpose c c,, { \clef F \RH }
>
> dyn = {
>   s1\pp
>   \spanText "cresc."
>   s4.\startTextSpan s8 s2
>   s1
>   \spanText "poi"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "a"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "poco"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "a"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "poco"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "sino"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   \spanText "al"
>   s4. s8\stopTextSpan s2\startTextSpan
>   s1
>   s2.. s8\stopTextSpan
>   s1\ff
> }
>
> \score { <<
>   \new PianoStaff <<
>     \new Staff <<
>       \new Voice \RH
>     >>
>     \new Dynamics \dyn
>     \new Staff <<
>       \new Voice \LH
>     >>
>   >>
> >> }
> %%%%
>
>

Reply via email to