Previous: Quoting other voices, Up: Writing parts
The previous section explains how to create quotations. The
\cueDuring
command is a more specialized form of
\quoteDuring
, being particularly useful for inserting cue
notes into a part. The syntax is as follows:
\cueDuring #partname #voice music
This command copies the corresponding measures from partname
into a CueVoice
context. The CueVoice
is created
implicitly, and occurs simultaneously with music, which
creates a polyphonic situation. The voice argument
determines whether the cue notes should be notated as a first or
second voice; UP
corresponds to the first voice, and
DOWN
corresponds to the second.
oboe = \relative c'' { r2 r8 d16 f e g f a g8 g16 g g2. } \addQuote "oboe" { \oboe } \new Voice \relative c'' { \cueDuring #"oboe" #UP { R1 } g2 c, }
In the above example, the Voice
context had to be
explicitly declared, or else the entire music expression would
belong to the CueVoice
context.
The name of the cued instrument can be printed by setting the
instrumentCueName
property in the CueVoice
context.
oboe = \relative c''' { g4 r8 e16 f e4 d } \addQuote "oboe" { \oboe } \new Staff \relative c'' << \new CueVoice \with { instrumentCueName = "ob." } \new Voice { \cueDuring #"oboe" #UP { R1 } g4. b8 d2 } >>
In addition to printing the name of the cued instrument, when cue
notes end, the name of the original instrument should be printed,
and any other changes introduced by the cued part should be
undone. This can be accomplished by using
\addInstrumentDefinition
and \instrumentSwitch
. For
an example and explanation, see Instrument names.
The \killCues
command removes cue notes from a music
expression. This can be useful if cue notes need to be removed
from a part but may be restored at a later time.
flute = \relative c''' { r2 cis2 r2 dis2 } \addQuote "flute" { \flute } \new Voice \relative c'' { \killCues { \cueDuring #"flute" #UP { R1 } g4. b8 d2 } }
The \transposedCueDuring
command is useful for adding
instrumental cues from a completely different register. The
syntax is similar to \cueDuring
, but it requires one extra
argument to specify the transposition of the cued instrument. For
more information about transposition, see
Instrument transpositions.
piccolo = \relative c''' { \clef "treble^8" R1 c8 c c e g2 a4 g g2 } \addQuote "piccolo" { \piccolo } cbassoon = \relative c, { \clef "bass_8" c4 r g r \transposedCueDuring #"piccolo" #UP c,, { R1 } c4 r g r } << \new Staff = "piccolo" \piccolo \new Staff = "cbassoon" \cbassoon >>
It is possible to tag cued parts with unique names in order to process them in different ways. For details about this procedure, see Using tags.
Notation Reference: Instrument transpositions, Instrument names, Using tags.
Snippets: Staff notation.
Internals Reference: CueVoice, Voice.
Collisions can occur with rests, when using \cueDuring
,
between Voice
and CueVoice
contexts.