| [ << Tweaking output ] | [Top][Contents][Index] | [ Templates >> ] |
[ < The \revert command ] | [ Up: Tweaking methods ] | [ The \tweak and \offset commands > ] |
The \once prefix
\override, \revert, \set, and \unset
commands may be prefixed with \once. This causes such a
command to be effective only during the current musical
moment before the property reverts back to its previous value (this can
be different from the default if another \override is still in
effect). Using the same example, we can change the color of a single
note like this:
\relative { c'4 d \override NoteHead.color = "red" e4 f | \once \override NoteHead.color = "green" g4 a \once \revert NoteHead.color b c | \revert NoteHead.color f2 c | }![]()
The \once prefix may also be used in front of many
predefined commands to limit their effect to one musical moment:
\relative { c'4( d) \once \slurDashed e4( f) | g4( a) \once \hideNotes b( c) | }![]()
| [ << Tweaking output ] | [Top][Contents][Index] | [ Templates >> ] |
[ < The \revert command ] | [ Up: Tweaking methods ] | [ The \tweak and \offset commands > ] |
![[image of music]](../8d/lily-11497db3.png)
![[image of music]](../0c/lily-ee40499e.png)