[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \applyContext, StaffSymbol, and \stopStaff \startStaff
From: |
David Kastrup |
Subject: |
Re: \applyContext, StaffSymbol, and \stopStaff \startStaff |
Date: |
Mon, 19 Oct 2015 16:59:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Paul Morris <address@hidden> writes:
>> On Oct 19, 2015, at 1:56 AM, David Kastrup <address@hidden> 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, thanks!
>
> \version “2.19.22”
>
> myfunc =
> #(define-music-function () ()
> #{
> \context Staff
> \applyContext
> #(lambda (context)
> ;; access context properties and pick a property setting based on
> them...
> (ly:context-pushpop-property context 'StaffSymbol 'color green))
> \stopStaff
> \startStaff
> #})
Frankly, anything wrong with
\temporary \override Staff.StaffSymbol.color = #green
here?
Assuming you want a temporary override (which is what
ly:context-pushpop-property does) in order to be able to revert to the
previous setting afterwards.
--
David Kastrup
- \applyContext, StaffSymbol, and \stopStaff \startStaff, Paul Morris, 2015/10/17
- Re: \applyContext, StaffSymbol, and \stopStaff \startStaff, Paul Morris, 2015/10/18
- Re: \applyContext, StaffSymbol, and \stopStaff \startStaff, David Kastrup, 2015/10/19
- Re: \applyContext, StaffSymbol, and \stopStaff \startStaff, Paul Morris, 2015/10/19
- Re: \applyContext, StaffSymbol, and \stopStaff \startStaff,
David Kastrup <=
- Re: \applyContext, StaffSymbol, and \stopStaff \startStaff, Paul Morris, 2015/10/19
- Re: \applyContext, StaffSymbol, and \stopStaff \startStaff, David Kastrup, 2015/10/19