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
10 @chapter Basic notation
12 This chapter explains how to use all basic notation features.
16 * Alternate music entry::
30 This section is about basic notation elements like notes, rests, and
31 related constructs, such as stems, tuplets and ties.
36 * Cautionary accidentals::
52 @cindex Note specification
53 @cindex entering notes
55 A note is printed by specifying its pitch and then its duration,
57 @lilypond[quote,verbatim,ragged-right,fragment]
63 This manual: @ref{Pitches}, @ref{Durations}
72 The most common syntax for pitch entry is used for standard notes and
73 @code{\chordmode} modes. In these modes, pitches may be designated by
74 names. The notes are specified by the letters @code{a} through
75 @code{g}. The octave is formed with notes ranging from @code{c}
76 to @code{b}. The pitch @code{c} is an octave below middle C and the
77 letters span the octave above that C
79 @lilypond[quote,fragment,verbatim,ragged-right]
81 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
87 The optional octave specification takes the form of a series of
88 single quote (`@code{'}') characters or a series of comma
89 (`@code{,}') characters. Each @code{'} raises the pitch by one
90 octave; each @code{,} lowers the pitch by an octave
92 @lilypond[quote,ragged-right,fragment,verbatim]
96 @cindex note names, Dutch
98 A sharp is formed by adding @code{-is} to the end of a pitch name and
99 a flat is formed by adding @code{-es}. Double sharps and double flats
100 are obtained by adding @code{-isis} or @code{-eses}. These
101 names are the Dutch note names. In Dutch, @code{aes} is contracted to
102 @code{as}, but both forms are accepted. Similarly, both
103 @code{es} and @code{ees} are accepted
105 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
114 There are predefined sets of note names for various other languages.
115 To use them, include the language specific init file. For
116 example: @code{\include "english.ly"}. The available language files
117 and the note names they define are
122 Note Names sharp flat
123 nederlands.ly c d e f g a bes b -is -es
124 english.ly c d e f g a bf b -s/-sharp -f/-flat
126 deutsch.ly c d e f g a b h -is -es
127 norsk.ly c d e f g a b h -iss/-is -ess/-es
128 svenska.ly c d e f g a b h -iss -ess
129 italiano.ly do re mi fa sol la sib si -d -b
130 catalan.ly do re mi fa sol la sib si -d/-s -b
131 espanol.ly do re mi fa sol la sib si -s -b
137 In accordance with standard typesetting rules, a natural sign is printed
138 before a sharp or flat if a previous accidental needs to be
139 cancelled. To change this behaviour, use
140 @code{\set Staff.extraNatural = ##f}
142 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
144 \set Staff.extraNatural = ##f
150 Suggested accidentals (used in notating musica ficta) may
151 be written with @code{suggestAccidentals}
153 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
154 \set suggestAccidentals = ##t
161 Program reference: @internalsref{LedgerLineSpanner}, @internalsref{NoteHead}.
164 @node Cautionary accidentals
165 @subsection Cautionary accidentals
167 @cindex reminder accidental
169 @cindex cautionary accidental
170 @cindex parenthesized accidental
173 Normally accidentals are printed automatically, but you may also
174 print them manually. A reminder accidental
175 can be forced by adding an exclamation mark @code{!}
176 after the pitch. A cautionary accidental
177 (i.e., an accidental within parentheses) can be obtained by adding the
178 question mark `@code{?}' after the pitch. These extra accidentals
179 can be used to produce natural signs, too.
181 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
182 cis cis cis! cis? c c? c! c
188 The automatic production of accidentals can be tuned in many
189 ways. For more information, refer to @ref{Automatic accidentals}.
194 @subsection Micro tones
196 @cindex quarter tones
197 @cindex semi-flats, semi-sharps
199 Half-flats and half-sharps are formed by adding @code{-eh} and
200 @code{-ih}; the following is a series of Cs with increasing pitches
202 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
203 \set Staff.extraNatural = ##f
207 Micro tones are also exported to the MIDI file.
212 There are no generally accepted standards for denoting three quarter
213 flats, so LilyPond's symbol does not conform to any standard.
221 A chord is formed by a enclosing a set of pitches in @code{<} and
222 @code{>}. A chord may be followed by a duration, and a set of
223 articulations, just like simple notes
225 @lilypond[verbatim,ragged-right,fragment,quote,relative=1]
229 For more information about chords, see @ref{Chord names}.
240 Rests are entered like notes with the note name @code{r}
242 @lilypond[fragment,quote,ragged-right,verbatim]
246 Whole bar rests, centered in middle of the bar,
247 must be done with multi-measure rests. They can be used for a
248 single bar as well as many bars, and are discussed in
249 @ref{Multi measure rests}.
251 To explicitly specify a rest's vertical position, write a note
252 followed by @code{\rest}. A rest will be placed in the position
253 where the note would appear,
255 @lilypond[fragment,quote,ragged-right,verbatim]
260 This makes manual formatting of
261 polyphonic music much easier, since the automatic rest collision
262 formatter will leave these rests alone.
266 Program reference: @internalsref{Rest}.
273 @cindex Invisible rest
278 An invisible rest (also called a `skip') can be entered like a note
279 with note name `@code{s}' or with @code{\skip @var{duration}}
281 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
282 a4 a4 s4 a4 \skip 1 a4
285 The @code{s} syntax is only available in note mode and chord mode. In
286 other situations, for example, when entering lyrics, you should use
287 the @code{\skip} command
289 @lilypond[quote,ragged-right,verbatim]
292 \new Lyrics \lyricmode { \skip 2 bla2 }
296 The skip command is merely an empty musical placeholder. It does not
297 produce any output, not even transparent output.
299 The @code{s} skip command does create @internalsref{Staff} and
300 @internalsref{Voice} when necessary, similar to note and rest
301 commands. For example, the following results in an empty staff.
303 @lilypond[quote,ragged-right,verbatim]
307 The fragment @code{@{ \skip 4 @} } would produce an empty page.
311 Program reference: @internalsref{SkipMusic}.
315 @subsection Durations
318 @cindex @code{\longa}
319 @cindex @code{\breve}
320 @cindex @code{\maxima}
322 In Note, Chord, and Lyrics mode, durations are designated by numbers and
323 dots: durations are entered as their reciprocal values. For example, a
324 quarter note is entered using a @code{4} (since it is a 1/4 note), while
325 a half note is entered using a @code{2} (since it is a 1/2 note). For
326 notes longer than a whole you must use the variables @code{\longa} and
331 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
333 r1 r2 r4 r8 r16 r32 r64 r64
339 a\breve*1/2 \autoBeamOff
340 a1 a2 a4 a8 a16 a32 a64 a64
343 r\longa*1/4 r\breve *1/2
344 r1 r2 r4 r8 r16 r32 r64 r64
350 \remove "Clef_engraver"
351 \override StaffSymbol #'transparent = ##t
352 \override TimeSignature #'transparent = ##t
353 \override BarLine #'transparent = ##t
354 \consists "Pitch_squash_engraver"
360 If the duration is omitted then it is set to the previously entered
361 duration. The default for the first note is a quarter note.
363 @lilypond[quote,ragged-right,verbatim,fragment]
364 { a a a2 a a4 a a1 a }
368 @node Augmentation dots
369 @subsection Augmentation dots
373 To obtain dotted note lengths, simply add a dot (`@code{.}') to
374 the number. Double-dotted notes are produced in a similar way.
376 @lilypond[quote,ragged-right,fragment,verbatim]
377 a'4 b' c''4. b'8 a'4. b'4.. c''8.
382 Dots are normally moved up to avoid staff lines, except in polyphonic
383 situations. The following commands may be used to force a particular
386 @cindex @code{\dotsUp}
388 @cindex @code{\dotsDown}
390 @cindex @code{\dotsNeutral}
395 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
403 @cindex @code{\times}
405 Tuplets are made out of a music expression by multiplying all durations
409 \times @var{fraction} @var{musicexpr}
413 The duration of @var{musicexpr} will be multiplied by the fraction.
414 The fraction's denominator will be printed over the notes, optionally
415 with a bracket. The most common tuplet is the triplet in which 3
416 notes have the length of 2, so the notes are 2/3 of their written
419 @lilypond[quote,ragged-right,fragment,verbatim]
420 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
423 Tuplets may be nested, for example,
425 @lilypond[fragment,ragged-right,verbatim,relative=2]
426 \set tupletNumberFormatFunction = #fraction-tuplet-formatter
429 \times 3/5 { a a a a a }
435 @cindex @code{\tupletUp}
437 @cindex @code{\tupletDown}
439 @cindex @code{\tupletNeutral}
440 @code{\tupletNeutral}.
445 @cindex @code{tupletNumberFormatFunction}
446 @cindex tuplet formatting
448 The property @code{tupletSpannerDuration} specifies how long each
449 bracket should last. With this, you can make lots of tuplets while
450 typing @code{\times} only once, thus saving lots of typing. In the next
451 example, there are two triplets shown, while @code{\times} was only
454 @lilypond[quote,fragment,relative=2,ragged-right,verbatim]
455 \set tupletSpannerDuration = #(ly:make-moment 1 4)
456 \times 2/3 { c8 c c c c c }
460 For more information about @code{make-moment}, see
461 @ref{Time administration}.
463 The format of the number is determined by the property
464 @code{tupletNumberFormatFunction}. The default prints only the
465 denominator, but if it is set to the Scheme function
466 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
469 To avoid printing tuplet numbers, use
471 @lilypond[quote,fragment,relative=2,ragged-right,verbatim]
472 \times 2/3 { c8 c c } \times 2/3 { c8 c c }
473 \override TupletNumber #'transparent = ##t
474 \times 2/3 { c8 c c } \times 2/3 { c8 c c }
480 Program reference: @internalsref{TupletBracket},
481 @internalsref{TupletNumber}, and @internalsref{TimeScaledMusic}.
483 Examples: @inputfileref{input/@/regression,tuplet@/-nest@/.ly}.
487 @node Scaling durations
488 @subsection Scaling durations
490 You can alter the length of duration by a fraction @var{N/M}
491 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
492 will not affect the appearance of the notes or rests produced.
494 In the following example, the first three notes take up exactly two
495 beats, but no triplet bracket is printed.
496 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
498 a4*2/3 gis4*2/3 a4*2/3
506 This manual: @ref{Tuplets}
512 Whenever a note is found, a @internalsref{Stem} object is created
513 automatically. For whole notes and rests, they are also created but
518 @cindex @code{\stemUp}
520 @cindex @code{\stemDown}
522 @cindex @code{\stemNeutral}
528 To change the direction of stems in the middle of the staff, use
530 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
532 \override Stem #'neutral-direction = #up
534 \override Stem #'neutral-direction = #down
539 @node Alternate music entry
540 @section Alternate music entry
543 This section deals with tricks and features of the input language that
544 were added solely to help entering music and finding and correcting
545 mistakes. There are also external tools that make debugging easier.
546 See @ref{Point and click} for more information.
548 It is also possible to enter and edit music using other programs, such as
549 GUI interfaces or MIDI sequencers. Refer to the LilyPond
550 website for more information.
558 * Skipping corrected music::
559 * Automatic note splitting::
560 * Writing music in parallel::
564 @node Relative octaves
565 @subsection Relative octaves
568 @cindex Relative octave specification
569 @cindex @code{\relative}
571 Octaves are specified by adding @code{'} and @code{,} to pitch names.
572 When you copy existing music, it is easy to accidentally put a pitch
573 in the wrong octave and hard to find such an error. The relative
574 octave mode prevents these errors by making the mistakes much
575 larger: a single error puts the rest of the piece off by one octave
578 \relative @var{startpitch} @var{musicexpr}
585 \relative @var{musicexpr}
589 @code{c'} is used as the default if no starting pitch is defined.
591 The octave of notes that appear in @var{musicexpr} are calculated as
592 follows: if no octave changing marks are used, the basic interval
593 between this and the last note is always taken to be a fourth or
594 less. This distance is determined without regarding alterations; a
595 @code{fisis} following a @code{ceses} will be put above the
596 @code{ceses}. In other words, a doubly-augmented fourth is considered
597 a smaller interval than a diminished fifth, even though the
598 doubly-augmented fourth spans seven semitones while the diminished
599 fifth only spans six semitones.
601 The octave changing marks @code{'} and @code{,} can be added to raise
602 or lower the pitch by an extra octave. Upon entering relative mode,
603 an absolute starting pitch can be specified that will act as the
604 predecessor of the first note of @var{musicexpr}. If no starting pitch
605 is specified, then middle C is used as a start.
607 Here is the relative mode shown in action
608 @lilypond[quote,fragment,ragged-right,verbatim]
614 Octave changing marks are used for intervals greater than a fourth
615 @lilypond[quote,ragged-right,fragment,verbatim]
621 If the preceding item is a chord, the first note of the chord is used
622 to determine the first note of the next chord
624 @lilypond[quote,ragged-right,fragment,verbatim]
632 The pitch after the @code{\relative} contains a note name.
634 The relative conversion will not affect @code{\transpose},
635 @code{\chordmode} or @code{\relative} sections in its argument. To use
636 relative within transposed music, an additional @code{\relative} must
637 be placed inside @code{\transpose}.
641 @subsection Octave check
645 Octave checks make octave errors easier to correct: a note may be
646 followed by @code{=}@var{quotes} which indicates what its absolute
647 octave should be. In the following example,
650 \relative c'' @{ c='' b=' d,='' @}
654 the @code{d} will generate a warning, because a @code{d''} is expected
655 (because @code{b'} to @code{d''} is only a third), but a @code{d'} is
656 found. In the output, the octave is corrected to be a @code{d''} and
657 the next note is calculated relative to @code{d''} instead of @code{d'}.
659 There is also an octave check that produces no visible output. The syntax
665 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
666 quotes) in \relative mode. If not, a warning is printed, and the
667 octave is corrected. The @var{pitch} is not printed as a note.
669 In the example below, the first check passes without incident, since
670 the @code{e} (in relative mode) is within a fifth of @code{a'}. However,
671 the second check produces a warning, since the @code{e} is not within
672 a fifth of @code{b'}. The warning message is printed, and the octave
673 is adjusted so that the following notes are in the correct octave
685 The octave of a note following an octave check is determined with
686 respect to the note preceding it. In the next fragment, the last note
687 is an @code{a'}, above middle C. That means that the @code{\octave}
688 check passes successfully, so the check could be deleted without changing
689 the output of the piece.
691 @lilypond[quote,ragged-right,verbatim,fragment]
701 @subsection Transpose
704 @cindex transposition of pitches
705 @cindex @code{\transpose}
707 A music expression can be transposed with @code{\transpose}. The
710 \transpose @var{from} @var{to} @var{musicexpr}
713 This means that @var{musicexpr} is transposed by the interval between
714 the pitches @var{from} and @var{to}: any note with pitch @code{from}
715 is changed to @code{to}.
717 For example, consider a piece written in the key of D-major. If
718 this piece is a little too low for its performer, it can be
719 transposed up to E-major with
721 \transpose d e @dots{}
724 Consider a part written for violin (a C instrument). If
725 this part is to be played on the A clarinet (for which an
726 A is notated as a C, and which sounds a minor third lower
727 than notated), the following
728 transposition will produce the appropriate part
731 \transpose a c @dots{}
734 @code{\transpose} distinguishes between enharmonic pitches: both
735 @code{\transpose c cis} or @code{\transpose c des} will transpose up
736 half a tone. The first version will print sharps and the second
737 version will print flats
739 @lilypond[quote,ragged-right,verbatim]
740 mus = { \key d \major cis d fis g }
749 @code{\transpose} may also be used to input written notes for a
750 transposing instrument. Pitches are normally entered into LilyPond
751 in C (or ``concert pitch''), but they may be entered in another
752 key. For example, when entering music for a B-flat trumpet which
753 begins on concert D, one would write
756 \transpose c bes @{ e4 @dots{} @}
759 To print this music in B-flat again (i.e. producing a trumpet part,
760 instead of a concert pitch conductor's score) you would wrap the
761 existing music with another @code{transpose}
764 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
770 Program reference: @internalsref{TransposedMusic}.
775 If you want to use both @code{\transpose} and @code{\relative},
776 you must put @code{\transpose} outside of @code{\relative}, since
777 @code{\relative} will have no effect music that appears inside a
782 @subsection Bar check
785 @cindex @code{barCheckSynchronize}
788 Bar checks help detect errors in the durations. A bar check is
789 entered using the bar symbol, `@code{|}'. Whenever it is encountered
790 during interpretation, it should fall on a measure boundary. If it
791 does not, a warning is printed. In the next example, the second bar
792 check will signal an error
794 \time 3/4 c2 e4 | g2 |
797 Bar checks can also be used in lyrics, for example
802 Twin -- kle | Twin -- kle
806 Failed bar checks are caused by entering incorrect
807 durations. Incorrect durations often completely garble up the score,
808 especially if the score is polyphonic, so a good place to start correcting
809 input is by scanning for failed bar checks and incorrect durations.
812 @cindex @code{pipeSymbol}
814 It is also possible to redefine the meaning of @code{|}. This is done
815 by assigning a music expression to @code{pipeSymbol},
817 @lilypond[quote,ragged-right,verbatim]
818 pipeSymbol = \bar "||"
824 @node Barnumber check
825 @subsection Barnumber check
827 When copying large pieces of music, it can be helpful to check that
828 the LilyPond bar number corresponds to the original that you are
829 entering from. This can be checked with @code{\barNumberCheck}, for
837 will print a warning if the @code{currentBarNumber} is not 123 when it
841 @node Skipping corrected music
842 @subsection Skipping corrected music
845 @cindex @code{skipTypesetting}
846 @cindex @code{showLastLength}
848 When entering or copying music, usually only the music near the end (where you
849 are adding notes) is interesting to view and correct. To speed up
850 this correction process, it is possible to skip typesetting of all but
851 the last few measures. This is achieved by putting
854 showLastLength = R1*5
859 in your source file. This will render only the last 5 measures
860 (assuming 4/4 time signature) of every @code{\score} in the input
861 file. For longer pieces, rendering only a small part is often an order
862 of magnitude quicker than rendering it completely
864 Skipping parts of a score can be controlled in a more fine-grained
865 fashion with the property @code{Score.skipTypesetting}. When it is
866 set, no typesetting is performed at all.
868 This property is also used to control output to the MIDI file. Note that
869 it skips all events, including tempo and instrument changes. You have
872 @lilypond[quote,fragment,ragged-right,verbatim]
875 \set Score.skipTypesetting = ##t
877 \set Score.skipTypesetting = ##f
881 In polyphonic music, @code{Score.skipTypesetting} will affect all
882 voices and staves, saving even more time.
885 @node Automatic note splitting
886 @subsection Automatic note splitting
888 Long notes can be converted automatically to tied notes. This is done
889 by replacing the @internalsref{Note_heads_engraver} by the
890 @internalsref{Completion_heads_engraver}.
891 In the following examples, notes crossing the bar line are split and tied.
893 @lilypond[quote,fragment,verbatim,relative=1,line-width=12\cm]
895 \remove "Note_heads_engraver"
896 \consists "Completion_heads_engraver"
898 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
902 This engraver splits all running notes at the bar line, and inserts
903 ties. One of its uses is to debug complex scores: if the measures are
904 not entirely filled, then the ties exactly show how much each measure
910 Not all durations (especially those containing tuplets) can be
911 represented exactly with normal notes and dots, but the engraver will
914 @code{Completion_heads_engraver} only affects notes; it does not split
920 Examples: @inputfileref{input/@/regression,completion@/-heads@/.ly}.
924 Program reference: @internalsref{Completion_heads_engraver}.
927 @node Writing music in parallel
928 @subsection Writing music in parallel
929 @cindex Writing music in parallel
930 @cindex Interleaved music
932 Music for multiple parts can be interleaved
934 @lilypond[quote,fragment,verbatim]
935 \parallelMusic #'(voiceA voiceB) {
936 r8 g'16[ c''] e''[ g' c'' e''] r8 g'16[ c''] e''[ g' c'' e''] |
938 r8 a'16[ d''] f''[ a' d'' f''] r8 a'16[ d''] f''[ a' d'' f''] |
942 \new Staff \new Voice \voiceA
943 \new Staff \new Voice \voiceB
949 @section Staff notation
951 @cindex Staff notation
953 This section describes music notation that occurs on staff level,
954 such as key signatures, clefs and time signatures.
963 * System start delimiters::
973 The clef indicates which lines of the staff correspond to which
974 pitches. The clef is set with the @code{\clef} command
976 @lilypond[quote,ragged-right,fragment,verbatim]
977 { c''2 \clef alto g'2 }
987 @cindex mezzosoprano clef
988 @cindex baritone clef
989 @cindex varbaritone clef
992 Supported clefs include
994 @item treble, violin, G, G2
1003 G clef on 1st line, so-called French violin clef
1020 By adding @code{_8} or @code{^8} to the clef name, the clef is
1021 transposed one octave down or up, respectively, and @code{_15} and
1022 @code{^15} transposes by two octaves. The argument @var{clefname}
1023 must be enclosed in quotes when it contains underscores or digits. For
1026 @cindex choral tenor clef
1027 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
1034 The command @code{\clef "treble_8"} is equivalent to setting @code{clefGlyph},
1035 @code{clefPosition} (which controls the Y position of the clef),
1036 @code{middleCPosition} and @code{clefOctavation}. A clef is printed
1037 when any of these properties are changed. The following example shows
1038 possibilities when setting properties manually.
1040 @lilypond[quote,ragged-right,verbatim]
1042 \set Staff.clefGlyph = #"clefs.F"
1043 \set Staff.clefPosition = #2
1045 \set Staff.clefGlyph = #"clefs.G"
1047 \set Staff.clefGlyph = #"clefs.C"
1049 \set Staff.clefOctavation = #7
1051 \set Staff.clefOctavation = #0
1052 \set Staff.clefPosition = #0
1056 \set Staff.middleCPosition = #4
1064 Program reference: @internalsref{Clef}.
1068 @subsection Key signature
1070 @cindex Key signature
1073 The key signature indicates the tonality in which a piece is played. It
1074 is denoted by a set of alterations (flats or sharps) at the start of the
1077 Setting or changing the key signature is done with the @code{\key}
1081 @code{\key} @var{pitch} @var{type}
1084 @cindex @code{\minor}
1085 @cindex @code{\major}
1086 @cindex @code{\minor}
1087 @cindex @code{\ionian}
1088 @cindex @code{\locrian}
1089 @cindex @code{\aeolian}
1090 @cindex @code{\mixolydian}
1091 @cindex @code{\lydian}
1092 @cindex @code{\phrygian}
1093 @cindex @code{\dorian}
1094 @cindex church modes
1096 Here, @var{type} should be @code{\major} or @code{\minor} to get
1097 @var{pitch}-major or @var{pitch}-minor, respectively. You may also
1098 use the standard mode names (also called ``church modes''): @code{\ionian},
1099 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
1100 @code{\phrygian}, and @code{\dorian}.
1102 This command sets the context property
1103 @code{Staff.keySignature}. Non-standard key signatures
1104 can be specified by setting this property directly.
1106 Accidentals and key signatures often confuse new users, because
1107 unaltered notes get natural signs depending on the key signature. For
1108 more information, see @ref{More about pitches}.
1113 A natural sign is printed to cancel any previous accidentals. This
1114 can be suppressed by setting the @code{Staff.printKeyCancellation}
1117 @lilypond[quote,fragment,ragged-right,fragment,verbatim,relative=2]
1122 \set Staff.printKeyCancellation = ##f
1132 Program reference: @internalsref{KeyCancellation}, @internalsref{KeySignature}.
1135 @node Time signature
1136 @subsection Time signature
1138 @cindex Time signature
1140 @cindex @code{\time}
1142 Time signature indicates the metrum of a piece: a regular pattern of
1143 strong and weak beats. It is denoted by a fraction at the start of the
1146 The time signature is set with the @code{\time} command
1148 @lilypond[quote,ragged-right,fragment,verbatim]
1149 \time 2/4 c'2 \time 3/4 c'2.
1154 The symbol that is printed can be customized with the @code{style}
1155 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1158 @lilypond[fragment,quote,ragged-right,verbatim]
1161 \override Staff.TimeSignature #'style = #'()
1166 There are many more options for its layout. See @ref{Ancient time
1167 signatures} for more examples.
1169 @code{\time} sets the property @code{timeSignatureFraction},
1170 @code{beatLength} and @code{measureLength} in the @code{Timing}
1171 context, which is normally aliased to @internalsref{Score}. The
1172 property @code{measureLength} determines where bar lines should be
1173 inserted, and how automatic beams should be generated. Changing the
1174 value of @code{timeSignatureFraction} also causes the symbol to be
1177 More options are available through the Scheme function
1178 @code{set-time-signature}. In combination with the
1179 @internalsref{Measure_grouping_engraver}, it will create
1180 @internalsref{MeasureGrouping} signs. Such signs ease reading
1181 rhythmically complex modern music. In the following example, the 9/8
1182 measure is subdivided in 2, 2, 2 and 3. This is passed to
1183 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1185 @lilypond[quote,ragged-right,verbatim]
1188 #(set-time-signature 9 8 '(2 2 2 3))
1189 g8[ g] d[ d] g[ g] a8[( bes g]) |
1190 #(set-time-signature 5 8 '(3 2))
1196 \consists "Measure_grouping_engraver"
1205 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_translator}.
1207 Examples: @inputfileref{input/@/test,compound@/-time@/.ly}.
1212 Automatic beaming does not use the measure grouping specified with
1213 @code{set-time-signature}.
1216 @node Partial measures
1217 @subsection Partial measures
1221 @cindex partial measure
1222 @cindex measure, partial
1223 @cindex shorten measures
1224 @cindex @code{\partial}
1226 Partial measures, such as an anacrusis or upbeat, are entered using the
1228 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1229 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1232 The syntax for this command is
1235 \partial @var{duration}
1238 This is internally translated into
1241 \set Timing.measurePosition = -@var{length of duration}
1244 The property @code{measurePosition} contains a rational number
1245 indicating how much of the measure has passed at this point.
1250 This command does not take into account grace notes at the start of
1251 the music. When a piece starts with graces notes in the pickup, then
1252 the @code{\partial} should follow the grace notes
1254 @lilypond[verbatim,quote,ragged-right,relative,fragment]
1263 @subsection Bar lines
1267 @cindex measure lines
1270 Bar lines delimit measures, but are also used to indicate
1271 repeats. Normally they are inserted automatically. Line
1272 breaks may only happen on bar lines.
1274 Special types of bar lines can be forced with the @code{\bar} command
1276 @lilypond[quote,ragged-right,relative=2,fragment,verbatim]
1280 The following bar types are available
1282 @lilypondfile[ragged-right,quote]{bar-lines.ly}
1284 To allow a line break where there is no visible bar line, use
1291 This will insert an invisible bar line and allow line breaks at this
1294 In scores with many staves, a @code{\bar} command in one staff is
1295 automatically applied to all staves. The resulting bar lines are
1296 connected between different staves of a StaffGroup
1298 @lilypond[quote,ragged-right,fragment,verbatim]
1306 \new Staff { \clef bass c4 g e g }
1308 \new Staff { \clef bass c2 c2 }
1315 @cindex @code{whichBar}
1316 @cindex @code{repeatCommands}
1317 @cindex @code{defaultBarType}
1319 The command @code{\bar }@var{bartype} is a short cut for doing
1320 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1321 is set to a string, a bar line of that type is created.
1323 A bar line is created whenever the @code{whichBar} property is set.
1324 At the start of a measure it is set to the contents of
1325 @code{Timing.defaultBarType}. The contents of @code{repeatCommands} are used
1326 to override default measure bars.
1328 You are encouraged to use @code{\repeat} for repetitions. See
1334 In this manual: @ref{Repeats}, @ref{System start delimiters}.
1336 Program reference: @internalsref{BarLine} (created at
1337 @internalsref{Staff} level), @internalsref{SpanBar} (across staves).
1339 Examples: @inputfileref{input/@/test,bar@/-lines@/.ly},
1342 @node Unmetered music
1343 @subsection Unmetered music
1346 @cindex @code{\cadenzaOn}
1347 @cindex @code{\cadenzaOff}
1349 Bar lines and bar numbers are calculated automatically. For unmetered
1350 music (cadenzas, for example), this is not desirable. To turn off
1351 automatic bar lines and bar numbers, use the commands @code{\cadenzaOn}
1352 and @code{\cadenzaOff}.
1354 @lilypond[verbatim,quote,ragged-right,relative=2,fragment]
1366 LilyPond will only insert page breaks at a barline. Unless the unmetered
1367 music ends before the end of the staff line, you will need to insert
1375 to indicate where line breaks can occur.
1378 @node System start delimiters
1379 @subsection System start delimiters
1381 @cindex start of system
1382 @cindex Staff, multiple
1383 @cindex bracket, vertical
1384 @cindex brace, vertical
1387 @cindex staff, choir
1389 Many scores consist of more than one staff. These staves can be
1390 joined in four different ways
1393 @item The group is started with a brace at the left, and bar lines are
1394 connected. This is done with the @internalsref{GrandStaff} context.
1396 @lilypond[verbatim,ragged-right,quote]
1404 @item The group is started with a bracket, and bar lines are connected.
1405 This is done with the
1406 @internalsref{StaffGroup} context
1408 @lilypond[verbatim,ragged-right,quote]
1416 @item The group is started with a bracket, but bar lines are not
1417 connected. This is done with the @internalsref{ChoirStaff} context.
1419 @lilypond[verbatim,ragged-right,quote]
1427 @item The group is started with a vertical line. Bar lines are not
1428 connected. This is the default for the score.
1430 @lilypond[verbatim,ragged-right,quote]
1441 The bar lines at the start of each system are
1442 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1443 @internalsref{SystemStartBracket}. Only one of these types is created
1444 in every context, and that type is determined by the property
1445 @code{systemStartDelimiter}.
1449 @subsection Staff symbol
1451 @cindex adjusting staff symbol
1453 Notes, dynamic signs, etc., are grouped
1454 with a set of horizontal lines, called a staff (plural `staves'). In
1455 LilyPond, these lines are drawn using a separate layout object called
1458 The staff symbol may be tuned in the number, thickness and distance
1459 of lines, using properties. This is demonstrated in the example files
1460 @inputfileref{input/@/test,staff@/-lines@/.ly},
1461 @inputfileref{input/@/test,staff@/-size@/.ly}.
1463 In addition, staves may be started and stopped at will. This is done
1464 with @code{\startStaff} and @code{\stopStaff}.
1466 @lilypond[verbatim,relative=2,fragment]
1468 \override Staff.StaffSymbol #'line-count = 2
1469 \stopStaff \startStaff
1471 \revert Staff.StaffSymbol #'line-count
1472 \stopStaff \startStaff
1476 In combination with Frenched staves, this may be used to typeset ossia
1477 sections. An example is in @inputfileref{input/@/test@/,ossia.ly},
1482 @lilypondfile{ossia.ly}
1484 @cindex staff lines, setting number of
1485 @cindex staff lines, setting thickness of
1486 @cindex thickness of staff lines, setting
1487 @cindex number of staff lines, setting
1491 Program reference: @internalsref{StaffSymbol}.
1493 Examples: @inputfileref{input/@/test,staff@/-lines@/.ly},
1494 @inputfileref{input/@/test@/,ossia.ly},
1495 @inputfileref{input/@/test,staff@/-size@/.ly},
1496 @inputfileref{input/@/regression,staff@/-line@/-positions@/.ly}.
1500 @node Connecting notes
1501 @section Connecting notes
1503 This section deals with notation that affects groups of notes.
1509 * Laissez vibrer ties::
1522 A tie connects two adjacent note heads of the same pitch. The tie in
1523 effect extends the length of a note. Ties should not be confused with
1524 slurs, which indicate articulation, or phrasing slurs, which indicate
1525 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
1527 @lilypond[quote,ragged-right,fragment,verbatim]
1528 e' ~ e' <c' e' g'> ~ <c' e' g'>
1531 When a tie is applied to a chord, all note heads whose pitches match
1532 are connected. When no note heads match, no ties will be created.
1534 A tie is just a way of extending a note duration, similar to the
1535 augmentation dot. The following example shows two ways of notating
1536 exactly the same concept
1538 @lilypond[quote,fragment,ragged-right]
1539 \time 3/4 c'2. c'2 ~ c'4
1543 Ties are used either when the note crosses a bar line, or when dots
1544 cannot be used to denote the rhythm. When using ties, larger note
1545 values should be aligned to subdivisions of the measure, such as
1547 @lilypond[fragment,quote,ragged-right]
1549 r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
1553 If you need to tie a lot of notes over bars, it may be easier to use
1554 automatic note splitting (see @ref{Automatic note splitting}). This
1555 mechanism automatically splits long notes, and ties them across bar
1558 When a second alternative of a repeat starts with a tied note, you
1559 have to repeat the tie. This can be achieved with @code{\repeatTie},
1561 @lilypond[fragment,quote,ragged-right,relative=2]
1565 @cindex repeating ties
1566 @cindex volta brackets and ties
1570 Ties are sometimes used to write out arpeggios. In this case, two tied
1571 notes need not be consecutive. This can be achieved by setting the
1572 @code{tieWaitForNote} property to true. The same feature is also useful,
1573 for example, to tie a tremolo to a chord. For example,
1575 @lilypond[fragment,verbatim,relative=1,ragged-right]
1576 \set tieWaitForNote = ##t
1577 \grace { c16[~ e~ g]~ } <c, e g>2
1578 \repeat "tremolo" 8 { c32~ c'~ } <c c,>1
1585 @cindex @code{\tieUp}
1587 @cindex @code{\tieDown}
1589 @cindex @code{\tieNeutral}
1591 @cindex @code{\tieDotted}
1593 @cindex @code{\tieDashed}
1595 @cindex @code{\tieSolid}
1601 In this manual: @ref{Automatic note splitting}.
1603 Program reference: @internalsref{Tie}.
1606 @inputfileref{input/@/regression,tie-arpeggio.ly}
1607 @inputfileref{input/@/regression,tie-manual.ly}
1614 Switching staves when a tie is active will not produce a slanted tie.
1622 A slur indicates that notes are to be played bound or
1623 @emph{legato}. They are entered using parentheses
1625 @lilypond[quote,ragged-right,relative=2,fragment,verbatim]
1626 f( g a) a8 b( a4 g2 f4)
1630 The direction of a slur can be specified with
1631 @code{\slur@emph{DIR}}, where @code{@emph{DIR}} is
1632 either @code{Up}, @code{Down}, or @code{Neutral} (automatically
1635 However, there is a convenient shorthand for forcing slur
1636 directions. By adding @code{_} or @code{^} before the opening
1637 parentheses, the direction is also set. For example,
1639 @lilypond[relative=2,ragged-right,quote,verbatim,fragment]
1643 Only one slur can be printed at once. If you need to print a long
1644 slur over a few small slurs, please see @ref{Phrasing slurs}.
1649 Some composers write two slurs when they want legato chords. This can
1650 be achieved in LilyPond by setting @code{doubleSlurs},
1652 @lilypond[verbatim,ragged-right,relative,fragment,quote]
1653 \set doubleSlurs = ##t
1654 <c e>4 ( <d f> <c e> <d f> )
1660 @cindex @code{\slurUp}
1662 @cindex @code{\slurDown}
1664 @cindex @code{\slurNeutral}
1665 @code{\slurNeutral},
1666 @cindex @code{\slurDashed}
1668 @cindex @code{\slurDotted}
1670 @cindex @code{\slurSolid}
1675 Program reference: @seeinternals{Slur}.
1678 @node Phrasing slurs
1679 @subsection Phrasing slurs
1681 @cindex phrasing slurs
1682 @cindex phrasing marks
1684 A phrasing slur (or phrasing mark) connects notes and is used to
1685 indicate a musical sentence. It is written using @code{\(} and @code{\)}
1688 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
1689 \time 6/4 c'\( d( e) f( e) d\)
1692 Typographically, the phrasing slur behaves almost exactly like a
1693 normal slur. However, they are treated as different objects. A
1694 @code{\slurUp} will have no effect on a phrasing slur; instead, use
1695 @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1696 @code{\phrasingSlurNeutral}.
1698 You cannot have simultaneous phrasing slurs.
1703 @cindex @code{\phrasingSlurUp}
1704 @code{\phrasingSlurUp},
1705 @cindex @code{\phrasingSlurDown}
1706 @code{\phrasingSlurDown},
1707 @cindex @code{\phrasingSlurNeutral}
1708 @code{\phrasingSlurNeutral}.
1713 Program reference: @internalsref{PhrasingSlur}.
1716 @node Laissez vibrer ties
1717 @subsection Laissez vibrer ties
1718 @cindex Laissez vibrer
1719 @cindex Ties, laissez vibrer
1721 L.v. ties (laissez vibrer) indicate that notes must not be damped at the
1722 end. It is used in notation for piano, harp and other string and
1723 percussion instruments. They can be entered using @code{\laissezVibrer},
1725 @lilypond[fragment,ragged-right,verbatim,relative=1]
1726 <c f g>\laissezVibrer
1732 @internalsref{LaissezVibrerTie}
1733 @internalsref{LaissezVibrerTieColumn}
1736 @inputfileref{input/regression,laissez-vibrer-tie.ly}
1739 @node Automatic beams
1740 @subsection Automatic beams
1742 LilyPond inserts beams automatically
1744 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1745 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1748 When these automatic decisions are not good enough, beaming can be
1749 entered explicitly. It is also possible to define beaming patterns
1750 that differ from the defaults. See @ref{Setting automatic beam behavior}
1753 Individual notes may be marked with @code{\noBeam} to prevent them
1756 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1757 \time 2/4 c8 c\noBeam c c
1763 Program reference: @internalsref{Beam}.
1767 @subsection Manual beams
1769 @cindex beams, manual
1773 In some cases it may be necessary to override the automatic beaming
1774 algorithm. For example, the autobeamer will not put beams over rests
1775 or bar lines. Such beams are specified manually by marking the begin
1776 and end point with @code{[} and @code{]}
1778 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
1780 r4 r8[ g' a r8] r8 g[ | a] r8
1787 @cindex @code{stemLeftBeamCount}
1788 @cindex @code{stemRightBeamCount}
1790 Normally, beaming patterns within a beam are determined automatically.
1791 If necessary, the properties @code{stemLeftBeamCount} and
1792 @code{stemRightBeamCount} can be used to override the defaults. If
1793 either property is set, its value will be used only once, and then it
1796 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
1801 \set stemLeftBeamCount = #1
1806 The property @code{subdivideBeams} can be set in order to subdivide
1807 all 16th or shorter beams at beat positions, as defined by the
1808 @code{beatLength} property.
1810 @lilypond[fragment,quote,relative=2,verbatim]
1812 \set subdivideBeams = ##t
1814 \set Score.beatLength = #(ly:make-moment 1 8)
1817 @cindex @code{subdivideBeams}
1820 For more information about @code{make-moment}, see
1821 @ref{Time administration}.
1823 Line breaks are normally forbidden when beams cross bar lines. This
1824 behavior can be changed by setting @code{allowBeamBreak}.
1826 @cindex @code{allowBeamBreak}
1827 @cindex beams and line breaks
1828 @cindex beams, kneed
1830 @cindex auto-knee-gap
1835 Kneed beams are inserted automatically when a large gap is detected
1836 between the note heads. This behavior can be tuned through the object.
1838 Automatically kneed cross-staff beams cannot be used together with
1839 hidden staves. See @ref{Hiding staves}.
1841 Beams do not avoid collisions with symbols around the notes, such as
1842 texts and accidentals.
1846 @subsection Grace notes
1848 @cindex @code{\grace}
1851 @cindex appoggiatura
1852 @cindex acciaccatura
1854 Grace notes are ornaments that are written out. The most common ones
1855 are acciaccatura, which should be played as very short. It is denoted
1856 by a slurred small note with a slashed stem. The appoggiatura is a
1857 grace note that takes a fixed fraction of the main note, and is
1858 denoted as a slurred note in small print without a slash. They
1859 are entered with the commands @code{\acciaccatura} and
1860 @code{\appoggiatura}, as demonstrated in the following example
1862 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
1863 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
1864 \acciaccatura { g16[ f] } e4
1867 Both are special forms of the @code{\grace} command. By prefixing this
1868 keyword to a music expression, a new one is formed, which will be
1869 printed in a smaller font and takes up no logical time in a measure.
1871 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
1873 \grace { c16[ d16] } c2 c4
1877 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
1878 @code{\grace} command does not start a slur.
1880 Internally, timing for grace notes is done using a second, `grace'
1881 timing. Every point in time consists of two rational numbers: one
1882 denotes the logical time, one denotes the grace timing. The above
1883 example is shown here with timing tuples
1885 @lilypond[quote,ragged-right]
1888 c4 \grace c16 c4 \grace {
1891 \new Lyrics \lyricmode {
1892 \override LyricText #'font-family = #'typewriter
1896 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
1897 \markup { (\fraction 1 4 , 0 ) } 4
1899 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
1900 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
1902 \markup { ( \fraction 2 4 , 0 ) }
1907 The placement of grace notes is synchronized between different staves.
1908 In the following example, there are two sixteenth grace notes for
1909 every eighth grace note
1911 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
1912 << \new Staff { e4 \grace { c16[ d e f] } e4 }
1913 \new Staff { c4 \grace { g8[ b] } c4 } >>
1916 @cindex @code{\afterGrace}
1918 If you want to end a note with a grace, use the @code{\afterGrace}
1919 command. It takes two arguments: the main note, and the grace notes
1920 following the main note.
1922 @lilypond[ragged-right, verbatim,relative=2,fragment]
1923 c1 \afterGrace d1 { c16[ d] } c4
1926 This will put the grace notes after a ``space'' lasting 3/4 of the
1927 length of the main note. The fraction 3/4 can be changed by setting
1928 @code{afterGraceFraction}, ie.
1931 afterGraceFraction = #(cons 7 8)
1935 will put the grace note at 7/8 of the main note.
1937 The same effect can be achieved manually by doing
1939 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1942 { s2 \grace { c16[ d] } } >>
1948 By adjusting the duration of the skip note (here it is a half-note),
1949 the space between the main-note and the grace is adjusted.
1951 A @code{\grace} section will introduce special typesetting settings,
1952 for example, to produce smaller type, and set directions. Hence, when
1953 introducing layout tweaks, they should be inside the grace section,
1955 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1967 The overrides should also be reverted inside the grace section.
1969 The layout of grace sections can be changed throughout the music using
1970 the function @code{add-grace-property}. The following example
1971 undefines the Stem direction for this grace, so stems do not always
1976 #(add-grace-property 'Voice 'Stem 'direction '())
1982 Another option is to change the variables @code{startGraceMusic},
1983 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
1984 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
1985 @code{stopAppoggiaturaMusic}. More information is in the file
1986 @file{ly/@/grace@/-init@/.ly}.
1989 The slash through the stem in acciaccaturas can be obtained
1990 in other situations by @code{\override Stem #'stroke-style = #"grace"}.
1994 Program reference: @internalsref{GraceMusic}.
1999 A score that starts with a @code{\grace} section needs an explicit
2000 @code{\new Voice} declaration, otherwise the main note and the grace
2001 note end up on different staves.
2003 Grace note synchronization can also lead to surprises. Staff notation,
2004 such as key signatures, bar lines, etc., are also synchronized. Take
2005 care when you mix staves with grace notes and staves without, for example,
2007 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
2008 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2009 \new Staff { c4 \bar "|:" d4 } >>
2013 This can be remedied by inserting grace skips of the corresponding
2014 durations in the other staves. For the above example
2017 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
2020 Grace sections should only be used within sequential music
2021 expressions. Nesting or juxtaposing grace sections is not supported,
2022 and might produce crashes or other errors.
2026 @node Expressive marks
2027 @section Expressive marks
2029 Expressive marks help musicians to bring more to the music than simple
2034 * Fingering instructions::
2044 @subsection Articulations
2046 @cindex Articulations
2050 A variety of symbols can appear above and below notes to indicate
2051 different characteristics of the performance. They are added to a note
2052 by adding a dash and the character signifying the
2053 articulation. They are demonstrated here
2055 @lilypondfile[quote,ragged-right]{script-abbreviations.ly}
2057 The meanings of these shorthands can be changed. See
2058 @file{ly/@/script@/-init@/.ly} for examples.
2060 The script is automatically placed, but the direction can be forced as
2061 well. Like other pieces of LilyPond code, @code{_} will place them
2062 below the staff, and @code{^} will place them above.
2064 @lilypond[quote,ragged-right,fragment,verbatim]
2068 Other symbols can be added using the syntax
2069 @var{note}@code{\}@var{name}. Again, they
2070 can be forced up or down using @code{^} and @code{_},
2073 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
2074 c\fermata c^\fermata c_\fermata
2079 @cindex staccatissimo
2089 @cindex organ pedal marks
2098 @cindex prallmordent
2102 @cindex thumb marking
2107 Here is a chart showing all scripts available,
2109 @lilypondfile[ragged-right,quote]{script-chart.ly}
2114 The vertical ordering of scripts is controlled with the
2115 @code{script-priority} property. The lower this number, the closer it
2116 will be put to the note. In this example, the
2117 @internalsref{TextScript} (the sharp symbol) first has the lowest
2118 priority, so it is put lowest in the first example. In the second, the
2119 prall trill (the @internalsref{Script}) has the lowest, so it is on the
2120 inside. When two objects have the same priority, the order in which
2121 they are entered decides which one comes first.
2123 @lilypond[verbatim,relative=3,ragged-right,fragment,quote]
2124 \once \override TextScript #'script-priority = #-100
2125 a4^\prall^\markup { \sharp }
2127 \once \override Script #'script-priority = #-100
2128 a4^\prall^\markup { \sharp }
2134 Program reference: @internalsref{Script}.
2139 These signs appear in the printed output but have no effect on the
2140 MIDI rendering of the music.
2143 @node Fingering instructions
2144 @subsection Fingering instructions
2147 @cindex finger change
2149 Fingering instructions can be entered using
2151 @var{note}-@var{digit}
2153 For finger changes, use markup texts
2155 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
2157 c^\markup { \finger "2 - 3" }
2160 You can use the thumb-script to indicate that a note should be
2161 played with the thumb (e.g., in cello music)
2162 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2163 <a_\thumb a'-3>8 <b_\thumb b'-3>
2166 Fingerings for chords can also be added to individual notes
2167 of the chord by adding them after the pitches
2168 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2169 < c-1 e-2 g-3 b-5 >4
2175 You may exercise greater control over fingering chords by
2176 setting @code{fingeringOrientations}
2178 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
2179 \set fingeringOrientations = #'(left down)
2180 <c-1 es-2 g-4 bes-5 > 4
2181 \set fingeringOrientations = #'(up right down)
2182 <c-1 es-2 g-4 bes-5 > 4
2185 Using this feature, it is also possible to put fingering instructions
2186 very close to note heads in monophonic music,
2188 @lilypond[verbatim,ragged-right,quote,fragment]
2189 \set fingeringOrientations = #'(right)
2196 Program reference: @internalsref{Fingering}.
2198 Examples: @inputfileref{input/@/regression,finger@/-chords@/.ly}.
2202 @subsection Dynamics
2213 @cindex @code{\ffff}
2222 Absolute dynamic marks are specified using a command after a note
2223 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2224 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2225 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2226 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
2228 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2229 c\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2230 c2\fp c\sf c\sff c\sp c\spp c\sfz c\rfz
2237 A crescendo mark is started with @code{\<} and terminated with
2238 @code{\!} or an absolute dynamic. A decrescendo is started with
2239 @code{\>} and is also terminated with @code{\!} or an absolute
2240 dynamic. @code{\cr} and @code{\decr} may be used instead of
2241 @code{\<} and @code{\>}. Because these marks are bound to notes, you must
2242 use spacer notes if multiple marks are needed during one note
2244 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2246 << f1 { s4 s4\< s4\! \> s4\! } >>
2250 A hairpin starts at the left edge of the beginning note and ends on the
2251 right edge of the ending note.
2253 In some situations the @code{\espressivo} articulation mark may
2254 be suitable to indicate a crescendo and decrescendo on the one note,
2256 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2257 c2 b4 a g1\espressivo
2260 This may give rise to very short hairpins. Use @code{minimum-length}
2261 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2265 \override Staff.Hairpin #'minimum-length = #5
2272 You can also use a text saying @emph{cresc.} instead of hairpins
2274 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2285 You can also supply your own texts
2286 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2287 \set crescendoText = \markup { \italic "cresc. poco" }
2288 \set crescendoSpanner = #'dashed-line
2292 To create new dynamic marks or text that should be aligned
2293 with dynamics, see @ref{New dynamic marks}.
2298 Dynamics that occur at, begin on, or end on, the same note
2299 will be vertically aligned. If you want to ensure that dynamics
2300 are aligned when they do not occur on the same note, you can
2301 increase the @code{staff-padding} property.
2304 \override DynamicLineSpanner #'staff-padding = #4
2307 You may also use this property if the dynamics are colliding
2308 with other notation.
2310 Crescendi and decrescendi that end on the first note of a
2311 new line are not printed. To change this behavior, use
2314 \override Score.Hairpin #'after-line-breaking = ##t
2317 Text style dynamic changes (such as cresc. and dim.) are printed with a
2318 dashed line showing their extent. To surpress printing this line, use
2321 \override DynamicTextSpanner #'dash-period = #-1.0
2327 @cindex @code{\dynamicUp}
2329 @cindex @code{\dynamicDown}
2330 @code{\dynamicDown},
2331 @cindex @code{\dynamicNeutral}
2332 @code{\dynamicNeutral}.
2337 Program reference: @internalsref{DynamicText}, @internalsref{Hairpin}.
2338 Vertical positioning of these symbols is handled by
2339 @internalsref{DynamicLineSpanner}.
2343 @subsection Breath marks
2345 Breath marks are entered using @code{\breathe}
2347 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2354 The glyph of the breath mark can be tuned by overriding the
2355 @code{text} property of the @code{BreathingSign} layout object with
2356 any markup text. For example,
2357 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
2359 \override BreathingSign #'text
2360 = #(make-musicglyph-markup "scripts.rvarcomma")
2367 Program reference: @internalsref{BreathingSign}.
2369 Examples: @inputfileref{input/@/regression,breathing@/-sign@/.ly}.
2375 Short trills are printed like normal articulation; see @ref{Articulations}.
2377 Long running trills are made with @code{\startTrillSpan} and
2378 @code{\stopTrillSpan},
2380 @lilypond[verbatim,ragged-right,relative=2,quote,fragment]
2382 << { c1 \startTrillSpan }
2383 { s2. \grace { d16[\stopTrillSpan e] } } >>
2387 @cindex Pitched trills
2389 Trills that should be executed on an explicitly specified pitch can be
2390 typeset with the command @code{pitchedTrill},
2392 @lilypond[ragged-right,verbatim,fragment,relative=1]
2393 \pitchedTrill c4\startTrillSpan fis
2397 The first argument is the main note. The pitch of the second
2398 is printed as a stemless note head in parentheses.
2403 @code{\startTrillSpan},
2404 @cindex @code{\startTrillSpan}
2405 @code{\stopTrillSpan}.
2406 @cindex @code{\stopTrillSpan}
2411 Program reference: @internalsref{TrillSpanner}.
2415 @subsection Glissando
2418 @cindex @code{\glissando}
2420 A glissando is a smooth change in pitch. It is denoted by a line or a
2421 wavy line between two notes. It is requested by attaching
2422 @code{\glissando} to a note
2424 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2426 \override Glissando #'style = #'zigzag
2433 Program reference: @internalsref{Glissando}.
2435 Example files: @file{input/@/regression/@/glissando@/.ly}.
2440 Printing text over the line (such as @emph{gliss.}) is not supported.
2444 @subsection Arpeggio
2447 @cindex broken chord
2448 @cindex @code{\arpeggio}
2450 You can specify an arpeggio sign (also known as broken chord) on a
2451 chord by attaching an @code{\arpeggio} to a chord
2453 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2457 A square bracket on the left indicates that the player should not
2458 arpeggiate the chord
2460 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2465 The direction of the arpeggio is sometimes denoted by adding an
2466 arrowhead to the wiggly line
2468 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2480 When an arpeggio crosses staves, you may attach an arpeggio to the chords
2481 in both staves and set
2482 @internalsref{PianoStaff}.@code{connectArpeggios}
2484 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2486 \set PianoStaff.connectArpeggios = ##t
2487 \new Staff { <c' e g c>\arpeggio }
2488 \new Staff { \clef bass <c,, e g>\arpeggio }
2496 @cindex @code{\arpeggioUp}
2498 @cindex @code{\arpeggioDown}
2499 @code{\arpeggioDown},
2500 @cindex @code{\arpeggioNeutral}
2501 @code{\arpeggioNeutral},
2502 @cindex @code{\arpeggioBracket}
2503 @code{\arpeggioBracket}.
2508 Notation manual: @ref{Ties}, for writing out arpeggios.
2510 Program reference: @internalsref{Arpeggio}.
2515 It is not possible to mix connected arpeggios and unconnected
2516 arpeggios in one @internalsref{PianoStaff} at the same point in time.
2523 Polyphony in music refers to having more than one voice occurring in
2524 a piece of music. Polyphony in LilyPond refers to having more than
2525 one voice on the same staff.
2529 * Explicitly instantiating voices::
2530 * Collision Resolution::
2534 @node Basic polyphony
2535 @subsection Basic polyphony
2539 The easiest way to enter fragments with more than one voice on a staff
2540 is to enter each voice as a sequence (with @code{@{...@}}), and combine
2541 them simultaneously, separating the voices with @code{\\}
2545 @lilypond[quote,verbatim,fragment]
2546 \new Staff \relative c' {
2549 { g4 f e | d2 e2 } \\
2550 { r8 e4 d c8 ~ | c b16 a b8 g ~ g2 } \\
2556 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
2557 voices are sometimes called ``layers'' in other notation packages}
2559 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
2560 each of these contexts, vertical direction of slurs, stems, etc., is set
2563 These voices are all separate from the voice that contains the notes just
2564 outside the @code{<< \\ >>} construct. This should be noted when making
2565 changes at the voice level. This also means that slurs and ties cannot go
2566 into or out of a @code{<< \\ >>} construct. Conversely, parallel voices
2567 from separate @code{<< \\ >>} constructs on the same staff are the the
2568 same voice. Here is the same example, with different noteheads for each
2569 voice. Note that the change to the note-head style in the main voice does not affect
2570 the inside of the @code{<< \\ >>} constructs. Also, the change to the second
2571 voice in the first @code{<< \\ >>} construct is effective in the second
2572 @code{<< \\ >>}, and the voice is tied across the two constructs.
2574 @lilypond[quote,verbatim,fragment]
2575 \new Staff \relative c' {
2576 \override NoteHead #'style = #'cross
2580 { \override NoteHead #'style = #'triangle
2585 { c8 b16 a b8 g ~ g2 } \\
2586 { \override NoteHead #'style = #'slash s4 b4 c2 }
2591 Polyphony does not change the relationship of notes within a
2592 @code{\relative @{ @}} block. Each note is calculated relative
2593 to the note immediately preceding it.
2596 \relative @{ noteA << noteB \\ noteC >> noteD @}
2599 @code{noteC} is relative to @code{noteB}, not @code{noteA};
2600 @code{noteD} is relative to @code{noteC}, not @code{noteB} or
2603 @node Explicitly instantiating voices
2604 @subsection Explicitly instantiating voices
2606 @internalsref{Voice} contexts can also be instantiated manually
2607 inside a @code{<< >>} block to create polyphonic music, using
2608 @code{\voiceOne}, up to @code{\voiceFour} to assign stem directions
2609 and a horizontal shift for each part.
2613 << \upper \\ \lower >>
2621 \new Voice = "1" @{ \voiceOne \upper @}
2622 \new Voice = "2" @{ \voiceTwo \lower @}
2626 The @code{\voiceXXX} commands set the direction of stems, slurs, ties,
2627 articulations, text annotations, augmentation dots of dotted
2628 notes, and fingerings. @code{\voiceOne} and @code{\voiceThree} make
2629 these objects point upwards, while @code{\voiceTwo} and @code{\voiceFour}
2630 make them point downwards.
2631 The command @code{\oneVoice} will revert back to the normal setting.
2633 An expression that appears directly inside a @code{<< >>} belongs to
2634 the main voice. This is useful when extra voices appear while the main
2635 voice is playing. Here is a more correct rendition of the example from
2636 the previous section. The crossed noteheads demonstrate that the main
2637 melody is now in a single voice context.
2639 @lilypond[quote,ragged-right,verbatim]
2640 \new Staff \relative c' {
2641 \override NoteHead #'style = #'cross
2646 \new Voice="1" { \voiceTwo
2647 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
2650 \new Voice { \voiceThree
2659 The correct definition of the voices allows the melody to be slurred.
2660 @lilypond[quote,ragged-right,verbatim]
2661 \new Staff \relative c' {
2666 \context Voice="1" { \voiceTwo
2667 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
2670 \new Voice { \voiceThree
2679 Avoiding the @code{\\} separator also allows nesting polyphony
2680 constructs, which in some case might be a more natural way to typeset
2683 @lilypond[quote,ragged-right,verbatim]
2684 \new Staff \relative c' {
2689 \context Voice="1" { \voiceTwo
2692 {c8 b16 a b8 g ~ g2}
2693 \new Voice { \voiceThree
2706 @node Collision Resolution
2707 @subsection Collision Resolution
2709 Normally, note heads with a different number of dots are not merged, but
2710 when the object property @code{merge-differently-dotted} is set in
2711 the @internalsref{NoteCollision} object, they are merged
2712 @lilypond[quote,verbatim,fragment,ragged-right,relative=2]
2715 \override Staff.NoteCollision
2716 #'merge-differently-dotted = ##t
2718 } \\ { g8.[ f16] g8.[ f16] } >>
2721 Similarly, you can merge half note heads with eighth notes, by setting
2722 @code{merge-differently-headed}
2723 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2726 \override Staff.NoteCollision
2727 #'merge-differently-headed = ##t
2728 c8 c4. } \\ { c2 c2 } >>
2731 LilyPond also vertically shifts rests that are opposite of a stem,
2734 @lilypond[quote,ragged-right,fragment,verbatim]
2735 \new Voice << c''4 \\ r4 >>
2741 @cindex @code{\oneVoice}
2743 @cindex @code{\voiceOne}
2745 @cindex @code{\voiceTwo}
2747 @cindex @code{\voiceThree}
2749 @cindex @code{\voiceFour}
2752 @cindex @code{\shiftOn}
2754 @cindex @code{\shiftOnn}
2756 @cindex @code{\shiftOnnn}
2758 @cindex @code{\shiftOff}
2759 @code{\shiftOff}: these commands specify in what chords of the current
2760 voice should be shifted. The outer voices (normally: voice one and
2761 two) have @code{\shiftOff}, while the inner voices (three and four)
2762 have @code{\shiftOn}. @code{\shiftOnn} and @code{\shiftOnnn} define
2763 further shift levels.
2765 When LilyPond cannot cope, the @code{force-hshift}
2766 property of the @internalsref{NoteColumn} object and pitched rests can
2767 be used to override typesetting decisions.
2769 @lilypond[quote,verbatim,ragged-right]
2776 \once \override NoteColumn #'force-hshift = #1.7
2784 Program reference: the objects responsible for resolving collisions are
2785 @internalsref{NoteCollision} and @internalsref{RestCollision}.
2788 @inputfileref{input/@/regression,collision@/-dots@/.ly},
2789 @inputfileref{input/@/regression,collision@/-head-chords@/.ly},
2790 @inputfileref{input/@/regression,collision@/-heads@/.ly},
2791 @inputfileref{input/@/regression,collision@/-mesh@/.ly}, and
2792 @inputfileref{input/@/regression,collisions@/.ly}.
2797 When using @code{merge-differently-headed} with an upstem eighth or a
2798 shorter note, and a downstem half note, the eighth note gets the wrong
2801 There is no support for clusters where the same note occurs with
2802 different accidentals in the same chord. In this case, it is
2803 recommended to use enharmonic transcription, or to use special cluster
2804 notation (see @ref{Clusters}).
2811 Repetition is a central concept in music, and multiple notations exist
2817 * Repeats and MIDI::
2818 * Manual repeat commands::
2820 * Tremolo subdivisions::
2826 @subsection Repeat types
2829 @cindex @code{\repeat}
2831 The following types of repetition are supported
2835 Repeated music is fully written (played) out. This is useful when
2836 entering repetitious music. This is the only kind of repeat that
2837 is included in MIDI output.
2840 Repeats are not written out, but alternative endings (volte) are
2841 printed, left to right with brackets. This is the standard notation
2842 for repeats with alternatives. These are not played in MIDI output by default.
2846 Alternative endings are written stacked. This has limited use but may be
2847 used to typeset two lines of lyrics in songs with repeats, see
2848 @inputfileref{input,star-spangled-banner@/.ly}.
2852 Make tremolo beams. These are not played in MIDI output by default.
2855 Make beat or measure repeats. These look like percent signs. These
2856 are not played in MIDI output by default. Percent repeats must be
2857 declared within a Voice context.
2863 @subsection Repeat syntax
2865 LilyPond has one syntactic construct for specifying different types of
2866 repeats. The syntax is
2869 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2872 If you have alternative endings, you may add
2873 @cindex @code{\alternative}
2884 where each @var{alternative} is a music expression. If you do not
2885 give enough alternatives for all of the repeats, the first alternative
2886 is assumed to be played more than once.
2888 Standard repeats are used like this
2889 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2891 \repeat volta 2 { c4 d e f }
2892 \repeat volta 2 { f e d c }
2895 With alternative endings
2896 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2898 \repeat volta 2 {c4 d e f}
2899 \alternative { {d2 d} {f f,} }
2902 In this example, the first ending is not a complete bar (it
2903 only had 3 beats). The beginning of the second ending
2904 contains the 4th beat from the first ending. This ``extra''
2905 beat in the second ending is due to the first time ending,
2906 and has nothing to do with the @code{\partial} at the
2907 beginning of the example.
2909 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2912 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2913 \alternative { { g4 g g } { a | a a a a | b2. } }
2917 It is possible to shorten volta brackets
2918 by setting @code{voltaSpannerDuration}. In the next example, the
2919 bracket only lasts one measure, which is a duration of 3/4.
2921 @lilypond[verbatim,ragged-right,quote]
2925 \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
2926 \repeat "volta" 5 { d d d }
2927 \alternative { { e e e f f f }
2937 Brackets for the repeat are normally only printed over the topmost
2938 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2939 property; see @inputfileref{input/@/regression,volta@/-multi@/-staff@/.ly}.
2944 @cindex repeat, ambiguous
2946 A nested repeat like
2955 is ambiguous, since it is is not clear to which @code{\repeat} the
2956 @code{\alternative} belongs. This ambiguity is resolved by always
2957 having the @code{\alternative} belong to the inner @code{\repeat}.
2958 For clarity, it is advisable to use braces in such situations.
2960 Timing information is not remembered at the start of an alternative,
2961 so after a repeat timing information must be reset by hand, for
2962 example by setting @code{Score.measurePosition} or entering
2963 @code{\partial}. Similarly, slurs or ties are also not repeated.
2966 @node Repeats and MIDI
2967 @subsection Repeats and MIDI
2969 @cindex expanding repeats
2970 @cindex @code{\unfoldRepeats}
2972 With a little bit of tweaking, all types of repeats can be present
2973 in the MIDI output. This is achieved by applying the
2974 @code{\unfoldRepeats} music function. This functions changes all
2975 repeats to unfold repeats.
2977 @lilypond[quote,verbatim,fragment,line-width=8.0\cm]
2979 \repeat tremolo 8 {c'32 e' }
2980 \repeat percent 2 { c''8 d'' }
2981 \repeat volta 2 {c'4 d' e' f'}
2990 When creating a score file using @code{\unfoldRepeats} for midi, then
2991 it is necessary to make two @code{\score} blocks. One for MIDI (with
2992 unfolded repeats) and one for notation (with volta, tremolo, and
2993 percent repeats). For example,
3001 \unfoldRepeats @var{..music..}
3007 @node Manual repeat commands
3008 @subsection Manual repeat commands
3010 @cindex @code{repeatCommands}
3012 The property @code{repeatCommands} can be used to control the layout of
3013 repeats. Its value is a Scheme list of repeat commands.
3016 @item @code{start-repeat}
3017 Print a @code{|:} bar line.
3019 @item @code{end-repeat}
3020 Print a @code{:|} bar line.
3022 @item @code{(volta @var{text})}
3023 Print a volta bracket saying @var{text}: The text can be specified as
3024 a text string or as a markup text, see @ref{Text markup}. Do not
3025 forget to change the font, as the default number font does not contain
3026 alphabetic characters;
3028 @item @code{(volta #f)}
3029 Stop a running volta bracket.
3032 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
3034 \set Score.repeatCommands = #'((volta "93") end-repeat)
3036 \set Score.repeatCommands = #'((volta #f))
3043 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
3044 @internalsref{VoltaRepeatedMusic},
3045 @internalsref{UnfoldedRepeatedMusic}, and
3046 @internalsref{FoldedRepeatedMusic}.
3049 @node Tremolo repeats
3050 @subsection Tremolo repeats
3052 @cindex tremolo beams
3054 To place tremolo marks between notes, use @code{\repeat} with tremolo
3056 @lilypond[quote,verbatim,ragged-right]
3057 \new Voice \relative c' {
3058 \repeat "tremolo" 8 { c16 d16 }
3059 \repeat "tremolo" 4 { c16 d16 }
3060 \repeat "tremolo" 2 { c16 d16 }
3064 Tremolo marks can also be put on a single note. In this case, the
3065 note should not be surrounded by braces.
3066 @lilypond[quote,verbatim,ragged-right]
3067 \repeat "tremolo" 4 c'16
3070 Similar output is obtained using the tremolo subdivision, described in
3071 @ref{Tremolo subdivisions}.
3076 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
3078 Program reference: @internalsref{Beam}, @internalsref{StemTremolo}.
3080 Example files: @inputfileref{input/@/regression,chord@/-tremolo@/.ly},
3081 @inputfileref{input/@/regression,stem@/-tremolo@/.ly}.
3084 @node Tremolo subdivisions
3085 @subsection Tremolo subdivisions
3087 @cindex tremolo marks
3088 @cindex @code{tremoloFlags}
3090 Tremolo marks can be printed on a single note by adding
3091 `@code{:}[@var{number}]' after the note. The number indicates the
3092 duration of the subdivision, and it must be at least 8. A
3093 @var{length} value of 8 gives one line across the note stem. If the
3094 length is omitted, the last value (stored in @code{tremoloFlags}) is
3097 @lilypond[quote,ragged-right,verbatim,fragment]
3098 c'2:8 c':32 | c': c': |
3104 Tremolos entered in this way do not carry over into the MIDI output.
3109 In this manual: @ref{Tremolo repeats}.
3111 Elsewhere: @internalsref{StemTremolo}.
3114 @node Measure repeats
3115 @subsection Measure repeats
3117 @cindex percent repeats
3118 @cindex measure repeats
3120 In the @code{percent} style, a note pattern can be repeated. It is
3121 printed once, and then the pattern is replaced with a special sign.
3122 Patterns of one and two measures are replaced by percent-like signs,
3123 patterns that divide the measure length are replaced by slashes.
3124 Percent repeats must be declared within a @code{Voice} context.
3126 @lilypond[quote,verbatim,ragged-right]
3127 \new Voice \relative c' {
3128 \repeat "percent" 4 { c4 }
3129 \repeat "percent" 2 { c2 es2 f4 fis4 g4 c4 }
3133 Measure repeats of more than 2 measures get a counter, if you switch
3134 on the @code{countPercentRepeats} property,
3136 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
3138 \set countPercentRepeats = ##t
3139 \repeat "percent" 4 { c1 }
3145 Isolated percents can also be printed. This is done by putting a multi
3146 measure rest with a different print function,
3148 @lilypond[fragment,verbatim]
3149 \override MultiMeasureRest #'stencil
3150 = #ly:multi-measure-rest::percent
3159 Program reference: @internalsref{RepeatSlash},
3160 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
3161 @internalsref{DoublePercentRepeatCounter},
3162 @internalsref{PercentRepeatCounter},
3163 @internalsref{PercentRepeatedMusic}, and