2012/11/27 Nick Payne <[email protected]>:
> On 27/11/12 11:52, David Kastrup wrote:
>>
>> #(define (text-spanner-start-stop mus)
>> (let ((elts (extract-typed-music mus 'rhythmic-event)))
>> (for-each
>> (lambda (sel)
>> (let ((m (sel elts)))
>> (set! (ly:music-property m 'articulations)
>> (cons (make-music 'TextSpanEvent
>> 'span-direction (sel '(-1 1)))
>> (ly:music-property m 'articulations)))))
>> (list last first)))
>> mus)
>
>
> Thanks. Substituting that works well except when \repeat unfold is used
> inside the braces holding the music for the barre, when the console contains
>
> warning: cannot find start of text spanner
> warning: unterminated text spanner.
>
> and the output is not what is desired.
>
> \version "2.16.0"
>
>
> #(define (text-spanner-start-stop mus)
> (let ((elts (extract-typed-music mus 'rhythmic-event)))
> (for-each
> (lambda (sel)
> (let ((m (sel elts)))
> (set! (ly:music-property m 'articulations)
> (cons (make-music 'TextSpanEvent
> 'span-direction (sel '(-1 1)))
> (ly:music-property m 'articulations)))))
> (list last first)))
> mus)
>
> barre =
> #(define-music-function (parser location strg music)(string? ly:music?)
> (let ((arg (string-append "B " strg)))
> #{
> \override TextSpanner #'(bound-details left text) = $arg
> #(text-spanner-start-stop music)
> #}))
>
> \relative c {
> \clef "treble_8"
> \barre V { \repeat unfold 24 { c4 } }
> }
>
> _______________________________________________
> lilypond-user mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
Although I can confirm your observation, I asked myself: How would I
use a TextSpanner to span a repeat-unfold-expression with pure
LilyPond-syntax?
I couldn't find any reasonable method.
The following doesn't work (ofcourse not):
\relative c {
\clef "treble_8"
\override TextSpanner #'(bound-details left text) = #"B V"
\startTextSpan
\repeat unfold 24 { c4 } \stopTextSpan
}
How to do?
-Harm
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user