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 } }
}
<<attachment: test.png>>
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
