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 staff appearance, print
17 scores with more than one staff, and how to apply specific
18 performance marks to single 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 percussion staff
50 @cindex Gregorian transcription staff
51 @cindex rhythmic staff
55 @notation{Staves} (singular: @notation{staff}) are created with
56 the @code{\new} or @code{\context} commands. For details, see
57 @ref{Creating contexts}.
59 The basic staff context is @code{Staff}:
61 @lilypond[verbatim,quote,relative=2]
62 \new Staff { c4 d e f }
65 @code{DrumStaff} creates a five-line staff set up for a
66 typical drum set. It uses different names for each instrument.
67 The instrument names are set using the @code{\drummode} command.
68 For details, see @ref{Percussion staves}.
70 @lilypond[verbatim,quote]
72 \drummode { cymc hh ss tomh }
76 @c FIXME: remove when mentioned in NR 2.8
77 @code{GregorianTranscriptionStaff} creates a staff to notate
78 modern Gregorian chant. It does not show bar lines.
80 @lilypond[verbatim,quote,relative=2]
81 \new GregorianTranscriptionStaff { c4 d e f e d }
84 @code{RhythmicStaff} creates a single-line staff that only
85 displays the rhythmic values of the input. Real durations are
86 preserved. For details, see @ref{Showing melody rhythms}.
88 @lilypond[verbatim,quote,relative=2]
89 \new RhythmicStaff { c4 d e f }
92 @code{TabStaff} creates a tablature with six strings in standard
93 guitar tuning. For details, see @ref{Default tablatures}.
95 @lilypond[verbatim,quote,relative=2]
96 \new TabStaff { c4 d e f }
99 There are two staff contexts specific for the notation of ancient
100 music: @code{MensuralStaff} and @code{VaticanaStaff}. They are
101 described in @ref{Pre-defined contexts}.
103 New single staff contexts may be defined. For details, see
104 @ref{Defining new contexts}.
114 @ref{Creating contexts},
115 @ref{Percussion staves},
116 @ref{Showing melody rhythms},
117 @ref{Default tablatures},
118 @ref{Pre-defined contexts},
120 @ref{Gregorian chant contexts},
121 @ref{Mensural contexts},
122 @ref{Defining new contexts}.
125 @rlsr{Staff notation}.
129 @rinternals{DrumStaff},
130 @rinternals{GregorianTranscriptionStaff},
131 @rinternals{RhythmicStaff},
132 @rinternals{TabStaff},
133 @rinternals{MensuralStaff},
134 @rinternals{VaticanaStaff},
135 @rinternals{StaffSymbol}.
138 @node Grouping staves
139 @unnumberedsubsubsec Grouping staves
141 @cindex start of system
142 @cindex staff, multiple
143 @cindex staves, multiple
144 @cindex system start delimiters
145 @cindex bracket, vertical
146 @cindex brace, vertical
155 Various contexts exist to group single staves together in order to
156 form multi-stave systems. Each grouping context sets the style of
157 the system start delimiter and the behavior of bar lines.
159 If no context is specified, the default properties will be used:
160 the group is started with a vertical line, and the bar lines are
163 @lilypond[verbatim,quote,relative=2]
170 In the @code{StaffGroup} context, the group is started with a
171 bracket and bar lines are drawn through all the staves.
173 @lilypond[verbatim,quote,relative=2]
180 In a @code{ChoirStaff}, the group starts with a bracket, but bar
181 lines are not connected.
183 @lilypond[verbatim,quote,relative=2]
190 In a @code{GrandStaff}, the group begins with a brace, and bar
191 lines are connected between the staves.
193 @lilypond[verbatim,quote,relative=2]
200 The @code{PianoStaff} is identical to a @code{GrandStaff}, except
201 that it supports printing the instrument name directly. For
202 details, see @ref{Instrument names}.
204 @lilypond[verbatim,quote,relative=2]
206 \set PianoStaff.instrumentName = "Piano"
212 Each staff group context sets the property
213 @code{systemStartDelimiter} to one of the following values:
214 @code{SystemStartBar}, @code{SystemStartBrace}, or
215 @code{SystemStartBracket}. A fourth delimiter,
216 @code{SystemStartSquare}, is also available, but it must be
217 explicitly specified.
219 New staff group contexts may be defined. For details, see
220 @ref{Defining new contexts}.
225 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
226 {use-square-bracket-at-the-start-of-a-staff-group.ly}
228 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
229 {display-bracket-with-only-one-staff-in-a-system.ly}
231 @cindex mensurstriche layout
232 @cindex renaissance music
233 @cindex transcription of mensural music
234 @cindex mensural music, transcription of
236 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
237 {mensurstriche-layout-bar-lines-between-the-staves.ly}
238 @c FIXME: move to NR 2.8.x when sectioning is ready
249 @ref{Instrument names},
250 @ref{Defining new contexts}.
253 @rlsr{Staff notation}.
257 @rinternals{StaffGroup},
258 @rinternals{ChoirStaff},
259 @rinternals{GrandStaff},
260 @rinternals{PianoStaff},
261 @rinternals{SystemStartBar},
262 @rinternals{SystemStartBrace},
263 @rinternals{SystemStartBracket},
264 @rinternals{SystemStartSquare}.
267 @node Nested staff groups
268 @unnumberedsubsubsec Nested staff groups
270 @cindex staff, nested
271 @cindex staves, nested
272 @cindex nesting of staves
273 @cindex system start delimiters, nested
274 @cindex nested staff brackets
275 @cindex brackets, nesting of
276 @cindex braces, nesting of
277 @cindex inner staff group
278 @cindex inner choir staff group
280 Two additional staff-group contexts are available that can be
281 nested within a @code{StaffGroup} or @code{ChoirStaff} context:
282 @code{InnerStaffGroup} and @code{InnerChoirStaff}. These contexts
283 create a new bracket adjacent to the bracket of their parent staff
286 An @code{InnerStaffGroup} is treated similarly to a
287 @code{StaffGroup}; bar lines are connected between each staff
290 @lilypond[verbatim,quote,relative=2]
292 \new Staff { c2 c | c2 c }
293 \new InnerStaffGroup <<
294 \new Staff { g2 g | g2 g }
295 \new Staff { e2 e | e2 e }
300 Bar lines are @emph{not} connected between staves of an
301 @code{InnerChoirStaff}, just like a @code{ChoirStaff}:
303 @lilypond[verbatim,quote,relative=2]
305 \new Staff { c2 c | c2 c }
306 \new InnerChoirStaff <<
307 \new Staff { g2 g | g2 g }
308 \new Staff { e2 e | e2 e }
310 \new Staff { c1 | c1 }
314 New nested staff group contexts can be defined. For details, see
315 @ref{Defining new contexts}.
320 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
327 @ref{Grouping staves},
328 @ref{Instrument names},
329 @ref{Defining new contexts}.
332 @rlsr{Staff notation}.
335 @rinternals{InnerStaffGroup},
336 @rinternals{StaffGroup},
337 @rinternals{InnerChoirStaff},
338 @rinternals{ChoirStaff},
339 @rinternals{SystemStartBar},
340 @rinternals{SystemStartBrace},
341 @rinternals{SystemStartBracket},
342 @rinternals{SystemStartSquare}.
345 @node Modifying single staves
346 @subsection Modifying single staves
348 This section explains how to change specific attributes of one
349 staff: for example, modifying the number of staff lines or the
350 staff size. Methods to start and stop staves and set ossia
351 sections are also described.
361 @unnumberedsubsubsec Staff symbol
363 @cindex adjusting staff symbol
364 @cindex drawing staff symbol
365 @cindex staff symbol, setting of
366 @cindex stop staff lines
367 @cindex start staff lines
368 @cindex staff lines, amount of
369 @cindex staff lines, number of
370 @cindex staff line, thickness of
371 @cindex amount of staff lines
372 @cindex thickness of staff lines
373 @cindex ledger lines, setting
374 @cindex setting of ledger lines
375 @cindex spacing of ledger lines
376 @cindex number of staff lines
378 The lines of a staff belong to the @code{StaffSymbol} grob.
379 @code{StaffSymbol} properties can be modified to change the
380 appearance of a staff, but they must be modified before the staff
383 The number of staff lines may be changed. The clef position and
384 the position of middle C may need to be modified to fit the new
385 staff. For an explanation, refer to the snippet section in
388 @lilypond[verbatim,quote,relative=2]
390 \override StaffSymbol #'line-count = #3
395 Staff line thickness can be modified. The thickness of ledger
396 lines and stems are also affected, since they depend on staff line
399 @lilypond[verbatim,quote,relative=1]
401 \override StaffSymbol #'thickness = #3
406 Ledger line thickness can be set independently of staff line
409 @lilypond[verbatim,quote,relative=1]
411 \override StaffSymbol #'ledger-line-thickness = #'(1 . 0.2)
416 The distance between staff lines can be changed. This setting
417 affects the spacing of ledger lines as well.
419 @lilypond[verbatim,quote,relative=1]
421 \override StaffSymbol #'staff-space = #1.5
426 Further details about the properties of @code{StaffSymbol} can be
427 found in @rinternals{staff-symbol-interface}.
429 @funindex \startStaff
432 Modifications to staff properties in the middle of a score can be
433 placed between @code{\stopStaff} and @code{\startStaff}:
435 @lilypond[verbatim,quote,relative=2]
438 \override Staff.StaffSymbol #'line-count = #2
442 \revert Staff.StaffSymbol #'line-count
447 @cindex stopping a staff
450 In general, @code{\startStaff} and @code{\stopStaff} can be used
451 to stop or start a staff in the middle of a score.
453 @lilypond[verbatim,quote,relative=2]
470 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
471 {making-some-staff-lines-thicker-than-the-others.ly}
485 @rlsr{Staff notation}.
488 @rinternals{StaffSymbol},
489 @rinternals{staff-symbol-interface}.
494 When setting vertical staff line positions manually, bar lines are
495 always centered on position 0, so the maximum distance between the
496 outermost bar lines in either direction must be equal.
500 @unnumberedsubsubsec Ossia staves
502 @cindex staff, Frenched
504 @cindex Frenched staves
505 @cindex staff, resizing of
506 @cindex resizing of staves
508 @notation{Ossia} staves can be set by creating a new simultaneous
509 staff in the appropriate location:
511 @lilypond[verbatim,quote]
512 \new Staff \relative c'' {
516 \new Staff { e4 d f e }
523 However, the above example is usually not the desired result. To
524 create ossia staves that are above the original staff, have no
525 time signature or clef, and have a smaller font size, tweaks must
526 be used. The Learning Manual describes a specific technique to
527 achieve this goal, beginning with
528 @rlearning{Nesting music expressions}.
530 The following example uses the @code{alignAboveContext} property
531 to align the ossia staff. This method is most appropriate when
532 only a few ossia staves are needed.
534 @lilypond[verbatim,quote]
535 \new Staff = main \relative c'' {
541 \remove "Time_signature_engraver"
542 alignAboveContext = #"main"
544 \override StaffSymbol #'staff-space = #(magstep -3)
545 \override StaffSymbol #'thickness = #(magstep -3)
554 If many isolated ossia staves are needed, creating an empty
555 @code{Staff} context with a specific @emph{context id} may be more
556 appropriate; the ossia staves may then be created by
557 @emph{calling} this context and using @code{\startStaff} and
558 @code{\stopStaff} at the desired locations. The benefits of this
559 method are more apparent if the piece is longer than the following
562 @lilypond[verbatim,quote,ragged-right]
564 \new Staff = ossia \with {
565 \remove "Time_signature_engraver"
566 \override Clef #'transparent = ##t
568 \override StaffSymbol #'staff-space = #(magstep -3)
569 \override StaffSymbol #'thickness = #(magstep -3)
573 \new Staff \relative c' {
577 \context Staff = ossia {
578 \startStaff e4 g8 f e2 \stopStaff
585 \context Staff = ossia {
586 \startStaff g4 e8 f g2 \stopStaff
594 Using the @code{\RemoveEmptyStaffContext} command to create ossia
595 staves may be used as an alternative. This method is most
596 convenient when ossia staves occur immediately following a line
597 break. In this case, spacer rests do not need to be used at all;
598 only @code{\startStaff} and @code{\stopStaff} are necessary. For
599 more information about @code{\RemoveEmptyStaffContext}, see
602 @lilypond[verbatim,quote,ragged-right]
604 \new Staff = ossia \with {
605 \remove "Time_signature_engraver"
606 \override Clef #'transparent = ##t
608 \override StaffSymbol #'staff-space = #(magstep -3)
609 \override StaffSymbol #'thickness = #(magstep -3)
611 \new Staff \relative c' {
617 \context Staff = ossia {
618 c4 e8 d c2 \stopStaff
628 \RemoveEmptyStaffContext
629 \override VerticalAxisGroup #'remove-first = ##t
637 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
638 {vertically-aligning-ossias-and-lyrics.ly}
646 @rglos{Frenched staff}.
649 @rlearning{Nesting music expressions},
650 @rlearning{Size of objects},
651 @rlearning{Length and thickness of objects}.
657 @rlsr{Staff notation}.
660 @rinternals{StaffSymbol}.
664 @unnumberedsubsubsec Hiding staves
666 @cindex Frenched score
667 @cindex Frenched staff
668 @cindex staff, hiding
670 @cindex hiding of staves
673 Staff lines can be hidden by removing the
674 @code{Staff_symbol_engraver} from the @code{Staff} context. As an
675 alternative, @code{\stopStaff} may be used.
677 @lilypond[verbatim,quote]
679 \remove "Staff_symbol_engraver"
681 \relative c''' { a8 f e16 d c b a2 }
684 @funindex \RemoveEmptyStaffContext
686 Empty staves can be hidden by setting the
687 @code{\RemoveEmptyStaffContext} command in the @code{\layout}
688 block. In orchestral scores, this style is known as @q{Frenched
689 Score}. By default, this command hides and removes all empty
690 staves in a score except for those in the first system.
692 @warning{An empty staff may only include multi-measure rests,
693 skips, spacer rests, or a combination of these elements.}
695 @lilypond[verbatim,quote,ragged-right]
698 \RemoveEmptyStaffContext
719 @code{\RemoveEmptyStaffContext} can also be used to create ossia
720 sections for a staff. For details, see @ref{Ossia staves}.
722 @cindex hiding ancient staves
723 @cindex hiding rhythmic staves
724 @funindex \AncientRemoveEmptyStaffContext
725 @funindex \RemoveEmptyRhythmicStaffContext
727 The @code{\AncientRemoveEmptyStaffContext} command may be used to
728 hide empty staves in ancient music contexts. Similarly,
729 @code{\RemoveEmptyRhythmicStaffContext} may be used to hide empty
730 @code{RhythmicStaff} contexts.
735 @code{\RemoveEmptyStaffContext},
736 @code{\AncientRemoveEmptyStaffContext},
737 @code{\RemoveEmptyRhythmicStaffContext}.
742 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
743 {removing-the-first-empty-line.ly}
749 @rglos{Frenched staff}.
756 @rlsr{Staff notation}.
759 @rinternals{ChordNames},
760 @rinternals{FiguredBass},
763 @rinternals{VerticalAxisGroup},
764 @rinternals{Staff_symbol_engraver}.
769 Removing @code{Staff_symbol_engraver} also hides bar lines. If
770 bar line visibility is forced, formatting errors may occur. In
771 this case, use the following overrides instead of removing the
775 \override StaffSymbol #'stencil = ##f
776 \override NoteHead #'no-ledgers = ##t
781 @subsection Writing parts
783 This section explains how to insert tempo indications and
784 instrument names into a score. Methods to quote other voices and
785 format cue notes are also described.
790 * Quoting other voices::
791 * Formatting cue notes::
795 @node Metronome marks
796 @unnumberedsubsubsec Metronome marks
799 @cindex beats per minute
800 @cindex metronome marking
801 @cindex metronome marking with text
804 A basic metronome mark is simple to write:
806 @lilypond[verbatim,quote,relative=1]
812 Tempo indications with text can be used instead:
814 @lilypond[verbatim,quote,relative=2]
820 Combining a metronome mark and text will automatically place the
821 metronome mark within parentheses:
823 @lilypond[verbatim,quote,relative=2]
824 \tempo "Allegro" 4 = 160
829 In general, the text can be any markup object:
831 @lilypond[verbatim,quote,relative=2]
832 \tempo \markup { \italic Faster } 4 = 132
833 a8-. r8 b-. r gis-. r a-. r
836 A parenthesized metronome mark with no textual indication may be
837 written by including an empty string in the input:
839 @lilypond[verbatim,quote,relative=2]
847 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
848 {printing-metronome-and-rehearsal-marks-below-the-staff.ly}
850 @c perhaps also an example of how to move it horizontally?
852 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
853 {changing-the-tempo-without-a-metronome-mark.ly}
855 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
856 {creating-metronome-marks-in-markup-mode.ly}
858 For more details, see @ref{Formatting text}.
865 @rglos{metronomic indication},
866 @rglos{tempo indication},
867 @rglos{metronome mark}.
870 @ref{Formatting text},
874 @rlsr{Staff notation}.
877 @rinternals{MetronomeMark}.
880 @node Instrument names
881 @unnumberedsubsubsec Instrument names
883 @cindex instrument names
884 @cindex instrument names, short
886 Instrument names can be printed on the left side of staves in the
887 @code{Staff} and @code{PianoStaff} contexts. The value of
888 @code{instrumentName} is used for the first staff, and the value
889 of @code{shortInstrumentName} is used for all succeeding staves.
891 @lilypond[verbatim,quote,ragged-right,relative=1]
892 \set Staff.instrumentName = "Violin "
893 \set Staff.shortInstrumentName = "Vln "
899 Markup mode can be used to create more complicated instrument
902 @lilypond[verbatim,quote,relative=2]
903 \set Staff.instrumentName = \markup {
904 \column { "Clarinetti"
905 \line { "in B" \smaller \flat } } }
909 @cindex instrument names, centering
911 When two or more staff contexts are grouped together, the
912 instrument names and short instrument names are centered by
913 default. To center multi-line instrument names,
914 @code{\center-column} must be used:
916 @lilypond[verbatim,quote,indent=1.5\cm,relative=2]
919 \set Staff.instrumentName = "Flute"
923 \set Staff.instrumentName = \markup \center-column {
925 \line { "in B" \smaller \flat }
935 However, if the instrument names are longer, the instrument names
936 in a staff group may not be centered unless the @code{indent} and
937 @code{short-indent} settings are increased. For details about
938 these settings, see @ref{Horizontal dimensions}.
940 @lilypond[verbatim,quote,ragged-right]
943 short-indent = 1.5\cm
948 \set Staff.instrumentName = "Alto Flute in G"
949 \set Staff.shortInstrumentName = "Fl."
954 \set Staff.instrumentName = "Clarinet"
955 \set Staff.shortInstrumentName = "Clar."
962 To add instrument names to other contexts (such as
963 @code{GrandStaff}, @code{ChoirStaff}, or @code{StaffGroup}),
964 @code{Instrument_name_engraver} must be added to that context.
965 For details, see @ref{Modifying context plug-ins}.
967 @cindex instrument names, changing
969 Instrument names may be changed in the middle of a piece:
971 @lilypond[verbatim,quote,ragged-right,relative=1]
972 \set Staff.instrumentName = "First"
973 \set Staff.shortInstrumentName = "one"
976 \set Staff.instrumentName = "Second"
977 \set Staff.shortInstrumentName = "two"
982 @cindex instrument switch
983 @cindex switching instruments
985 If an instrument @emph{switch} is needed,
986 @code{\addInstrumentDefinition} may be used in combination with
987 @code{\instrumentSwitch} to create a detailed list of the
988 necessary changes for the switch. The
989 @code{\addInstrumentDefinition} command has two arguments: an
990 identifying string, and an association list of context properties
991 and values to be used for the instrument. It must be placed in
992 the toplevel scope. @code{\instrumentSwitch} is used in the music
993 expression to declare the instrument switch:
995 @lilypond[verbatim,quote,ragged-right]
996 \addInstrumentDefinition #"contrabassoon"
997 #`((instrumentTransposition . ,(ly:make-pitch -1 0 0))
998 (shortInstrumentName . "Cbsn.")
999 (clefGlyph . "clefs.F")
1000 (middleCPosition . 6)
1002 (instrumentCueName . ,(make-bold-markup "cbsn."))
1003 (midiInstrument . "bassoon"))
1006 instrumentName = "Bassoon"
1010 \compressFullBarRests
1013 \instrumentSwitch "contrabassoon"
1023 @ref{Horizontal dimensions},
1024 @ref{Modifying context plug-ins}.
1027 @rlsr{Staff notation}.
1029 Internals Reference:
1030 @rinternals{InstrumentName},
1031 @rinternals{PianoStaff},
1035 @node Quoting other voices
1036 @unnumberedsubsubsec Quoting other voices
1039 @cindex quoting other voices
1043 It is very common for one voice to double the some of the music from
1044 another voice. For example, the first and second violins may play the
1045 same notes during a passage of music. In LilyPond this is accomplished
1046 by letting one voice @emph{quote} the other voice without having to
1049 Before a part can be quoted, the @code{\addQuote} command must be used
1050 to initialize the quoted fragment. This command must be used in the
1051 toplevel scope. The first argument is an identifying string, and the
1052 second is a music expression:
1055 flute = \relative c'' @{
1058 \addQuote "flute" @{ \flute @}
1061 The @code{\quoteDuring} command is used to indicate the point where the
1062 quotation begins. It is followed by two arguments: the name of the
1063 quoted voice, as defined with @code{\addQuote}, and a music expression
1064 that indicates the duration of the quote, usually spacer rests or
1065 multi-measure rests. The corresponding music from the quoted voice is
1066 inserted into the music expression:
1068 @lilypond[verbatim,quote]
1069 flute = \relative c'' {
1072 \addQuote "flute" { \flute }
1075 c4 cis \quoteDuring #"flute" { s2 }
1079 If the music expression used for @code{\quoteDuring} contains
1080 anything but a spacer rest or multi-measure rest, a polyphonic
1081 situation is created, which is often not desirable:
1083 @lilypond[verbatim,quote]
1084 flute = \relative c'' {
1087 \addQuote "flute" { \flute }
1090 c4 cis \quoteDuring #"flute" { c4 b }
1094 Quotations recognize instrument transposition settings for both
1095 the source and target instruments if the @code{\transposition}
1096 command is used. For details about @code{\transposition}, see
1097 @ref{Instrument transpositions}.
1099 @lilypond[verbatim,quote]
1100 clarinet = \relative c'' {
1104 \addQuote "clarinet" { \clarinet }
1107 c4 cis \quoteDuring #"clarinet" { s2 }
1111 It is possible to tag quotations with unique names in order to
1112 process them in different ways. For details about this procedure,
1113 see @ref{Using tags}.
1118 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1119 {quoting-another-voice-with-transposition.ly}
1122 @cindex articulation-event
1123 @cindex dynamic-event
1125 @funindex quotedEventTypes
1127 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1128 {quoting-another-voice.ly}
1134 @ref{Instrument transpositions},
1138 @rlsr{Staff notation}.
1140 Internals Reference:
1141 @rinternals{QuoteMusic},
1147 Only the contents of the first @code{Voice} occurring in an
1148 @code{\addQuote} command will be considered for quotation, so
1149 @var{music} cannot contain @code{\new} and @code{\context Voice}
1150 statements that would switch to a different Voice.
1152 Quoting grace notes is broken and can even cause LilyPond to
1155 Quoting nested triplets may result in poor notation.
1157 In earlier versions of LilyPond (pre 2.11), @code{addQuote} was
1158 written entirely in lower-case letters: @code{\addquote}.
1161 @node Formatting cue notes
1162 @unnumberedsubsubsec Formatting cue notes
1166 @cindex cue notes, formatting
1168 @cindex quoting other voices
1169 @cindex cues, formatting
1171 The previous section explains how to create quotations. The
1172 @code{\cueDuring} command is a more specialized form of
1173 @code{\quoteDuring}, being particularly useful for inserting cue
1174 notes into a part. The syntax is as follows:
1177 \cueDuring #@var{partname} #@var{voice} @var{music}
1180 This command copies the corresponding measures from @var{partname}
1181 into a @code{CueVoice} context. The @code{CueVoice} is created
1182 implicitly, and occurs simultaneously with @var{music}, which
1183 creates a polyphonic situation. The @var{voice} argument
1184 determines whether the cue notes should be notated as a first or
1185 second voice; @code{UP} corresponds to the first voice, and
1186 @code{DOWN} corresponds to the second.
1188 @lilypond[verbatim,quote]
1189 oboe = \relative c'' {
1193 \addQuote "oboe" { \oboe }
1195 \new Voice \relative c'' {
1196 \cueDuring #"oboe" #UP { R1 }
1202 In the above example, the @code{Voice} context had to be
1203 explicitly declared, or else the entire music expression would
1204 belong to the @code{CueVoice} context.
1206 The name of the cued instrument can be printed by setting the
1207 @code{instrumentCueName} property in the @code{CueVoice} context.
1209 @lilypond[verbatim,quote]
1210 oboe = \relative c''' {
1213 \addQuote "oboe" { \oboe }
1215 \new Staff \relative c'' <<
1216 \new CueVoice \with {
1217 instrumentCueName = "ob."
1220 \cueDuring #"oboe" #UP { R1 }
1226 In addition to printing the name of the cued instrument, when cue
1227 notes end, the name of the original instrument should be printed,
1228 and any other changes introduced by the cued part should be
1229 undone. This can be accomplished by using
1230 @code{\addInstrumentDefinition} and @code{\instrumentSwitch}. For
1231 an example and explanation, see @ref{Instrument names}.
1233 The @code{\killCues} command removes cue notes from a music
1234 expression. This can be useful if cue notes need to be removed
1235 from a part but may be restored at a later time.
1237 @lilypond[verbatim,quote]
1238 flute = \relative c''' {
1241 \addQuote "flute" { \flute }
1243 \new Voice \relative c'' {
1245 \cueDuring #"flute" #UP { R1 }
1251 The @code{\transposedCueDuring} command is useful for adding
1252 instrumental cues from a completely different register. The
1253 syntax is similar to @code{\cueDuring}, but it requires one extra
1254 argument to specify the transposition of the cued instrument. For
1255 more information about transposition, see
1256 @ref{Instrument transpositions}.
1258 @lilypond[verbatim,quote]
1259 piccolo = \relative c''' {
1265 \addQuote "piccolo" { \piccolo }
1267 cbassoon = \relative c, {
1270 \transposedCueDuring #"piccolo" #UP c,, { R1 }
1275 \new Staff = "piccolo" \piccolo
1276 \new Staff = "cbassoon" \cbassoon
1280 It is possible to tag cued parts with unique names in order to
1281 process them in different ways. For details about this procedure,
1282 see @ref{Using tags}.
1288 @ref{Instrument transpositions},
1289 @ref{Instrument names},
1293 @rlsr{Staff notation}.
1295 Internals Reference:
1296 @rinternals{CueVoice},
1302 Collisions can occur with rests, when using @code{\cueDuring},
1303 between @code{Voice} and @code{CueVoice} contexts.