lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overrides and nesting: intentional?


From: Jan Warchoł
Subject: Re: Overrides and nesting: intentional?
Date: Sun, 7 Aug 2011 11:06:32 +0200

2011/8/6 David Kastrup <address@hidden>:
>> Going back to your colorful examples, here's what effects i'd expect:
>>
>> \relative c' {
>>     c4
>>     \once\override Stem #'color = #red
>>     \override Stem #'color = #blue
>>     c4 c
>>     \revert Stem #'color
>>     c4
>> }
>>
>> black blue blue black
>
> That's a reasonable expectation, but it requires that \once\override
> keeps track of just what it is supposed to revert at the end of the time
> step.  Popping the top of the stack would not work, leaving us with
> black, blue, red, black.  One possibility would be to store the
> \once\override info in a separate location (or with a special mark)
> where it does not mix with the \override info.
>
>> \relative c' {
>>     c4
>>     \override Stem #'color = #blue
>>     \once\override Stem #'color = #red
>>     \revert Stem #'color
>>     c4 c
>>     c4
>> }
>>
>> black black black black.
>
> Actually, I think I'd prefer black, red, black, black.  I feel a revert
> should not cancel more than one \override, so something should happen at
> the second time step.  The pure stack approach would leave us with
> black, blue, black, black, arguably weird.  But pretty easy to explain.
>
> If we aim for black, red, black, black, this would more or less imply
> (if things should obey simple rules) that you can _never_ use \revert to
> cancel \once\override.  However, the syntax already permits
> \once\revert, so maintaining what amounts to a separate stack for \once
> could work reasonably well and be nice enough to document.

I'm not sure if i prefer black, red, black, black over 4 x black, but
it's not that important.  Overall, your suggestion seems good to me.

cheers,
Janek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]