Following example shows a problem I have in a score with multiple voices where I want the TextSpanner for a barre to be two bars long. Because the actual notes in the two bars are split between the voices, I have the \stopTextSpan on the silent eighth note at the end of bar two in voiceOne, but it is terminating as if I had it on the B flat at the start of the bar. In fact there is no difference in the output between having the \stopTextSpan on the B flat or s8. Why is this?

%================================================================
\version "2.13.7"

barre = #(define-music-function (parser location fretnum dirn shorten adjBreak adjEnd)
   (string? number? pair? number? number?)
#{
   \once \override TextSpanner #'bound-details #'left #'text =
   \markup { \small { \concat { "C" "." $fretnum " " } } }
   \once \override TextSpanner #'style = #'line
   \once \override TextSpanner #'font-shape = #'upright
   \once \override TextSpanner #'direction = #$dirn
\once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #(cons 0 (/ $dirn -1)) } \once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER \once \override TextSpanner #'bound-details #'left #'padding = #(car $shorten) \once \override TextSpanner #'bound-details #'right #'padding = #(cdr $shorten) \once \override TextSpanner #'bound-details #'right-broken #'padding = #$adjEnd \once \override TextSpanner #'bound-details #'left-broken #'X = #$adjBreak
   \once \override TextSpanner #'bound-details #'left-broken #'text = ##f
   \once \override TextSpanner #'bound-details #'right-broken #'text = ##f
#})

\relative c' {
   \time 5/8
   \new Staff
   <<
   \new Voice = "first"
{ \voiceOne \barre "6" #UP #'(-0.5 . -1) #5 #1 bes8\startTextSpan f' aes d_( e) |
       bes'4 s4 s8\stopTextSpan |
   }
   \new Voice= "second"
   { \voiceTwo
       s2 s8 |
       bes f e aes, e' |
   }
   >>
}
%================================================================


Nick

<<inline: test.preview.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to