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.
10 @section Staff notation
12 @lilypondfile[quote,ragged-right,line-width=16\cm,staffsize=16]
15 Notes, dynamic signs, rests, etc., are grouped with a set of horizontal
16 lines, called a staff (plural @q{staves}). In LilyPond, these
17 lines are drawn using a separate layout object called @code{staff
20 Two or more staves can be grouped vertically in a @code{GrandStaff}, a
21 @code{StaffGroup}, or a @code{ChoirStaff}.
30 @node Displaying staves
31 @subsection Displaying staves
34 * System start delimiters::
39 @node System start delimiters
40 @subsubsection System start delimiters
42 @cindex start of system
43 @cindex staff, multiple
44 @cindex bracket, vertical
45 @cindex brace, vertical
51 Many scores consist of more than one staff. These staves can be
52 grouped in several different ways:
56 In a @code{GrandStaff}, the group is started with a brace
57 at the left, and bar lines are connected between the staves.
59 @lilypond[verbatim,ragged-right,quote]
68 In a @code{StaffGroup}, the bar lines will be drawn through
69 all the staves, but the group is started with a bracket.
71 @lilypond[verbatim,ragged-right,quote]
80 In a @code{ChoirStaff}, the group is started with a
81 bracket, but bar lines are not connected.
83 @lilypond[verbatim,ragged-right,quote]
92 If no context is specified, the default properties for the score
93 will be used: the group is started with a vertical line, and the
94 bar lines are not connected.
96 @lilypond[verbatim,ragged-right,quote]
104 @cindex Mensurstriche layout
105 @cindex Renaissance music
107 In addition to these four staff group types, other groupings can
108 be produced by changing various properties. E.g., the
109 @q{Mensurstriche} layout common in Renaissance music, with
110 bar lines running between but not through the staves, can be
111 produced from a @code{StaffGroup} or @code{GrandStaff} context if
112 the bar lines are made transparent in the @code{Staff} itself, with
113 the command @code{\override Staff.BarLine #'transparent = ##t}
115 @cindex staff, nested
117 Staff groups can be nested, using the context
118 @code{InnerStaffGroup} or @code{InnerChoirStaff}; see
119 @c @lsr{staff,staff-brackets.ly}
124 More complex nesting can be accomplished using the property
125 @code{systemStartDelimiterHierarchy}:
127 @lilypond[quote,ragged-right,verbatim]
130 \set StaffGroup.systemStartDelimiterHierarchy
131 = #'(SystemStartSquare (SystemStartBracket a
132 (SystemStartSquare b)) d)
141 Each staff group context sets the property
142 @code{systemStartDelimiter} to one of the values
143 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace},
144 and @internalsref{SystemStartBracket}. A fourth delimiter,
145 @code{systemStartSquare}, is also available, but must be
146 instantiated manually
148 @c FIXME: Graham will deal with this. -gp
150 To display a bracket even if there is only one staff, see
151 @c @lsr{staff,display-bracket-with-only-one-staff-in-a system.ly}
155 Music Glossary: @rglos{brace}, @rglos{staff}, @rglos{staves}
158 Snippets: @lsrdir{Staff,Staff-notation}
160 Internals Reference: @internalsref{ChoirStaff},
161 @internalsref{GrandStaff}, @internalsref{StaffGroup},
162 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace},
163 @internalsref{SystemStartBracket},
164 @internalsref{systemStartDelimiterHierarchy}.
168 @subsubsection Staff symbol
170 @cindex adjusting staff symbol
172 The layout object which draws the lines of a staff is called
173 @code{staff symbol}. The staff symbol may be tuned in the number,
174 thickness and distance of lines, using properties. This is
175 demonstrated in the example files
176 @c @lsr{staff,changing-the-number-of-lines-in-a-staff.ly} and
177 @c @lsr{staff,changing-the-staff-size.ly}.
179 In addition, staves may be started and stopped at will. This is
180 done with @code{\startStaff} and @code{\stopStaff}.
182 @lilypond[verbatim,relative=2,fragment]
184 \override Staff.StaffSymbol #'line-count = 2
185 \stopStaff \startStaff
187 \revert Staff.StaffSymbol #'line-count
188 \stopStaff \startStaff
192 @cindex staves, Frenched
194 @cindex Frenched staves
196 In combination with Frenched staves, this may be used to typeset
197 @emph{ossia} sections. An example is shown here
199 @lilypond[verbatim,relative=2,quote]
203 \remove "Time_signature_engraver"
205 \override StaffSymbol #'staff-space = #(magstep -2)
214 bes8[^"ossia" g bes g]
231 @cindex staff lines, setting number of
232 @cindex staff lines, setting thickness of
233 @cindex thickness of staff lines, setting
234 @cindex number of staff lines, setting
238 Music Glossary: @rglos{ossia}, @rglos{staff}, @rglos{Frenched staff}.
240 Snippets: @lsrdir{Staff,Staff-notation}
242 Internals Reference: @internalsref{StaffSymbol},
243 @internalsref{DrumStaff}.
247 @subsubsection Hiding staves
249 @cindex Frenched scores
250 @cindex staves, hiding
251 @cindex staves, empty
253 In orchestral scores, staff lines that only have rests are usually
254 removed; this saves some space. This style is called @q{French
255 Score}. For @code{Lyrics}, @code{ChordNames} and
256 @code{FiguredBass}, this is switched on by default. When
257 the lines of these contexts turn out empty after the line-breaking
258 process, they are removed.
260 For normal staves, a specialized @code{Staff} context is
261 available, which does the same: staves containing nothing (or only
262 multi-measure rests) are removed. The context definition is
263 stored in @code{\RemoveEmptyStaffContext} variable. Observe how
264 the second staff in this example disappears in the second line
266 @lilypond[quote,ragged-right,verbatim]
268 \context { \RemoveEmptyStaffContext }
273 \new Staff { e4 f g a \break c1 }
274 \new Staff { c4 d e f \break R1 }
279 The first system shows all staves in full. If empty staves should
280 be removed from the first system too, set @code{remove-first} to
281 true in @code{VerticalAxisGroup}.
284 \override Score.VerticalAxisGroup #'remove-first = ##t
287 To remove other types of contexts, use
288 @code{\AncientRemoveEmptyStaffContext} or
289 @code{\RemoveEmptyRhythmicStaffContext}.
293 Another application of the @code{\RemoveEmptyStaffContext} is to
294 make ossia sections, i.e., alternative melodies on a separate
295 piece of staff, with help of a Frenched staff. See @ref{Staff
298 You can make the staff lines invisible by removing the
299 @code{Staff_symbol_engraver} from the @code{Staff} context.
302 @lilypond[quote,ragged-right,verbatim]
304 \context Staff \relative c'' { c8 c c16 c c c }
308 \remove Staff_symbol_engraver
316 Notation Reference: @ref{Staff symbol}.
318 Snippets: @lsrdir{Staff,Staff-notation}
320 Internals Reference: @internalsref{ChordNames},
321 @internalsref{FiguredBass}, @internalsref{Lyrics},
322 @internalsref{Staff}, @internalsref{VerticalAxisGroup}.
325 @subsection Writing parts
330 * Quoting other voices::
331 * Formatting cue notes::
334 @node Metronome marks
335 @subsubsection Metronome marks
338 @cindex beats per minute
339 @cindex metronome marking
341 Metronome settings can be entered as follows
344 \tempo @var{duration} = @var{per-minute}
347 In the MIDI output, they are interpreted as a tempo change. In
348 the layout output, a metronome marking is printed
352 @lilypond[quote,ragged-right,verbatim,fragment]
359 To change the tempo in the MIDI output without printing anything,
360 make the metronome marking invisible @example \once \override
361 Score.MetronomeMark #'transparent = ##t @end example
363 To print other metronome markings, use these markup commands
364 @lilypond[quote,ragged-right,verbatim,relative,fragment]
367 \smaller \general-align #Y #DOWN \note #"16." #1
369 \smaller \general-align #Y #DOWN \note #"8" #1
374 For more details, see @ref{Text markup}.
379 Music Glossary: @rglos{metronome}, @rglos{metronomic indication},
380 @rglos{tempo indication}, @rglos{metronome mark}.
382 Notation Reference: @ref{Text markup}.
384 Snippets: @lsrdir{Staff,Staff-notation}.
386 Internals Reference: @internalsref{MetronomeMark}, @ref{MIDI
392 Collisions are not checked. If you have notes above the top line
393 of the staff (or notes with articulations, slurs, text, etc), then
394 the metronome marking may be printed on top of musical symbols.
395 If this occurs, increase the padding of the metronome mark to
396 place it further away from the staff.
399 \override Score.MetronomeMark #'padding = #2.5
402 @c perhaps also an example of how to move it horizontally?
405 @node Instrument names
406 @subsubsection Instrument names
408 @cindex instrument names
409 @cindex instrument names, short
411 In an orchestral score, instrument names are printed at the left
414 This can be achieved by setting @code{Staff}.@code{instrumentName} and
415 @code{Staff}.@code{shortInstrumentName}, or
416 @code{PianoStaff}.@code{instrumentName} and
417 @code{PianoStaff}.@code{shortInstrumentName}. This will print text
418 before the start of the staff. For the first staff,
419 @code{instrumentName} is used. If set, @code{shortInstrumentName} is
420 used for the following staves.
422 @lilypond[quote,verbatim,ragged-right,relative=1,fragment]
423 \set Staff.instrumentName = "Ploink "
424 \set Staff.shortInstrumentName = "Plk "
430 You can also use markup texts to construct more complicated
431 instrument names, for example
433 @lilypond[quote,fragment,verbatim,ragged-right]
434 \set Staff.instrumentName = \markup {
435 \column { "Clarinetti"
436 \line { "in B" \smaller \flat } } }
440 @cindex instrument names, centering
442 If you wish to center the instrument names, you must center all of
445 @lilypond[quote,verbatim,ragged-right]
448 \set Staff.instrumentName = \markup {
449 \center-align { "Clarinetti"
450 \line { "in B" \smaller \flat } } }
454 \set Staff.instrumentName =
455 \markup{ \center-align { Vibraphone }}
462 For longer instrument names, it may be useful to increase the
463 @code{indent} setting in the @code{\layout} block.
465 To center instrument names while leaving extra space to the right,
467 @lilypond[quote,verbatim,ragged-right]
468 \new StaffGroup \relative
471 \set Staff.instrumentName =
472 \markup { \hcenter-in #10 "blabla" }
476 \set Staff.instrumentName =
477 \markup { \hcenter-in #10 "blo" }
483 To add instrument names to other contexts (such as
484 @code{GrandStaff}, @code{ChoirStaff}, or @code{StaffGroup}), the
485 engraver must be added to that context.
489 \context @{\GrandStaff \consists "Instrument_name_engraver"@}
494 More information about adding and removing engravers can be found
495 in @ref{Modifying context plug-ins}.
497 @cindex instrument names, changing
499 Instrument names may be changed in the middle of a piece,
501 @lilypond[quote,fragment,verbatim,ragged-right]
502 \set Staff.instrumentName = "First"
503 \set Staff.shortInstrumentName = "one"
506 \set Staff.instrumentName = "Second"
507 \set Staff.shortInstrumentName = "two"
515 Notation Reference: @ref{Modifying context plug-ins}.
517 Snippets: @lsrdir{Staff,Staff-notation}
519 Internals Reference: @internalsref{InstrumentName},
520 @internalsref{PianoStaff}, @internalsref{Staff}.
523 @node Quoting other voices
524 @subsubsection Quoting other voices
527 @cindex quoting other voices
531 With quotations, fragments of other parts can be inserted into a
532 part directly. Before a part can be quoted, it must be marked
533 especially as quotable. This is done with the @code{\addQuote}
537 \addQuote @var{name} @var{music}
542 Here, @var{name} is an identifying string. The @var{music} is any
543 kind of music. Here is an example of @code{\addQuote}
546 \addQuote clarinet \relative c' @{
551 This command must be entered at toplevel, i.e., outside any music
552 blocks. Typically, one would use an already defined music event
556 clarinet = \relative c' @{
559 \addQuote clarinet @{ \clarinet @}
563 After calling @code{\addQuote}, the quotation may then be done
564 with @code{\quoteDuring} or @code{\cueDuring},
567 \quoteDuring #@var{name} @var{music}
570 During a part, a piece of music can be quoted with the
571 @code{\quoteDuring} command.
574 \quoteDuring #"clarinet" @{ s2. @}
577 This would cite three quarter notes (the duration of @code{s2.})
578 of the previously added @code{clarinet} voice.
580 More precisely, it takes the current time-step of the part being
581 printed, and extracts the notes at the corresponding point of the
582 @code{\addQuote}d voice. Therefore, the argument to
583 @code{\addQuote} should be the entire part of the voice to be
584 quoted, including any rests at the beginning.
586 It is possible to use another music expression instead of
587 @code{s}, thus creating a polyphonic section, but this may not
588 always give the desired result.
590 Quotations take into account the transposition of both source and
591 target instruments, if they are specified using the
592 @code{\transposition} command.
594 @lilypond[quote,ragged-right,verbatim]
595 \addQuote clarinet \relative c' {
601 e'8 f'8 \quoteDuring #"clarinet" { s2 }
605 The type of events that are present in the quoted music can be
606 trimmed with the @code{quotedEventTypes} property. The default
607 value is @code{(note-event rest-event)}, which means that only
608 notes and rests of the quoted voice end up in the
609 @code{\quoteDuring}. Setting
612 \set Staff.quotedEventTypes =
613 #'(note-event articulation-event dynamic-event)
617 will quote notes (but no rests), together with scripts and
622 Only the contents of the first @code{Voice} occurring in an
623 @code{\addQuote} command will be considered for quotation, so
624 @var{music} can not contain @code{\new} and @code{\context Voice}
625 statements that would switch to a different Voice.
627 Quoting grace notes is broken and can even cause LilyPond to
630 Quoting nested triplets may result in poor notation.
632 In earlier versions of LilyPond (pre 2.11), @code{addQuote} was
633 written entirely in lower-case letters: @code{\addquote}.
637 Notation Reference: @ref{Instrument transpositions}.
639 Snippets: @lsrdir{Staff,Staff-notation}
641 Internals Reference: @internalsref{QuoteMusic}, @internalsref{Voice}.
644 @node Formatting cue notes
645 @subsubsection Formatting cue notes
649 @cindex cue notes, formatting
651 @cindex quoting other voices
652 @cindex cues, formatting
654 The previous section deals with inserting notes from another
655 voice. There is a more advanced music function called
656 @code{\cueDuring}, which makes formatting cue notes easier.
661 \cueDuring #@var{name} #@var{updown} @var{music}
664 This will insert notes from the part @var{name} into a
665 @code{Voice} called @code{cue}. This happens
666 simultaneously with @var{music}, which usually is a rest. When
667 the cue notes start, the staff in effect becomes polyphonic for a
668 moment. The argument @var{updown} determines whether the cue
669 notes should be notated as a first or second voice.
672 @lilypond[verbatim,ragged-right]
675 \override Stem #'length-fraction = #0.8
676 \override Beam #'thickness = #0.384
677 \override Beam #'length-fraction = #0.8
680 \addQuote clarinet \relative {
685 \new Staff \relative <<
687 % setup a context for cue notes.
688 \new Voice = "cue" { \smaller \skip 1*21 }
690 \set Score.skipBars = ##t
694 \cueDuring #"clarinet" #UP {
703 Here are a couple of hints for successful cue notes:
707 Cue notes have smaller font sizes.
710 The cued part is marked with the instrument playing the cue.
713 When the original part takes over again, this should be marked
714 with the name of the original instrument.
717 Any other changes introduced by the cued part should also be
718 undone. For example, if the cued instrument plays in a different
719 clef, the original clef should be stated once again.
723 The macro @code{\transposedCueDuring} is useful to add cues to
724 instruments which use a completely different octave range (for
725 example, having a cue of a piccolo flute within a contra bassoon
728 @lilypond[verbatim,ragged-right,quote]
729 picc = \relative c''' {
735 \addQuote "picc" { \picc }
737 cbsn = \relative c, {
740 \transposedCueDuring #"picc" #UP c,, { R1 } |
745 \context Staff = "picc" \picc
746 \context Staff = "cbsn" \cbsn
752 Snippets: @lsrdir{Staff,Staff-notation}.
754 Internals Reference: @internalsref{Voice}.