1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond.tely
4 @c A menu is needed before every deeper *section nesting of @node's; run
5 @c M-x texinfo-all-menus-update
6 @c to automatically fill in these menus before saving changes
9 @chapter Basic notation
11 This chapter explains how to use basic notation features.
16 * Multiple notes at once::
28 This section discusses how to specify the pitch of notes.
33 * Cautionary accidentals::
35 * Notes names in other languages::
45 @subsection Normal pitches
50 A pitch name is specified using lowercase letters @code{a} through @code{g}.
51 An ascending C-major scale is engraved with
53 @lilypond[quote,fragment,verbatim,ragged-right]
58 The note name @code{c} is engraved one octave below middle C.
60 @lilypond[quote,fragment,verbatim,ragged-right]
70 The optional octave specification takes the form of a series of
71 single quote (`@code{'}') characters or a series of comma
72 (`@code{,}') characters. Each @code{'} raises the pitch by one
73 octave; each @code{,} lowers the pitch by an octave.
75 @lilypond[quote,ragged-right,fragment,verbatim]
77 c' c'' e' g d'' d' d c
79 c, c,, e, g d,, d, d c
82 An alternate method may be used to declare which octave to
83 engrave a pitch; this method does not require as many
84 octave specifications (@code{'} and @code{,}). See
85 @ref{Relative octaves}.
89 @subsection Accidentals
91 @cindex note names, Dutch
92 @cindex note names, default
94 A sharp is formed by adding @code{-is} to the end of a pitch name and
95 a flat is formed by adding @code{-es}. Double sharps and double flats
96 are obtained by adding @code{-isis} or @code{-eses} to a note name.
98 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
104 These are the Dutch note names. In Dutch, @code{aes} is contracted to
105 @code{as}, but both forms are accepted. Similarly, both
106 @code{es} and @code{ees} are accepted
108 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
112 A natural will cancel the effect of an accidental or key signature.
113 However, naturals are not encoded into the note name syntax with a
114 suffix; a natural pitch is shown as a simple note name
116 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
120 The input @code{d e f} is interpreted as ``print a D-natural,
121 E-natural, and an F-natural,'' regardless of the key
122 signature. For more information about the distinction between
123 musical content and the presentation of that content, see
124 @ref{More about pitches}.
126 @lilypond[fragment,quote,ragged-right,verbatim,relative]
135 In accordance with standard typesetting rules, a natural sign is printed
136 before a sharp or flat if a previous accidental needs to be
137 cancelled. To change this behavior, use
138 @code{\set Staff.extraNatural = ##f}
140 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
142 \set Staff.extraNatural = ##f
149 Program reference: @internalsref{LedgerLineSpanner},
150 @internalsref{NoteHead}.
153 @node Cautionary accidentals
154 @subsection Cautionary accidentals
156 @cindex accidental, reminder
157 @cindex accidental, cautionary
158 @cindex accidental, parenthesized
159 @cindex reminder accidental
161 @cindex cautionary accidental
162 @cindex parenthesized accidental
165 Normally accidentals are printed automatically, but you may also
166 print them manually. A reminder accidental
167 can be forced by adding an exclamation mark @code{!}
168 after the pitch. A cautionary accidental
169 (i.e., an accidental within parentheses) can be obtained by adding the
170 question mark `@code{?}' after the pitch. These extra accidentals
171 can be used to produce natural signs, too.
173 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
174 cis cis cis! cis? c c? c! c
180 The automatic production of accidentals can be tuned in many
181 ways. For more information, see @ref{Automatic accidentals}.
185 @subsection Micro tones
187 @cindex quarter tones
188 @cindex semi-flats, semi-sharps
190 Half-flats and half-sharps are formed by adding @code{-eh} and
191 @code{-ih}; the following is a series of Cs with increasing pitches
193 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
194 \set Staff.extraNatural = ##f
198 Micro tones are also exported to the MIDI file.
203 There are no generally accepted standards for denoting
204 three-quarter flats, so LilyPond's symbol does not conform to any
208 @node Notes names in other languages
209 @subsection Notes names in other languages
211 There are predefined sets of note names for various other languages.
212 To use them, include the language specific init file. For
213 example, add @code{\include "english.ly"} to the top of the input
214 file. The available language files
215 and the note names they define are
217 @c what about micro-tunes, double-sharps, and double-flats? add
218 @c more columns to the table?
219 @c Oh, and should this be made into a multitable?
220 @cindex note names, other languages
222 Note Names sharp flat
223 nederlands.ly c d e f g a bes b -is -es
224 english.ly c d e f g a bf b -s/-sharp -f/-flat
226 deutsch.ly c d e f g a b h -is -es
227 norsk.ly c d e f g a b h -iss/-is -ess/-es
228 svenska.ly c d e f g a b h -iss -ess
229 italiano.ly do re mi fa sol la sib si -d -b
230 catalan.ly do re mi fa sol la sib si -d/-s -b
231 espanol.ly do re mi fa sol la sib si -s -b
235 @node Relative octaves
236 @subsection Relative octaves
239 @cindex Relative octave specification
242 Octaves are specified by adding @code{'} and @code{,} to pitch names.
243 When you copy existing music, it is easy to accidentally put a pitch
244 in the wrong octave and hard to find such an error. The relative
245 octave mode prevents these errors by making the mistakes much
246 larger: a single error puts the rest of the piece off by one octave
249 \relative @var{startpitch} @var{musicexpr}
256 \relative @var{musicexpr}
260 @code{c'} is used as the default if no starting pitch is defined.
262 The octave of notes that appear in @var{musicexpr} are calculated as
263 follows: if no octave changing marks are used, the basic interval
264 between this and the last note is always taken to be a fourth or
265 less. This distance is determined without regarding alterations; a
266 @code{fisis} following a @code{ceses} will be put above the
267 @code{ceses}. In other words, a doubly-augmented fourth is considered
268 a smaller interval than a diminished fifth, even though the
269 doubly-augmented fourth spans seven semitones while the diminished
270 fifth only spans six semitones.
272 The octave changing marks @code{'} and @code{,} can be added to raise
273 or lower the pitch by an extra octave. Upon entering relative mode,
274 an absolute starting pitch can be specified that will act as the
275 predecessor of the first note of @var{musicexpr}. If no starting pitch
276 is specified, then middle C is used as a start.
278 Here is the relative mode shown in action
279 @lilypond[quote,fragment,ragged-right,verbatim]
285 Octave changing marks are used for intervals greater than a fourth
287 @lilypond[quote,ragged-right,fragment,verbatim]
293 If the preceding item is a chord, the first note of the chord is used
294 to determine the first note of the next chord
296 @lilypond[quote,ragged-right,fragment,verbatim]
304 The pitch after @code{\relative} contains a note name.
306 The relative conversion will not affect @code{\transpose},
307 @code{\chordmode} or @code{\relative} sections in its argument. To use
308 relative within transposed music, an additional @code{\relative} must
309 be placed inside @code{\transpose}.
313 @subsection Octave check
317 Octave checks make octave errors easier to correct: a note may be
318 followed by @code{=}@var{quotes} which indicates what its absolute
319 octave should be. In the following example,
322 \relative c'' @{ c='' b=' d,='' @}
326 the @code{d} will generate a warning, because a @code{d''} is expected
327 (because @code{b'} to @code{d''} is only a third), but a @code{d'} is
328 found. In the output, the octave is corrected to be a @code{d''} and
329 the next note is calculated relative to @code{d''} instead of @code{d'}.
331 There is also an octave check that produces no visible output. The syntax
337 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
338 quotes) in @code{\relative} mode compared to the note given in the
339 @code{\relative} command. If not, a warning is printed, and the
340 octave is corrected. The @var{pitch} is not printed as a note.
342 In the example below, the first check passes without incident, since
343 the @code{e} (in @code{relative} mode) is within a fifth of
345 the second check produces a warning, since the @code{e} is not within
346 a fifth of @code{b'}. The warning message is printed, and the octave
347 is adjusted so that the following notes are in the correct octave
359 The octave of a note following an octave check is determined with
360 respect to the note preceding it. In the next fragment, the last note
361 is an @code{a'}, above middle C. That means that the @code{\octave}
362 check passes successfully, so the check could be deleted without changing
363 the output of the piece.
365 @lilypond[quote,ragged-right,verbatim,fragment]
375 @subsection Transpose
378 @cindex Transposition of pitches
381 A music expression can be transposed with @code{\transpose}. The
384 \transpose @var{from} @var{to} @var{musicexpr}
387 This means that @var{musicexpr} is transposed by the interval between
388 the pitches @var{from} and @var{to}: any note with pitch @code{from}
389 is changed to @code{to}.
391 For example, consider a piece written in the key of D-major. If
392 this piece is a little too low for its performer, it can be
393 transposed up to E-major with
395 \transpose d e @dots{}
398 Consider a part written for violin (a C instrument). If
399 this part is to be played on the A clarinet (for which an
400 A is notated as a C, and which sounds a minor third lower
401 than notated), the following
402 transposition will produce the appropriate part
405 \transpose a c @dots{}
408 @code{\transpose} distinguishes between enharmonic pitches: both
409 @code{\transpose c cis} or @code{\transpose c des} will transpose up
410 half a tone. The first version will print sharps and the second
411 version will print flats
413 @lilypond[quote,ragged-right,verbatim]
414 mus = { \key d \major cis d fis g }
423 @code{\transpose} may also be used to input written notes for a
424 transposing instrument. Pitches are normally entered into LilyPond
425 in C (or ``concert pitch''), but they may be entered in another
426 key. For example, when entering music for a B-flat trumpet which
427 begins on concert D, one would write
430 \transpose c bes @{ e4 @dots{} @}
433 To print this music in B-flat again (i.e., producing a trumpet part,
434 instead of a concert pitch conductor's score) you would wrap the
435 existing music with another @code{transpose}
438 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
444 Program reference: @internalsref{TransposedMusic}.
446 Example: @inputfileref{input/@/test,smart@/-transpose@/.ly}.
451 If you want to use both @code{\transpose} and @code{\relative},
452 you must put @code{\transpose} outside of @code{\relative}, since
453 @code{\relative} will have no effect on music that appears inside a
464 Rests are entered like notes with the note name @code{r}
466 @lilypond[fragment,quote,ragged-right,verbatim]
470 Whole bar rests, centered in middle of the bar,
471 must be done with multi-measure rests. They can be used for a
472 single bar as well as many bars, and are discussed in
473 @ref{Multi measure rests}.
475 To explicitly specify a rest's vertical position, write a note
476 followed by @code{\rest}. A rest will be placed in the position
477 where the note would appear,
479 @lilypond[fragment,quote,ragged-right,verbatim]
484 This makes manual formatting of
485 polyphonic music much easier, since the automatic rest collision
486 formatter will leave these rests alone.
490 Program reference: @internalsref{Rest}.
497 @cindex Invisible rest
502 An invisible rest (also called a `skip') can be entered like a note
503 with note name `@code{s}' or with @code{\skip @var{duration}}
505 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
506 a4 a4 s4 a4 \skip 1 a4
509 The @code{s} syntax is only available in note mode and chord mode. In
510 other situations, for example, when entering lyrics, you should use
511 the @code{\skip} command
513 @lilypond[quote,ragged-right,verbatim]
516 \new Lyrics \lyricmode { \skip 2 bla2 }
520 The skip command is merely an empty musical placeholder. It does not
521 produce any output, not even transparent output.
523 The @code{s} skip command does create @internalsref{Staff} and
524 @internalsref{Voice} when necessary, similar to note and rest
525 commands. For example, the following results in an empty staff.
527 @lilypond[quote,ragged-right,verbatim]
531 The fragment @code{@{ \skip 4 @} } would produce an empty page.
535 Program reference: @internalsref{SkipMusic}.
542 This section discusses rhythms, durations, and bars.
546 * Augmentation dots::
548 * Scaling durations::
551 * Automatic note splitting::
556 @subsection Durations
563 In Note, Chord, and Lyrics mode, durations are designated by numbers and
564 dots: durations are entered as their reciprocal values. For example, a
565 quarter note is entered using a @code{4} (since it is a 1/4 note), while
566 a half note is entered using a @code{2} (since it is a 1/2 note). For
567 notes longer than a whole you must use the @code{\longa} and
568 @code{\breve} commands
572 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
574 r1 r2 r4 r8 r16 r32 r64 r64
580 a\breve*1/2 \autoBeamOff
581 a1 a2 a4 a8 a16 a32 a64 a64
584 r\longa*1/4 r\breve *1/2
585 r1 r2 r4 r8 r16 r32 r64 r64
592 \remove "Bar_number_engraver"
596 \remove "Clef_engraver"
597 \override StaffSymbol #'transparent = ##t
598 \override TimeSignature #'transparent = ##t
599 \override BarLine #'transparent = ##t
600 \consists "Pitch_squash_engraver"
606 If the duration is omitted then it is set to the previously entered
607 duration. The default for the first note is a quarter note.
609 @lilypond[quote,ragged-right,verbatim,fragment]
610 { a a a2 a a4 a a1 a }
614 @node Augmentation dots
615 @subsection Augmentation dots
619 To obtain dotted note lengths, simply add a dot (`@code{.}') to
620 the number. Double-dotted notes are produced in a similar way.
622 @lilypond[quote,ragged-right,fragment,verbatim]
623 a'4 b' c''4. b'8 a'4. b'4.. c''8.
628 Dots are normally moved up to avoid staff lines, except in polyphonic
629 situations. The following commands may be used to force a particular
636 @funindex \dotsNeutral
641 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
651 Tuplets are made out of a music expression by multiplying all durations
655 \times @var{fraction} @var{musicexpr}
659 The duration of @var{musicexpr} will be multiplied by the fraction.
660 The fraction's denominator will be printed over the notes, optionally
661 with a bracket. The most common tuplet is the triplet in which 3
662 notes have the length of 2, so the notes are 2/3 of their written
665 @lilypond[quote,ragged-right,fragment,verbatim]
666 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
669 Tuplets may be nested, for example,
671 @lilypond[fragment,ragged-right,verbatim,relative=2]
672 \override TupletNumber #'text = #tuplet-number::calc-fraction-text
675 \times 3/5 { a a a a a }
683 @funindex \tupletDown
685 @funindex \tupletNeutral
686 @code{\tupletNeutral}.
691 @funindex tupletNumberFormatFunction
692 @cindex tuplet formatting
694 The property @code{tupletSpannerDuration} specifies how long each
695 bracket should last. With this, you can make lots of tuplets while
696 typing @code{\times} only once, thus saving lots of typing. In the next
697 example, there are two triplets shown, while @code{\times} was only
700 @lilypond[quote,fragment,relative=2,ragged-right,verbatim]
701 \set tupletSpannerDuration = #(ly:make-moment 1 4)
702 \times 2/3 { c8 c c c c c }
706 For more information about @code{make-moment}, see
707 @ref{Time administration}.
709 The format of the number is determined by the property @code{text} in
710 @code{TupletNumber}. The default prints only the denominator, but if
711 it is set to the function @code{tuplet-number::calc-fraction-text},
712 @var{num}:@var{den} will be printed instead.
714 To avoid printing tuplet numbers, use
716 @lilypond[quote,fragment,relative=2,ragged-right,verbatim]
717 \times 2/3 { c8 c c } \times 2/3 { c8 c c }
718 \override TupletNumber #'transparent = ##t
719 \times 2/3 { c8 c c } \times 2/3 { c8 c c }
725 Program reference: @internalsref{TupletBracket},
726 @internalsref{TupletNumber}, and @internalsref{TimeScaledMusic}.
728 Examples: @inputfileref{input/@/regression,tuplet@/-nest@/.ly}.
732 @node Scaling durations
733 @subsection Scaling durations
735 You can alter the length of duration by a fraction @var{N/M}
736 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
737 will not affect the appearance of the notes or rests produced.
739 In the following example, the first three notes take up exactly two
740 beats, but no triplet bracket is printed.
741 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
743 a4*2/3 gis4*2/3 a4*2/3
751 This manual: @ref{Tuplets}
755 @subsection Bar check
758 @funindex barCheckSynchronize
761 Bar checks help detect errors in the durations. A bar check is
762 entered using the bar symbol, `@code{|}'. Whenever it is encountered
763 during interpretation, it should fall on a measure boundary. If it
764 does not, a warning is printed. In the next example, the second bar
765 check will signal an error
767 \time 3/4 c2 e4 | g2 |
770 Bar checks can also be used in lyrics, for example
775 Twin -- kle | Twin -- kle
779 Failed bar checks are caused by entering incorrect
780 durations. Incorrect durations often completely garble up the score,
781 especially if the score is polyphonic, so a good place to start correcting
782 input is by scanning for failed bar checks and incorrect durations.
787 It is also possible to redefine the meaning of @code{|}. This is done
788 by assigning a music expression to @code{pipeSymbol},
790 @lilypond[quote,ragged-right,verbatim]
791 pipeSymbol = \bar "||"
797 @node Barnumber check
798 @subsection Barnumber check
800 When copying large pieces of music, it can be helpful to check that
801 the LilyPond bar number corresponds to the original that you are
802 entering from. This can be checked with @code{\barNumberCheck}, for
810 will print a warning if the @code{currentBarNumber} is not 123 when it
814 @node Automatic note splitting
815 @subsection Automatic note splitting
817 Long notes can be converted automatically to tied notes. This is done
818 by replacing the @internalsref{Note_heads_engraver} by the
819 @internalsref{Completion_heads_engraver}.
820 In the following examples, notes crossing the bar line are split and tied.
822 @lilypond[quote,fragment,verbatim,relative=1,line-width=12\cm]
824 \remove "Note_heads_engraver"
825 \consists "Completion_heads_engraver"
827 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
831 This engraver splits all running notes at the bar line, and inserts
832 ties. One of its uses is to debug complex scores: if the measures are
833 not entirely filled, then the ties exactly show how much each measure
839 Not all durations (especially those containing tuplets) can be
840 represented exactly with normal notes and dots, but the engraver will
843 @code{Completion_heads_engraver} only affects notes; it does not split
849 Examples: @inputfileref{input/@/regression,completion@/-heads@/.ly}.
853 Program reference: @internalsref{Completion_heads_engraver}.
856 @node Multiple notes at once
857 @section Multiple notes at once
859 Polyphony in music refers to having more than one voice occurring in
860 a piece of music. Polyphony in LilyPond refers to having more than
861 one voice on the same staff.
867 * Explicitly instantiating voices::
868 * Collision Resolution::
877 A chord is formed by a enclosing a set of pitches between @code{<}
878 and @code{>}. A chord may be followed by a duration, and a set of
879 articulations, just like simple notes
881 @lilypond[verbatim,ragged-right,fragment,quote,relative=1]
885 For more information about chords, see @ref{Chord names}.
891 Whenever a note is found, a @internalsref{Stem} object is created
892 automatically. For whole notes and rests, they are also created but
901 @funindex \stemNeutral
907 To change the direction of stems in the middle of the staff, use
909 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
911 \override Stem #'neutral-direction = #up
913 \override Stem #'neutral-direction = #down
918 @node Basic polyphony
919 @subsection Basic polyphony
923 The easiest way to enter fragments with more than one voice on a staff
924 is to enter each voice as a sequence (with @code{@{...@}}), and combine
925 them simultaneously, separating the voices with @code{\\}
929 @lilypond[quote,verbatim,fragment]
930 \new Staff \relative c' {
933 { g4 f e | d2 e2 } \\
934 { r8 e4 d c8 ~ | c b16 a b8 g ~ g2 } \\
940 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
941 voices are sometimes called ``layers'' in other notation packages}
943 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
944 each of these contexts, vertical direction of slurs, stems, etc., is set
947 These voices are all separate from the voice that contains the notes just
948 outside the @code{<< \\ >>} construct. This should be noted when making
949 changes at the voice level. This also means that slurs and ties cannot go
950 into or out of a @code{<< \\ >>} construct. Conversely, parallel voices
951 from separate @code{<< \\ >>} constructs on the same staff are the the
952 same voice. Here is the same example, with different noteheads for each
953 voice. Note that the change to the note-head style in the main voice does
955 the inside of the @code{<< \\ >>} constructs. Also, the change to the
957 voice in the first @code{<< \\ >>} construct is effective in the second
958 @code{<< \\ >>}, and the voice is tied across the two constructs.
960 @cindex note heads, styles
962 @lilypond[quote,verbatim,fragment]
963 \new Staff \relative c' {
964 \override NoteHead #'style = #'cross
968 { \override NoteHead #'style = #'triangle
973 { c8 b16 a b8 g ~ g2 } \\
974 { \override NoteHead #'style = #'slash s4 b4 c2 }
979 Polyphony does not change the relationship of notes within a
980 @code{\relative @{ @}} block. Each note is calculated relative
981 to the note immediately preceding it.
984 \relative @{ noteA << noteB \\ noteC >> noteD @}
987 @code{noteC} is relative to @code{noteB}, not @code{noteA};
988 @code{noteD} is relative to @code{noteC}, not @code{noteB} or
991 @node Explicitly instantiating voices
992 @subsection Explicitly instantiating voices
994 @internalsref{Voice} contexts can also be instantiated manually
995 inside a @code{<< >>} block to create polyphonic music, using
996 @code{\voiceOne}, up to @code{\voiceFour} to assign stem directions
997 and a horizontal shift for each part.
1001 << \upper \\ \lower >>
1009 \new Voice = "1" @{ \voiceOne \upper @}
1010 \new Voice = "2" @{ \voiceTwo \lower @}
1014 The @code{\voiceXXX} commands set the direction of stems, slurs, ties,
1015 articulations, text annotations, augmentation dots of dotted
1016 notes, and fingerings. @code{\voiceOne} and @code{\voiceThree} make
1017 these objects point upwards, while @code{\voiceTwo} and @code{\voiceFour}
1018 make them point downwards.
1019 The command @code{\oneVoice} will revert back to the normal setting.
1021 An expression that appears directly inside a @code{<< >>} belongs to
1022 the main voice. This is useful when extra voices appear while the main
1023 voice is playing. Here is a more correct rendition of the example from
1024 the previous section. The crossed noteheads demonstrate that the main
1025 melody is now in a single voice context.
1027 @lilypond[quote,ragged-right,verbatim]
1028 \new Staff \relative c' {
1029 \override NoteHead #'style = #'cross
1034 \new Voice="1" { \voiceTwo
1035 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
1038 \new Voice { \voiceThree
1047 The correct definition of the voices allows the melody to be slurred.
1048 @lilypond[quote,ragged-right,verbatim]
1049 \new Staff \relative c' {
1054 \context Voice="1" { \voiceTwo
1055 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
1058 \new Voice { \voiceThree
1067 Avoiding the @code{\\} separator also allows nesting polyphony
1068 constructs, which in some case might be a more natural way to typeset
1071 @lilypond[quote,ragged-right,verbatim]
1072 \new Staff \relative c' {
1077 \context Voice="1" { \voiceTwo
1080 {c8 b16 a b8 g ~ g2}
1081 \new Voice { \voiceThree
1094 @node Collision Resolution
1095 @subsection Collision Resolution
1097 Normally, note heads with a different number of dots are not merged, but
1098 when the object property @code{merge-differently-dotted} is set in
1099 the @internalsref{NoteCollision} object, they are merged
1100 @lilypond[quote,verbatim,fragment,ragged-right,relative=2]
1103 \override Staff.NoteCollision
1104 #'merge-differently-dotted = ##t
1106 } \\ { g8.[ f16] g8.[ f16] } >>
1109 Similarly, you can merge half note heads with eighth notes, by setting
1110 @code{merge-differently-headed}
1111 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
1114 \override Staff.NoteCollision
1115 #'merge-differently-headed = ##t
1116 c8 c4. } \\ { c2 c2 } >>
1119 LilyPond also vertically shifts rests that are opposite of a stem,
1122 @lilypond[quote,ragged-right,fragment,verbatim]
1123 \new Voice << c''4 \\ r4 >>
1135 @funindex \voiceThree
1137 @funindex \voiceFour
1144 @funindex \shiftOnnn
1147 @code{\shiftOff}: these commands specify in what chords of the current
1148 voice should be shifted. The outer voices (normally: voice one and
1149 two) have @code{\shiftOff}, while the inner voices (three and four)
1150 have @code{\shiftOn}. @code{\shiftOnn} and @code{\shiftOnnn} define
1151 further shift levels.
1153 When LilyPond cannot cope, the @code{force-hshift}
1154 property of the @internalsref{NoteColumn} object and pitched rests can
1155 be used to override typesetting decisions.
1157 @lilypond[quote,verbatim,ragged-right]
1164 \once \override NoteColumn #'force-hshift = #1.7
1172 Program reference: the objects responsible for resolving collisions are
1173 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1176 @inputfileref{input/@/regression,collision@/-dots@/.ly},
1177 @inputfileref{input/@/regression,collision@/-head-chords@/.ly},
1178 @inputfileref{input/@/regression,collision@/-heads@/.ly},
1179 @inputfileref{input/@/regression,collision@/-mesh@/.ly}, and
1180 @inputfileref{input/@/regression,collisions@/.ly}.
1185 When using @code{merge-differently-headed} with an upstem eighth or a
1186 shorter note, and a downstem half note, the eighth note gets the wrong
1189 There is no support for clusters where the same note occurs with
1190 different accidentals in the same chord. In this case, it is
1191 recommended to use enharmonic transcription, or to use special cluster
1192 notation (see @ref{Clusters}).
1196 @node Staff notation
1197 @section Staff notation
1199 @cindex Staff notation
1201 This section describes music notation that occurs on staff level,
1202 such as key signatures, clefs and time signatures.
1208 * Partial measures::
1211 * System start delimiters::
1213 * Writing music in parallel::
1222 The clef indicates which lines of the staff correspond to which
1223 pitches. The clef is set with the @code{\clef} command
1225 @lilypond[quote,ragged-right,fragment,verbatim]
1226 { c''2 \clef alto g'2 }
1235 @cindex soprano clef
1236 @cindex mezzosoprano clef
1237 @cindex baritone clef
1238 @cindex varbaritone clef
1239 @cindex subbass clef
1241 Supported clefs include
1243 @multitable @columnfractions .33 .66
1244 @headitem Clef @tab Position
1245 @item @code{treble}, violin, G, G2 @tab
1247 @item @code{alto, C} @tab
1249 @item @code{tenor} @tab
1251 @item @code{bass, F} @tab
1253 @item @code{french} @tab
1254 G clef on 1st line, so-called French violin clef
1255 @item @code{soprano} @tab
1257 @item @code{mezzosoprano} @tab
1259 @item @code{baritone} @tab
1261 @item @code{varbaritone} @tab
1263 @item @code{subbass} @tab
1265 @item @code{percussion} @tab
1267 @item @code{tab} @tab
1271 By adding @code{_8} or @code{^8} to the clef name, the clef is
1272 transposed one octave down or up, respectively, and @code{_15} and
1273 @code{^15} transposes by two octaves. The argument @var{clefname}
1274 must be enclosed in quotes when it contains underscores or digits. For
1277 @cindex choral tenor clef
1278 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
1285 The command @code{\clef "treble_8"} is equivalent to setting
1287 @code{clefPosition} (which controls the Y position of the clef),
1288 @code{middleCPosition} and @code{clefOctavation}. A clef is printed
1289 when any of these properties are changed. The following example shows
1290 possibilities when setting properties manually.
1292 @lilypond[quote,ragged-right,verbatim]
1294 \set Staff.clefGlyph = #"clefs.F"
1295 \set Staff.clefPosition = #2
1297 \set Staff.clefGlyph = #"clefs.G"
1299 \set Staff.clefGlyph = #"clefs.C"
1301 \set Staff.clefOctavation = #7
1303 \set Staff.clefOctavation = #0
1304 \set Staff.clefPosition = #0
1308 \set Staff.middleCPosition = #4
1316 Manual: @ref{Grace notes}.
1318 Program reference: @internalsref{Clef}.
1322 @subsection Key signature
1324 @cindex Key signature
1327 The key signature indicates the tonality in which a piece is played. It
1328 is denoted by a set of alterations (flats or sharps) at the start of the
1331 Setting or changing the key signature is done with the @code{\key}
1335 @code{\key} @var{pitch} @var{type}
1344 @funindex \mixolydian
1348 @cindex church modes
1350 Here, @var{type} should be @code{\major} or @code{\minor} to get
1351 @var{pitch}-major or @var{pitch}-minor, respectively. You may also
1352 use the standard mode names (also called ``church modes''): @code{\ionian},
1353 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
1354 @code{\phrygian}, and @code{\dorian}.
1356 This command sets the context property
1357 @code{Staff.keySignature}. Non-standard key signatures
1358 can be specified by setting this property directly.
1360 Accidentals and key signatures often confuse new users, because
1361 unaltered notes get natural signs depending on the key signature. For
1362 more information, see @ref{Accidentals} or @ref{More about pitches}.
1364 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
1373 A natural sign is printed to cancel any previous accidentals. This
1374 can be suppressed by setting the @code{Staff.printKeyCancellation}
1377 @lilypond[quote,fragment,ragged-right,fragment,verbatim,relative=2]
1382 \set Staff.printKeyCancellation = ##f
1392 Program reference: @internalsref{KeyCancellation},
1393 @internalsref{KeySignature}.
1396 @node Time signature
1397 @subsection Time signature
1399 @cindex Time signature
1403 Time signature indicates the metrum of a piece: a regular pattern of
1404 strong and weak beats. It is denoted by a fraction at the start of the
1407 The time signature is set with the @code{\time} command
1409 @lilypond[quote,ragged-right,fragment,verbatim]
1410 \time 2/4 c'2 \time 3/4 c'2.
1415 The symbol that is printed can be customized with the @code{style}
1416 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1419 @lilypond[fragment,quote,ragged-right,verbatim]
1422 \override Staff.TimeSignature #'style = #'()
1427 There are many more options for its layout. See @ref{Ancient time
1428 signatures} for more examples.
1430 @code{\time} sets the property @code{timeSignatureFraction},
1431 @code{beatLength} and @code{measureLength} in the @code{Timing}
1432 context, which is normally aliased to @internalsref{Score}. The
1433 property @code{measureLength} determines where bar lines should be
1434 inserted, and how automatic beams should be generated. Changing the
1435 value of @code{timeSignatureFraction} also causes the symbol to be
1438 More options are available through the Scheme function
1439 @code{set-time-signature}. In combination with the
1440 @internalsref{Measure_grouping_engraver}, it will create
1441 @internalsref{MeasureGrouping} signs. Such signs ease reading
1442 rhythmically complex modern music. In the following example, the 9/8
1443 measure is subdivided in 2, 2, 2 and 3. This is passed to
1444 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1446 @lilypond[quote,ragged-right,verbatim]
1449 #(set-time-signature 9 8 '(2 2 2 3))
1450 g8[ g] d[ d] g[ g] a8[( bes g]) |
1451 #(set-time-signature 5 8 '(3 2))
1457 \consists "Measure_grouping_engraver"
1466 Program reference: @internalsref{TimeSignature}, and
1467 @internalsref{Timing_translator}.
1469 Examples: @inputfileref{input/@/test,compound@/-time@/.ly}.
1474 Automatic beaming does not use the measure grouping specified with
1475 @code{set-time-signature}.
1478 @node Partial measures
1479 @subsection Partial measures
1483 @cindex partial measure
1484 @cindex measure, partial
1485 @cindex shorten measures
1488 Partial measures, such as an anacrusis or upbeat, are entered using the
1490 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1491 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1494 The syntax for this command is
1497 \partial @var{duration}
1500 where @code{duration} is the rhythmic length to be added before
1503 This is internally translated into
1506 \set Timing.measurePosition = -@var{length of duration}
1509 The property @code{measurePosition} contains a rational number
1510 indicating how much of the measure has passed at this point. Note
1511 that this is a negative number; @code{\partial 4} is internally
1512 translated to mean ``there is a quarter note left in the bar''.
1517 This command does not take into account grace notes at the start of
1518 the music. When a piece starts with graces notes in the pickup, then
1519 the @code{\partial} should follow the grace notes
1521 @lilypond[verbatim,quote,ragged-right,relative,fragment]
1530 @subsection Bar lines
1534 @cindex measure lines
1537 Bar lines delimit measures, but are also used to indicate
1538 repeats. Normally they are inserted automatically. Line
1539 breaks may only happen on bar lines.
1541 Special types of bar lines can be forced with the @code{\bar} command
1543 @lilypond[quote,ragged-right,relative=2,fragment,verbatim]
1547 The following bar types are available
1549 @lilypondfile[ragged-right,quote]{bar-lines.ly}
1551 In addition, you can specify @code{"||:"}, which is equivalent to
1552 @code{"|:"} except at line breaks, where it gives a double bar line at
1553 the end of the line and a start repeat at the beginning of the next
1556 To allow a line break where there is no visible bar line, use
1563 This will insert an invisible bar line and allow line breaks at this
1564 point. This also increases the bar number counter.
1566 In scores with many staves, a @code{\bar} command in one staff is
1567 automatically applied to all staves. The resulting bar lines are
1568 connected between different staves of a @code{StaffGroup},
1569 @code{PianoStaff}, or @code{ChoirStaff}.
1571 @lilypond[quote,ragged-right,fragment,verbatim]
1579 \new Staff { \clef bass c4 g e g }
1581 \new Staff { \clef bass c2 c2 }
1589 @funindex repeatCommands
1590 @funindex defaultBarType
1592 The command @code{\bar }@var{bartype} is a short cut for doing
1593 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1594 is set to a string, a bar line of that type is created.
1596 A bar line is created whenever the @code{whichBar} property is set.
1597 At the start of a measure it is set to the contents of
1598 @code{Timing.defaultBarType}. The contents of @code{repeatCommands} are
1600 to override default measure bars.
1602 You are encouraged to use @code{\repeat} for repetitions. See
1608 In this manual: @ref{Repeats}, @ref{System start delimiters}.
1610 Program reference: @internalsref{BarLine} (created at
1611 @internalsref{Staff} level), @internalsref{SpanBar} (across staves).
1613 Examples: @inputfileref{input/@/test,bar@/-lines@/.ly},
1616 @node Unmetered music
1617 @subsection Unmetered music
1620 @funindex \cadenzaOn
1621 @funindex \cadenzaOff
1623 Bar lines and bar numbers are calculated automatically. For unmetered
1624 music (cadenzas, for example), this is not desirable. To turn off
1625 automatic bar lines and bar numbers, use the commands @code{\cadenzaOn}
1626 and @code{\cadenzaOff}.
1628 @lilypond[verbatim,quote,ragged-right,relative=2,fragment]
1640 LilyPond will only insert line breaks and page breaks at a
1641 barline. Unless the unmetered music ends before the end of
1642 the staff line, you will need to insert
1650 to indicate where breaks can occur.
1653 @node System start delimiters
1654 @subsection System start delimiters
1656 @cindex start of system
1657 @cindex Staff, multiple
1658 @cindex bracket, vertical
1659 @cindex brace, vertical
1662 @cindex staff, choir
1664 Many scores consist of more than one staff. These staves can be
1665 joined in four different ways
1668 @item The group is started with a brace at the left, and bar lines are
1669 connected. This is done with the @internalsref{GrandStaff} context.
1671 @lilypond[verbatim,ragged-right,quote]
1679 @item The group is started with a bracket, and bar lines are connected.
1680 This is done with the
1681 @internalsref{StaffGroup} context
1683 @lilypond[verbatim,ragged-right,quote]
1691 @item The group is started with a bracket, but bar lines are not
1692 connected. This is done with the @internalsref{ChoirStaff} context.
1694 @lilypond[verbatim,ragged-right,quote]
1702 @item The group is started with a vertical line. Bar lines are not
1703 connected. This is the default for the score.
1705 @lilypond[verbatim,ragged-right,quote]
1716 The bar lines at the start of each system are
1717 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1718 @internalsref{SystemStartBracket}. Only one of these types is created
1719 in every context, and that type is determined by the property
1720 @internalsref{systemStartDelimiter}.
1724 @subsection Staff symbol
1726 @cindex adjusting staff symbol
1728 Notes, dynamic signs, etc., are grouped
1729 with a set of horizontal lines, called a staff (plural `staves'). In
1730 LilyPond, these lines are drawn using a separate layout object called
1731 @code{staff symbol}.
1733 The staff symbol may be tuned in the number, thickness and distance
1734 of lines, using properties. This is demonstrated in the example files
1735 @inputfileref{input/@/test,staff@/-lines@/.ly},
1736 @inputfileref{input/@/test,staff@/-size@/.ly}.
1738 In addition, staves may be started and stopped at will. This is done
1739 with @code{\startStaff} and @code{\stopStaff}.
1741 @lilypond[verbatim,relative=2,fragment]
1743 \override Staff.StaffSymbol #'line-count = 2
1744 \stopStaff \startStaff
1746 \revert Staff.StaffSymbol #'line-count
1747 \stopStaff \startStaff
1751 In combination with Frenched staves, this may be used to typeset ossia
1752 sections. An example is in @inputfileref{input/@/test@/,ossia.ly},
1757 @lilypondfile{ossia.ly}
1759 @cindex staff lines, setting number of
1760 @cindex staff lines, setting thickness of
1761 @cindex thickness of staff lines, setting
1762 @cindex number of staff lines, setting
1766 Program reference: @internalsref{StaffSymbol}.
1768 Examples: @inputfileref{input/@/test,staff@/-lines@/.ly},
1769 @inputfileref{input/@/test@/,ossia.ly},
1770 @inputfileref{input/@/test,staff@/-size@/.ly},
1771 @inputfileref{input/@/regression,staff@/-line@/-positions@/.ly}.
1774 @node Writing music in parallel
1775 @subsection Writing music in parallel
1777 @cindex Writing music in parallel
1778 @cindex Interleaved music
1780 Music for multiple parts can be interleaved
1782 @lilypond[quote,fragment,verbatim]
1783 \parallelMusic #'(voiceA voiceB) {
1784 r8 g'16[ c''] e''[ g' c'' e''] r8 g'16[ c''] e''[ g' c'' e''] |
1786 r8 a'16[ d''] f''[ a' d'' f''] r8 a'16[ d''] f''[ a' d'' f''] |
1790 \new Staff \new Voice \voiceA
1791 \new Staff \new Voice \voiceB
1797 @node Connecting notes
1798 @section Connecting notes
1800 This section deals with notation that affects groups of notes.
1806 * Laissez vibrer ties::
1819 A tie connects two adjacent note heads of the same pitch. The tie in
1820 effect extends the length of a note. Ties should not be confused with
1821 slurs, which indicate articulation, or phrasing slurs, which indicate
1822 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
1824 @lilypond[quote,ragged-right,fragment,verbatim]
1825 e' ~ e' <c' e' g'> ~ <c' e' g'>
1828 When a tie is applied to a chord, all note heads whose pitches match
1829 are connected. When no note heads match, no ties will be created. Chords
1830 may be partially tied by placing the tie inside the chord,
1832 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
1833 <c~ e g~ b> <c e g b>
1836 A tie is just a way of extending a note duration, similar to the
1837 augmentation dot. The following example shows two ways of notating
1838 exactly the same concept
1840 @lilypond[quote,fragment,ragged-right]
1841 \time 3/4 c'2. c'2 ~ c'4
1845 Ties are used either when the note crosses a bar line, or when dots
1846 cannot be used to denote the rhythm. When using ties, larger note
1847 values should be aligned to subdivisions of the measure, such as
1849 @lilypond[fragment,quote,ragged-right]
1851 r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
1855 If you need to tie a lot of notes over bars, it may be easier to use
1856 automatic note splitting (see @ref{Automatic note splitting}). This
1857 mechanism automatically splits long notes, and ties them across bar
1860 @funindex \repeatTie
1862 When a second alternative of a repeat starts with a tied note, you
1863 have to repeat the tie. This can be achieved with @code{\repeatTie},
1865 @lilypond[fragment,quote,ragged-right,relative=2]
1869 @cindex repeating ties
1870 @cindex volta brackets and ties
1874 Ties are sometimes used to write out arpeggios. In this case, two tied
1875 notes need not be consecutive. This can be achieved by setting the
1876 @code{tieWaitForNote} property to true. The same feature is also useful,
1877 for example, to tie a tremolo to a chord. For example,
1879 @lilypond[fragment,verbatim,relative=1,ragged-right]
1880 \set tieWaitForNote = ##t
1881 \grace { c16[~ e~ g]~ } <c, e g>2
1882 \repeat "tremolo" 8 { c32~ c'~ } <c c,>1
1883 e8~ c~ a~ f~ <e' c a f>2
1894 @funindex \tieNeutral
1896 @funindex \tieDotted
1898 @funindex \tieDashed
1906 In this manual: @ref{Automatic note splitting}.
1908 Program reference: @internalsref{Tie}.
1911 @inputfileref{input/@/regression,tie-arpeggio.ly}
1912 @inputfileref{input/@/regression,tie-manual.ly}
1919 Switching staves when a tie is active will not produce a slanted tie.
1927 A slur indicates that notes are to be played bound or
1928 @emph{legato}. They are entered using parentheses
1930 @lilypond[quote,ragged-right,relative=2,fragment,verbatim]
1931 f( g a) a8 b( a4 g2 f4)
1935 The direction of a slur can be specified with
1936 @code{\slur@emph{DIR}}, where @code{@emph{DIR}} is
1937 either @code{Up}, @code{Down}, or @code{Neutral} (automatically
1940 However, there is a convenient shorthand for forcing slur
1941 directions. By adding @code{_} or @code{^} before the opening
1942 parentheses, the direction is also set. For example,
1944 @lilypond[relative=2,ragged-right,quote,verbatim,fragment]
1948 Only one slur can be printed at once. If you need to print a long
1949 slur over a few small slurs, please see @ref{Phrasing slurs}.
1954 Some composers write two slurs when they want legato chords. This can
1955 be achieved in LilyPond by setting @code{doubleSlurs},
1957 @lilypond[verbatim,ragged-right,relative,fragment,quote]
1958 \set doubleSlurs = ##t
1959 <c e>4 ( <d f> <c e> <d f> )
1969 @funindex \slurNeutral
1970 @code{\slurNeutral},
1971 @funindex \slurDashed
1973 @funindex \slurDotted
1975 @funindex \slurSolid
1980 Program reference: @seeinternals{Slur}.
1983 @node Phrasing slurs
1984 @subsection Phrasing slurs
1986 @cindex phrasing slurs
1987 @cindex phrasing marks
1989 A phrasing slur (or phrasing mark) connects notes and is used to
1990 indicate a musical sentence. It is written using @code{\(} and @code{\)}
1993 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
1994 \time 6/4 c'\( d( e) f( e) d\)
1997 Typographically, the phrasing slur behaves almost exactly like a
1998 normal slur. However, they are treated as different objects. A
1999 @code{\slurUp} will have no effect on a phrasing slur; instead, use
2000 @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
2001 @code{\phrasingSlurNeutral}.
2003 You cannot have simultaneous phrasing slurs.
2008 @funindex \phrasingSlurUp
2009 @code{\phrasingSlurUp},
2010 @funindex \phrasingSlurDown
2011 @code{\phrasingSlurDown},
2012 @funindex \phrasingSlurNeutral
2013 @code{\phrasingSlurNeutral}.
2018 Program reference: @internalsref{PhrasingSlur}.
2021 @node Laissez vibrer ties
2022 @subsection Laissez vibrer ties
2023 @cindex Laissez vibrer
2024 @cindex Ties, laissez vibrer
2026 L.v. ties (laissez vibrer) indicate that notes must not be damped at the
2027 end. It is used in notation for piano, harp and other string and
2028 percussion instruments. They can be entered using @code{\laissezVibrer},
2030 @lilypond[fragment,ragged-right,verbatim,relative=1]
2031 <c f g>\laissezVibrer
2037 @internalsref{LaissezVibrerTie}
2038 @internalsref{LaissezVibrerTieColumn}
2041 @inputfileref{input/regression,laissez-vibrer-tie.ly}
2044 @node Automatic beams
2045 @subsection Automatic beams
2047 LilyPond inserts beams automatically
2049 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2050 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
2053 When these automatic decisions are not good enough, beaming can be
2054 entered explicitly. It is also possible to define beaming patterns
2055 that differ from the defaults. See @ref{Setting automatic beam behavior}
2058 Individual notes may be marked with @code{\noBeam} to prevent them
2061 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2062 \time 2/4 c8 c\noBeam c c
2068 Program reference: @internalsref{Beam}.
2072 @subsection Manual beams
2074 @cindex beams, manual
2078 In some cases it may be necessary to override the automatic beaming
2079 algorithm. For example, the autobeamer will not put beams over rests
2080 or bar lines. Such beams are specified manually by marking the begin
2081 and end point with @code{[} and @code{]}
2083 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2085 r4 r8[ g' a r8] r8 g[ | a] r8
2092 @funindex stemLeftBeamCount
2093 @funindex stemRightBeamCount
2095 Normally, beaming patterns within a beam are determined automatically.
2096 If necessary, the properties @code{stemLeftBeamCount} and
2097 @code{stemRightBeamCount} can be used to override the defaults. If
2098 either property is set, its value will be used only once, and then it
2101 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2106 \set stemLeftBeamCount = #1
2111 The property @code{subdivideBeams} can be set in order to subdivide
2112 all 16th or shorter beams at beat positions, as defined by the
2113 @code{beatLength} property.
2115 @lilypond[fragment,quote,relative=2,verbatim]
2117 \set subdivideBeams = ##t
2119 \set Score.beatLength = #(ly:make-moment 1 8)
2122 @funindex subdivideBeams
2125 For more information about @code{make-moment}, see
2126 @ref{Time administration}.
2128 Line breaks are normally forbidden when beams cross bar lines. This
2129 behavior can be changed by setting @code{allowBeamBreak}.
2131 @funindex allowBeamBreak
2132 @cindex beams and line breaks
2133 @cindex beams, kneed
2135 @cindex auto-knee-gap
2140 Kneed beams are inserted automatically when a large gap is detected
2141 between the note heads. This behavior can be tuned through the object.
2143 Automatically kneed cross-staff beams cannot be used together with
2144 hidden staves. See @ref{Hiding staves}.
2146 Beams do not avoid collisions with symbols around the notes, such as
2147 texts and accidentals.
2151 @subsection Grace notes
2156 @cindex appoggiatura
2157 @cindex acciaccatura
2159 Grace notes are ornaments that are written out. The most common ones
2160 are acciaccatura, which should be played as very short. It is denoted
2161 by a slurred small note with a slashed stem. The appoggiatura is a
2162 grace note that takes a fixed fraction of the main note, and is
2163 denoted as a slurred note in small print without a slash. They
2164 are entered with the commands @code{\acciaccatura} and
2165 @code{\appoggiatura}, as demonstrated in the following example
2167 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
2168 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2169 \acciaccatura { g16[ f] } e4
2172 Both are special forms of the @code{\grace} command. By prefixing this
2173 keyword to a music expression, a new one is formed, which will be
2174 printed in a smaller font and takes up no logical time in a measure.
2176 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
2178 \grace { c16[ d16] } c2 c4
2182 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2183 @code{\grace} command does not start a slur.
2185 Internally, timing for grace notes is done using a second, `grace'
2186 timing. Every point in time consists of two rational numbers: one
2187 denotes the logical time, one denotes the grace timing. The above
2188 example is shown here with timing tuples
2190 @lilypond[quote,ragged-right]
2193 c4 \grace c16 c4 \grace {
2196 \new Lyrics \lyricmode {
2197 \override LyricText #'font-family = #'typewriter
2201 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2202 \markup { (\fraction 1 4 , 0 ) } 4
2204 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2205 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2207 \markup { ( \fraction 2 4 , 0 ) }
2212 The placement of grace notes is synchronized between different staves.
2213 In the following example, there are two sixteenth grace notes for
2214 every eighth grace note
2216 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
2217 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2218 \new Staff { c4 \grace { g8[ b] } c4 } >>
2221 @funindex \afterGrace
2223 If you want to end a note with a grace, use the @code{\afterGrace}
2224 command. It takes two arguments: the main note, and the grace notes
2225 following the main note.
2227 @lilypond[ragged-right, verbatim,relative=2,fragment]
2228 c1 \afterGrace d1 { c16[ d] } c4
2231 This will put the grace notes after a ``space'' lasting 3/4 of the
2232 length of the main note. The fraction 3/4 can be changed by setting
2233 @code{afterGraceFraction}, ie.
2236 afterGraceFraction = #(cons 7 8)
2240 will put the grace note at 7/8 of the main note.
2242 The same effect can be achieved manually by doing
2244 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2247 { s2 \grace { c16[ d] } } >>
2253 By adjusting the duration of the skip note (here it is a half-note),
2254 the space between the main-note and the grace is adjusted.
2256 A @code{\grace} section will introduce special typesetting settings,
2257 for example, to produce smaller type, and set directions. Hence, when
2258 introducing layout tweaks, they should be inside the grace section,
2261 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2273 The overrides should also be reverted inside the grace section.
2275 The layout of grace sections can be changed throughout the music using
2276 the function @code{add-grace-property}. The following example
2277 undefines the @code{Stem} direction for this grace, so
2278 that stems do not always point up.
2282 #(add-grace-property 'Voice 'Stem 'direction '())
2288 Another option is to change the variables @code{startGraceMusic},
2289 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2290 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2291 @code{stopAppoggiaturaMusic}. More information is in the file
2292 @file{ly/@/grace@/-init@/.ly}.
2295 The slash through the stem in acciaccaturas can be obtained
2296 in other situations by @code{\override Stem #'stroke-style = #"grace"}.
2300 Program reference: @internalsref{GraceMusic}.
2305 A score that starts with a @code{\grace} section needs an explicit
2306 @code{\new Voice} declaration, otherwise the main note and the grace
2307 note end up on different staves.
2309 Grace note synchronization can also lead to surprises. Staff notation,
2310 such as key signatures, bar lines, etc., are also synchronized. Take
2311 care when you mix staves with grace notes and staves without, for example,
2313 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
2314 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2315 \new Staff { c4 \bar "|:" d4 } >>
2319 This can be remedied by inserting grace skips of the corresponding
2320 durations in the other staves. For the above example
2323 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
2326 Grace sections should only be used within sequential music
2327 expressions. Nesting or juxtaposing grace sections is not supported,
2328 and might produce crashes or other errors.
2332 @node Expressive marks
2333 @section Expressive marks
2335 Expressive marks help musicians to bring more to the music than simple
2340 * Fingering instructions::
2350 @subsection Articulations
2352 @cindex Articulations
2356 A variety of symbols can appear above and below notes to indicate
2357 different characteristics of the performance. They are added to a note
2358 by adding a dash and the character signifying the
2359 articulation. They are demonstrated here
2361 @lilypondfile[quote,ragged-right]{script-abbreviations.ly}
2363 The meanings of these shorthands can be changed. See
2364 @file{ly/@/script@/-init@/.ly} for examples.
2366 The script is automatically placed, but the direction can be forced as
2367 well. Like other pieces of LilyPond code, @code{_} will place them
2368 below the staff, and @code{^} will place them above.
2370 @lilypond[quote,ragged-right,fragment,verbatim]
2374 Other symbols can be added using the syntax
2375 @var{note}@code{\}@var{name}. Again, they
2376 can be forced up or down using @code{^} and @code{_},
2379 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
2380 c\fermata c^\fermata c_\fermata
2385 @cindex staccatissimo
2395 @cindex organ pedal marks
2404 @cindex prallmordent
2408 @cindex thumb marking
2413 Here is a chart showing all scripts available,
2415 @lilypondfile[ragged-right,quote]{script-chart.ly}
2420 The vertical ordering of scripts is controlled with the
2421 @code{script-priority} property. The lower this number, the closer it
2422 will be put to the note. In this example, the
2423 @internalsref{TextScript} (the sharp symbol) first has the lowest
2424 priority, so it is put lowest in the first example. In the second, the
2425 prall trill (the @internalsref{Script}) has the lowest, so it is on the
2426 inside. When two objects have the same priority, the order in which
2427 they are entered decides which one comes first.
2429 @lilypond[verbatim,relative=3,ragged-right,fragment,quote]
2430 \once \override TextScript #'script-priority = #-100
2431 a4^\prall^\markup { \sharp }
2433 \once \override Script #'script-priority = #-100
2434 a4^\prall^\markup { \sharp }
2440 Program reference: @internalsref{Script}.
2445 These signs appear in the printed output but have no effect on the
2446 MIDI rendering of the music.
2449 @node Fingering instructions
2450 @subsection Fingering instructions
2453 @cindex finger change
2455 Fingering instructions can be entered using
2457 @var{note}-@var{digit}
2459 For finger changes, use markup texts
2461 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
2463 c^\markup { \finger "2 - 3" }
2466 You can use the thumb-script to indicate that a note should be
2467 played with the thumb (e.g., in cello music)
2468 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2469 <a_\thumb a'-3>8 <b_\thumb b'-3>
2472 Fingerings for chords can also be added to individual notes
2473 of the chord by adding them after the pitches
2474 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2475 < c-1 e-2 g-3 b-5 >4
2481 You may exercise greater control over fingering chords by
2482 setting @code{fingeringOrientations}
2484 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
2485 \set fingeringOrientations = #'(left down)
2486 <c-1 es-2 g-4 bes-5 > 4
2487 \set fingeringOrientations = #'(up right down)
2488 <c-1 es-2 g-4 bes-5 > 4
2491 Using this feature, it is also possible to put fingering instructions
2492 very close to note heads in monophonic music,
2494 @lilypond[verbatim,ragged-right,quote,fragment]
2495 \set fingeringOrientations = #'(right)
2502 Program reference: @internalsref{Fingering}.
2504 Examples: @inputfileref{input/@/regression,finger@/-chords@/.ly}.
2508 @subsection Dynamics
2529 Absolute dynamic marks are specified using a command after a note
2530 @code{c4\ff}. The available dynamic marks are @code{\ppppp},
2531 @code{\pppp}, @code{\ppp},
2532 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2533 @code{\fff}, @code{\ffff}, @code{\fp}, @code{\sf}, @code{\sff},
2534 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
2536 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2537 c\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2538 c2\fp c\sf c\sff c\sp c\spp c\sfz c\rfz
2545 A crescendo mark is started with @code{\<} and terminated with
2546 @code{\!} or an absolute dynamic. A decrescendo is started with
2547 @code{\>} and is also terminated with @code{\!} or an absolute
2548 dynamic. @code{\cr} and @code{\decr} may be used instead of
2549 @code{\<} and @code{\>}. Because these marks are bound to notes, you must
2550 use spacer notes if multiple marks are needed during one note
2552 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2554 << f1 { s4 s4\< s4\! \> s4\! } >>
2558 A hairpin starts at the left edge of the beginning note and ends on the
2559 right edge of the ending note. This may be modified by setting
2560 the @code{hairpinToBarline} property,
2562 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2563 \set hairpinToBarline = ##t
2567 In some situations the @code{\espressivo} articulation mark may
2568 be suitable to indicate a crescendo and decrescendo on the one note,
2570 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2571 c2 b4 a g1\espressivo
2574 This may give rise to very short hairpins. Use @code{minimum-length}
2575 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2579 \override Voice.Hairpin #'minimum-length = #5
2585 Hairpins may be printed with a circled tip (al niente notation) by
2586 setting the @code{circled-tip} property,
2588 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2589 \override Hairpin #'circled-tip = ##t
2599 You can also use text saying @emph{cresc.} instead of hairpins
2601 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2612 You can also supply your own texts
2613 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2614 \set crescendoText = \markup { \italic "cresc. poco" }
2615 \set crescendoSpanner = #'dashed-line
2619 To create new dynamic marks or text that should be aligned
2620 with dynamics, see @ref{New dynamic marks}.
2625 Dynamics that occur at, begin on, or end on, the same note
2626 will be vertically aligned. If you want to ensure that dynamics
2627 are aligned when they do not occur on the same note, you can
2628 increase the @code{staff-padding} property.
2631 \override DynamicLineSpanner #'staff-padding = #4
2634 You may also use this property if the dynamics are colliding
2635 with other notation.
2637 Crescendi and decrescendi that end on the first note of a
2638 new line are not printed. To change this behavior, use
2641 \override Score.Hairpin #'after-line-breaking = ##t
2644 Text style dynamic changes (such as @emph{cresc.} and @emph{dim.})
2646 dashed line showing their extent. To surpress printing this line, use
2649 \override DynamicTextSpanner #'dash-period = #-1.0
2655 @funindex \dynamicUp
2657 @funindex \dynamicDown
2658 @code{\dynamicDown},
2659 @funindex \dynamicNeutral
2660 @code{\dynamicNeutral}.
2665 Program reference: @internalsref{DynamicText}, @internalsref{Hairpin}.
2666 Vertical positioning of these symbols is handled by
2667 @internalsref{DynamicLineSpanner}.
2671 @subsection Breath marks
2673 Breath marks are entered using @code{\breathe}
2675 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2682 The glyph of the breath mark can be tuned by overriding the
2683 @code{text} property of the @code{BreathingSign} layout object with
2684 any markup text. For example,
2685 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
2687 \override BreathingSign #'text
2688 = #(make-musicglyph-markup "scripts.rvarcomma")
2695 Program reference: @internalsref{BreathingSign}.
2697 Examples: @inputfileref{input/@/regression,breathing@/-sign@/.ly}.
2703 Short trills are printed like normal articulation; see @ref{Articulations}.
2705 Long running trills are made with @code{\startTrillSpan} and
2706 @code{\stopTrillSpan},
2708 @lilypond[verbatim,ragged-right,relative=2,quote,fragment]
2710 << { c1 \startTrillSpan }
2711 { s2. \grace { d16[\stopTrillSpan e] } } >>
2715 @cindex Pitched trills
2717 Trills that should be executed on an explicitly specified pitch can be
2718 typeset with the command @code{pitchedTrill},
2720 @lilypond[ragged-right,verbatim,fragment,relative=1,quote]
2721 \pitchedTrill c4\startTrillSpan fis
2725 The first argument is the main note. The pitch of the second
2726 is printed as a stemless note head in parentheses.
2731 @code{\startTrillSpan},
2732 @funindex \startTrillSpan
2733 @code{\stopTrillSpan}.
2734 @funindex \stopTrillSpan
2739 Program reference: @internalsref{TrillSpanner}.
2743 @subsection Glissando
2746 @funindex \glissando
2748 A glissando is a smooth change in pitch. It is denoted by a line or a
2749 wavy line between two notes. It is requested by attaching
2750 @code{\glissando} to a note
2752 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2754 \override Glissando #'style = #'zigzag
2761 Program reference: @internalsref{Glissando}.
2763 Example files: @file{input/@/regression/@/glissando@/.ly}.
2768 Printing text over the line (such as @emph{gliss.}) is not supported.
2772 @subsection Arpeggio
2775 @cindex broken chord
2778 You can specify an arpeggio sign (also known as broken chord) on a
2779 chord by attaching an @code{\arpeggio} to a chord
2781 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2785 A square bracket on the left indicates that the player should not
2786 arpeggiate the chord
2788 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2793 The direction of the arpeggio is sometimes denoted by adding an
2794 arrowhead to the wiggly line
2796 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2808 When an arpeggio crosses staves, you may attach an arpeggio to the chords
2809 in both staves and set
2810 @internalsref{PianoStaff}.@code{connectArpeggios}
2812 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2814 \set PianoStaff.connectArpeggios = ##t
2815 \new Staff { <c' e g c>\arpeggio }
2816 \new Staff { \clef bass <c,, e g>\arpeggio }
2824 @funindex \arpeggioUp
2826 @funindex \arpeggioDown
2827 @code{\arpeggioDown},
2828 @funindex \arpeggioNeutral
2829 @code{\arpeggioNeutral},
2830 @funindex \arpeggioBracket
2831 @code{\arpeggioBracket}.
2836 Notation manual: @ref{Ties}, for writing out arpeggios.
2838 Program reference: @internalsref{Arpeggio}.
2843 It is not possible to mix connected arpeggios and unconnected
2844 arpeggios in one @internalsref{PianoStaff} at the same point in time.
2853 Repetition is a central concept in music, and multiple notations exist
2859 * Repeats and MIDI::
2860 * Manual repeat commands::
2862 * Tremolo subdivisions::
2868 @subsection Repeat types
2873 The following types of repetition are supported
2877 Repeated music is fully written (played) out. This is useful when
2878 entering repetitious music. This is the only kind of repeat that
2879 is included in MIDI output.
2882 Repeats are not written out, but alternative endings (volte) are
2883 printed, left to right with brackets. This is the standard notation
2884 for repeats with alternatives. These are not played in MIDI output by
2889 Alternative endings are written stacked. This has limited use but may be
2890 used to typeset two lines of lyrics in songs with repeats, see
2891 @inputfileref{input,star-spangled-banner@/.ly}.
2895 Make tremolo beams. These are not played in MIDI output by default.
2898 Make beat or measure repeats. These look like percent signs. These
2899 are not played in MIDI output by default. Percent repeats must be
2900 declared within a @code{Voice} context.
2906 @subsection Repeat syntax
2908 LilyPond has one syntactic construct for specifying different types of
2909 repeats. The syntax is
2912 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2915 If you have alternative endings, you may add
2916 @funindex \alternative
2927 where each @var{alternative} is a music expression. If you do not
2928 give enough alternatives for all of the repeats, the first alternative
2929 is assumed to be played more than once.
2931 Standard repeats are used like this
2932 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2934 \repeat volta 2 { c4 d e f }
2935 \repeat volta 2 { f e d c }
2938 With alternative endings
2939 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2941 \repeat volta 2 {c4 d e f}
2942 \alternative { {d2 d} {f f,} }
2945 In the following example, the first ending is not a complete
2946 bar (it only had 3 beats). The beginning of the second ending
2947 contains the 4th beat from the first ending. This ``extra''
2948 beat in the second ending is due to the first time ending,
2949 and has nothing to do with the @code{\partial} at the
2950 beginning of the example.
2952 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2955 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2956 \alternative { { g4 g g } { a | a a a a | b2. } }
2960 @funindex \repeatTie
2962 Ties may be added to a second ending,
2964 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2966 \repeat volta 2 {c4 d e f ~ }
2967 \alternative { {f2 d} {f\repeatTie f,} }
2970 It is possible to shorten volta brackets
2971 by setting @code{voltaSpannerDuration}. In the next example, the
2972 bracket only lasts one measure, which is a duration of 3/4.
2974 @lilypond[verbatim,ragged-right,quote]
2978 \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
2979 \repeat "volta" 5 { d d d }
2980 \alternative { { e e e f f f }
2990 Brackets for the repeat are normally only printed over the topmost
2991 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2992 property; see @inputfileref{input/@/regression,volta@/-multi@/-staff@/.ly}.
2997 @cindex repeat, ambiguous
2999 A nested repeat like
3008 is ambiguous, since it is is not clear to which @code{\repeat} the
3009 @code{\alternative} belongs. This ambiguity is resolved by always
3010 having the @code{\alternative} belong to the inner @code{\repeat}.
3011 For clarity, it is advisable to use braces in such situations.
3013 Timing information is not remembered at the start of an alternative,
3014 so after a repeat timing information must be reset by hand; for
3015 example, by setting @code{Score.measurePosition} or entering
3016 @code{\partial}. Similarly, slurs or ties are also not repeated.
3019 @node Repeats and MIDI
3020 @subsection Repeats and MIDI
3022 @cindex expanding repeats
3023 @funindex \unfoldRepeats
3025 With a little bit of tweaking, all types of repeats can be present
3026 in the MIDI output. This is achieved by applying the
3027 @code{\unfoldRepeats} music function. This function changes all
3028 repeats to unfold repeats.
3030 @lilypond[quote,verbatim,fragment,line-width=8.0\cm]
3032 \repeat tremolo 8 {c'32 e' }
3033 \repeat percent 2 { c''8 d'' }
3034 \repeat volta 2 {c'4 d' e' f'}
3043 When creating a score file using @code{\unfoldRepeats} for MIDI,
3044 it is necessary to make two @code{\score} blocks: one for MIDI (with
3045 unfolded repeats) and one for notation (with volta, tremolo, and
3046 percent repeats). For example,
3054 \unfoldRepeats @var{..music..}
3060 @node Manual repeat commands
3061 @subsection Manual repeat commands
3063 @funindex repeatCommands
3065 The property @code{repeatCommands} can be used to control the layout of
3066 repeats. Its value is a Scheme list of repeat commands.
3069 @item @code{start-repeat}
3070 Print a @code{|:} bar line.
3072 @item @code{end-repeat}
3073 Print a @code{:|} bar line.
3075 @item @code{(volta @var{text})}
3076 Print a volta bracket saying @var{text}: The text can be specified as
3077 a text string or as a markup text, see @ref{Text markup}. Do not
3078 forget to change the font, as the default number font does not contain
3079 alphabetic characters;
3081 @item @code{(volta #f)}
3082 Stop a running volta bracket.
3085 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
3087 \set Score.repeatCommands = #'((volta "93") end-repeat)
3089 \set Score.repeatCommands = #'((volta #f))
3096 Program reference: @internalsref{VoltaBracket},
3097 @internalsref{RepeatedMusic},
3098 @internalsref{VoltaRepeatedMusic},
3099 @internalsref{UnfoldedRepeatedMusic}, and
3100 @internalsref{FoldedRepeatedMusic}.
3103 @node Tremolo repeats
3104 @subsection Tremolo repeats
3106 @cindex tremolo beams
3108 To place tremolo marks between notes, use @code{\repeat} with tremolo
3110 @lilypond[quote,verbatim,ragged-right]
3111 \new Voice \relative c' {
3112 \repeat "tremolo" 8 { c16 d16 }
3113 \repeat "tremolo" 4 { c16 d16 }
3114 \repeat "tremolo" 2 { c16 d16 }
3118 Tremolo marks can also be put on a single note. In this case, the
3119 note should not be surrounded by braces.
3120 @lilypond[quote,verbatim,ragged-right]
3121 \repeat "tremolo" 4 c'16
3124 Similar output is obtained using the tremolo subdivision, described in
3125 @ref{Tremolo subdivisions}.
3130 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
3132 Program reference: @internalsref{Beam}, @internalsref{StemTremolo}.
3134 Example files: @inputfileref{input/@/regression,chord@/-tremolo@/.ly},
3135 @inputfileref{input/@/regression,stem@/-tremolo@/.ly}.
3138 @node Tremolo subdivisions
3139 @subsection Tremolo subdivisions
3141 @cindex tremolo marks
3142 @funindex tremoloFlags
3144 Tremolo marks can be printed on a single note by adding
3145 `@code{:}[@var{number}]' after the note. The number indicates the
3146 duration of the subdivision, and it must be at least 8. A
3147 @var{length} value of 8 gives one line across the note stem. If the
3148 length is omitted, the last value (stored in @code{tremoloFlags}) is
3151 @lilypond[quote,ragged-right,verbatim,fragment]
3152 c'2:8 c':32 | c': c': |
3158 Tremolos entered in this way do not carry over into the MIDI output.
3163 In this manual: @ref{Tremolo repeats}.
3165 Elsewhere: @internalsref{StemTremolo}.
3168 @node Measure repeats
3169 @subsection Measure repeats
3171 @cindex percent repeats
3172 @cindex measure repeats
3174 In the @code{percent} style, a note pattern can be repeated. It is
3175 printed once, and then the pattern is replaced with a special sign.
3176 Patterns of one and two measures are replaced by percent-like signs,
3177 patterns that divide the measure length are replaced by slashes.
3178 Percent repeats must be declared within a @code{Voice} context.
3180 @lilypond[quote,verbatim,ragged-right]
3181 \new Voice \relative c' {
3182 \repeat "percent" 4 { c4 }
3183 \repeat "percent" 2 { c2 es2 f4 fis4 g4 c4 }
3187 Measure repeats of more than 2 measures get a counter, if you switch
3188 on the @code{countPercentRepeats} property,
3190 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
3192 \set countPercentRepeats = ##t
3193 \repeat "percent" 4 { c1 }
3199 Isolated percents can also be printed. This is done by putting a
3200 multi-measure rest with a different print function,
3202 @lilypond[fragment,verbatim,quote]
3203 \override MultiMeasureRest #'stencil
3204 = #ly:multi-measure-rest::percent
3213 Program reference: @internalsref{RepeatSlash},
3214 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
3215 @internalsref{DoublePercentRepeatCounter},
3216 @internalsref{PercentRepeatCounter},
3217 @internalsref{PercentRepeatedMusic}.