Next: Formatting cue notes, Previous: Hiding staves, Up: Orchestral music
With quotations, fragments of other parts can be inserted into a part
directly. Before a part can be quoted, it must be marked especially as
quotable. This is done with the \addquote
command.
\addquote name music
Here, name is an identifying string. The music is any kind
of music. Here is an example of \addquote
\addquote clarinet \relative c' { f4 fis g gis }
This command must be entered at toplevel, i.e., outside any music blocks.
After calling \addquote
, the quotation may then be done with
\quoteDuring
or \cueDuring
,
\quoteDuring #name music
During a part, a piece of music can be quoted with the \quoteDuring
command.
\quoteDuring #"clarinet" { s2. }
This would cite three quarter notes (the duration of s2.
) of
the previously added clarinet
voice.
More precisely, it takes the current time-step of the part being
printed, and extracts the notes at the corresponding point of the
\addquote
d voice. Therefore, the argument to \addquote
should be the entire part of the voice to be quoted, including any
rests at the beginning.
Quotations take into account the transposition of both source and target
instruments, if they are specified using the \transposition
command.
\addquote clarinet \relative c' { \transposition bes f4 fis g gis } { e'8 f'8 \quoteDuring #"clarinet" { s2 } }
The type of events that are present in cue notes can be trimmed with
the quotedEventTypes
property. The default value is
(note-event rest-event)
, which means that only notes and
rests of the cued voice end up in the \quoteDuring
.
Setting
\set Staff.quotedEventTypes = #'(note-event articulation-event dynamic-event)
will quote notes (but no rests), together with scripts and dynamics.
Only the contents of the first Voice occurring in an
\addquote
command will be considered for quotation, so
music can not contain \new
and \context Voice
statements that would switch to a different Voice.
Quoting grace notes is broken and can even cause LilyPond to crash.
Quoting nested triplets may result in poor notation.
In this manual: Instrument transpositions.
Examples: input/regression/quote.ly input/regression/quote-transposition.ly
Program reference: QuoteMusic.
Next: Formatting cue notes, Previous: Hiding staves, Up: Orchestral music
This page is for LilyPond-2.10.33 (stable-branch).