lilypond-devel
[Top][All Lists]
Advanced

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

Re: stepping down as project manager


From: Reinhold Kainhofer
Subject: Re: stepping down as project manager
Date: Sun, 14 Oct 2012 01:46:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1

On 2012-10-14 01:07, Joseph Rushton Wakeling wrote:
On 10/13/2012 11:44 PM, David Kastrup wrote:
\once creates a one-time-step temporary change, \temporary an
unterminated temporary change which can be terminated element-wise with
\revert or, again using a converter, en bloc from the original overrides
with \undo.

Forgive me for coming into this without the background, but what's the
difference between \temporary and the existing \override?

\temporary\override would work the way you probably expect \override to work now: It sets the grob property to a new value and keeps the old value stored so that after \revert the property takes the old value it had before the \temporary\override.

The actual problem is that \override currently CLEARS (i.e. reverts) the current value before setting the new one, so that the old value is not stored anywhere any more, and a \revert thus reverts to the default value.

As an example, let's look at the following code. What color would you expect the final "b" to have? red? (because the \revert clears the previous override to blue, right?)

\version "2.16.0"

\relative c' {
  c4
  \override NoteHead #'color = #red
  f
  \override NoteHead #'color = #blue
  g
  \revert NoteHead #'color
  b
}

In reality, the \revert does not revert the override, but completely clear the value to the black default. Currently, there is no way to temporarily change a property and then change it back to its previous value (except for \once\override, which only works for one timestep).

In fact, \override and \revert are currently misnamed, they work more like \set and \unset.

Cheers,
Reinhold

--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://www.kainhofer.com
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com



reply via email to

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