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 As instrument names are centered by default, multi line names
443 are better entered using @code{\center-align}:
445 @lilypond[quote,verbatim,ragged-right]
448 \set Staff.instrumentName = \markup \center-align {
450 \line { "in B" \smaller \flat }
455 \set Staff.instrumentName = "Vibraphone"
462 For longer instrument names, it may be useful to increase the
463 @code{indent} setting in the @code{\layout} block.
465 Short instrument names, printed before the systems following the first
466 one, are also centered by default, in a space which width is given by
467 the @code{short-indent} variable of the @code{\layout} block.
469 To add instrument names to other contexts (such as
470 @code{GrandStaff}, @code{ChoirStaff}, or @code{StaffGroup}), the
471 engraver must be added to that context.
475 \context @{\GrandStaff \consists "Instrument_name_engraver"@}
480 More information about adding and removing engravers can be found
481 in @ref{Modifying context plug-ins}.
483 @cindex instrument names, changing
485 Instrument names may be changed in the middle of a piece,
487 @lilypond[quote,fragment,verbatim,ragged-right]
488 \set Staff.instrumentName = "First"
489 \set Staff.shortInstrumentName = "one"
492 \set Staff.instrumentName = "Second"
493 \set Staff.shortInstrumentName = "two"
501 Notation Reference: @ref{Modifying context plug-ins}.
503 Snippets: @lsrdir{Staff,Staff-notation}
505 Internals Reference: @internalsref{InstrumentName},
506 @internalsref{PianoStaff}, @internalsref{Staff}.
509 @node Quoting other voices
510 @subsubsection Quoting other voices
513 @cindex quoting other voices
517 With quotations, fragments of other parts can be inserted into a
518 part directly. Before a part can be quoted, it must be marked
519 especially as quotable. This is done with the @code{\addQuote}
523 \addQuote @var{name} @var{music}
528 Here, @var{name} is an identifying string. The @var{music} is any
529 kind of music. Here is an example of @code{\addQuote}
532 \addQuote clarinet \relative c' @{
537 This command must be entered at toplevel, i.e., outside any music
538 blocks. Typically, one would use an already defined music event
542 clarinet = \relative c' @{
545 \addQuote clarinet @{ \clarinet @}
549 After calling @code{\addQuote}, the quotation may then be done
550 with @code{\quoteDuring} or @code{\cueDuring},
553 \quoteDuring #@var{name} @var{music}
556 During a part, a piece of music can be quoted with the
557 @code{\quoteDuring} command.
560 \quoteDuring #"clarinet" @{ s2. @}
563 This would cite three quarter notes (the duration of @code{s2.})
564 of the previously added @code{clarinet} voice.
566 More precisely, it takes the current time-step of the part being
567 printed, and extracts the notes at the corresponding point of the
568 @code{\addQuote}d voice. Therefore, the argument to
569 @code{\addQuote} should be the entire part of the voice to be
570 quoted, including any rests at the beginning.
572 It is possible to use another music expression instead of
573 @code{s}, thus creating a polyphonic section, but this may not
574 always give the desired result.
576 Quotations take into account the transposition of both source and
577 target instruments, if they are specified using the
578 @code{\transposition} command.
580 @lilypond[quote,ragged-right,verbatim]
581 \addQuote clarinet \relative c' {
587 e'8 f'8 \quoteDuring #"clarinet" { s2 }
591 The type of events that are present in the quoted music can be
592 trimmed with the @code{quotedEventTypes} property. The default
593 value is @code{(note-event rest-event)}, which means that only
594 notes and rests of the quoted voice end up in the
595 @code{\quoteDuring}. Setting
598 \set Staff.quotedEventTypes =
599 #'(note-event articulation-event dynamic-event)
603 will quote notes (but no rests), together with scripts and
608 Only the contents of the first @code{Voice} occurring in an
609 @code{\addQuote} command will be considered for quotation, so
610 @var{music} can not contain @code{\new} and @code{\context Voice}
611 statements that would switch to a different Voice.
613 Quoting grace notes is broken and can even cause LilyPond to
616 Quoting nested triplets may result in poor notation.
618 In earlier versions of LilyPond (pre 2.11), @code{addQuote} was
619 written entirely in lower-case letters: @code{\addquote}.
623 Notation Reference: @ref{Instrument transpositions}.
625 Snippets: @lsrdir{Staff,Staff-notation}
627 Internals Reference: @internalsref{QuoteMusic}, @internalsref{Voice}.
630 @node Formatting cue notes
631 @subsubsection Formatting cue notes
635 @cindex cue notes, formatting
637 @cindex quoting other voices
638 @cindex cues, formatting
640 The previous section deals with inserting notes from another
641 voice. There is a more advanced music function called
642 @code{\cueDuring}, which makes formatting cue notes easier.
647 \cueDuring #@var{name} #@var{updown} @var{music}
650 This will insert notes from the part @var{name} into a
651 @code{Voice} called @code{cue}. This happens
652 simultaneously with @var{music}, which usually is a rest. When
653 the cue notes start, the staff in effect becomes polyphonic for a
654 moment. The argument @var{updown} determines whether the cue
655 notes should be notated as a first or second voice.
658 @lilypond[verbatim,ragged-right]
661 \override Stem #'length-fraction = #0.8
662 \override Beam #'thickness = #0.384
663 \override Beam #'length-fraction = #0.8
666 \addQuote clarinet \relative {
671 \new Staff \relative <<
673 % setup a context for cue notes.
674 \new Voice = "cue" { \smaller \skip 1*21 }
676 \set Score.skipBars = ##t
680 \cueDuring #"clarinet" #UP {
689 Here are a couple of hints for successful cue notes:
693 Cue notes have smaller font sizes.
696 The cued part is marked with the instrument playing the cue.
699 When the original part takes over again, this should be marked
700 with the name of the original instrument.
703 Any other changes introduced by the cued part should also be
704 undone. For example, if the cued instrument plays in a different
705 clef, the original clef should be stated once again.
709 The macro @code{\transposedCueDuring} is useful to add cues to
710 instruments which use a completely different octave range (for
711 example, having a cue of a piccolo flute within a contra bassoon
714 @lilypond[verbatim,ragged-right,quote]
715 picc = \relative c''' {
721 \addQuote "picc" { \picc }
723 cbsn = \relative c, {
726 \transposedCueDuring #"picc" #UP c,, { R1 } |
731 \context Staff = "picc" \picc
732 \context Staff = "cbsn" \cbsn
738 Snippets: @lsrdir{Staff,Staff-notation}.
740 Internals Reference: @internalsref{Voice}.