| [ << Tweaking output ] | [Top][Contents][Index] | [ Templates >> ] |
[ < The \tweak and \offset commands ] | [ Up: Tweaking methods ] | [ The Internals Reference manual > ] |
The \single prefix
Suppose we wanted to emphasize particular note heads by coloring them red and increasing their size, and to make it easy suppose also we have defined a function to do this:
emphNoteHead = { \override NoteHead.color = "red" \override NoteHead.font-size = 2 } \relative { c''4 a \once \emphNoteHead f d | }![]()
The \once prefix works fine to emphasize single notes or
complete chords, but it cannot be used to emphasize a single note
within a chord. Earlier we have seen how \tweak can
be used to do this, see
The \tweak and \offset commands. But
\tweak cannot be used with a function; that’s where
\single comes in:
emphNoteHead = { \override NoteHead.color = "red" \override NoteHead.font-size = 2 } \relative { <c'' a \single \emphNoteHead f d>4 }![]()
In summary, \single converts overrides into tweaks so when
there are several objects at the same point in musical time (like
note heads in a chord), \single will only affect a single one,
the one generated by the immediately following music expression, in
contrast to \once which will affect all of those objects.
By using \single in this way any shorthand function
containing just overrides may be applied to individual notes in a
chord. However, \single does not convert \revert,
\set or \unset into tweaks.
See also
Learning Manual:
The \tweak and \offset commands,
Using variables for layout adjustments.
| [ << Tweaking output ] | [Top][Contents][Index] | [ Templates >> ] |
[ < The \tweak and \offset commands ] | [ Up: Tweaking methods ] | [ The Internals Reference manual > ] |
![[image of music]](../93/lily-d47947d2.png)
![[image of music]](../ac/lily-347d1b6a.png)