lilypond-user
[Top][All Lists]
Advanced

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

Re: Text Spanner repeated after a break


From: Jean Abou Samra
Subject: Re: Text Spanner repeated after a break
Date: Mon, 13 Dec 2021 08:37:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

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




reply via email to

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