lilypond-user
[Top][All Lists]
Advanced

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

Text Spanner repeated after a break


From: Molly Preston
Subject: Text Spanner repeated after a break
Date: Sun, 12 Dec 2021 22:03:00 -0500

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.

-Molly



reply via email to

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