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}
17 This section explains how to influence the staff appearance,
18 print scores with more than one staff, and
19 how to apply specific performance marks to single staves.
23 * Modifying single staves::
28 @node Displaying staves
29 @subsection Displaying staves
31 This section shows the different possibilities to create and group
32 staves into groups, which can be marked in the beginning of each
33 line with either a bracket or a brace.
36 * Instantiating new staves::
38 * Deeper nested staff groups::
41 @node Instantiating new staves
42 @subsubsection 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 The lines of a staff (pl. staves) are produced by the @code{staff symbol}
57 layout object. Staves are created with the @code{\new} or
58 @code{\context} commands. For an explanation on these commands,
59 see @ref{Creating contexts}.
61 There are different predefined staff contexts available in LilyPond:
65 The default is @code{Staff}:
66 @lilypond[verbatim,ragged-right,quote]
68 \new Staff { c d e f }
73 @code{DrumStaff} creates a five line staff set up for a typical drum set.
74 It uses different names for each instrument. The instrument names have to
75 be set using the @code{drummode}. See @ref{Percussion staves}.
76 @lilypond[verbatim,ragged-right,quote]
78 \drummode { cymc hh ss tomh }
83 @code{GregorianTranscriptionStaff} sets up a staff to notate modern
84 Gregorian chant. It does not show bar lines.
85 @lilypond[verbatim,ragged-right,quote]
87 \new GregorianTranscriptionStaff { c d e f }
92 @code{RhythmicStaff} can be used to show the rhythm of some music. The
93 notes are printed on one line regardless of their pitch, but the duration
94 is preserved. See @ref{Showing melody rhythms}.
95 @lilypond[verbatim,ragged-right,quote]
97 \new RhythmicStaff { c d e f }
102 @code{TabStaff} creates by default a tablature with six strings in
103 standard guitar tuning. See @ref{Tablatures basic}.
104 @lilypond[verbatim,ragged-right,quote]
106 \new TabStaff { c d e f }
113 Besides these staves there are two staff contexts specific for the notation
114 of ancient music: @code{MensuralStaff} and @code{VaticanaStaff}. They are
115 described in @ref{Pre-defined contexts}.
117 Once a staff is instantiated it can be started or stopped at every point
118 in the score. This is done with the commands @code{\startStaff} and
119 @code{\stopStaff}. How to use it is explained in @ref{Staff symbol}.
124 Music Glossary: @rglos{staff}, @rglos{staves}.
126 Notation Reference: @ref{Percussion staves},
127 @ref{Tablatures basic}, @ref{Gregorian Chant contexts}, and
128 @ref{Mensural contexts}.
130 Snippets: @lsrdir{Staff,Staff-notation}.
132 Internals Reference: @internalsref{Staff}, @internalsref{DrumStaff},
133 @internalsref{GregorianTranscriptionStaff}, @internalsref{RhythmicStaff},
134 @internalsref{TabStaff}, @internalsref{MensuralStaff},
135 @internalsref{VaticanaStaff}.
139 @node Grouping staves
140 @subsubsection 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
155 LilyPond provides different types of contexts to group single staves
156 together. These contexts influence in the first place the appearance
157 of the system start delimiter, but they have also influence on the
158 behavior of the bar lines.
160 Each staff group context sets the property
161 @code{systemStartDelimiter} to one of the values
162 @code{SystemStartBar}, @code{SystemStartBrace},
163 and @code{SystemStartBracket}. A fourth delimiter,
164 @code{systemStartSquare}, is also available, but must be
165 instantiated manually. The usage of this last delimiter is shown further
166 down in the snippet section.
171 If no context is specified, the default properties for the score
172 will be used: the group is started with a vertical line, and the
173 bar lines are not connected. The name of the beginning bar line
174 grob is @code{SystemStartBar}.
176 @lilypond[verbatim,ragged-right,quote]
184 In a @code{StaffGroup}, the bar lines will be drawn through
185 all the staves, and the group is started with a bracket.
187 @lilypond[verbatim,ragged-right,quote]
197 In a @code{ChoirStaff}, the group is
198 started with a bracket, but bar lines are not connected.
200 @lilypond[verbatim,ragged-right,quote]
210 In a @code{GrandStaff}, the group is started with a brace
211 at the left, and bar lines are connected between the staves.
213 @lilypond[verbatim,ragged-right,quote]
223 The @code{PianoStaff} behaves almost as the @code{GrandStaff} but is
224 optimized for setting piano music. In particular it supports the printing
225 of an instrument name directly, see @ref{Instrument names}.
227 @lilypond[verbatim,ragged-right,quote]
238 According to classic engraver rules an orchestral score consists of
239 staves connected only with a single line at the beginning of the system.
240 In LilyPond this is produced grouping the @code{Staff} contexts with
243 Each instrument family is grouped inside of a @code{StaffGroup} with a
244 starting bracket. A group of same instruments or an instrument using
245 more than one staff is grouped with braces in a @code{GrandStaff}.
247 As the context names tell, @code{PianoStaff} is used for notating
248 piano music and @code{ChoirStaff} for all kind of vocal ensemble music.
253 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
254 {use-square-bracket-at-the-start-of-a-staff-group.ly}
256 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
257 {display-bracket-with-only-one-staff-in-a-system.ly}
259 @cindex mensurstriche layout
260 @cindex renaissance music
261 @cindex transcription of mensural music
262 @cindex mensural music, transcription of
264 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
265 {mensurstriche-layout-bar-lines-between-the-staves.ly}
270 Music Glossary: @rglos{brace},
271 @rglos{bracket}, @rglos{grand staff}.
273 Snippets: @lsrdir{Staff,Staff-notation}
275 Internals Reference: @internalsref{ChoirStaff},
276 @internalsref{GrandStaff}, @internalsref{StaffGroup},
277 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace},
278 @internalsref{SystemStartBracket}, and @internalsref{systemStartSquare}.
281 @node Deeper nested staff groups
282 @subsubsection Deeper nested staff groups
284 There are also two inner staff contexts named @code{InnerStaffGroup}
285 and @code{InnerChoirStaffGroup} besides the grouping contexts mentioned
286 in @ref{Grouping staves}. They behave in the same way as their simple
287 counterparts, except that they are contained in another staff grouping
288 context, thus producing one more bracket on top of the existing one.
289 Note that @code{GrandStaff} and @code{PianoStaff} do not have any inner
290 grouping contexts. They can both be inside any other staff context,
291 including inner staff groups, though.
293 Here is an example of an orchestral score using groupings and nesting
294 of these groupings. Note that the instrument names are omitted from the
295 source code, see @ref{Instrument names} how to set them.
297 @cindex staff, nested
298 @cindex staves, nested
299 @cindex nesting of staves
300 @cindex system start delimiters, nested
301 @cindex nested staff brackets
302 @cindex brackets, nesting of
303 @cindex braces, nesting of
304 @cindex inner staff group
305 @cindex inner choir staff group
310 \new StaffGroup %woodwinds
312 \new Staff @{ c'1 d' @} %flute
313 \new InnerStaffGroup <<
314 \new Staff @{ c' d' @} %sax
315 \new Staff @{ c' d' @} %oboe
316 \new Staff @{ c' d' @} %English horn
318 \new Staff @{ \clef bass c d @} %bassoon
320 \new StaffGroup %the brass group
322 \new Staff @{ c' d' @} %trumpet
323 \new Staff @{ \clef bass c d @} %trombone
324 \new GrandStaff %the horns need a GrandStaff (same instrument)
326 \new Staff @{ c' d' @}
327 \new Staff @{ \clef bass c d @}
330 \new ChoirStaff %for setting vocal music
332 \new Staff @{ c' d' @}
333 \new InnerChoirStaff <<
334 \new Staff @{ c' d' @}
335 \new Staff @{ c' d' @}
337 \new Staff @{ c' d' @}
339 \new PianoStaff %for the piano
341 \new Staff @{ c' d' @}
342 \new Staff @{\clef bass c d @}
347 @c no verbatim so instrument names are only in the music
348 @lilypond[ragged-right,quote]
350 \new StaffGroup %woodwinds
352 \new Staff {\set Staff.instrumentName = "fl" c'1 d' } %flute
353 \new InnerStaffGroup <<
354 \new Staff { \set Staff.instrumentName = "sax" c' d' } %sax 1
355 \new Staff { \set Staff.instrumentName = "ob" c' d' } %sax 2
356 \new Staff { \set Staff.instrumentName = "ca" c' d' }
358 \new Staff {\set Staff.instrumentName = "bs" \clef bass c d } %bassoon
360 \new StaffGroup %the brass group
362 \new Staff {\set Staff.instrumentName = "tr" c' d' } %trumpet
363 \new Staff {\set Staff.instrumentName = "tb" \clef bass c d } %trombone
364 \new GrandStaff %the horns need a GrandStaff (same instrument)
366 \new Staff {\set Staff.instrumentName = "cor1" c' d' }
367 \new Staff {\set Staff.instrumentName = "cor2" \clef bass c d }
370 \new ChoirStaff %for setting vocal music
372 \new Staff {\set Staff.instrumentName = "S" c' d' }
373 \new InnerChoirStaff <<
374 \new Staff {\set Staff.instrumentName = "A1" c' d' }
375 \new Staff {\set Staff.instrumentName = "A2" c' d' }
377 \new Staff {\set Staff.instrumentName = "T" c' d' }
379 \new PianoStaff %for the piano
382 \new Staff {\clef bass c d }
390 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
396 Internals Reference: @internalsref{SystemStartBar},
397 @internalsref{SystemStartBrace}, @internalsref{SystemStartBracket},
398 @internalsref{systemStartDelimiterHierarchy}.
402 @node Modifying single staves
403 @subsection Modifying single staves
405 This section explains how to change specific attributes of one
406 staff like the staff lines, starting and stopping of staves, sizing
407 of staves, and setting ossia sections.
416 @subsubsection Staff symbol
418 @cindex adjusting staff symbol
419 @cindex drawing staff symbol
420 @cindex staff symbol, setting of
421 @cindex stop staff lines
422 @cindex start staff lines
423 @cindex staff lines, amount of
424 @cindex staff line, thickness of
425 @cindex amount of staff lines
426 @cindex thickness of staff lines
427 @cindex ledger lines, setting
428 @cindex setting of ledger lines
429 @cindex spacing of ledger lines
431 The layout object which draws the lines of a staff is called
432 @code{staff symbol}. The staff symbol may be tuned in number,
433 thickness and distance of lines, using properties. It may also
434 be started and stopped at every point in the score.
438 Changing the number of staff lines is done by overriding
439 @code{line-count}. You may need to adjust the clef position
440 and the position of the middle C to fit to the new staff. For
441 an explanation, see the snippet section in @ref{Displaying pitches}.
443 @lilypond[verbatim,ragged-right,quote]
445 \override Staff.StaffSymbol #'line-count = #3
451 The placement and amount of the staff lines can also set totally
452 manually by defining their positions explicitly. The middle
453 of the staff has the value of 0, each half staff space up and down
454 adds an integer. The default values are 4 2 0 -2 -4. Bar lines
455 are drawn according to the calculated width of the system, but
456 they are always centered. As the
457 example shows, the positions of the notes are not influenced
458 by the position of the staff lines.
460 @lilypond[verbatim,ragged-right,quote]
462 \override StaffSymbol #' line-positions = #' ( 7 3 0 -4 -6 -7 )
469 The staff line thickness can be set by overriding the @code{thickness}
470 property. Note that it gets applied also to ledger lines and stems,
471 since they depend on the staff line thickness. The argument of
472 @code{thickness} is a factor of @code{line-thickness} which defaults
473 to the normal staff line thickness.
475 @lilypond[verbatim,ragged-right,quote]
477 \override StaffSymbol #'thickness = #3
484 The thickness of the ledger lines can also be set independent of the
485 settings for staff lines. The setting is calculated from a pair of
486 values which will be added for the final thickness. The first value
487 is the staff line thickness multiplied by a factor, the second is
488 the staff space multiplied by a factor. In the example the ledger
489 lines get their thickness from one staff line thickness plus 1/5
490 staff space, so they are heavier than a normal staff line.
492 @lilypond[verbatim,ragged-right,quote]
494 \override StaffSymbol #' ledger-line-thickness = #' ( 1 . 0.2 ) }
501 The distance of the stafflines can be changed with the
502 @code{staff-space} property. Its argument is the amount
503 of staff spaces that should be inserted between the lines.
504 The default value is 1. Setting the distance has
505 influence on the staff lines as well as on ledger lines.
507 @lilypond[verbatim,ragged-right,quote]
509 \override StaffSymbol #' staff-space = #1.5
516 The length of the staff line can also be adjusted
517 manually. The unit is one staff space. Spacing
518 of the objects inside the staff does not get influenced
521 @lilypond[verbatim,ragged-right,quote]
523 \override StaffSymbol #' width = #23
531 These properties can only be set before instantiating the staff symbol.
532 But it is possible to start and stop staves in the middle of a score,
533 so each new setting will be applied to the newly instantiated staff.
535 @lilypond[verbatim,relative=2,fragment]
537 %Set here the overrides for the staff
538 \override Staff.StaffSymbol #'line-count = 2
539 \stopStaff \startStaff
541 %Revert to the default
542 \revert Staff.StaffSymbol #'line-count
543 \stopStaff \startStaff
549 @code{\stopStaff}, @code{\startStaff}
553 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
554 {making-some-staff-lines-thicker-than-the-others.ly}
558 Glossary: @rglos{line}, @rglos{ledger line}, @rglos{staff}.
560 Internals Reference: @internalsref{StaffSymbol}.
564 When setting staff lines manually, bar lines are
565 always drawn centered on the position 0, so the
566 maximum distance of the bar lines in either direction
571 @subsubsection Ossia staves
573 @cindex staves, Frenched
575 @cindex Frenched staves
577 Tweaking the staff object allows to resize the staff:
579 @lilypond[verbatim,ragged-right,quote]
582 \override StaffSymbol #'staff-space = #(magstep -3)
583 \override StaffSymbol #'thickness = # (magstep -3)
592 This involves shrinking the staff spaces, the staff lines and
593 the font size. See @ref{Setting the staff size}.
595 In combination with Frenched staves, this may be used to typeset
596 @emph{ossia} sections. An example is shown here
598 @lilypond[verbatim,relative=2,quote]
602 \remove "Time_signature_engraver"
604 \override StaffSymbol #'staff-space = #(magstep -2)
613 bes8[^"ossia" g bes g]
630 @cindex staff lines, setting number of
631 @cindex staff lines, setting thickness of
632 @cindex thickness of staff lines, setting
633 @cindex number of staff lines, setting
637 @c lilypondfile{Making-some-staff-lines-thicker-than-the-others.ly}
642 Music Glossary: @rglos{ossia}, @rglos{staff}, @rglos{Frenched staff}.
644 Snippets: @lsrdir{Staff,Staff-notation}
646 Internals Reference: @internalsref{StaffSymbol},
647 @internalsref{DrumStaff}.
651 @subsubsection Hiding staves
653 @cindex Frenched scores
654 @cindex staves, hiding
655 @cindex staves, empty
657 In orchestral scores, staff lines that only have rests are usually
658 removed; this saves some space. This style is called @q{French
659 Score}. For @code{Lyrics}, @code{ChordNames} and
660 @code{FiguredBass}, this is switched on by default. When
661 the lines of these contexts turn out empty after the line-breaking
662 process, they are removed.
664 For normal staves, a specialized @code{Staff} context is
665 available, which does the same: staves containing nothing (or only
666 multi-measure rests) are removed. The context definition is
667 stored in @code{\RemoveEmptyStaffContext} variable. Observe how
668 the second staff in this example disappears in the second line
670 @lilypond[quote,ragged-right,verbatim]
672 \context { \RemoveEmptyStaffContext }
677 \new Staff { e4 f g a \break c1 }
678 \new Staff { c4 d e f \break R1 }
683 The first system shows all staves in full. If empty staves should
684 be removed from the first system too, set @code{remove-first} to
685 true in @code{VerticalAxisGroup}.
688 \override Score.VerticalAxisGroup #'remove-first = ##t
691 To remove other types of contexts, use
692 @code{\AncientRemoveEmptyStaffContext} or
693 @code{\RemoveEmptyRhythmicStaffContext}.
697 Another application of the @code{\RemoveEmptyStaffContext} is to
698 make ossia sections, i.e., alternative melodies on a separate
699 piece of staff, with help of a Frenched staff. See @ref{Staff
702 You can make the staff lines invisible by removing the
703 @code{Staff_symbol_engraver} from the @code{Staff} context.
706 @lilypond[quote,ragged-right,verbatim]
708 \context Staff \relative c'' { c8 c c16 c c c }
712 \remove Staff_symbol_engraver
720 Notation Reference: @ref{Staff symbol}.
722 Snippets: @lsrdir{Staff,Staff-notation}
724 Internals Reference: @internalsref{ChordNames},
725 @internalsref{FiguredBass}, @internalsref{Lyrics},
726 @internalsref{Staff}, @internalsref{VerticalAxisGroup}.
729 @subsection Writing parts
734 * Quoting other voices::
735 * Formatting cue notes::
738 @node Metronome marks
739 @subsubsection Metronome marks
742 @cindex beats per minute
743 @cindex metronome marking
745 Metronome settings can be entered as follows
748 \tempo @var{duration} = @var{per-minute}
751 In the MIDI output, they are interpreted as a tempo change. In
752 the layout output, a metronome marking is printed
756 @lilypond[quote,ragged-right,verbatim,fragment]
763 To change the tempo in the MIDI output without printing anything,
764 make the metronome marking invisible @example \once \override
765 Score.MetronomeMark #'transparent = ##t @end example
767 To print other metronome markings, use these markup commands
768 @lilypond[quote,ragged-right,verbatim,relative,fragment]
771 \smaller \general-align #Y #DOWN \note #"16." #1
773 \smaller \general-align #Y #DOWN \note #"8" #1
778 For more details, see @ref{Formatting text}.
783 Music Glossary: @rglos{metronome}, @rglos{metronomic indication},
784 @rglos{tempo indication}, @rglos{metronome mark}.
786 Notation Reference: @ref{Formatting text}.
788 Snippets: @lsrdir{Staff,Staff-notation}.
790 Internals Reference: @internalsref{MetronomeMark}, @ref{MIDI
796 Collisions are not checked. If you have notes above the top line
797 of the staff (or notes with articulations, slurs, text, etc), then
798 the metronome marking may be printed on top of musical symbols.
799 If this occurs, increase the padding of the metronome mark to
800 place it further away from the staff.
803 \override Score.MetronomeMark #'padding = #2.5
806 @c perhaps also an example of how to move it horizontally?
809 @node Instrument names
810 @subsubsection Instrument names
812 @cindex instrument names
813 @cindex instrument names, short
815 In an orchestral score, instrument names are printed at the left
818 This can be achieved by setting @code{Staff}.@code{instrumentName} and
819 @code{Staff}.@code{shortInstrumentName}, or
820 @code{PianoStaff}.@code{instrumentName} and
821 @code{PianoStaff}.@code{shortInstrumentName}. This will print text
822 before the start of the staff. For the first staff,
823 @code{instrumentName} is used. If set, @code{shortInstrumentName} is
824 used for the following staves.
826 @lilypond[quote,verbatim,ragged-right,relative=1,fragment]
827 \set Staff.instrumentName = "Ploink "
828 \set Staff.shortInstrumentName = "Plk "
834 You can also use markup texts to construct more complicated
835 instrument names, for example
837 @lilypond[quote,fragment,verbatim,ragged-right]
838 \set Staff.instrumentName = \markup {
839 \column { "Clarinetti"
840 \line { "in B" \smaller \flat } } }
844 @cindex instrument names, centering
846 As instrument names are centered by default, multi line names
847 are better entered using @code{\center-align}:
849 @lilypond[quote,verbatim,ragged-right]
852 \set Staff.instrumentName = \markup \center-align {
854 \line { "in B" \smaller \flat }
859 \set Staff.instrumentName = "Vibraphone"
866 For longer instrument names, it may be useful to increase the
867 @code{indent} setting in the @code{\layout} block.
869 Short instrument names, printed before the systems following the first
870 one, are also centered by default, in a space which width is given by
871 the @code{short-indent} variable of the @code{\layout} block.
873 To add instrument names to other contexts (such as
874 @code{GrandStaff}, @code{ChoirStaff}, or @code{StaffGroup}), the
875 engraver must be added to that context.
879 \context @{\GrandStaff \consists "Instrument_name_engraver"@}
884 More information about adding and removing engravers can be found
885 in @ref{Modifying context plug-ins}.
887 @cindex instrument names, changing
889 Instrument names may be changed in the middle of a piece,
891 @lilypond[quote,fragment,verbatim,ragged-right]
892 \set Staff.instrumentName = "First"
893 \set Staff.shortInstrumentName = "one"
896 \set Staff.instrumentName = "Second"
897 \set Staff.shortInstrumentName = "two"
905 Notation Reference: @ref{Modifying context plug-ins}.
907 Snippets: @lsrdir{Staff,Staff-notation}
909 Internals Reference: @internalsref{InstrumentName},
910 @internalsref{PianoStaff}, @internalsref{Staff}.
913 @node Quoting other voices
914 @subsubsection Quoting other voices
917 @cindex quoting other voices
921 With quotations, fragments of other parts can be inserted into a
922 part directly. Before a part can be quoted, it must be marked
923 especially as quotable. This is done with the @code{\addQuote}
927 \addQuote @var{name} @var{music}
932 Here, @var{name} is an identifying string. The @var{music} is any
933 kind of music. Here is an example of @code{\addQuote}
936 \addQuote clarinet \relative c' @{
941 This command must be entered at toplevel, i.e., outside any music
942 blocks. Typically, one would use an already defined music event
946 clarinet = \relative c' @{
949 \addQuote clarinet @{ \clarinet @}
953 After calling @code{\addQuote}, the quotation may then be done
954 with @code{\quoteDuring} or @code{\cueDuring},
957 \quoteDuring #@var{name} @var{music}
960 During a part, a piece of music can be quoted with the
961 @code{\quoteDuring} command.
964 \quoteDuring #"clarinet" @{ s2. @}
967 This would cite three quarter notes (the duration of @code{s2.})
968 of the previously added @code{clarinet} voice.
970 More precisely, it takes the current time-step of the part being
971 printed, and extracts the notes at the corresponding point of the
972 @code{\addQuote}d voice. Therefore, the argument to
973 @code{\addQuote} should be the entire part of the voice to be
974 quoted, including any rests at the beginning.
976 It is possible to use another music expression instead of
977 @code{s}, thus creating a polyphonic section, but this may not
978 always give the desired result.
980 Quotations take into account the transposition of both source and
981 target instruments, if they are specified using the
982 @code{\transposition} command.
984 @lilypond[quote,ragged-right,verbatim]
985 \addQuote clarinet \relative c' {
991 e'8 f'8 \quoteDuring #"clarinet" { s2 }
995 The type of events that are present in the quoted music can be
996 trimmed with the @code{quotedEventTypes} property. The default
997 value is @code{(note-event rest-event)}, which means that only
998 notes and rests of the quoted voice end up in the
999 @code{\quoteDuring}. Setting
1002 \set Staff.quotedEventTypes =
1003 #'(note-event articulation-event dynamic-event)
1007 will quote notes (but no rests), together with scripts and
1012 Only the contents of the first @code{Voice} occurring in an
1013 @code{\addQuote} command will be considered for quotation, so
1014 @var{music} can not contain @code{\new} and @code{\context Voice}
1015 statements that would switch to a different Voice.
1017 Quoting grace notes is broken and can even cause LilyPond to
1020 Quoting nested triplets may result in poor notation.
1022 In earlier versions of LilyPond (pre 2.11), @code{addQuote} was
1023 written entirely in lower-case letters: @code{\addquote}.
1027 Notation Reference: @ref{Instrument transpositions}.
1029 Snippets: @lsrdir{Staff,Staff-notation}
1031 Internals Reference: @internalsref{QuoteMusic}, @internalsref{Voice}.
1034 @node Formatting cue notes
1035 @subsubsection Formatting cue notes
1039 @cindex cue notes, formatting
1041 @cindex quoting other voices
1042 @cindex cues, formatting
1044 The previous section deals with inserting notes from another
1045 voice. There is a more advanced music function called
1046 @code{\cueDuring}, which makes formatting cue notes easier.
1051 \cueDuring #@var{name} #@var{updown} @var{music}
1054 This will insert notes from the part @var{name} into a
1055 @code{Voice} called @code{cue}. This happens
1056 simultaneously with @var{music}, which usually is a rest. When
1057 the cue notes start, the staff in effect becomes polyphonic for a
1058 moment. The argument @var{updown} determines whether the cue
1059 notes should be notated as a first or second voice.
1062 @lilypond[verbatim,ragged-right]
1065 \override Stem #'length-fraction = #0.8
1066 \override Beam #'thickness = #0.384
1067 \override Beam #'length-fraction = #0.8
1070 \addQuote clarinet \relative {
1075 \new Staff \relative <<
1077 % setup a context for cue notes.
1078 \new Voice = "cue" { \smaller \skip 1*21 }
1080 \set Score.skipBars = ##t
1084 \cueDuring #"clarinet" #UP {
1093 Here are a couple of hints for successful cue notes:
1097 Cue notes have smaller font sizes.
1100 The cued part is marked with the instrument playing the cue.
1103 When the original part takes over again, this should be marked
1104 with the name of the original instrument.
1107 Any other changes introduced by the cued part should also be
1108 undone. For example, if the cued instrument plays in a different
1109 clef, the original clef should be stated once again.
1113 The macro @code{\transposedCueDuring} is useful to add cues to
1114 instruments which use a completely different octave range (for
1115 example, having a cue of a piccolo flute within a contra bassoon
1118 @lilypond[verbatim,ragged-right,quote]
1119 picc = \relative c''' {
1125 \addQuote "picc" { \picc }
1127 cbsn = \relative c, {
1130 \transposedCueDuring #"picc" #UP c,, { R1 } |
1135 \context Staff = "picc" \picc
1136 \context Staff = "cbsn" \cbsn
1142 Snippets: @lsrdir{Staff,Staff-notation}.
1144 Internals Reference: @internalsref{Voice}.