Hi Jean! Thank you so much! That worked. I will have to keep this in mind. It's interesting that the OttavaSpanner doesn't have something similar. Why is that?
-Molly On Mon, Dec 13, 2021 at 2:37 AM Jean Abou Samra <[email protected]> wrote: > Le 13/12/2021 à 04:03, Molly Preston a écrit : > > Hi again. > > > > I have a similar problem to the 8va showing up after line breaks. I > > made a text spanner that's a rit.----- > > > > It shows up on the line after a break. I tried to modify the scheme > > code slightly like this: > > > > > > \version "2.22.1" > > \new Staff > > \absolute { > > #(define (text-callback grob) > > (let* ( > > ; have we been split? > > (orig (ly:grob-original grob)) > > ; if yes, get the split pieces (our siblings) > > (siblings (if (ly:grob? orig) > > (ly:spanner-broken-into orig) '() ))) > > (if (and (>= (length siblings) 2) > > (not (eq? (car siblings) grob))) > > (ly:grob-set-property! grob 'text #f) > > (ly:grob-set-property! grob 'stencil (ly:line-spanner::print > > grob))))) > > \override TextSpanner.after-line-breaking = #text-callback > > \time 6/8 > > \override TextSpanner.bound-details.left.text = \markup {\bold > > rit. } > > \override TextSpanner.after-line-breaking = ##f > > \override TextSpanner.font-shape = #'upright > > \override TextSpanner.to-barline = ##t > > \override TextSpanner.staff-padding = #6 > > dis''2. \> \startTextSpan | > > \break > > ais'2. \fermata \! | > > \tempo \markup { \concat {"Anxious" \hspace > > #0.75 %{\general-align #Y #DOWN%} > > \note-by-number #1 #0 #UP \hspace #1 > > \musicglyph "ties.lyric.short" \hspace #1 > > \note-by-number #2 #1 #UP > > " = " > > \hspace #0.5 > > ca. \hspace #0.5 "40" > > } > > } > > \time 7/8 > > \clef bass > > \set Timing.beatStructure = 4,3 > > \once \override DynamicText.Y-offset = # 3 > > <ees ees'>8\( \f \stopTextSpan <d d'> <des des' > <d d'> <fis fis' > > >\) -. <d d' >\( <fis fis' >\) -. > > } > > > > This didn't work though and I'm wondering if the stencil is wrong or > > something? Not sure how it works. > > > > For text spanners, there is a simpler interface. > details at the left are taken either from bound-details.left > or from the combination of bound-details.left-broken and > bound-details.left. In this case, just set the > property in left-broken accordingly. > > \override TextSpanner.bound-details.left.text = \markup {\bold rit. } > \override TextSpanner.bound-details.left-broken.text = "" > > > Best, > Jean > >
