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 Staff.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 position of the staff
393 @warning{The @code{'line-positions} property overrides the
394 @code{'line-count} property. The number of staff lines is
395 implicitly defined by the number of elements in the list of values
396 for @code{'line-positions}}
398 @lilypond[verbatim,quote,relative=1]
400 \override StaffSymbol #'line-positions = #'(7 3 0 -4 -6 -7)
405 Staff line thickness can be modified. The thickness of ledger
406 lines and stems are also affected, since they depend on staff line
409 @lilypond[verbatim,quote,relative=1]
411 \override StaffSymbol #'thickness = #3
416 The thickness of ledger lines can be set independently of staff
419 @lilypond[verbatim,quote,relative=1]
421 \override StaffSymbol #'ledger-line-thickness = #'(1 . 0.2)
426 The distance between staff lines can be changed. The setting has
427 influence on ledger lines as well.
429 @lilypond[verbatim,quote,relative=1]
431 \override StaffSymbol #'staff-space = #1.5
436 The width of a staff can be adjusted. The unit is one staff
437 space. The spacing of objects inside the staff is not influenced
440 @lilypond[verbatim,quote,relative=1]
442 \override StaffSymbol #'width = #23
447 Further details about the properties of @code{StaffSymbol} listed
448 above can be found here: @rinternals{staff-symbol-interface}.
450 Modifications to staff properties in the middle of a score can be
451 placed between @code{\stopStaff} and @code{\startStaff}:
453 @lilypond[verbatim,quote,relative=2]
456 \override Staff.StaffSymbol #'line-count = #2
460 \revert Staff.StaffSymbol #'line-count
468 @funindex \startStaff
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 staff lines manually, bar lines are always drawn
501 centered on the position 0, so the maximum distance of the bar
502 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 scores
713 @cindex staff, hiding
715 @cindex hiding of staves
717 @cindex Frenched staves
719 In orchestral scores, staff lines that only have rests are usually
720 removed in order to save some space. This style is called
721 @q{French Score}. For the @code{Lyrics}, @code{ChordNames}, and
722 @code{FiguredBass} contexts, this is switched on by default.
724 For other staff contexts, this behavior is set with the
725 @code{\RemoveEmptyStaffContext} command. It is set in the
726 @code{\layout} block. As a result, empty staves or staves
727 containing multi-measure rests are removed after a line break.
729 @lilypond[verbatim,quote,ragged-right]
732 \RemoveEmptyStaffContext
737 \new Staff { e4 f g a \break c1 }
738 \new Staff { c4 d e f \break R1 }
743 To remove other types of contexts, use
744 @code{\AncientRemoveEmptyStaffContext} or
745 @code{\RemoveEmptyRhythmicStaffContext}.
749 Another application of @code{\RemoveEmptyStaffContext} is to make
750 ossia sections, i.e., alternative melodies on a separate piece of
751 staff, with help of a Frenched staff. For details, see
754 Staff lines can be made invisible by removing the
755 @code{Staff_symbol_engraver} from the @code{Staff} context:
757 @lilypond[verbatim,quote]
759 \remove "Staff_symbol_engraver"
761 \relative c'' { c8 c c16 c c c c2 }
767 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
768 {removing-the-first-empty-line.ly}
773 @funindex \RemoveEmptyStaffContext
774 @code{\RemoveEmptyStaffContext},
775 @funindex \AncientRemoveEmptyStaffContext
776 @code{\AncientRemoveEmptyStaffContext},
777 @funindex \RemoveEmptyRhythmicStaffContext
778 @code{\RemoveEmptyRhythmicStaffContext}.
788 @rlsr{Staff notation}.
791 @rinternals{ChordNames},
792 @rinternals{FiguredBass},
795 @rinternals{VerticalAxisGroup}.
799 @subsection Writing parts
801 This section explains how to insert tempo indications and
802 instrument names into a score. Methods to quote other voices and
803 format cue notes are also described.
808 * Quoting other voices::
809 * Formatting cue notes::
813 @node Metronome marks
814 @unnumberedsubsubsec Metronome marks
817 @cindex beats per minute
818 @cindex metronome marking
819 @cindex metronome marking with text
822 A basic metronome mark is simple to write:
824 @lilypond[verbatim,quote,relative=1]
830 Tempo indications with text can be used instead:
832 @lilypond[verbatim,quote,relative=2]
838 Combining a metronome mark and text will automatically place the
839 metronome mark within parentheses:
841 @lilypond[verbatim,quote,relative=2]
842 \tempo "Allegro" 4 = 160
847 In general, the text can be any markup object:
849 @lilypond[verbatim,quote,relative=2]
850 \tempo \markup { \italic Faster } 4 = 132
851 a8-. r8 b-. r gis-. r a-. r
854 A parenthesized metronome mark with no textual indication may be
855 written by including an empty string in the input:
857 @lilypond[verbatim,quote,relative=2]
865 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
866 {printing-metronome-and-rehearsal-marks-below-the-staff.ly}
868 @c perhaps also an example of how to move it horizontally?
870 @c TODO add snippet to LSR -pm
871 To change the tempo in the MIDI output without printing anything,
872 make the metronome marking invisible
875 \once \override Score.MetronomeMark #'transparent = ##t
878 @c TODO add snippet to LSR -pm
879 To print other metronome markings, use these markup commands
881 @lilypond[verbatim,quote,relative=1]
884 \smaller \general-align #Y #DOWN \note #"16." #1
886 \smaller \general-align #Y #DOWN \note #"8" #1
890 For more details, see @ref{Formatting text}.
897 @rglos{metronomic indication},
898 @rglos{tempo indication},
899 @rglos{metronome mark}.
902 @ref{Formatting text},
906 @rlsr{Staff notation}.
909 @rinternals{MetronomeMark}.
912 @node Instrument names
913 @unnumberedsubsubsec Instrument names
915 @cindex instrument names
916 @cindex instrument names, short
918 Instrument names can be printed on the left side of staves for the
919 @code{Staff} and @code{PianoStaff} contexts. The value of
920 @code{instrumentName} is used for the first staff, and the value
921 of @code{shortInstrumentName} is used for all succeeding staves.
923 @lilypond[verbatim,quote,ragged-right,relative=1]
924 \set Staff.instrumentName = "Violin "
925 \set Staff.shortInstrumentName = "Vln "
931 Markup mode can be used to create more complicated instrument
934 @lilypond[verbatim,quote,relative=2]
935 \set Staff.instrumentName = \markup {
936 \column { "Clarinetti"
937 \line { "in B" \smaller \flat } } }
941 @cindex instrument names, centering
943 When two or more staff contexts are grouped together, the
944 instrument names and short instrument names are centered by
945 default. To center multi-line instrument names,
946 @code{\center-column} must be used:
948 @lilypond[verbatim,quote,relative=2]
951 \set Staff.instrumentName = \markup \center-column {
953 \line { "in B" \smaller \flat }
958 \set Staff.instrumentName = "Vibraphone"
967 The @code{indent} and @code{short-indent} settings specify the
968 level of indentation for the first system and all succeeding
969 systems, respectively. They can be modified in the @code{\layout}
970 block. For instrument names or short instrument names that are
971 longer, it may be useful to increase the @code{indent} and
972 @code{short-indent} settings:
974 @lilypond[verbatim,quote]
977 instrumentName = "Oboe"
981 instrumentName = "Glockenspiel"
991 To add instrument names to other contexts (such as
992 @code{GrandStaff}, @code{ChoirStaff}, or @code{StaffGroup}),
993 @code{Instrument_name_engraver} must be added to that context.
994 For details, see @ref{Modifying context plug-ins}.
996 @cindex instrument names, changing
998 Instrument names may be changed in the middle of a piece:
1000 @lilypond[verbatim,quote,ragged-right,relative=1]
1001 \set Staff.instrumentName = "First"
1002 \set Staff.shortInstrumentName = "one"
1005 \set Staff.instrumentName = "Second"
1006 \set Staff.shortInstrumentName = "two"
1014 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1015 {aligning-and-centering-instrument-names.ly}
1021 @ref{Modifying context plug-ins}.
1024 @rlsr{Staff notation}.
1026 Internals Reference:
1027 @rinternals{InstrumentName},
1028 @rinternals{PianoStaff},
1032 @node Quoting other voices
1033 @unnumberedsubsubsec Quoting other voices
1036 @cindex quoting other voices
1040 Quotations allow fragments of other parts to be inserted directly
1041 into a music expression. Before a part can be quoted, the
1042 @code{\addQuote} command must be used to initialize the quoted
1043 fragment. This command must be used in the toplevel scope. The
1044 first argument is an identifying string, and the second is a music
1048 flute = \relative c' @{
1051 \addQuote "flute" @{ \flute @}
1054 The @code{\quoteDuring} command may then be used to indicate when
1055 the quotation should take place. The corresponding measures from
1056 the quotation are inserted into the music expression. The syntax
1057 is similar to @code{\addQuote}:
1059 @lilypond[verbatim,quote]
1060 flute = \relative c' {
1063 \addQuote "flute" { \flute }
1066 c4 cis \quoteDuring #"flute" { s2 }
1070 If the music expression used for @code{\quoteDuring} contains
1071 anything but a spacer rest or multi-measure rest, a polyphonic
1072 situation is created, which is often not desirable:
1074 @lilypond[verbatim,quote]
1075 flute = \relative c' {
1078 \addQuote "flute" { \flute }
1081 c4 cis \quoteDuring #"flute" { c4 b }
1085 Quotations recognize instrument transposition settings for both
1086 the source and target instruments if they are specified using the
1087 @code{\transposition} command:
1089 @lilypond[verbatim,quote]
1090 clarinet = \relative c' {
1094 \addQuote "clarinet" { \clarinet }
1097 c4 cis \quoteDuring #"clarinet" { s2 }
1101 @c add to snippets, possibly. It might already be there. -pm
1103 @c The type of events that are present in the quoted music can be
1104 @c trimmed with the @code{quotedEventTypes} property. The default
1105 @c value is @code{(note-event rest-event)}, which means that only
1106 @c notes and rests of the quoted voice end up in the
1107 @c @code{\quoteDuring}. Setting
1110 @c \set Staff.quotedEventTypes =
1111 @c #'(note-event articulation-event dynamic-event)
1115 @c will quote notes (but no rests), together with scripts and
1121 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1122 {quoting-another-voice-with-transposition.ly}
1124 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1125 {quoting-another-voice.ly}
1131 @ref{Instrument transpositions}.
1134 @rlsr{Staff notation}.
1136 Internals Reference:
1137 @rinternals{QuoteMusic},
1143 Only the contents of the first @code{Voice} occurring in an
1144 @code{\addQuote} command will be considered for quotation, so
1145 @var{music} cannot contain @code{\new} and @code{\context Voice}
1146 statements that would switch to a different Voice.
1148 Quoting grace notes is broken and can even cause LilyPond to
1151 Quoting nested triplets may result in poor notation.
1153 In earlier versions of LilyPond (pre 2.11), @code{addQuote} was
1154 written entirely in lower-case letters: @code{\addquote}.
1157 @node Formatting cue notes
1158 @unnumberedsubsubsec Formatting cue notes
1162 @cindex cue notes, formatting
1164 @cindex quoting other voices
1165 @cindex cues, formatting
1167 The previous section explains how to quote other voices. The
1168 @code{\cueDuring} command is a more specialized form of
1169 @code{\quoteDuring}, being particularly useful for inserting cue
1170 notes into a part. The syntax is as follows:
1173 \cueDuring #@var{partname} #@var{voice} @var{music}
1176 This command copies the corresponding measures from @var{partname}
1177 into a @code{CueVoice} context. The @code{CueVoice} is created
1178 implicitly, and occurs simultaneously with @var{music}, which
1179 creates a polyphonic situation. The @var{voice} argument
1180 determines whether the cue notes should be notated as a first or
1181 second voice; @code{DOWN} corresponds to the first voice, and
1182 @code{UP} corresponds to the second.
1184 @lilypond[verbatim,quote]
1185 oboe = \relative c'' {
1189 \addQuote "oboe" { \oboe }
1191 \new Voice \relative c'' {
1192 \cueDuring #"oboe" #UP { R1 }
1197 In the above example, the @code{Voice} context had to be
1198 explicitly declared, or else the entire music expression would
1199 belong to the @code{CueVoice} context.
1201 The name of the cued instrument can be printed by setting the
1202 @code{instrumentCueName} property.
1204 @lilypond[verbatim,quote]
1205 oboe = \relative c''' {
1208 \addQuote oboe { \oboe }
1210 \new Staff \relative c'' <<
1211 \new CueVoice \with {
1212 instrumentCueName = "ob."
1215 \cueDuring #"oboe" #UP { R1 }
1221 The @code{\killCues} command is used to remove the cue notes from
1224 @lilypond[verbatim,quote]
1225 flute = \relative c''' {
1228 \addQuote flute { \flute }
1230 \new Voice \relative c'' {
1232 \cueDuring #"flute" #UP { R1 }
1238 When typesetting cue notes, some guidelines should be followed:
1242 The instrument playing the cue should be clearly marked on the
1246 When the cue notes end, the name of the original instrument should
1250 Any other changes introduced by the cued part should also be
1251 undone. For example, if the cued instrument plays in a different
1252 clef, the original clef should be stated once again.
1256 @c FIXME explain syntax of \transposedCueDuring
1258 The @code{\transposedCueDuring} command is useful to add cues for
1259 instruments in a completely different register. Having piccolo
1260 cues within a contrabassoon part is a good example.
1262 @lilypond[verbatim,quote]
1263 piccolo = \relative c''' {
1269 \addQuote "piccolo" { \piccolo }
1271 cbassoon = \relative c, {
1274 \transposedCueDuring #"piccolo" #UP c,, { R1 }
1279 \new Staff = "piccolo" \piccolo
1280 \new Staff = "cbassoon" \cbassoon
1288 @rlsr{Staff notation}.
1290 Internals Reference:
1291 @rinternals{CueVoice},
1297 Collisions are not checked between @code{Voice} and
1298 @code{CueVoice} contexts.