On Fri, Sep 16, 2016 at 3:50 PM, Thomas Morley-2 [via Lilypond] <
ml-node+s1069038n194649...@n5.nabble.com> wrote:
>
> Your function doesn't integrate \start/stopTextSpan into the
> 'articulations of the music-arg, which is needed.
> A most boiled down example would be:
>
> mus = c'1
> { \mus \tenuto }
>
>
> Would be probably nice to have it work, but I seem to remember there
> are some problems, forgot what exactly though.
>
> Your function could be done at the lines of:
>
> myStartTextSpan = #(define-music-function (mus) (ly:music?)
> (ly:music-set-property! mus 'articulations
> (cons #{ \startTextSpan #}
> (ly:music-property mus 'articulations)))
> #{
> \override TextSpanner.color = #red
> #mus
> #})
>
> \relative c' {
> \myStartTextSpan b'1
> c \stopTextSpan
> }
>
Brilliant, Harm! I figured I just wasn't understanding the mechanism
correctly. Now a similar function is easily created to do the custom
termination:
myStopTextSpan = #(define-music-function (mus) (ly:music?)
(ly:music-set-property! mus 'articulations
(cons #{ \stopTextSpan #}
(ly:music-property mus 'articulations)))
#{
#mus
<>^\markup \italic "a tempo"
#})
to get
\relative c' {
\myStartTextSpan b'1
\myStopTextSpan c1
d1
}
Thanks for the explanation and a usable solution!
Best,
Abraham
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Using-startTextSpan-and-stopTextSpan-in-separate-music-functions-tp194647p194650.html
Sent from the User mailing list archive at Nabble.com.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user