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 staff = singular, staves = plural
20 @node Displaying staves
21 @subsection Displaying staves
24 * System start delimiters::
29 @node System start delimiters
30 @unnumberedsubsubsec System start delimiters
32 @cindex start of system
33 @cindex Staff, multiple
34 @cindex bracket, vertical
35 @cindex brace, vertical
40 Many scores consist of more than one staff. These staves can be
41 joined in four different ways
44 @item The group is started with a brace at the left, and bar lines are
45 connected. This is done with the @internalsref{GrandStaff} context.
47 @lilypond[verbatim,ragged-right,quote]
55 @item The group is started with a bracket, and bar lines are connected.
57 @internalsref{StaffGroup} context
59 @lilypond[verbatim,ragged-right,quote]
67 @item The group is started with a bracket, but bar lines are not
68 connected. This is done with the @internalsref{ChoirStaff} context.
70 @lilypond[verbatim,ragged-right,quote]
78 @item The group is started with a vertical line. Bar lines are not
79 connected. This is the default for the score.
81 @lilypond[verbatim,ragged-right,quote]
92 The bar lines at the start of each system are
93 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
94 @internalsref{SystemStartBracket}. Only one of these types is created
95 in every context, and that type is determined by the property
96 @code{systemStartDelimiter}.
101 System start delimiters may be deeply nested,
103 @lilypond[quote,ragged-right,verbatim]
106 \set StaffGroup.systemStartDelimiterHierarchy
107 = #'(SystemStartSquare (SystemStartBracket a (SystemStartSquare b)) d)
118 @unnumberedsubsubsec Staff symbol
120 @cindex adjusting staff symbol
122 Notes, dynamic signs, etc., are grouped
123 with a set of horizontal lines, called a staff (plural @q{staves}). In
124 LilyPond, these lines are drawn using a separate layout object called
127 The staff symbol may be tuned in the number, thickness and distance
128 of lines, using properties. This is demonstrated in the example files
129 @lsr{staff,changing-the-number-of-lines-in-a-staff.ly} and
130 @lsr{staff,changing-the-staff-size.ly}.
132 In addition, staves may be started and stopped at will. This is done
133 with @code{\startStaff} and @code{\stopStaff}.
135 @lilypond[verbatim,relative=2,fragment]
137 \override Staff.StaffSymbol #'line-count = 2
138 \stopStaff \startStaff
140 \revert Staff.StaffSymbol #'line-count
141 \stopStaff \startStaff
145 In combination with Frenched staves, this may be used to typeset ossia
146 sections. An example is shown here
150 @lilypondfile{ossia.ly}
152 @cindex staff lines, setting number of
153 @cindex staff lines, setting thickness of
154 @cindex thickness of staff lines, setting
155 @cindex number of staff lines, setting
159 Program reference: @internalsref{StaffSymbol}.
161 Examples: @lsrdir{staff}
165 @unnumberedsubsubsec Hiding staves
167 @cindex Frenched scores
168 @cindex Hiding staves
170 In orchestral scores, staff lines that only have rests are usually
171 removed; this saves some space. This style is called @q{French Score}.
172 For @internalsref{Lyrics},
173 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
174 switched on by default. When the lines of these contexts turn out
175 empty after the line-breaking process, they are removed.
177 For normal staves, a specialized @internalsref{Staff} context is
178 available, which does the same: staves containing nothing (or only
179 multi-measure rests) are removed. The context definition is stored in
180 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
181 in this example disappears in the second line
183 @lilypond[quote,ragged-right,verbatim]
185 \context { \RemoveEmptyStaffContext }
190 \new Staff { e4 f g a \break c1 }
191 \new Staff { c4 d e f \break R1 }
196 The first system shows all staves in full. If empty staves should be
197 removed from the first system too, set @code{remove-first} to true in
198 @internalsref{VerticalAxisGroup}.
201 \override Score.VerticalAxisGroup #'remove-first = ##t
204 To remove other types of contexts, use @code{\AncientRemoveEmptyStaffContext}
205 or @code{\RemoveEmptyRhythmicStaffContext}.
207 Another application is making ossia sections, i.e., alternative
208 melodies on a separate piece of staff, with help of a Frenched
214 @subsection Writing parts
219 * Quoting other voices::
220 * Formatting cue notes::
223 @node Metronome marks
224 @unnumberedsubsubsec Metronome marks
227 @cindex beats per minute
228 @cindex metronome marking
230 Metronome settings can be entered as follows
232 \tempo @var{duration} = @var{per-minute}
235 In the MIDI output, they are interpreted as a tempo change. In the
236 layout output, a metronome marking is printed
238 @lilypond[quote,ragged-right,verbatim,fragment]
245 To change the tempo in the MIDI output without printing anything, make
246 the metronome marking invisible
248 \once \override Score.MetronomeMark #'transparent = ##t
251 To print other metronome markings, use these markup commands
252 @lilypond[quote,ragged-right,verbatim,relative,fragment]
255 \smaller \general-align #Y #DOWN \note #"16." #1
257 \smaller \general-align #Y #DOWN \note #"8" #1
262 See @ref{Text markup}, for more details.
267 Program reference: @internalsref{MetronomeMark}.
272 Collisions are not checked. If you have notes above the top line of
273 the staff (or notes with articulations, slurs, text, etc), then the
274 metronome marking may be printed on top of musical symbols. If this
275 occurs, increase the padding of the metronome mark to place it
276 further away from the staff.
279 \override Score.MetronomeMark #'padding = #2.5
283 @node Instrument names
284 @unnumberedsubsubsec Instrument names
286 In an orchestral score, instrument names are printed at the left side
289 This can be achieved by setting @internalsref{Staff}.@code{instrumentName}
290 and @internalsref{Staff}.@code{shortInstrumentName}, or
291 @internalsref{PianoStaff}.@code{instrumentName} and
292 @internalsref{PianoStaff}.@code{shortInstrumentName}. This will
294 the start of the staff. For the first staff, @code{instrumentName} is
295 used, for the following ones, @code{shortInstrumentName} is used.
297 @lilypond[quote,verbatim,ragged-right,relative=1,fragment]
298 \set Staff.instrumentName = "Ploink "
299 \set Staff.shortInstrumentName = "Plk "
305 You can also use markup texts to construct more complicated instrument
308 @lilypond[quote,fragment,verbatim,ragged-right]
309 \set Staff.instrumentName = \markup {
310 \column { "Clarinetti"
311 \line { "in B" \smaller \flat } } }
315 If you wish to center the instrument names, you must center all of them
317 @lilypond[quote,verbatim,ragged-right]
320 \set Staff.instrumentName = \markup {
321 \center-align { "Clarinetti"
322 \line { "in B" \smaller \flat } } }
326 \set Staff.instrumentName = \markup{ \center-align { Vibraphone }}
333 For longer instrument names, it may be useful to increase the
334 @code{indent} setting in the @code{\layout} block.
336 To center instrument names while leaving extra space to the right,
338 @lilypond[quote,verbatim,ragged-right]
339 \new StaffGroup \relative
342 \set Staff.instrumentName = \markup { \hcenter-in #10 "blabla" }
346 \set Staff.instrumentName = \markup { \hcenter-in #10 "blo" }
352 To add instrument names to other contexts (such as @code{GrandStaff},
353 @code{ChoirStaff}, or @code{StaffGroup}), the engraver must
354 be added to that context.
358 \context @{\GrandStaff \consists "Instrument_name_engraver"@}
363 More information about adding and removing engravers can
364 be found in @ref{Modifying context plug-ins}.
366 Instrument names may be changed in the middle of a piece,
368 @lilypond[quote,fragment,verbatim,ragged-right]
369 \set Staff.instrumentName = "First"
370 \set Staff.shortInstrumentName = "one"
373 \set Staff.instrumentName = "Second"
374 \set Staff.shortInstrumentName = "two"
382 Program reference: @internalsref{InstrumentName}.
385 @node Quoting other voices
386 @unnumberedsubsubsec Quoting other voices
390 With quotations, fragments of other parts can be inserted into a part
391 directly. Before a part can be quoted, it must be marked especially as
392 quotable. This is done with the @code{\addQuote} command.
395 \addQuote @var{name} @var{music}
400 Here, @var{name} is an identifying string. The @var{music} is any kind
401 of music. Here is an example of @code{\addQuote}
404 \addQuote clarinet \relative c' @{
409 This command must be entered at toplevel, i.e., outside any music
412 After calling @code{\addQuote}, the quotation may then be done with
413 @code{\quoteDuring} or @code{\cueDuring},
416 \quoteDuring #@var{name} @var{music}
419 During a part, a piece of music can be quoted with the @code{\quoteDuring}
423 \quoteDuring #"clarinet" @{ s2. @}
426 This would cite three quarter notes (the duration of @code{s2.}) of
427 the previously added @code{clarinet} voice.
430 More precisely, it takes the current time-step of the part being
431 printed, and extracts the notes at the corresponding point of the
432 @code{\addQuote}d voice. Therefore, the argument to @code{\addQuote}
433 should be the entire part of the voice to be quoted, including any
434 rests at the beginning.
436 Quotations take into account the transposition of both source and target
437 instruments, if they are specified using the @code{\transposition} command.
439 @lilypond[quote,ragged-right,verbatim]
440 \addQuote clarinet \relative c' {
446 e'8 f'8 \quoteDuring #"clarinet" { s2 }
450 The type of events that are present in cue notes can be trimmed with
451 the @code{quotedEventTypes} property. The default value is
452 @code{(note-event rest-event)}, which means that only notes and
453 rests of the cued voice end up in the @code{\quoteDuring}.
457 \set Staff.quotedEventTypes =
458 #'(note-event articulation-event dynamic-event)
462 will quote notes (but no rests), together with scripts and dynamics.
466 Only the contents of the first @internalsref{Voice} occurring in an
467 @code{\addQuote} command will be considered for quotation, so
468 @var{music} can not contain @code{\new} and @code{\context Voice}
469 statements that would switch to a different Voice.
471 Quoting grace notes is broken and can even cause LilyPond to crash.
473 Quoting nested triplets may result in poor notation.
478 In this manual: @ref{Instrument transpositions}.
480 Examples: @lsr{parts,quote.ly}, @lsr{parts,quote-transportation.ly}
482 Program reference: @internalsref{QuoteMusic}.
485 @node Formatting cue notes
486 @unnumberedsubsubsec Formatting cue notes
488 @cindex cues, formatting
490 The previous section deals with inserting notes from another voice.
491 There is a more advanced music function called @code{\cueDuring},
492 which makes formatting cue notes easier.
497 \cueDuring #@var{name} #@var{updown} @var{music}
500 This will insert notes from the part @var{name} into a
501 @internalsref{Voice} called @code{cue}. This happens simultaneously
502 with @var{music}, which usually is a rest. When the cue notes start,
503 the staff in effect becomes polyphonic for a moment. The argument
504 @var{updown} determines whether the cue notes should be notated as a
505 first or second voice.
508 @lilypond[verbatim,ragged-right]
511 \override Stem #'length-fraction = #0.8
512 \override Beam #'thickness = #0.384
513 \override Beam #'length-fraction = #0.8
516 \addQuote clarinet \relative {
521 \new Staff \relative <<
523 % setup a context for cue notes.
524 \new Voice = "cue" { \smaller \skip 1*21 }
526 \set Score.skipBars = ##t
530 \cueDuring #"clarinet" #UP {
539 Here are a couple of hints for successful cue notes
543 Cue notes have smaller font sizes.
545 the cued part is marked with the instrument playing the cue.
547 when the original part takes over again, this should be marked with
548 the name of the original instrument.
550 @c really? Are you sure about that last point? I'll check after 3.0 -gp
552 @c Yes, this is good practice. Otherwise, the start of the original
553 @c part can only be seen from the font size. This is not good enough
554 @c for sight-reading. It is possilbe to use other
555 @c markers (e.g. a big close-bracket over the staff) to indicate the cue
561 Any other changes introduced by the cued part should also be
562 undone. For example, if the cued instrument plays in a different clef,
563 the original clef should be stated once again.
567 The macro @code{\transposedCueDuring} is
568 useful to add cues to instruments which use a completely different
569 octave range (for example, having a cue of a piccolo flute within
570 a contra bassoon part).
572 @lilypond[verbatim,ragged-right,quote]
573 picc = \relative c''' {
579 \addQuote "picc" { \picc }
581 cbsn = \relative c, {
584 \transposedCueDuring #"picc" #UP c,, { R1 } |
589 \context Staff = "picc" \picc
590 \context Staff = "cbsn" \cbsn