1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
12 @section Staff notation
14 @lilypondfile[quote]{staff-headword.ly}
16 This section explains how to influence the appearance of staves,
17 how to print scores with more than one staff, and how to add tempo
18 indications and cue notes to staves.
22 * Modifying single staves::
27 @node Displaying staves
28 @subsection Displaying staves
30 This section describes the different methods of creating and
34 * Instantiating new staves::
36 * Nested staff groups::
40 @node Instantiating new staves
41 @unnumberedsubsubsec Instantiating new staves
44 @cindex staff initiation
45 @cindex staff instantiation
49 @cindex staff, percussion
51 @cindex percussion staff
52 @cindex Gregorian transcription staff
53 @cindex rhythmic staff
60 @notation{Staves} (singular: @notation{staff}) are created with
61 the @code{\new} or @code{\context} commands. For details, see
62 @ref{Creating contexts}.
64 The basic staff context is @code{Staff}:
66 @lilypond[verbatim,quote,relative=2]
67 \new Staff { c4 d e f }
70 The @code{DrumStaff} context creates a five-line staff set up for
71 a typical drum set. Each instrument is shown with a different
72 symbol. The instruments are entered in drum mode following a
73 @code{\drummode} command, with each instrument specified by name.
74 For details, see @ref{Percussion staves}.
76 @lilypond[verbatim,quote]
78 \drummode { cymc hh ss tomh }
82 @code{RhythmicStaff} creates a single-line staff that only
83 displays the rhythmic values of the input. Real durations are
84 preserved. For details, see @ref{Showing melody rhythms}.
86 @lilypond[verbatim,quote,relative=2]
87 \new RhythmicStaff { c4 d e f }
90 @code{TabStaff} creates a tablature with six strings in standard
91 guitar tuning. For details, see @ref{Default tablatures}.
93 @lilypond[verbatim,quote,relative=2]
94 \new TabStaff { c4 d e f }
97 There are two staff contexts specific for the notation of ancient
98 music: @code{MensuralStaff} and @code{VaticanaStaff}. They are
99 described in @ref{Pre-defined contexts}.
101 The @code{GregorianTranscriptionStaff} context creates a staff to
102 notate modern Gregorian chant. It does not show bar lines.
104 @lilypond[verbatim,quote,relative=2]
105 \new GregorianTranscriptionStaff { c4 d e f e d }
108 New single staff contexts may be defined. For details, see
109 @ref{Defining new contexts}.
118 @ref{Creating contexts},
119 @ref{Percussion staves},
120 @ref{Showing melody rhythms},
121 @ref{Default tablatures},
122 @ref{Pre-defined contexts},
124 @ref{Gregorian chant contexts},
125 @ref{Mensural contexts},
126 @ref{Defining new contexts}.
129 @rlsr{Staff notation}.
133 @rinternals{DrumStaff},
134 @rinternals{GregorianTranscriptionStaff},
135 @rinternals{RhythmicStaff},
136 @rinternals{TabStaff},
137 @rinternals{MensuralStaff},
138 @rinternals{VaticanaStaff},
139 @rinternals{StaffSymbol}.
142 @node Grouping staves
143 @unnumberedsubsubsec Grouping staves
145 @cindex start of system
146 @cindex staff, multiple
147 @cindex staves, multiple
148 @cindex system start delimiters
149 @cindex bracket, vertical
150 @cindex brace, vertical
160 Various contexts exist to group single staves together in order to
161 form multi-stave systems. Each grouping context sets the style of
162 the system start delimiter and the behavior of bar lines.
164 If no context is specified, the default properties will be used:
165 the group is started with a vertical line, and the bar lines are
168 @lilypond[verbatim,quote,relative=2]
175 In the @code{StaffGroup} context, the group is started with a
176 bracket and bar lines are drawn through all the staves.
178 @lilypond[verbatim,quote,relative=2]
185 In a @code{ChoirStaff}, the group starts with a bracket, but bar
186 lines are not connected.
188 @lilypond[verbatim,quote,relative=2]
195 In a @code{GrandStaff}, the group begins with a brace, and bar
196 lines are connected between the staves.
198 @lilypond[verbatim,quote,relative=2]
205 The @code{PianoStaff} is identical to a @code{GrandStaff}, except
206 that it supports printing the instrument name directly. For
207 details, see @ref{Instrument names}.
209 @lilypond[verbatim,quote,relative=2]
211 \set PianoStaff.instrumentName = #"Piano"
217 Each staff group context sets the property
218 @code{systemStartDelimiter} to one of the following values:
219 @code{SystemStartBar}, @code{SystemStartBrace}, or
220 @code{SystemStartBracket}. A fourth delimiter,
221 @code{SystemStartSquare}, is also available, but it must be
222 explicitly specified.
224 New staff group contexts may be defined. For details, see
225 @ref{Defining new contexts}.
230 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
231 {use-square-bracket-at-the-start-of-a-staff-group.ly}
233 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
234 {display-bracket-with-only-one-staff-in-a-system.ly}
236 @cindex mensurstriche layout
237 @cindex renaissance music
238 @cindex transcription of mensural music
239 @cindex mensural music, transcription of
241 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
242 {mensurstriche-layout-bar-lines-between-the-staves.ly}
252 @ref{Instrument names},
253 @ref{Defining new contexts}.
256 @rlsr{Staff notation}.
260 @rinternals{StaffGroup},
261 @rinternals{ChoirStaff},
262 @rinternals{GrandStaff},
263 @rinternals{PianoStaff},
264 @rinternals{SystemStartBar},
265 @rinternals{SystemStartBrace},
266 @rinternals{SystemStartBracket},
267 @rinternals{SystemStartSquare}.
270 @node Nested staff groups
271 @unnumberedsubsubsec Nested staff groups
273 @cindex staff, nested
274 @cindex staves, nested
275 @cindex nesting of staves
276 @cindex system start delimiters, nested
277 @cindex nested staff brackets
278 @cindex brackets, nesting of
279 @cindex braces, nesting of
281 Staff-group contexts can be nested to arbitrary depths. In this
282 case, each child context creates a new bracket adjacent to the
283 bracket of its parent group.
285 @lilypond[verbatim,quote,relative=2]
287 \new Staff { c2 c | c2 c }
289 \new Staff { g2 g | g2 g }
290 \new StaffGroup \with {
291 systemStartDelimiter = #'SystemStartSquare
294 \new Staff { e2 e | e2 e }
295 \new Staff { c2 c | c2 c }
301 New nested staff group contexts can be defined. For details, see
302 @ref{Defining new contexts}.
307 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
313 @ref{Grouping staves},
314 @ref{Instrument names},
315 @ref{Defining new contexts}.
318 @rlsr{Staff notation}.
321 @rinternals{StaffGroup},
322 @rinternals{ChoirStaff},
323 @rinternals{SystemStartBar},
324 @rinternals{SystemStartBrace},
325 @rinternals{SystemStartBracket},
326 @rinternals{SystemStartSquare}.
329 @node Modifying single staves
330 @subsection Modifying single staves
332 This section explains how to change specific attributes of one
333 staff: for example, modifying the number of staff lines or the
334 staff size. Methods to start and stop staves and set ossia
335 sections are also described.
345 @unnumberedsubsubsec Staff symbol
347 @cindex adjusting staff symbol
348 @cindex drawing staff symbol
349 @cindex staff symbol, setting of
350 @cindex staff symbol, drawing
351 @cindex stop staff lines
352 @cindex start staff lines
353 @cindex staff lines, amount of
354 @cindex staff lines, number of
355 @cindex staff line, thickness of
356 @cindex amount of staff lines
357 @cindex thickness of staff lines
358 @cindex ledger lines, setting
359 @cindex setting of ledger lines
360 @cindex spacing of ledger lines
361 @cindex number of staff lines
363 The lines of a staff belong to the @code{StaffSymbol} grob.
364 @code{StaffSymbol} properties can be modified to change the
365 appearance of a staff, but they must be modified before the staff
368 The number of staff lines may be changed. The clef position and
369 the position of middle C may need to be modified to fit the new
370 staff. For an explanation, refer to the snippet section in
373 @lilypond[verbatim,quote,relative=2]
375 \override StaffSymbol #'line-count = #3
380 Staff line thickness can be modified. The thickness of ledger
381 lines and stems are also affected, since they depend on staff line
384 @lilypond[verbatim,quote,relative=1]
386 \override StaffSymbol #'thickness = #3
391 Ledger line thickness can be set independently of staff line
392 thickness. In the example the two numbers are factors multiplying
393 the staff line thickness and the staff line spacing. The two
394 contributions are added to give the ledger line thickness.
396 @lilypond[verbatim,quote,relative=1]
398 \override StaffSymbol #'ledger-line-thickness = #'(1 . 0.2)
403 The distance between staff lines can be changed. This setting
404 affects the spacing of ledger lines as well.
406 @lilypond[verbatim,quote,relative=1]
408 \override StaffSymbol #'staff-space = #1.5
413 Further details about the properties of @code{StaffSymbol} can be
414 found in @rinternals{staff-symbol-interface}.
416 @cindex stopping a staff
417 @cindex starting a staff
418 @cindex staff, starting
419 @cindex staff, stopping
421 @funindex \startStaff
426 Modifications to staff properties in the middle of a score can be
427 placed between @code{\stopStaff} and @code{\startStaff}:
429 @lilypond[verbatim,quote,relative=2]
432 \override Staff.StaffSymbol #'line-count = #2
436 \revert Staff.StaffSymbol #'line-count
442 In general, @code{\startStaff} and @code{\stopStaff} can be used
443 to stop or start a staff in the middle of a score.
445 @lilypond[verbatim,quote,relative=2]
462 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
463 {making-some-staff-lines-thicker-than-the-others.ly}
476 @rlsr{Staff notation}.
479 @rinternals{StaffSymbol},
480 @rinternals{staff-symbol-interface}.
484 @unnumberedsubsubsec Ossia staves
486 @cindex staff, Frenched
488 @cindex Frenched staves
489 @cindex staff, resizing of
490 @cindex resizing of staves
492 @funindex \startStaff
497 @notation{Ossia} staves can be set by creating a new simultaneous
498 staff in the appropriate location:
500 @lilypond[verbatim,quote]
501 \new Staff \relative c'' {
505 \new Staff { e4 d f e }
512 However, the above example is not what is usually desired. To
513 create ossia staves that are above the original staff, have no
514 time signature or clef, and have a smaller font size, tweaks must
515 be used. The Learning Manual describes a specific technique to
516 achieve this goal, beginning with
517 @rlearning{Nesting music expressions}.
519 The following example uses the @code{alignAboveContext} property
520 to align the ossia staff. This method is most appropriate when
521 only a few ossia staves are needed.
523 @lilypond[verbatim,quote]
524 \new Staff = main \relative c'' {
530 \remove "Time_signature_engraver"
531 alignAboveContext = #"main"
533 \override StaffSymbol #'staff-space = #(magstep -3)
534 \override StaffSymbol #'thickness = #(magstep -3)
543 If many isolated ossia staves are needed, creating an empty
544 @code{Staff} context with a specific @emph{context id} may be more
545 appropriate; the ossia staves may then be created by
546 @emph{calling} this context and using @code{\startStaff} and
547 @code{\stopStaff} at the desired locations. The benefits of this
548 method are more apparent if the piece is longer than the following
551 @lilypond[verbatim,quote,ragged-right]
553 \new Staff = ossia \with {
554 \remove "Time_signature_engraver"
555 \override Clef #'transparent = ##t
557 \override StaffSymbol #'staff-space = #(magstep -3)
558 \override StaffSymbol #'thickness = #(magstep -3)
562 \new Staff \relative c' {
566 \context Staff = ossia {
567 \startStaff e4 g8 f e2 \stopStaff
574 \context Staff = ossia {
575 \startStaff g4 e8 f g2 \stopStaff
583 Using the @code{\RemoveEmptyStaffContext} command to create ossia
584 staves may be used as an alternative. This method is most
585 convenient when ossia staves occur immediately following a line
586 break. In this case, spacer rests do not need to be used at all;
587 only @code{\startStaff} and @code{\stopStaff} are necessary. For
588 more information about @code{\RemoveEmptyStaffContext}, see
591 @lilypond[verbatim,quote,ragged-right]
593 \new Staff = ossia \with {
594 \remove "Time_signature_engraver"
595 \override Clef #'transparent = ##t
597 \override StaffSymbol #'staff-space = #(magstep -3)
598 \override StaffSymbol #'thickness = #(magstep -3)
600 \new Staff \relative c' {
606 \context Staff = ossia {
607 c4 e8 d c2 \stopStaff
617 \RemoveEmptyStaffContext
618 \override VerticalAxisGroup #'remove-first = ##t
626 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
627 {vertically-aligning-ossias-and-lyrics.ly}
634 @rglos{Frenched staff}.
637 @rlearning{Nesting music expressions},
638 @rlearning{Size of objects},
639 @rlearning{Length and thickness of objects}.
645 @rlsr{Staff notation}.
648 @rinternals{StaffSymbol}.
652 @unnumberedsubsubsec Hiding staves
654 @cindex Frenched score
655 @cindex Frenched staff
656 @cindex staff, hiding
658 @cindex hiding of staves
661 @funindex \RemoveEmptyStaffContext
662 @funindex RemoveEmptyStaffContext
665 Staff lines can be hidden by removing the
666 @code{Staff_symbol_engraver} from the @code{Staff} context. As an
667 alternative, @code{\stopStaff} may be used.
669 @lilypond[verbatim,quote]
671 \remove "Staff_symbol_engraver"
673 \relative c''' { a8 f e16 d c b a2 }
677 Empty staves can be hidden by setting the
678 @code{\RemoveEmptyStaffContext} command in the @code{\layout}
679 block. In orchestral scores, this style is known as @q{Frenched
680 Score}. By default, this command hides and removes all empty
681 staves in a score except for those in the first system.
683 @warning{A staff is considered empty when it contains only
684 multi-measure rests, skips, spacer rests, or a combination of these
687 @lilypond[verbatim,quote,ragged-right]
690 \RemoveEmptyStaffContext
711 @code{\RemoveEmptyStaffContext} can also be used to create ossia
712 sections for a staff. For details, see @ref{Ossia staves}.
714 @cindex hiding ancient staves
715 @cindex hiding rhythmic staves
717 @funindex \RemoveEmptyStaffContext
718 @funindex RemoveEmptyStaffContext
719 @funindex \AncientRemoveEmptyStaffContext
720 @funindex AncientRemoveEmptyStaffContext
721 @funindex \RemoveEmptyRhythmicStaffContext
722 @funindex RemoveEmptyRhythmicStaffContext
724 The @code{\AncientRemoveEmptyStaffContext} command may be used to
725 hide empty staves in ancient music contexts. Similarly,
726 @code{\RemoveEmptyRhythmicStaffContext} may be used to hide empty
727 @code{RhythmicStaff} contexts.
731 @code{\RemoveEmptyStaffContext},
732 @code{\AncientRemoveEmptyStaffContext},
733 @code{\RemoveEmptyRhythmicStaffContext}.
739 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
740 {removing-the-first-empty-line.ly}
745 @rglos{Frenched staff}.
752 @rlsr{Staff notation}.
755 @rinternals{ChordNames},
756 @rinternals{FiguredBass},
759 @rinternals{VerticalAxisGroup},
760 @rinternals{Staff_symbol_engraver}.
765 Removing @code{Staff_symbol_engraver} also hides bar lines. If
766 bar line visibility is forced, formatting errors may occur. In
767 this case, use the following overrides instead of removing the
771 \override StaffSymbol #'stencil = ##f
772 \override NoteHead #'no-ledgers = ##t
777 @subsection Writing parts
779 This section explains how to insert tempo indications and
780 instrument names into a score. Methods to quote other voices and
781 format cue notes are also described.
786 * Quoting other voices::
787 * Formatting cue notes::
791 @node Metronome marks
792 @unnumberedsubsubsec Metronome marks
795 @cindex beats per minute
796 @cindex metronome marking
797 @cindex metronome marking with text
802 A basic metronome mark is simple to write:
804 @lilypond[verbatim,quote,relative=1]
810 Tempo indications with text can be used instead:
812 @lilypond[verbatim,quote,relative=2]
818 Combining a metronome mark and text will automatically place the
819 metronome mark within parentheses:
821 @lilypond[verbatim,quote,relative=2]
822 \tempo "Allegro" 4 = 160
827 In general, the text can be any markup object:
829 @lilypond[verbatim,quote,relative=2]
830 \tempo \markup { \italic Faster } 4 = 132
831 a8-. r8 b-. r gis-. r a-. r
834 A parenthesized metronome mark with no textual indication may be
835 written by including an empty string in the input:
837 @lilypond[verbatim,quote,relative=2]
845 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
846 {printing-metronome-and-rehearsal-marks-below-the-staff.ly}
848 @c perhaps also an example of how to move it horizontally?
850 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
851 {changing-the-tempo-without-a-metronome-mark.ly}
853 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
854 {creating-metronome-marks-in-markup-mode.ly}
856 For more details, see @ref{Formatting text}.
862 @rglos{metronomic indication},
863 @rglos{tempo indication},
864 @rglos{metronome mark}.
867 @ref{Formatting text},
871 @rlsr{Staff notation}.
874 @rinternals{MetronomeMark}.
877 @node Instrument names
878 @unnumberedsubsubsec Instrument names
880 @cindex instrument names
881 @cindex instrument names, short
883 Instrument names can be printed on the left side of staves in the
884 @code{Staff} and @code{PianoStaff} contexts. The value of
885 @code{instrumentName} is used for the first staff, and the value
886 of @code{shortInstrumentName} is used for all succeeding staves.
888 @lilypond[verbatim,quote,ragged-right,relative=1]
889 \set Staff.instrumentName = #"Violin "
890 \set Staff.shortInstrumentName = #"Vln "
896 Markup mode can be used to create more complicated instrument
899 @lilypond[verbatim,quote,relative=2]
900 \set Staff.instrumentName = \markup {
901 \column { "Clarinetti"
902 \line { "in B" \smaller \flat } } }
906 @cindex instrument names, centering
908 When two or more staff contexts are grouped together, the
909 instrument names and short instrument names are centered by
910 default. To center multi-line instrument names,
911 @code{\center-column} must be used:
913 @lilypond[verbatim,quote,indent=1.5\cm,relative=2]
916 \set Staff.instrumentName = #"Flute"
920 \set Staff.instrumentName = \markup \center-column {
922 \line { "in B" \smaller \flat }
930 @funindex short-indent
932 However, if the instrument names are longer, the instrument names
933 in a staff group may not be centered unless the @code{indent} and
934 @code{short-indent} settings are increased. For details about
935 these settings, see @ref{Horizontal dimensions}.
937 @lilypond[verbatim,quote,ragged-right]
940 short-indent = 1.5\cm
945 \set Staff.instrumentName = #"Alto Flute in G"
946 \set Staff.shortInstrumentName = #"Fl."
951 \set Staff.instrumentName = #"Clarinet"
952 \set Staff.shortInstrumentName = #"Clar."
959 To add instrument names to other contexts (such as
960 @code{GrandStaff}, @code{ChoirStaff}, or @code{StaffGroup}),
961 @code{Instrument_name_engraver} must be added to that context.
962 For details, see @ref{Modifying context plug-ins}.
964 @cindex instrument names, changing
965 @cindex changing instrument names
967 Instrument names may be changed in the middle of a piece:
969 @lilypond[verbatim,quote,ragged-right,relative=1]
970 \set Staff.instrumentName = #"First"
971 \set Staff.shortInstrumentName = #"one"
974 \set Staff.instrumentName = #"Second"
975 \set Staff.shortInstrumentName = #"two"
980 @cindex instrument switch
981 @cindex switching instruments
983 @funindex \addInstrumentDefinition
984 @funindex addInstrumentDefinition
985 @funindex \instrumentSwitch
986 @funindex instrumentSwitch
988 If an instrument @emph{switch} is needed,
989 @code{\addInstrumentDefinition} may be used in combination with
990 @code{\instrumentSwitch} to create a detailed list of the
991 necessary changes for the switch. The
992 @code{\addInstrumentDefinition} command has two arguments: an
993 identifying string, and an association list of context properties
994 and values to be used for the instrument. It must be placed in
995 the toplevel scope. @code{\instrumentSwitch} is used in the music
996 expression to declare the instrument switch:
998 @lilypond[verbatim,quote,ragged-right]
999 \addInstrumentDefinition #"contrabassoon"
1000 #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
1001 (shortInstrumentName . "Cbsn.")
1002 (clefGlyph . "clefs.F")
1003 (middleCPosition . 6)
1005 (instrumentCueName . ,(make-bold-markup "cbsn."))
1006 (midiInstrument . "bassoon"))
1009 instrumentName = #"Bassoon"
1013 \compressFullBarRests
1016 \instrumentSwitch "contrabassoon"
1025 @ref{Horizontal dimensions},
1026 @ref{Modifying context plug-ins}.
1029 @rlsr{Staff notation}.
1031 Internals Reference:
1032 @rinternals{InstrumentName},
1033 @rinternals{PianoStaff},
1037 @node Quoting other voices
1038 @unnumberedsubsubsec Quoting other voices
1041 @cindex quoting other voices
1047 @funindex \quoteDuring
1048 @funindex quoteDuring
1049 @funindex \transposition
1050 @funindex transposition
1052 It is very common for one voice to double some of the music from
1053 another voice. For example, the first and second violins may play the
1054 same notes during a passage of music. In LilyPond this is accomplished
1055 by letting one voice @emph{quote} the other voice without having to
1058 Before a part can be quoted, the @code{\addQuote} command must be used
1059 to initialize the quoted fragment. This command must be used in the
1060 toplevel scope. The first argument is an identifying string, and the
1061 second is a music expression:
1064 flute = \relative c'' @{
1067 \addQuote "flute" @{ \flute @}
1070 The @code{\quoteDuring} command is used to indicate the point where the
1071 quotation begins. It is followed by two arguments: the name of the
1072 quoted voice, as defined with @code{\addQuote}, and a music expression
1073 that indicates the duration of the quote, usually spacer rests or
1074 multi-measure rests. The corresponding music from the quoted voice is
1075 inserted into the music expression:
1077 @lilypond[verbatim,quote]
1078 flute = \relative c'' {
1081 \addQuote "flute" { \flute }
1084 c4 cis \quoteDuring #"flute" { s2 }
1088 If the music expression used for @code{\quoteDuring} contains
1089 anything but a spacer rest or multi-measure rest, a polyphonic
1090 situation is created, which is often not desirable:
1092 @lilypond[verbatim,quote]
1093 flute = \relative c'' {
1096 \addQuote "flute" { \flute }
1099 c4 cis \quoteDuring #"flute" { c4 b }
1103 Quotations recognize instrument transposition settings for both
1104 the source and target instruments if the @code{\transposition}
1105 command is used. For details about @code{\transposition}, see
1106 @ref{Instrument transpositions}.
1108 @lilypond[verbatim,quote]
1109 clarinet = \relative c'' {
1113 \addQuote "clarinet" { \clarinet }
1116 c4 cis \quoteDuring #"clarinet" { s2 }
1120 It is possible to tag quotations with unique names in order to
1121 process them in different ways. For details about this procedure,
1122 see @ref{Using tags}.
1127 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1128 {quoting-another-voice-with-transposition.ly}
1131 @cindex articulation-event
1132 @cindex dynamic-event
1134 @funindex quotedEventTypes
1136 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1137 {quoting-another-voice.ly}
1142 @ref{Instrument transpositions},
1146 @rlsr{Staff notation}.
1148 Internals Reference:
1149 @rinternals{QuoteMusic},
1155 Only the contents of the first @code{Voice} occurring in an
1156 @code{\addQuote} command will be considered for quotation, so
1157 @var{music} cannot contain @code{\new} and @code{\context Voice}
1158 statements that would switch to a different Voice.
1160 Quoting grace notes is broken and can even cause LilyPond to
1163 Quoting nested triplets may result in poor notation.
1165 In earlier versions of LilyPond (pre 2.11), @code{addQuote} was
1166 written entirely in lower-case letters: @code{\addquote}.
1169 @node Formatting cue notes
1170 @unnumberedsubsubsec Formatting cue notes
1174 @cindex cue notes, formatting
1176 @cindex quoting other voices
1177 @cindex cues, formatting
1179 @funindex \cueDuring
1182 The previous section explains how to create quotations. The
1183 @code{\cueDuring} command is a more specialized form of
1184 @code{\quoteDuring}, being particularly useful for inserting cue
1185 notes into a part. The syntax is as follows:
1188 \cueDuring #@var{partname} #@var{voice} @var{music}
1191 This command copies the corresponding measures from @var{partname}
1192 into a @code{CueVoice} context. The @code{CueVoice} is created
1193 implicitly, and occurs simultaneously with @var{music}, which
1194 creates a polyphonic situation. The @var{voice} argument
1195 determines whether the cue notes should be notated as a first or
1196 second voice; @code{UP} corresponds to the first voice, and
1197 @code{DOWN} corresponds to the second.
1199 @lilypond[verbatim,quote]
1200 oboe = \relative c'' {
1204 \addQuote "oboe" { \oboe }
1206 \new Voice \relative c'' {
1207 \cueDuring #"oboe" #UP { R1 }
1213 In the above example, the @code{Voice} context had to be
1214 explicitly declared, or else the entire music expression would
1215 belong to the @code{CueVoice} context.
1217 The name of the cued instrument can be printed by setting the
1218 @code{instrumentCueName} property in the @code{CueVoice} context.
1220 @lilypond[verbatim,quote]
1221 oboe = \relative c''' {
1224 \addQuote "oboe" { \oboe }
1226 \new Staff \relative c'' <<
1227 \new CueVoice \with {
1228 instrumentCueName = "ob."
1231 \cueDuring #"oboe" #UP { R1 }
1237 @cindex removing cues
1238 @cindex removing cue notes
1239 @cindex cue notes, removing
1243 @funindex \transposedCueDuring
1244 @funindex transposedCueDuring
1246 In addition to printing the name of the cued instrument, when cue
1247 notes end, the name of the original instrument should be printed,
1248 and any other changes introduced by the cued part should be
1249 undone. This can be accomplished by using
1250 @code{\addInstrumentDefinition} and @code{\instrumentSwitch}. For
1251 an example and explanation, see @ref{Instrument names}.
1253 The @code{\killCues} command removes cue notes from a music
1254 expression. This can be useful if cue notes need to be removed
1255 from a part but may be restored at a later time.
1257 @lilypond[verbatim,quote]
1258 flute = \relative c''' {
1261 \addQuote "flute" { \flute }
1263 \new Voice \relative c'' {
1265 \cueDuring #"flute" #UP { R1 }
1271 The @code{\transposedCueDuring} command is useful for adding
1272 instrumental cues from a completely different register. The
1273 syntax is similar to @code{\cueDuring}, but it requires one extra
1274 argument to specify the transposition of the cued instrument. For
1275 more information about transposition, see
1276 @ref{Instrument transpositions}.
1278 @lilypond[verbatim,quote]
1279 piccolo = \relative c''' {
1285 \addQuote "piccolo" { \piccolo }
1287 cbassoon = \relative c, {
1290 \transposedCueDuring #"piccolo" #UP c,, { R1 }
1295 \new Staff = "piccolo" \piccolo
1296 \new Staff = "cbassoon" \cbassoon
1300 It is possible to tag cued parts with unique names in order to
1301 process them in different ways. For details about this procedure,
1302 see @ref{Using tags}.
1307 @ref{Instrument transpositions},
1308 @ref{Instrument names},
1312 @rlsr{Staff notation}.
1314 Internals Reference:
1315 @rinternals{CueVoice},
1321 Collisions can occur with rests, when using @code{\cueDuring},
1322 between @code{Voice} and @code{CueVoice} contexts.