> On Oct 19, 2015, at 1:56 AM, David Kastrup wrote:
>
> I think your main problem is that you are using \applyContext here at
> Voice level where it does not really do anything worthwhile.
Ah, I see.
> Try \context Staff \applyContext …
That did the trick and now it works,
> On Oct 19, 2015, at 10:59 AM, David Kastrup wrote:
>
> Paul Morris writes:
>>
>> That did the trick and now it works, thanks!
>>
>> \version “2.19.22”
>>
>> myfunc =
>> #(define-music-function () ()
>> #{
>> \context Staff
>> \applyContext
>>
Paul Morris writes:
>> On Oct 19, 2015, at 1:56 AM, David Kastrup wrote:
>>
>> I think your main problem is that you are using \applyContext here at
>> Voice level where it does not really do anything worthwhile.
>
> Ah, I see.
>
>> Try \context Staff
Paul Morris writes:
>> On Oct 19, 2015, at 10:59 AM, David Kastrup wrote:
>>
>> Paul Morris writes:
>>>
>>> That did the trick and now it works, thanks!
>>>
>>> \version “2.19.22”
>>>
>>> myfunc =
>>> #(define-music-function () ()
I found another way to do what I was trying to do. (I used \applyContext in a
music function to access and then modify a custom staff context property, and
then used a custom StaffSymbol engraver to access that context property and
change the grob properties of any new StaffSymbol grob
Paul Morris writes:
> % These work as expected
> {
> c'
> \stopStaff
> \startStaff
> \override Staff.StaffSymbol.color = #red
> c'
> \override Staff.StaffSymbol.color = #green
> \stopStaff
> \startStaff
> c’
> }
>
> {
> \applyContext
> #(lambda
Greetings lilyponders,
I’m trying to figure out how to use \applyContext to modify StaffSymbol grob
properties. The examples here
http://www.lilypond.org/doc/v2.19/Documentation/extending/context-evaluation
are very helpful, but I haven’t been able to get things working with
StaffSymbol