Jan Warchoł <lemniskata.bernoulli...@gmail.com> writes:

> 2011/8/5 David Kastrup <d...@gnu.org>:
>
> I'm not sure if i understand it (is "a" a property or a value?),

Property.  I am not yet concerned about values...  Anyway, I am not sure
I understand what I write either.

> but it seems to me that \override should indeed not begin with a
> revert.

My current comprehension is that this is likely the intent of the code.
Doesn't work yet, but I'll try figuring out why, and then likely what
change caused this for what reason.

> However, we may need additional command like
> \revertTillDefaultIsReached or sth like that.
>
> 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
>     c4 c
>     \revert Stem #'color
>     c4
> }
>
> black red blue black

Yup.

> \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.

-- 
David Kastrup

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

Reply via email to