tisimst <tisimst.lilyp...@gmail.com> writes:

> 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
>>   #})

That assumes that $mus is an actual expression capable of accepting
articulations (which { c } wouldn't).

I'd rather write

   #{
       <>-\tweak color #red \startTextSpan
       $mus
    #}

and then that begs the question why to use a music function in the first
place rather than just writing

myStartTextSpan = <>-\tweak color #red \startTextSpan

-- 
David Kastrup

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

Reply via email to