| [ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
| [ < Chorded notes ] | [ Up : Single voice ] | [ Simultaneous expressions > ] |
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 }
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 }
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, | }
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, | }
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, | }
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'' | }
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.
| [ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
| [ < Chorded notes ] | [ Up : Single voice ] | [ Simultaneous expressions > ] |
![[image of music]](../46/lily-f91dd60f.png)
![[image of music]](../ee/lily-d1649c43.png)
![[image of music]](../26/lily-6bf16530.png)
![[image of music]](../3f/lily-252dadd2.png)
![[image of music]](../e3/lily-c62681ce.png)
![[image of music]](../15/lily-41ed6399.png)