1.5.1 Single voice

This section discusses simultaneous notes inside the same voice.


Chorded notes

A chord is formed by enclosing a set of pitches between < and >. A chord may be followed by a duration just like simple notes.

\relative {
  <a' c e>1 <a c e>2 <f a c e>4 <a c>8. <g c e>16
}

[image of music]

Chords may also be followed by articulations, again just like simple notes.

\relative {
  <a' c e>1\fermata <a c e>2-> <f a c e>4\prall <a c>8.^! <g c e>16-.
}

[image of music]

The notes within the chord themselves can also be followed by articulation and ornamentation.

\relative {
  <a' c\prall e>1 <a-> c-^ e>2 <f-. a c-. e-.>4
  <a-+ c-->8. <g\fermata c e\turn>16
}

[image of music]

However some notation, such as dynamics and hairpins must be attached to the chord rather than to notes within the chord, otherwise they will not print. Other notation like fingerings and slurs will get placed markedly different when attached to notes within a chord rather than to whole chords or single notes.

\relative {
  <a'\f c( e>1 <a c) e>\f <a\< c e>( <a\! c e>)
  <a c e>\< <a c e> <a c e>\!
}

[image of music]

A chord acts merely as a container for its notes, its articulations and other attached elements. Consequently, a chord without notes inside does not actually have a duration. Any attached articulations will happen at the same musical time as the next following note or chord and be combined with them (for more complex possibilities of combining such elements, see Simultaneous expressions):

\relative {
  \grace { g'8( a b }
  <> ) \p \< -. -\markup \italic "sempre staccato"
  \repeat unfold 4 { c4 e }  c1\f
}

[image of music]

Relative mode can be used for pitches in chords. The first note of each chord is always relative to the first note of the chord that came before it, or in the case where no preceding chord exists, the pitch of the last note that came before the chord. All remaining notes in the chord are relative to the note that came before it within the same chord.

\relative {
  <a' c e>1 <f a c> <a c e> <f' a c> <b, e b,>
}

[image of music]

For more information about chords, see Chord notation.

See also

Music Glossary: chord.

Learning Manual: Combining notes into chords.

Notation Reference: Chord notation, Articulations and ornamentations, Relative octave entry, Multiple voices.

Snippets: Simultaneous notes.

Known issues and warnings

Chords containing more than two pitches within a staff space, such as ‘<e f! fis!>’, create overlapping note heads. Depending on the situation, better representations might involve


Chord repetition

In order to save typing, a shortcut can be used to repeat the preceding chord. The chord repetition symbol is q:

\relative {
  <a' c e>1 q <f a c>2 q
}

[image of music]

As with regular chords, the chord repetition symbol can be used with durations, articulations, markups, slurs, beams, etc., as only the pitches of the previous chord are duplicated.

\relative {
  <a' c e>1\p^"text" q2\<( q8)[-! q8.]\! q16-1-2-3 q8\prall
}

[image of music]

The chord repetition symbol always remembers the last instance of a chord so it is possible to repeat the most recent chord even if other non-chorded notes or rests have been added since.

\relative {
  <a' c e>1 c'4 q2 r8 q8 |
  q2 c, |
}

[image of music]

However, the chord repetition symbol does not retain any dynamics, articulation or ornamentation within, or attached to, the previous chord.

\relative {
  <a'-. c\prall e>1\sfz c'4 q2 r8 q8 |
  q2 c, |
}

[image of music]

To have some of them retained, the \chordRepeats function can be be called explicitly with an extra argument specifying a list of event types to keep unless events of that type are already present on the q chord itself.

\relative {
  \chordRepeats #'(articulation-event)
  { <a'-. c\prall e>1\sfz c'4 q2 r8 q8-. } |
  q2 c, |
}

[image of music]

Here using \chordRepeats inside of a \relative construction produces unexpected results: once chord events have been expanded, they are indistinguishable from having been entered as regular chords, making \relative assign an octave based on their current context.

Since nested instances of \relative don’t affect one another, another \relative inside of \chordRepeats can be used for establishing the octave relations before expanding the repeat chords. In that case, the whole content of the inner \relative does not affect the outer one; hence the different octave entry of the final note in this example.

\relative {
  \chordRepeats #'(articulation-event)
  \relative
  { <a'-. c\prall e>1\sfz c'4 q2 r8 q8-. } |
  q2 c'' |
}

[image of music]

Interactions with \relative occur only with explicit calls of \chordRepeats: the implicit expansion at the start of typesetting is done at a time where all instances of \relative have already been processed.

See also

Notation Reference: Chord notation, Articulations and ornamentations.

Installed Files: ‘ly/chord-repetition-init.ly’.


Simultaneous expressions

One or more music expressions enclosed in double angle brackets are taken to be simultaneous. If the first expression begins with a single note or if the whole simultaneous expression appears explicitly within a single voice, the whole expression is placed on a single staff; otherwise the elements of the simultaneous expression are placed on separate staves.

The following examples show simultaneous expressions on one staff:

\new Voice {  % explicit single voice
  << \relative { a'4 b g2 }
     \relative { d'4 g c,2 } >>
}

[image of music]

\relative {
  % single first note
  a' << \relative { a'4 b g }
       \relative { d'4 g c, } >>
}

[image of music]

This can be useful if the simultaneous sections have identical rhythms, but attempts to attach notes with different durations to the same stem will cause errors. Notes, articulations, and property changes in a singleVoice’ are collected and engraved in musical order:

\relative {
  <a' c>4-.  <>-. << c a >>  << { c-. <c a> } { a s-. } >>
}

[image of music]

Multiple stems or beams or different note durations or properties at the same musical time require the use of multiple voices.

The following example shows how simultaneous expressions can generate multiple staves implicitly:

% no single first note
<< \relative { a'4 b g2 }
   \relative { d'4 g2 c,4 } >>

[image of music]

Here different rhythms cause no problems because they are interpreted in different voices.

Known issues and warnings

If notes from two or more voices, with no shifts specified, have stems in the same direction, the message

warning: This voice needs a \voiceXx or \shiftXx setting

will appear during compilation. This message can be suppressed by:

\override NoteColumn.ignore-collision = ##t

However, this not only suppresses the warning but will prevent any collision resolution whatsover and may have other unintended effects (also see Known Issues in Collision resolution).


Clusters

A cluster indicates a continuous range of pitches to be played. They can be denoted as the envelope of a set of notes. They are entered by applying the function \makeClusters to a sequence of chords, e.g.,

\relative \makeClusters { <g' b>2 <c g'> }

[image of music]

Ordinary notes and clusters can be put together in the same staff, even simultaneously. In such a case no attempt is made to automatically avoid collisions between ordinary notes and clusters.

See also

Music Glossary: cluster.

Snippets: Simultaneous notes.

Internals Reference: ClusterSpanner, ClusterSpannerBeacon, Cluster_spanner_engraver.

Known issues and warnings

Clusters look good only if they span at least two chords; otherwise they appear too narrow.

Clusters do not have a stem and cannot indicate durations by themselves, but the length of the printed cluster is determined by the durations of the defining chords. Separate clusters need a separating rest between them.

Clusters do not produce MIDI output.


LilyPond — Notation Reference v2.23.82 (development-branch).