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 shows the different possibilities of creating and
31 grouping staves, which are marked at the beginning of each line
32 with either a bracket or a brace.
35 * Instantiating new staves::
37 * Deeper nested staff groups::
41 @node Instantiating new staves
42 @unnumberedsubsubsec Instantiating new staves
45 @cindex staff initiation
46 @cindex staff instantiation
50 @cindex percussion staff
51 @cindex Gregorian transcription staff
52 @cindex rhythmic staff
56 @notation{Staves} (singular: @notation{staff}) are created with
57 the @code{\new} or @code{\context} commands. For details, see
58 @ref{Creating contexts}.
60 The basic staff context is @code{Staff}:
62 @lilypond[verbatim,quote,relative=2]
63 \new Staff { c4 d e f }
66 @code{DrumStaff} creates a five-line staff set up for a
67 typical drum set. It uses different names for each instrument.
68 The instrument names are set using the @code{\drummode} command.
69 For details, see @ref{Percussion staves}.
71 @lilypond[verbatim,quote]
73 \drummode { cymc hh ss tomh }
77 @c FIXME: remove when mentioned in NR 2.8
78 @code{GregorianTranscriptionStaff} creates a staff to notate
79 modern Gregorian chant. It does not show bar lines.
81 @lilypond[verbatim,quote,relative=2]
82 \new GregorianTranscriptionStaff { c4 d e f }
85 @code{RhythmicStaff} creates a single-line staff that only
86 displays the rhythmic values of the input. Real durations are
87 preserved. For details, see @ref{Showing melody rhythms}.
89 @lilypond[verbatim,quote,relative=2]
90 \new RhythmicStaff { c4 d e f }
93 @code{TabStaff} creates a tablature with six strings in standard
94 guitar tuning. For details, see @ref{Default tablatures}.
96 @lilypond[verbatim,quote,relative=2]
97 \new TabStaff { c4 d e f }
100 There are two staff contexts specific for the notation of ancient
101 music: @code{MensuralStaff} and @code{VaticanaStaff}. They are
102 described in @ref{Pre-defined contexts}.
104 Staves can be started or stopped at any point in the score. The
105 commands @code{\startStaff} and @code{\stopStaff} are used for
106 this purpose. For details, see @ref{Staff symbol}.
116 @ref{Creating contexts},
117 @ref{Percussion staves},
118 @ref{Showing melody rhythms},
119 @ref{Default tablatures},
120 @ref{Pre-defined contexts},
122 @ref{Gregorian chant contexts},
123 @ref{Mensural contexts}.
126 @rlsr{Staff notation}.
130 @rinternals{DrumStaff},
131 @rinternals{GregorianTranscriptionStaff},
132 @rinternals{RhythmicStaff},
133 @rinternals{TabStaff},
134 @rinternals{MensuralStaff},
135 @rinternals{VaticanaStaff},
136 @rinternals{StaffSymbol}.
139 @node Grouping staves
140 @unnumberedsubsubsec Grouping staves
142 @cindex start of system
143 @cindex staff, multiple
144 @cindex staves, multiple
145 @cindex system start delimiters
146 @cindex bracket, vertical
147 @cindex brace, vertical
156 Various contexts exist to group single staves together in order to
157 form multi-stave systems. Each grouping context sets the style of
158 the system start delimiter and the behavior of bar lines.
160 If no context is specified, the default properties will be used:
161 the group is started with a vertical line, and the bar lines are
164 @lilypond[verbatim,quote,relative=2]
171 In the @code{StaffGroup} context, the group is started with a
172 bracket and bar lines are drawn through all the staves.
174 @lilypond[verbatim,quote,relative=2]
181 In a @code{ChoirStaff}, the group starts with a bracket, but bar
182 lines are not connected.
184 @lilypond[verbatim,quote,relative=2]
191 In a @code{GrandStaff}, the group begins with a brace, and bar
192 lines are connected between the staves.
194 @lilypond[verbatim,quote,relative=2]
201 The @code{PianoStaff} is identical to a @code{GrandStaff}, except
202 that it supports printing the instrument name directly. For
203 details, see @ref{Instrument names}.
205 @lilypond[verbatim,quote,relative=2]
207 \set PianoStaff.instrumentName = "Piano"
213 Each staff group context sets the property
214 @code{systemStartDelimiter} to one of the following values:
215 @code{SystemStartBar}, @code{SystemStartBrace}, or
216 @code{SystemStartBracket}. A fourth delimiter,
217 @code{SystemStartSquare}, is also available, but it must be
218 explicitly specified.
223 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
224 {use-square-bracket-at-the-start-of-a-staff-group.ly}
226 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
227 {display-bracket-with-only-one-staff-in-a-system.ly}
229 @cindex mensurstriche layout
230 @cindex renaissance music
231 @cindex transcription of mensural music
232 @cindex mensural music, transcription of
234 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
235 {mensurstriche-layout-bar-lines-between-the-staves.ly}
236 @c FIXME: move to NR 2.8.x when sectioning is ready
247 @ref{Instrument names}.
250 @rlsr{Staff notation}.
254 @rinternals{StaffGroup},
255 @rinternals{ChoirStaff},
256 @rinternals{GrandStaff},
257 @rinternals{PianoStaff},
258 @rinternals{SystemStartBar},
259 @rinternals{SystemStartBrace},
260 @rinternals{SystemStartBracket},
261 @rinternals{SystemStartSquare}.
264 @node Deeper nested staff groups
265 @unnumberedsubsubsec Deeper nested staff groups
267 @cindex staff, nested
268 @cindex staves, nested
269 @cindex nesting of staves
270 @cindex system start delimiters, nested
271 @cindex nested staff brackets
272 @cindex brackets, nesting of
273 @cindex braces, nesting of
274 @cindex inner staff group
275 @cindex inner choir staff group
277 Two additional staff-group contexts are available that can be
278 nested within a @code{StaffGroup} or @code{ChoirStaff} context:
279 @code{InnerStaffGroup} and @code{InnerChoirStaff}. These contexts
280 create a bracket next to the original bracket of their parent
283 An @code{InnerStaffGroup} is treated similarly to a
284 @code{StaffGroup}; bar lines are connected between each stave
287 @lilypond[verbatim,quote,relative=2]
289 \new Staff { c2 c | c2 c }
290 \new InnerStaffGroup <<
291 \new Staff { g2 g | g2 g }
292 \new Staff { e2 e | e2 e }
297 Bar lines are @emph{not} connected between staves of an
298 @code{InnerChoirStaff}, just like a @code{ChoirStaff}:
300 @lilypond[verbatim,quote,relative=2]
302 \new Staff { c2 c | c2 c }
303 \new InnerChoirStaff <<
304 \new Staff { g2 g | g2 g }
305 \new Staff { e2 e | e2 e }
307 \new Staff { c1 | c1 }
314 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
321 @ref{Grouping staves},
322 @ref{Instrument names}.
325 @rlsr{Staff notation}.
328 @rinternals{InnerStaffGroup},
329 @rinternals{StaffGroup},
330 @rinternals{InnerChoirStaff},
331 @rinternals{ChoirStaff},
332 @rinternals{SystemStartBar},
333 @rinternals{SystemStartBrace},
334 @rinternals{SystemStartBracket},
335 @rinternals{SystemStartSquare}.
338 @node Modifying single staves
339 @subsection Modifying single staves
341 This section explains how to change specific attributes of one
342 staff: for example, modifying the number of staff lines or the
343 staff size. Methods to start and stop staves and set ossia
344 sections are also described.
354 @unnumberedsubsubsec Staff symbol
356 @cindex adjusting staff symbol
357 @cindex drawing staff symbol
358 @cindex staff symbol, setting of
359 @cindex stop staff lines
360 @cindex start staff lines
361 @cindex staff lines, amount of
362 @cindex staff lines, number of
363 @cindex staff line, thickness of
364 @cindex amount of staff lines
365 @cindex thickness of staff lines
366 @cindex ledger lines, setting
367 @cindex setting of ledger lines
368 @cindex spacing of ledger lines
369 @cindex number of staff lines
371 The lines of a staff belong to the @code{StaffSymbol} grob.
372 @code{StaffSymbol} properties can be modified to change the
373 appearance of a staff, but they must be modified before the staff
376 The number of staff lines may be changed. The clef position and
377 the position of middle C may need to be modified to fit the new
378 staff. For an explanation, refer to the snippet section in
381 @lilypond[verbatim,quote,relative=2]
383 \override StaffSymbol #'line-count = #3
388 The vertical position of staff lines and the number of staff lines
389 can be defined at the same time. As the following example shows,
390 note positions are not influenced by the staff line positions.
392 @warning{The @code{'line-positions} property overrides the
393 @code{'line-count} property. The number of staff lines is
394 implicitly defined by the number of elements in the list of values
395 for @code{'line-positions}}
397 @lilypond[verbatim,quote,relative=1]
399 \override StaffSymbol #'line-positions = #'(7 3 0 -4 -6 -7)
404 Staff line thickness can be modified. The thickness of ledger
405 lines and stems are also affected, since they depend on staff line
408 @lilypond[verbatim,quote,relative=1]
410 \override StaffSymbol #'thickness = #3
415 Ledger line thickness can be set independently of staff line
418 @lilypond[verbatim,quote,relative=1]
420 \override StaffSymbol #'ledger-line-thickness = #'(1 . 0.2)
425 The distance between staff lines can be changed. This setting has
426 influence on ledger lines as well.
428 @lilypond[verbatim,quote,relative=1]
430 \override StaffSymbol #'staff-space = #1.5
435 The width of a staff can be modified. The unit is one staff
436 space. The spacing of objects inside the staff is not influenced
439 @lilypond[verbatim,quote,relative=1]
441 \override StaffSymbol #'width = #23
446 Further details about the properties of @code{StaffSymbol} can be
447 found here: @rinternals{staff-symbol-interface}.
449 @funindex \startStaff
452 Modifications to staff properties in the middle of a score can be
453 placed between @code{\stopStaff} and @code{\startStaff}:
455 @lilypond[verbatim,quote,relative=2]
458 \override Staff.StaffSymbol #'line-count = #2
462 \revert Staff.StaffSymbol #'line-count
476 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
477 {making-some-staff-lines-thicker-than-the-others.ly}
488 @ref{Displaying pitches}.
491 @rlsr{Staff notation}.
494 @rinternals{StaffSymbol},
495 @rinternals{staff-symbol-interface}.
500 When setting vertical staff line positions manually, bar lines are
501 always centered on position 0, so the maximum distance between the
502 outermost bar lines in either direction must be equal.
506 @unnumberedsubsubsec Ossia staves
508 @cindex staff, Frenched
510 @cindex Frenched staves
511 @cindex staff, resizing of
512 @cindex resizing of staves
514 @notation{Ossia} staves can be set by creating a new simultaneous
515 staff in the appropriate location:
517 @lilypond[verbatim,quote]
518 \new Staff \relative c'' {
522 \new Staff { e4 d f e }
528 However, the above example is usually not the desired result. To
529 create ossia staves that are above the original staff, have no
530 time signature or clef, and have a smaller font size, tweaks must
531 be used. The Learning Manual describes a specific technique to
532 achieve this goal, beginning with
533 @rlearning{Nesting music expressions}.
535 The following example uses the @code{alignAboveContext} property
536 to align the ossia staff. This method is most appropriate when
537 only a few ossia staves are needed.
539 @lilypond[verbatim,quote]
540 \new Staff = main \relative c'' {
546 \remove "Time_signature_engraver"
547 alignAboveContext = #"main"
549 \override StaffSymbol #'staff-space = #(magstep -3)
550 \override StaffSymbol #'thickness = #(magstep -3)
559 If many isolated ossia staves are needed, creating an empty
560 @code{Staff} context with a specific @emph{context id} may be more
561 appropriate; the ossia staves may then be created by
562 @emph{calling} this context and using @code{\startStaff} and
563 @code{\stopStaff} at the desired locations. The benefits of this
564 method are more apparent if the piece is longer than the following
567 @lilypond[verbatim,quote,ragged-right]
569 \new Staff = ossia \with {
570 \remove "Time_signature_engraver"
571 \remove "Clef_engraver"
573 \override StaffSymbol #'staff-space = #(magstep -3)
574 \override StaffSymbol #'thickness = #(magstep -3)
578 \new Staff \relative c' {
582 \context Staff = ossia {
583 \startStaff e4 g8 f e2 \stopStaff
590 \context Staff = ossia {
591 \startStaff g4 e8 f g2 \stopStaff
599 @c The following is the legacy "ossia.ly" example
601 @c I don't think this method is very efficient.
602 @c I'm commenting it out for now. -pm
606 @ lilypond[verbatim,quote]
610 %No time signature in the ossia staff
611 \remove "Time_signature_engraver"
613 \override StaffSymbol #'staff-space = #(magstep -3)
614 \override StaffSymbol #'thickness = #(magstep -3)
623 bes8[^"ossia" g bes g]
631 \new Staff \relative c'' {
640 Using the @code{\RemoveEmptyStaffContext} command to create ossia
641 staves may be used as an alternative. This method is most
642 convenient when ossia staves occur immediately following a line
643 break. In this case, spacer rests do not need to be used at all;
644 only @code{\startStaff} and @code{\stopStaff} are necessary. For
645 more information about @code{\RemoveEmptyStaffContext}, see
648 @lilypond[verbatim,quote,ragged-right]
650 \new Staff = ossia \with {
651 \remove "Time_signature_engraver"
652 \remove "Clef_engraver"
654 \override StaffSymbol #'staff-space = #(magstep -3)
655 \override StaffSymbol #'thickness = #(magstep -3)
657 \new Staff \relative c' {
663 \context Staff = ossia {
664 c4 e8 d c2 \stopStaff
674 \RemoveEmptyStaffContext
675 \override VerticalAxisGroup #'remove-first = ##t
683 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
684 {vertically-aligning-ossias-and-lyrics.ly}
692 @rglos{Frenched staff}.
695 @rlearning{Nesting music expressions},
696 @rlearning{Size of objects},
697 @rlearning{Length and thickness of objects}.
700 @ref{Setting the staff size}.
703 @rlsr{Staff notation}.
706 @rinternals{StaffSymbol}.
710 @unnumberedsubsubsec Hiding staves
712 @cindex Frenched score
713 @cindex Frenched staff
714 @cindex staff, hiding
716 @cindex hiding of staves
719 Staff lines can be hidden by removing the
720 @code{Staff_symbol_engraver} from the @code{Staff} context. As an
721 alternative, @code{\stopStaff} may be used.
723 @lilypond[verbatim,quote]
725 \remove "Staff_symbol_engraver"
727 \relative c''' { a8 f e16 d c b a2 }
730 @funindex \RemoveEmptyStaffContext
732 Empty staves can be hidden by setting the
733 @code{\RemoveEmptyStaffContext} command in the @code{\layout}
734 block. In orchestral scores, this style is known as @q{Frenched
735 Score}. By default, this command hides all empty staves in a
736 score except for those in the first system.
738 @warning{An empty staff may only include multi-measure rests,
739 skips, spacer rests, or a combination of these.}
741 @lilypond[verbatim,quote,ragged-right]
744 \RemoveEmptyStaffContext
763 @code{\RemoveEmptyStaffContext} can also be used to create ossia
764 sections for a staff. For details, see @ref{Ossia staves}.
766 @cindex hiding ancient staves
767 @cindex hiding rhythmic staves
768 @funindex \AncientRemoveEmptyStaffContext
769 @funindex \RemoveEmptyRhythmicStaffContext
771 The @code{\AncientRemoveEmptyStaffContext} command may be used to
772 hide empty staves in ancient music contexts. Similarly,
773 @code{\RemoveEmptyRhythmicStaffContext} may be used to hide empty
774 @code{RhythmicStaff} contexts.
779 @code{\RemoveEmptyStaffContext},
780 @code{\AncientRemoveEmptyStaffContext},
781 @code{\RemoveEmptyRhythmicStaffContext}.
786 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
787 {removing-the-first-empty-line.ly}
793 @rglos{Frenched staff}.
800 @rlsr{Staff notation}.
803 @rinternals{ChordNames},
804 @rinternals{FiguredBass},
807 @rinternals{VerticalAxisGroup}.
811 @subsection Writing parts
813 This section explains how to insert tempo indications and
814 instrument names into a score. Methods to quote other voices and
815 format cue notes are also described.
820 * Quoting other voices::
821 * Formatting cue notes::
825 @node Metronome marks
826 @unnumberedsubsubsec Metronome marks
829 @cindex beats per minute
830 @cindex metronome marking
831 @cindex metronome marking with text
834 A basic metronome mark is simple to write:
836 @lilypond[verbatim,quote,relative=1]
842 Tempo indications with text can be used instead:
844 @lilypond[verbatim,quote,relative=2]
850 Combining a metronome mark and text will automatically place the
851 metronome mark within parentheses:
853 @lilypond[verbatim,quote,relative=2]
854 \tempo "Allegro" 4 = 160
859 In general, the text can be any markup object:
861 @lilypond[verbatim,quote,relative=2]
862 \tempo \markup { \italic Faster } 4 = 132
863 a8-. r8 b-. r gis-. r a-. r
866 A parenthesized metronome mark with no textual indication may be
867 written by including an empty string in the input:
869 @lilypond[verbatim,quote,relative=2]
877 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
878 {printing-metronome-and-rehearsal-marks-below-the-staff.ly}
880 @c perhaps also an example of how to move it horizontally?
882 @c TODO add snippet to LSR -pm
883 To change the tempo in the MIDI output without printing anything,
884 make the metronome marking invisible
887 \once \override Score.MetronomeMark #'transparent = ##t
890 @c TODO add snippet to LSR -pm
891 To print other metronome markings, use these markup commands
893 @lilypond[verbatim,quote,relative=1]
896 \smaller \general-align #Y #DOWN \note #"16." #1
898 \smaller \general-align #Y #DOWN \note #"8" #1
902 For more details, see @ref{Formatting text}.
909 @rglos{metronomic indication},
910 @rglos{tempo indication},
911 @rglos{metronome mark}.
914 @ref{Formatting text},
918 @rlsr{Staff notation}.
921 @rinternals{MetronomeMark}.
924 @node Instrument names
925 @unnumberedsubsubsec Instrument names
927 @cindex instrument names
928 @cindex instrument names, short
930 Instrument names can be printed on the left side of staves for the
931 @code{Staff} and @code{PianoStaff} contexts. The value of
932 @code{instrumentName} is used for the first staff, and the value
933 of @code{shortInstrumentName} is used for all succeeding staves.
935 @lilypond[verbatim,quote,ragged-right,relative=1]
936 \set Staff.instrumentName = "Violin "
937 \set Staff.shortInstrumentName = "Vln "
943 Markup mode can be used to create more complicated instrument
946 @lilypond[verbatim,quote,relative=2]
947 \set Staff.instrumentName = \markup {
948 \column { "Clarinetti"
949 \line { "in B" \smaller \flat } } }
953 @cindex instrument names, centering
955 When two or more staff contexts are grouped together, the
956 instrument names and short instrument names are centered by
957 default. To center multi-line instrument names,
958 @code{\center-column} must be used:
960 @lilypond[verbatim,quote,relative=2]
963 \set Staff.instrumentName = "Flute"
967 \set Staff.instrumentName = \markup \center-column {
969 \line { "in B" \smaller \flat }
979 However, if the instrument names are longer, the instrument names
980 in a staff group may not be centered unless the @code{indent} and
981 @code{short-indent} settings are increased. The @code{indent} and
982 @code{short-indent} settings are modified in the @code{\layout}
983 block and specify the level of indentation for the first system
984 and all succeeding systems, respectively.
986 @lilypond[verbatim,quote,ragged-right]
989 short-indent = 1.5\cm
994 \set Staff.instrumentName = "Flute"
995 \set Staff.shortInstrumentName = "Fl."
1000 \set Staff.instrumentName = "Clarinet"
1001 \set Staff.shortInstrumentName = "Clar."
1008 To add instrument names to other contexts (such as
1009 @code{GrandStaff}, @code{ChoirStaff}, or @code{StaffGroup}),
1010 @code{Instrument_name_engraver} must be added to that context.
1011 For details, see @ref{Modifying context plug-ins}.
1013 @cindex instrument names, changing
1015 Instrument names may be changed in the middle of a piece:
1017 @lilypond[verbatim,quote,ragged-right,relative=1]
1018 \set Staff.instrumentName = "First"
1019 \set Staff.shortInstrumentName = "one"
1022 \set Staff.instrumentName = "Second"
1023 \set Staff.shortInstrumentName = "two"
1032 @ref{Modifying context plug-ins}.
1035 @rlsr{Staff notation}.
1037 Internals Reference:
1038 @rinternals{InstrumentName},
1039 @rinternals{PianoStaff},
1043 @node Quoting other voices
1044 @unnumberedsubsubsec Quoting other voices
1047 @cindex quoting other voices
1051 Quotations allow fragments of other parts to be inserted directly
1052 into a music expression. Before a part can be quoted, the
1053 @code{\addQuote} command must be used to initialize the quoted
1054 fragment. This command must be used in the toplevel scope. The
1055 first argument is an identifying string, and the second is a music
1059 flute = \relative c' @{
1062 \addQuote "flute" @{ \flute @}
1065 The @code{\quoteDuring} command may then be used to indicate when
1066 the quotation should take place. The corresponding measures from
1067 the quotation are inserted into the music expression. The syntax
1068 is similar to @code{\addQuote}:
1070 @lilypond[verbatim,quote]
1071 flute = \relative c' {
1074 \addQuote "flute" { \flute }
1077 c4 cis \quoteDuring #"flute" { s2 }
1081 If the music expression used for @code{\quoteDuring} contains
1082 anything but a spacer rest or multi-measure rest, a polyphonic
1083 situation is created, which is often not desirable:
1085 @lilypond[verbatim,quote]
1086 flute = \relative c' {
1089 \addQuote "flute" { \flute }
1092 c4 cis \quoteDuring #"flute" { c4 b }
1096 Quotations recognize instrument transposition settings for both
1097 the source and target instruments if they are specified using the
1098 @code{\transposition} command:
1100 @lilypond[verbatim,quote]
1101 clarinet = \relative c' {
1105 \addQuote "clarinet" { \clarinet }
1108 c4 cis \quoteDuring #"clarinet" { s2 }
1112 @c add to snippets, possibly. It might already be there. -pm
1114 @c The type of events that are present in the quoted music can be
1115 @c trimmed with the @code{quotedEventTypes} property. The default
1116 @c value is @code{(note-event rest-event)}, which means that only
1117 @c notes and rests of the quoted voice end up in the
1118 @c @code{\quoteDuring}. Setting
1121 @c \set Staff.quotedEventTypes =
1122 @c #'(note-event articulation-event dynamic-event)
1126 @c will quote notes (but no rests), together with scripts and
1132 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1133 {quoting-another-voice-with-transposition.ly}
1135 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1136 {quoting-another-voice.ly}
1142 @ref{Instrument transpositions}.
1145 @rlsr{Staff notation}.
1147 Internals Reference:
1148 @rinternals{QuoteMusic},
1154 Only the contents of the first @code{Voice} occurring in an
1155 @code{\addQuote} command will be considered for quotation, so
1156 @var{music} cannot contain @code{\new} and @code{\context Voice}
1157 statements that would switch to a different Voice.
1159 Quoting grace notes is broken and can even cause LilyPond to
1162 Quoting nested triplets may result in poor notation.
1164 In earlier versions of LilyPond (pre 2.11), @code{addQuote} was
1165 written entirely in lower-case letters: @code{\addquote}.
1168 @node Formatting cue notes
1169 @unnumberedsubsubsec Formatting cue notes
1173 @cindex cue notes, formatting
1175 @cindex quoting other voices
1176 @cindex cues, formatting
1178 The previous section explains how to quote other voices. The
1179 @code{\cueDuring} command is a more specialized form of
1180 @code{\quoteDuring}, being particularly useful for inserting cue
1181 notes into a part. The syntax is as follows:
1184 \cueDuring #@var{partname} #@var{voice} @var{music}
1187 This command copies the corresponding measures from @var{partname}
1188 into a @code{CueVoice} context. The @code{CueVoice} is created
1189 implicitly, and occurs simultaneously with @var{music}, which
1190 creates a polyphonic situation. The @var{voice} argument
1191 determines whether the cue notes should be notated as a first or
1192 second voice; @code{UP} corresponds to the first voice, and
1193 @code{DOWN} corresponds to the second.
1195 @lilypond[verbatim,quote]
1196 oboe = \relative c'' {
1200 \addQuote "oboe" { \oboe }
1202 \new Voice \relative c'' {
1203 \cueDuring #"oboe" #UP { R1 }
1208 In the above example, the @code{Voice} context had to be
1209 explicitly declared, or else the entire music expression would
1210 belong to the @code{CueVoice} context.
1212 The name of the cued instrument can be printed by setting the
1213 @code{instrumentCueName} property.
1215 @lilypond[verbatim,quote]
1216 oboe = \relative c''' {
1219 \addQuote oboe { \oboe }
1221 \new Staff \relative c'' <<
1222 \new CueVoice \with {
1223 instrumentCueName = "ob."
1226 \cueDuring #"oboe" #UP { R1 }
1232 The @code{\killCues} command is used to remove the cue notes from
1235 @lilypond[verbatim,quote]
1236 flute = \relative c''' {
1239 \addQuote flute { \flute }
1241 \new Voice \relative c'' {
1243 \cueDuring #"flute" #UP { R1 }
1249 When typesetting cue notes, some guidelines should be followed:
1253 The instrument playing the cue should be clearly marked on the
1257 When the cue notes end, the name of the original instrument should
1261 Any other changes introduced by the cued part should also be
1262 undone. For example, if the cued instrument plays in a different
1263 clef, the original clef should be stated once again.
1267 The @code{\transposedCueDuring} command is useful to add cues for
1268 instruments in a completely different register. The syntax is
1269 similar to @code{\cueDuring}, but it requires one more argument to
1270 specify the transposition of the cued instrument. For more
1271 information about transposition, see
1272 @ref{Instrument transpositions}.
1274 @lilypond[verbatim,quote]
1275 piccolo = \relative c''' {
1281 \addQuote "piccolo" { \piccolo }
1283 cbassoon = \relative c, {
1286 \transposedCueDuring #"piccolo" #UP c,, { R1 }
1291 \new Staff = "piccolo" \piccolo
1292 \new Staff = "cbassoon" \cbassoon
1300 @ref{Instrument transpositions}.
1303 @rlsr{Staff notation}.
1305 Internals Reference:
1306 @rinternals{CueVoice},
1312 Collisions are not checked between @code{Voice} and
1313 @code{CueVoice} contexts.