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 Notation manual
11 This chapter describes all the different types of notation supported
12 by LilyPond. It is intended as a reference for users that are already
13 somewhat familiar with LilyPond.
17 * Easier music entry::
27 * Other instrument specific notation::
31 * Formatting cue notes::
33 * Contemporary notation::
37 @c FIXME: Note entry vs Music entry at top level menu is confusing.
43 This section is about basic notation elements notes, rests and
44 related constructs, such as stems, tuplets and ties.
49 * Chromatic alterations::
67 A note is printed by specifying its pitch and then its duration,
69 @lilypond[quote,verbatim]
70 { cis'4 d'8 e'16 c'16 }
78 @cindex Note specification
80 @cindex entering notes
82 The most common syntax for pitch entry is used for standard notes and
83 @code{\chords} modes. In these modes, pitches may be designated by
84 names. The notes are specified by the letters @code{a} through
85 @code{g}. The octave is formed with notes ranging from @code{c}
86 to @code{b}. The pitch @code{c} is an octave below middle C and the
87 letters span the octave above that C
89 @lilypond[fragment,verbatim,noindent]
91 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
94 @cindex note names, Dutch
96 A sharp is formed by adding @code{-is} to the end of a pitch name and
97 a flat is formed by adding @code{-es}. Double sharps and double flats
98 are obtained by adding @code{-isis} or @code{-eses}. These
99 names are the Dutch note names. In Dutch, @code{aes} is contracted to
100 @code{as}, but both forms are accepted. Similarly, both
101 @code{es} and @code{ees} are accepted
103 @lilypond[fragment,quote,verbatim,relative=2]
111 There are predefined sets of note names for various other languages.
112 To use them, include the language specific init file. For
113 example: @code{\include "english.ly"}. The available language files
114 and the note names they define are
119 Note Names sharp flat
120 nederlands.ly c d e f g a bes b -is -es
121 english.ly c d e f g a bf b -s/-sharp -f/-flat
123 deutsch.ly c d e f g a b h -is -es
124 norsk.ly c d e f g a b h -iss/-is -ess/-es
125 svenska.ly c d e f g a b h -iss -ess
126 italiano.ly do re mi fa sol la sib si -d -b
127 catalan.ly do re mi fa sol la sib si -d/-s -b
128 espanol.ly do re mi fa sol la sib si -s -b
137 The optional octave specification takes the form of a series of
138 single quote (`@code{'}') characters or a series of comma
139 (`@code{,}') characters. Each @code{'} raises the pitch by one
140 octave; each @code{,} lowers the pitch by an octave
142 @lilypond[quote,fragment,verbatim]
143 c' c'' es' g' as' gisis' ais'
146 @c FIXME: we need this info (hide/unhide) somewhere in the manual, but this ain't the place. -gp
148 Notes can be hidden and unhidden with the following commands
150 cindex @code{\hideNotes}
152 @cindex @code{\unHideNotes}
158 Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
162 @node Chromatic alterations
163 @subsection Chromatic alterations
165 Normally accidentals are printed automatically, but you may also
166 print them manually. A reminder accidental
167 @cindex reminder accidental
169 can be forced by adding an exclamation mark @code{!}
170 after the pitch. A cautionary accidental
171 @cindex cautionary accidental
172 @cindex parenthesized accidental
173 (i.e. an accidental within parentheses) can be obtained by adding the
174 question mark `@code{?}' after the pitch.
176 @lilypond[quote,fragment,verbatim]
177 cis' cis' cis'! cis'?
183 The automatic production of accidentals can be tuned in many
184 ways. For more information, refer to @ref{Accidentals}.
189 @subsection Micro tones
191 Half-flats and half-sharps are formed by adding @code{-eh} and
192 @code{-ih}; the following is a series of Cs with increasing pitches
194 @cindex quarter tones
195 @cindex semi-flats, semi-sharps
197 @lilypond[verbatim,quote,relative=2,fragment]
198 { ceseh ceh cih cisih }
201 Micro tones are also exported to the MIDI file
206 There are no generally accepted standards for denoting three quarter
207 flats, so LilyPond's symbol does not conform to any standard.
212 A chord is formed by a enclosing a set of pitches in @code{<} and
213 @code{>}. A chord may be followed by a duration, and a set of
214 articulations, just like simple notes
216 @lilypond[verbatim,fragment,quote,relative=1]
228 Rests are entered like notes, with the note name @code{r}
230 @lilypond[fragment,quote,raggedright,verbatim]
234 Whole bar rests, centered in middle of the bar,
235 must be done with multi-measure rests. They are discussed in
236 @ref{Multi measure rests}.
239 A rest's vertical position may be explicitly specified by entering a
240 note with the @code{\rest} keyword appended. This makes manual
241 formatting in polyphonic music easier. Automatic rest collision
242 formatting will leave these rests alone
244 @lilypond[fragment,quote,raggedright,verbatim]
250 Program reference: @internalsref{RestEvent}, and @internalsref{Rest}.
257 @cindex Invisible rest
262 An invisible rest (also called a `skip') can be entered like a note
263 with note name `@code{s}' or with @code{\skip @var{duration}}
265 @lilypond[fragment,quote,raggedright,verbatim,relative=2]
266 a4 a4 s4 a4 \skip 1 a4
269 The @code{s} syntax is only available in note mode and chord mode. In
270 other situations, for example, when entering lyrics, you should use
271 the @code{\skip} command
273 @lilypond[quote,raggedright,verbatim]
276 \new Lyrics \lyrics { \skip 2 bla1 }
280 The skip command is merely an empty musical placeholder. It does not
281 produce any output, not even transparent output.
283 The @code{s} skip command does create @internalsref{Staff} and
284 @internalsref{Voice} when necessary, similar to note and rest
285 commands. For example, the following results in an empty staff.
287 @lilypond[quote,raggedright,verbatim]
291 The fragment @code{@{ \skip 4 @} } would produce an empty page.
295 Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
300 @subsection Durations
304 @cindex @code{\longa}
305 @cindex @code{\breve}
306 @cindex @code{\maxima}
309 In Note, Chord, and Lyrics mode, durations are designated by numbers
310 and dots: durations are entered as their reciprocal values. For example,
311 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
312 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
313 longer than a whole you must use variables
317 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
319 r1 r2 r4 r8 r16 r32 r64 r64
322 @lilypond[quote,noindent]
325 a\breve*1/2 \autoBeamOff
326 a1 a2 a4 a8 a16 a32 a64 a64
329 r\longa*1/4 r\breve *1/2
330 r1 r2 r4 r8 r16 r32 r64 r64
336 \remove "Clef_engraver"
337 \override StaffSymbol #'transparent = ##t
338 \override TimeSignature #'transparent = ##t
339 \override BarLine #'transparent = ##t
340 \consists "Pitch_squash_engraver"
346 If the duration is omitted then it is set to the previously entered
347 duration. The default for the first note is a quarter note.
349 @lilypond[quote,raggedright,verbatim,fragment]
357 @node Augmentation dots
358 @subsection Augmentation dots
361 To obtain dotted note lenghts, simply add a dot (`@code{.}') to
362 the number. Double-dotted notes are produced in a similar way.
364 @lilypond[quote,fragment,verbatim]
365 a'4 b' c''4. b'8 a'4. b'4.. c''8.
370 Dots are normally moved up to avoid staff lines, except in polyphonic
371 situations. The following commands may be used to force a particular
374 @cindex @code{\dotsUp}
376 @cindex @code{\dotsDown}
378 @cindex @code{\dotsBoth}
383 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
385 @node Scaling durations
386 @subsection Scaling durations
388 You can alter the length of duration by a fraction @var{N/M}
389 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
390 will not affect the appearance of the notes or rests produced.
392 In the following example, the first three notes take up exactly two
393 beats, but no triplet bracket is printed.
394 @lilypond[quote,fragment,relative=2,verbatim]
396 a4*2/3 gis4*2/3 a4*2/3
404 This manual: @ref{Tuplets}
407 @c TODO: I'm not certain that Stems belong here in the manual. -gp
411 Whenever a note is found, a @internalsref{Stem} object is created
412 automatically. For whole notes and rests, they are also created but
417 @cindex @code{\stemUp}
419 @cindex @code{\stemDown}
421 @cindex @code{\stemBoth}
432 A tie connects two adjacent note heads of the same pitch. The tie in
433 effect extends the length of a note. Ties should not be confused with
434 slurs, which indicate articulation, or phrasing slurs, which indicate
435 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
437 @lilypond[quote,fragment,verbatim]
438 e' ~ e' <c' e' g'> ~ <c' e' g'>
441 When a tie is applied to a chord, all note heads whose pitches match
442 are connected. When no note heads match, no ties will be created.
444 A tie is just a way of extending a note duration, similar to the
445 augmentation dot. The following example shows two ways of notating
446 exactly the same concept
448 @lilypond[quote,fragment,raggedright]
449 \time 3/4 c'2. c'2 ~ c'4
453 Ties are used either when the note crosses a bar line, or when dots
454 cannot be used to denote the rhythm. When using ties, larger note
455 values should be aligned to subdivisions of the measure, eg.
459 r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
463 If you need to tie a lot of notes over bars, it may be easier to use
464 automatic note splitting (see @ref{Automatic note splitting}). This
465 mechanism automatically splits long notes, and ties them across bar
471 @cindex @code{\tieUp}
473 @cindex @code{\tieDown}
475 @cindex @code{\tieBoth}
477 @cindex @code{\tieDotted}
479 @cindex @code{\tieSolid}
484 In this manual: @ref{Automatic note splitting}.
486 Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
491 Switching staves when a tie is active will not produce a slanted tie.
493 Formatting of ties is a difficult subject. The results are often not
501 @cindex @code{\times}
503 Tuplets are made out of a music expression by multiplying all durations
506 @cindex @code{\times}
508 \times @var{fraction} @var{musicexpr}
512 The duration of @var{musicexpr} will be multiplied by the fraction.
513 The fraction's denominator will be printed over the notes, optionally
514 with a bracket. The most common tuplet is the triplet in which 3
515 notes have the length of 2, so the notes are 2/3 of their written
518 @lilypond[quote,fragment,verbatim]
519 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
522 The property @code{tupletSpannerDuration} specifies how long each
523 bracket should last. With this, you can make lots of tuplets while
524 typing @code{\times} only once, thus saving lots of typing. In the next
525 example, there are two triplets shown, while @code{\times} was only
528 @lilypond[quote,fragment,relative=1,raggedright,verbatim]
529 \set tupletSpannerDuration = #(ly:make-moment 1 4)
530 \times 2/3 { c'8 c c c c c }
533 The format of the number is determined by the property
534 @code{tupletNumberFormatFunction}. The default prints only the
535 denominator, but if it is set to the Scheme function
536 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
540 @cindex @code{tupletNumberFormatFunction}
541 @cindex tuplet formatting
546 @cindex @code{\tupletUp}
548 @cindex @code{\tupletDown}
550 @cindex @code{\tupletBoth}
555 User manual: @ref{Changing context properties on the fly} for the
559 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
561 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
565 Nested tuplets are not formatted automatically. In this case, outer
566 tuplet brackets should be moved manually, which is demonstrated in
567 @inputfileref{input/regression,tuplet-nest.ly}.
571 @node Easier music entry
572 @section Easier music entry
575 This section deals with tricks and features of the input language that
576 were added solely to help entering music and finding and correcting
577 mistakes. There are also external tools that make debugging easier.
578 See @ref{Point and click} for more information.
580 It is also possible to enter and edit music using other programs, such as
581 GUI interfaces or MIDI sequencers. Refer to the LilyPond
582 website for more information.
589 * Skipping corrected music::
590 * Automatic note splitting::
596 @node Relative octaves
597 @subsection Relative octaves
599 @cindex relative octave specification
601 Octaves are specified by adding @code{'} and @code{,} to pitch names.
602 When you copy existing music, it is easy to accidentally put a pitch
603 in the wrong octave and hard to find such an error. The relative
604 octave mode prevents these errors by making the mistakes much
605 larger: a single error puts the rest of the piece off by one octave
607 @cindex @code{\relative}
609 \relative @var{startpitch} @var{musicexpr}
613 \relative @var{musicexpr}
616 The octave of notes that appear in @var{musicexpr} are calculated as
617 follows: if no octave changing marks are used, the basic interval
618 between this and the last note is always taken to be a fourth or
619 less. This distance is determined without regarding alterations; a
620 @code{fisis} following a @code{ceses} will be put above the
621 @code{ceses}. In other words, a doubly-augmented fourth is considered
622 a smaller interval than a diminshed fifth, even though the fourth is
623 seven semitones while the fifth is only six semitones.
625 The octave changing marks @code{'} and @code{,} can be added to raise
626 or lower the pitch by an extra octave. Upon entering relative mode,
627 an absolute starting pitch can be specified that will act as the
628 predecessor of the first note of @var{musicexpr}. If no starting pitch
629 is specified, then middle C is used as a start.
631 Here is the relative mode shown in action
632 @lilypond[quote,fragment,raggedright,verbatim]
638 Octave changing marks are used for intervals greater than a fourth
639 @lilypond[quote,fragment,verbatim]
645 If the preceding item is a chord, the first note of the chord is used
646 to determine the first note of the next chord
648 @lilypond[quote,fragment,verbatim]
656 The pitch after the @code{\relative} contains a note name.
659 @c Perfect place for a "refwarning"! -gp
662 The relative conversion will not affect @code{\transpose},
663 @code{\chords} or @code{\relative} sections in its argument. To use
664 relative within transposed music, an additional @code{\relative} must
665 be placed inside @code{\transpose}.
668 @subsection Octave check
671 Octave checks make octave errors easier to correct: a note may be
672 followed by @code{=}@var{quotes} which indicates what its absolute
673 octave should be. In the following example,
675 \relative c'' @{ c='' b=' d,='' @}
679 @c take care with @code, adds confusing quotes.
680 the @code{d} will generate a warning, because a @code{d''} is expected
681 (because @code{b'} to @code{d''} is only a third), but a @code{d}' is
682 found. In the output, the octave is corrected to be a @code{d''} and
683 the next note is calculated relative to @code{d''} instead of @code{d'}.
687 There is also a syntax that is separate from the notes. The syntax
694 @c FIXME: what is the second sentence trying to say? \octave check -gp
696 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
697 quotes) in \relative mode. If not, a warning is printed, and the
698 octave is corrected, for example, the first check is passed
699 successfully. The second check fails with an error message. The
700 octave is adjusted so the following notes are in the correct octave
711 The octave of a note following an octave check is determined with
712 respect to the note preceding it. In the next fragment, the last note
713 is a @code{a'}, above middle C. That means that the @code{\octave}
714 check passes successfully, so the check could be deleted without changing
715 the output of the piece.
717 @lilypond[quote,verbatim,fragment]
726 @subsection Bar check
730 @cindex @code{barCheckSynchronize}
733 Bar checks help detect errors in the durations. A bar check is
734 entered using the bar symbol, `@code{|}'. Whenever it is encountered
735 during interpretation, it should fall on a measure boundary. If it
736 does not, a warning is printed. In the next example, the second bar
737 check will signal an error
739 \time 3/4 c2 e4 | g2 |
742 Bar checks can also be used in lyrics, for example
747 Twin -- kle | Twin -- kle
752 @cindex @code{skipTypesetting}
754 Failed bar checks are caused by entering incorrect
755 durations. Incorrect durations often completely garble up the score,
756 especially if the score is polyphonic, so a good place to start correcting
757 input is by scanning for failed bar checks and incorrect durations. To
758 speed up this process, the @code{skipTypesetting} feature may be
759 used. It is described in the next section.
762 @cindex @code{pipeSymbol}
764 It is also possible to redefine the meaning of @code{|}. This is done
765 by assigning a music expression to @code{pipeSymbol},
767 @lilypond[quote,fragment,raggedright,verbatim]
768 pipeSymbol = \bar "||"
770 { c'2 c'2 | c'2 c'2 | }
774 @node Skipping corrected music
775 @subsection Skipping corrected music
777 The property @code{Score.skipTypesetting} can be used to switch on and
778 off typesetting completely during the interpretation phase. When
779 typesetting is switched off, the music is processed much more
780 quickly. This can be used to skip over the parts of a score that
781 have already been checked for errors
783 @lilypond[quote,fragment,raggedright,verbatim]
786 \set Score.skipTypesetting = ##t
788 \set Score.skipTypesetting = ##f
792 In polyphonic music, @code{Score.skipTypesetting} will affect all
793 voices and staves, saving even more time.
795 @node Automatic note splitting
796 @subsection Automatic note splitting
798 Long notes can be converted automatically to tied notes. This is done
799 by replacing the @internalsref{Note_heads_engraver} by the
800 @internalsref{Completion_heads_engraver}.
801 In the following examples, notes crossing the bar line are split and tied.
804 @lilypond[quote,fragment,verbatim,relative=1,raggedright]
806 \remove "Note_heads_engraver"
807 \consists "Completion_heads_engraver"
809 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
813 This engraver splits all running notes at the bar line, and inserts
814 ties. One of its uses is to debug complex scores: if the measures are
815 not entirely filled, then the ties exactly show how much each measure
820 Not all durations (especially those containing tuplets) can be
821 represented exactly with normal notes and dots, but the engraver will
826 Examples: @inputfileref{input/regression,completion-heads.ly}.
830 Program reference: @internalsref{Completion_heads_engraver}.
834 @section Staff notation
836 This section describes music notation that occurs on staff level,
837 such as key signatures, clefs and time signatures.
839 @cindex Staff notation
850 * Time administration::
851 * Controlling formatting of prefatory matter::
855 @subsection Staff symbol
857 @cindex adjusting staff symbol
859 Notes, dynamic signs, etc. are grouped
860 with a set of horizontal lines, into a staff (plural `staves'). In our
861 system, these lines are drawn using a separate layout object called
865 @cindex staff lines, setting number of
866 @cindex staff lines, setting thickness of
867 @cindex thickness of staff lines, setting
868 @cindex number of staff lines, setting
872 Program reference: @internalsref{StaffSymbol}.
874 Examples: @inputfileref{input/test,staff-lines.ly},
875 @inputfileref{input/test,staff-size.ly}.
879 If a staff is ended halfway a piece, the staff symbol may not end
880 exactly on the bar line.
884 @subsection Key signature
885 @cindex Key signature
889 The key signature indicates the scale in which a piece is played. It
890 is denoted by a set of alterations (flats or sharps) at the start of
894 Setting or changing the key signature is done with the @code{\key}
897 @code{\key} @var{pitch} @var{type}
900 @cindex @code{\minor}
901 @cindex @code{\major}
902 @cindex @code{\minor}
903 @cindex @code{\ionian}
904 @cindex @code{\locrian}
905 @cindex @code{\aeolian}
906 @cindex @code{\mixolydian}
907 @cindex @code{\lydian}
908 @cindex @code{\phrygian}
909 @cindex @code{\dorian}
911 Here, @var{type} should be @code{\major} or @code{\minor} to get
912 @var{pitch}-major or @var{pitch}-minor, respectively.
913 The standard mode names @code{\ionian},
914 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
915 @code{\phrygian}, and @code{\dorian} are also defined.
917 This command sets the context property
918 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
919 can be specified by setting this property directly.
921 Accidentals and key signatures often confuse new users, because
922 unaltered notes get natural signs depending on the key signature. For
923 more information, see @ref{More about pitches}.
925 @c FIXME FIXME: check CVS logs to see what was supposed to happen to this
926 @c part; CVS merge conflict occurred.
929 @c The ordering of a key cancellation is wrong when it is combined with
930 @c repeat bar lines. The cancellation is also printed after a line break.
934 Program reference: @internalsref{KeyChangeEvent},
935 @internalsref{KeyCancellation} and @internalsref{KeySignature}.
937 @cindex @code{keySignature}
944 The clef indicates which lines of the staff correspond to which
948 The clef can be set with the @code{\clef} command
949 @lilypond[quote,fragment,verbatim]
950 { c''2 \clef alto g'2 }
953 Supported clef-names include
954 @c Moved standard clefs to the top /MB
958 @item treble, violin, G, G2
971 G clef on 1st line, so-called French violin clef
976 @cindex mezzosoprano clef
979 @cindex baritone clef
982 @cindex varbaritone clef
993 By adding @code{_8} or @code{^8} to the clef name, the clef is
994 transposed one octave down or up, respectively, and @code{_15} and
995 @code{^15} transposes by two octaves. The argument @var{clefname}
996 must be enclosed in quotes when it contains underscores or digits. For
1000 @cindex choral tenor clef
1001 @lilypond[quote,verbatim,fragment,relative=1]
1005 This command is equivalent to setting @code{clefGlyph},
1006 @code{clefPosition} (which controls the Y position of the clef),
1007 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
1008 when any of these properties are changed. The following example shows
1009 possibilities when setting properties manually.
1013 \set Staff.clefGlyph = #"clefs-F"
1014 \set Staff.clefPosition = #2
1016 \set Staff.clefGlyph = #"clefs-G"
1018 \set Staff.clefGlyph = #"clefs-C"
1020 \set Staff.clefOctavation = #7
1022 \set Staff.clefOctavation = #0
1023 \set Staff.clefPosition = #0
1033 Program reference: @internalsref{Clef}.
1037 @node Ottava brackets
1038 @subsection Ottava brackets
1040 `Ottava' brackets introduce an extra transposition of an octave for
1041 the staff. They are created by invoking the function
1042 @code{set-octavation}
1048 @lilypond[quote,verbatim,fragment]
1058 The @code{set-octavation} function also takes -1 (for 8va bassa) and 2
1059 (for 15ma) as arguments. Internally the function sets the properties
1060 @code{ottavation} (e.g. to @code{"8va"}) and
1061 @code{centralCPosition}. For overriding the text of the bracket, set
1062 @code{ottavation} after invoking @code{set-octavation}, i.e.,
1067 \set Staff.ottavation = #"8"
1074 Program reference: @internalsref{OttavaBracket}.
1076 Examples: @inputfileref{input/regression,ottava.ly},
1077 @inputfileref{input/regression,ottava-broken.ly}.
1081 @code{set-octavation} will get confused when clef changes happen
1082 during an octavation bracket.
1087 @node Time signature
1088 @subsection Time signature
1089 @cindex Time signature
1091 @cindex @code{\time}
1093 Time signature indicates the metrum of a piece: a regular pattern of
1094 strong and weak beats. It is denoted by a fraction at the start of the
1098 The time signature is set or changed by the @code{\time}
1100 @lilypond[quote,fragment,verbatim]
1101 \time 2/4 c'2 \time 3/4 c'2.
1104 The symbol that is printed can be customized with the @code{style}
1105 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1108 @lilypond[fragment,verbatim]
1111 \override TimeSignature #'style = #'()
1118 There are many more options for its layout. See @ref{Ancient time
1119 signatures} for more examples.
1122 This command sets the property @code{timeSignatureFraction},
1123 @code{beatLength} and @code{measureLength} in the @code{Timing}
1124 context, which is normally aliased to @internalsref{Score}. The
1125 property @code{measureLength} determines where bar lines should be
1126 inserted, and how automatic beams should be generated. Changing the
1127 value of @code{timeSignatureFraction} also causes the symbol to be
1130 More options are available through the Scheme function
1131 @code{set-time-signature}. In combination with the
1132 @internalsref{Measure_grouping_engraver}, it will create
1133 @internalsref{MeasureGrouping} signs. Such signs ease reading
1134 rhythmically complex modern music. In the following example, the 9/8
1135 measure is subdivided in 2, 2, 2 and 3. This is passed to
1136 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1138 @lilypond[quote,raggedright,verbatim]
1141 #(set-time-signature 9 8 '(2 2 2 3))
1142 g8[ g] d[ d] g[ g] a8[( bes g]) |
1143 #(set-time-signature 5 8 '(3 2))
1149 \consists "Measure_grouping_engraver"
1157 Program reference: @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1162 Automatic beaming does not use the measure grouping specified with
1163 @code{set-time-signature}.
1165 @node Partial measures
1166 @subsection Partial measures
1169 @cindex partial measure
1170 @cindex measure, partial
1171 @cindex shorten measures
1172 @cindex @code{\partial}
1174 Partial measures, for example in upsteps, are entered using the
1175 @code{\partial} command
1176 @lilypond[quote,fragment,verbatim,relative=2]
1177 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1180 The syntax for this command is
1182 \partial @var{duration}
1184 This is internally translated into
1186 \set Timing.measurePosition = -@var{length of duration}
1189 The property @code{measurePosition} contains a rational number
1190 indicating how much of the measure has passed at this point.
1194 This command does not take into account grace notes at the start of
1195 the music. When a piece starts with graces notes in the pickup, then
1196 the @code{\partial} should follow the grace notes
1198 @lilypond[verbatim,relative,fragment]
1208 @node Unmetered music
1209 @subsection Unmetered music
1213 Bar lines and bar numbers are calculated automatically. For unmetered
1214 music (e.g. cadenzas), this is not desirable. By setting
1215 @code{Score.timing} to false, this automatic timing can be switched
1216 off. Empty bar lines,
1223 indicate where line breaks can occur.
1227 @cindex @code{\cadenzaOn}
1229 @cindex @code{\cadenzaOff}
1236 @subsection Bar lines
1240 @cindex measure lines
1244 Bar lines delimit measures, but are also used to indicate repeats.
1245 Normally, they are inserted automatically. Line breaks may only
1246 happen on bar lines.
1248 Special types of bar lines can be forced with the @code{\bar} command
1250 @lilypond[quote,relative=2,fragment,verbatim]
1254 The following bar types are available
1255 @lilypondfile[]{bar-lines.ly}
1257 For allowing line breaks, there is a special command,
1261 This will insert an invisible bar line, and allow line breaks at this
1264 In scores with many staves, a @code{\bar} command in one staff is
1265 automatically applied to all staves. The resulting bar lines are
1266 connected between different staves of a @internalsref{StaffGroup}
1268 @lilypond[quote,fragment,verbatim]
1270 \context StaffGroup <<
1276 \new Staff { \clef bass c4 g e g }
1278 \new Staff { \clef bass c2 c2 }
1283 The command @code{\bar }@var{bartype} is a short cut for doing
1284 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1285 is set to a string, a bar line of that type is created.
1287 A bar line is created whenever the @code{whichBar} property is set.
1288 At the start of a measure it is set to the contents of
1289 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1290 to override default measure bars.
1292 @cindex @code{whichBar}
1293 @cindex @code{repeatCommands}
1294 @cindex @code{defaultBarType}
1296 You are encouraged to use @code{\repeat} for repetitions. See
1303 In this manual: @ref{Repeats}, @ref{System start delimiters}
1306 Program reference: @internalsref{BarLine} (created at
1307 @internalsref{Staff} level), @internalsref{SpanBar} (across staves).
1309 @cindex bar lines at start of system
1310 @cindex start of system
1314 Examples: @inputfileref{input/test,bar-lines.ly},
1317 @node Time administration
1318 @subsection Time administration
1320 Time is administered by the @internalsref{Time_signature_engraver},
1321 which usually lives in the @internalsref{Score} context.
1322 The bookkeeping deals with the following variables
1325 @item currentBarNumber
1328 the length of the measures in the current time signature. For a 4/4
1329 time this is 1, and for 6/8 it is 3/4.
1330 @item measurePosition
1331 the point within the measure where we currently are. This quantity
1332 is reset to 0 whenever it exceeds @code{measureLength}. When that happens,
1333 @code{currentBarNumber} is incremented.
1335 if set to true, the above variables are updated for every time
1336 step. When set to false, the engraver stays in the current measure
1340 Timing can be changed by setting any of these variables explicitly.
1341 In the next example, the 4/4 time signature is printed, but
1342 @code{measureLength} is set to 5/4. After a while, the measure is
1343 shortened by 1/8, by setting @code{measurePosition} to -3/8 at 2/4 in
1344 the measure, so the next bar line will fall at 2/4 + 3/8.
1348 \set Score.measureLength = #(ly:make-moment 5 4)
1352 \set Score.measurePosition = #(ly:make-moment -3 8)
1359 @node Controlling formatting of prefatory matter
1360 @subsection Controlling formatting of prefatory matter
1366 \override Staff.Clef #'break-visibility = #end-of-line-visible
1367 \override Staff.KeySignature #'break-visibility = #end-of-line-visible
1368 \set Staff.explicitClefVisibility = #end-of-line-visible
1369 \set Staff.explicitKeySignatureVisibility = #end-of-line-visible
1371 % We want the time sig to take space, otherwise there is not
1372 % enough white at the start of the line.
1375 \override Staff.TimeSignature #'transparent = ##t
1376 \set Score.defaultBarType = #"empty"
1397 The easiest way to enter fragments with more than one voice on a staff
1398 is to split chords using the separator @code{\\}. You can use it for
1399 small, short-lived voices or for single chords
1403 @lilypond[quote,verbatim,fragment]
1404 \context Staff \relative c'' {
1405 c4 << { f d e } \\ { b c2 } >>
1406 c4 << g' \\ b, \\ f' \\ d >>
1410 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1411 voices are sometimes called "layers" in other notation packages}
1413 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1414 each of these contexts, vertical direction of slurs, stems, etc. is set
1417 @cindex @code{\voiceOne}
1418 @cindex @code{\voiceFour}
1420 This can also be done by instantiating @internalsref{Voice} contexts
1421 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1422 a stem directions and horizontal shift for each part
1425 @lilypond[quote,raggedright,verbatim]
1428 \new Voice { \voiceOne cis2 b }
1429 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1430 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1434 The command @code{\oneVoice} will revert back to the normal setting.
1435 @cindex @code{\oneVoice}
1438 Normally, note heads with a different number of dots are not merged, but
1439 when the object property @code{merge-differently-dotted} is set in
1440 the @internalsref{NoteCollision} object, they are merged
1441 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
1444 \override Staff.NoteCollision
1445 #'merge-differently-dotted = ##t
1447 } \\ { g8.[ f16] g8.[ f16] } >>
1450 Similarly, you can merge half note heads with eighth notes, by setting
1451 @code{merge-differently-headed}
1452 @lilypond[quote,fragment,relative=2,verbatim]
1455 \override Staff.NoteCollision
1456 #'merge-differently-headed = ##t
1457 c8 c4. } \\ { c2 c2 } >>
1460 LilyPond also vertically shifts rests that are opposite of a stem,
1463 @lilypond[quote,raggedright,fragment,verbatim]
1464 \context Voice << c''4 \\ r4 >>
1472 @cindex @code{\oneVoice}
1474 @cindex @code{\voiceOne}
1476 @cindex @code{\voiceTwo}
1478 @cindex @code{\voiceThree}
1480 @cindex @code{\voiceFour}
1485 @cindex @code{\shiftOn}
1487 @cindex @code{\shiftOnn}
1489 @cindex @code{\shiftOnnn}
1491 @cindex @code{\shiftOff}
1492 @code{\shiftOff}: these commands specify in what chords of the current
1493 voice should be shifted. The outer voices (normally: voice one and
1494 two) have @code{\shiftOff}, while the inner voices (three and four)
1495 have @code{\shiftOn}. @code{\shiftOnn} and @code{\shiftOnnn} define
1496 further shift levels.
1499 When LilyPond cannot cope, the @code{force-hshift}
1500 property of the @internalsref{NoteColumn} object and pitched rests can
1501 be used to override typesetting decisions.
1503 @lilypond[verbatim,raggedright]
1510 \once \override NoteColumn #'force-hshift = #1.7
1519 Program reference: the objects responsible for resolving collisions are
1520 @internalsref{NoteCollision} and @internalsref{RestCollision}.
1523 @inputfileref{input/regression,collision-dots.ly},
1524 @inputfileref{input/regression,collision-head-chords.ly},
1525 @inputfileref{input/regression,collision-heads.ly},
1526 @inputfileref{input/regression,collision-mesh.ly}, and
1527 @inputfileref{input/regression,collisions.ly}.
1533 When using @code{merge-differently-headed} with an upstem eighth or a
1534 shorter note, and a downstem half note, the eighth note gets the wrong
1537 There is no support for clusters where the same note occurs with
1538 different accidentals in the same chord. In this case, it is
1539 recommended to use enharmonic transcription, or to use special cluster
1540 notation (see @ref{Clusters}).
1545 Beams are used to group short notes into chunks that are aligned with
1546 the metrum. They are inserted automatically
1548 @lilypond[quote,fragment,verbatim,relative=2]
1549 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1552 When these automatic decisions are not good enough, beaming can be
1553 entered explicitly. It is also possible to define beaming patterns
1554 that differ from the defaults.
1556 Individual notes may be marked with @code{\noBeam}, to prevent them
1559 @lilypond[quote,fragment,verbatim,relative=2]
1560 \time 2/4 c8 c\noBeam c c
1566 Program reference: @internalsref{Beam}.
1569 @cindex Automatic beams
1572 * Setting automatic beam behavior::
1577 @subsection Manual beams
1578 @cindex beams, manual
1582 In some cases it may be necessary to override the automatic beaming
1583 algorithm. For example, the autobeamer will not put beams over rests
1584 or bar lines. Such beams are specified manually by marking the begin
1585 and end point with @code{[} and @code{]}
1587 @lilypond[quote,fragment,relative=1,verbatim]
1589 r4 r8[ g' a r8] r8 g[ | a] r8
1593 @cindex @code{stemLeftBeamCount}
1595 Normally, beaming patterns within a beam are determined automatically.
1596 If necessary, the properties @code{stemLeftBeamCount} and
1597 @code{stemRightBeamCount} can be used to override the defaults. If
1598 either property is set, its value will be used only once, and then it
1601 @lilypond[quote,fragment,relative=1,verbatim]
1604 f8[ r16 \set stemLeftBeamCount = #1 f g a]
1607 @cindex @code{stemRightBeamCount}
1610 The property @code{subdivideBeams} can be set in order to subdivide
1611 all 16th or shorter beams at beat positions, as defined by the
1612 @code{beatLength} property.
1615 @lilypond[fragment,quote,relative=2,verbatim,noindent]
1617 \set subdivideBeams = ##t
1619 \set Score.beatLength = #(ly:make-moment 1 8)
1622 @cindex @code{subdivideBeams}
1624 Normally, line breaks are forbidden when beams cross bar lines. This
1625 behavior can be changed by setting @code{allowBeamBreak}.
1627 @cindex @code{allowBeamBreak}
1628 @cindex beams and line breaks
1630 @cindex beams, kneed
1632 @cindex auto-knee-gap
1637 User manual: @ref{Changing context properties on the fly} for the
1643 @cindex Frenched staves
1644 Kneed beams are inserted automatically, when a large gap is detected
1645 between the note heads. This behavior can be tuned through the object
1648 Automatically kneed cross-staff beams cannot be used together with
1649 hidden staves. See @ref{Hiding staves}.
1651 Beams do not avoid collisions with symbols around the notes, such as
1652 texts and accidentals.
1657 @node Setting automatic beam behavior
1658 @subsection Setting automatic beam behavior
1660 @cindex @code{autoBeamSettings}
1661 @cindex @code{(end * * * *)}
1662 @cindex @code{(begin * * * *)}
1663 @cindex automatic beams, tuning
1664 @cindex tuning automatic beaming
1666 @c [TODO: use \applycontext]
1668 In normal time signatures, automatic beams can start on any note but can
1669 only end in a few positions within the measure: beams can end on a beat,
1670 or at durations specified by the properties in
1671 @code{autoBeamSettings}. The defaults for @code{autoBeamSettings}
1672 are defined in @file{scm/auto-beam.scm}.
1674 The value of @code{autoBeamSettings} is changed with two functions,
1676 #(override-auto-beam-setting
1677 '(@var{be} @var{p} @var{q} @var{n} @var{m}) @var{a} @var{b}
1679 #(revert-auto-beam-setting '(@var{be} @var{p} @var{q} @var{n} @var{m}))
1681 Here, @var{be} is the symbol @code{begin} or @code{end}, and
1682 @var{context} is an optional context (default: @code{'Voice}). It
1683 determines whether the rule applies to begin or end-points. The
1684 quantity @var{p}/@var{q} refers to the length of the beamed notes (and
1685 `@code{* *}' designates notes of any length), @var{n}/@var{M} refers
1686 to a time signature (wildcards `@code{* *}' may be entered to
1687 designate all time signatures), @var{a}/@var{b} is a duration. By
1688 default, this command changes settings for the current voice. It is
1689 also possible to adjust settings at higher contexts, by adding a
1690 @var{context} argument.
1692 For example, if automatic beams should end on every quarter note, use
1695 #(override-auto-beam-setting '(end * * * *) 1 4 'Staff)
1697 Since the duration of a quarter note is 1/4 of a whole note, it is
1698 entered as @code{(ly:make-moment 1 4)}.
1700 The same syntax can be used to specify beam starting points. In this
1701 example, automatic beams can only end on a dotted quarter note
1703 #(override-auto-beam-setting '(end * * * *) 3 8)
1705 In 4/4 time signature, this means that automatic beams could end only on
1706 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1707 3/8, has passed within the measure).
1709 Rules can also be restricted to specific time signatures. A rule that
1710 should only be applied in @var{N}/@var{M} time signature is formed by
1711 replacing the second asterisks by @var{N} and @var{M}. For example, a
1712 rule for 6/8 time exclusively looks like
1714 #(override-auto-beam-setting '(begin * * 6 8) @dots{})
1717 If a rule should be to applied only to certain types of beams, use the
1718 first pair of asterisks. Beams are classified according to the
1719 shortest note they contain. For a beam ending rule that only applies
1720 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1723 @cindex automatic beam generation
1725 @cindex @code{autoBeaming}
1728 If beams are used to indicate melismata in songs, then automatic
1729 beaming should be switched off. This is done by setting
1730 @code{autoBeaming} to @code{#f}.
1734 @cindex @code{\autoBeamOff}
1735 @code{\autoBeamOff},
1736 @cindex @code{\autoBeamOn}
1742 If a score ends while an automatic beam has not been ended and is
1743 still accepting notes, this last beam will not be typeset at all. The
1744 same holds polyphonic voices, entered with @code{<< @dots{} \\ @dots{}
1745 >>}. If a polyphonic voice ends while an automatic beam is still
1746 accepting notes, it is not typeset.
1748 The rules for ending a beam depend on the shortest note in a beam.
1749 So, while it is possible to have different ending rules for eight
1750 beams and sixteenth beams, a beam that contains both eight and
1751 sixteenth notes will use the rules for the sixteenth beam.
1753 In the example below, the autobeamer makes eighth beams and sixteenth
1754 end at three eighths. The third beam can only be corrected by
1755 specifying manual beaming.
1757 @lilypond[quote,raggedright,fragment,relative=1]
1758 #(override-auto-beam-setting '(end * * * *) 3 8)
1759 % rather show case where it goes wrong
1760 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1761 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1763 It is not possible to specify beaming parameters that act differently in
1764 different parts of a measure. This means that it is not possible to use
1765 automatic beaming in irregular meters such as @code{5/8}.
1767 @node Beam formatting
1768 @subsection Beam formatting
1771 When a beam falls in the middle of the staff, the beams point normally
1772 down. However, this behaviour can be altered with the
1773 @code{neutral-direction} property.
1779 \override Beam #'neutral-direction = #-1
1781 \override Beam #'neutral-direction = #1
1787 @section Accidentals
1790 This section describes how to change the way that accidentals are
1791 inserted automatically before the running notes.
1793 Common rules for typesetting accidentals have been canned in a
1794 function. This function is called as follows
1796 @cindex @code{set-accidental-style}
1798 #(set-accidental-style 'modern 'Voice)
1801 The function takes two arguments: a symbol that denotes the style (in
1802 the example, @code{modern}), and another symbol that denotes the
1803 context name (in this example, @code{Voice}). If no context name is
1804 supplied, @code{Staff} is the default.
1806 The following styles are supported
1809 This is the default typesetting behavior. It should correspond
1810 to 18th century common practice: Accidentals are
1811 remembered to the end of the measure in which they occur and
1812 only on their own octave.
1816 The normal behavior is to remember the accidentals on
1817 Staff-level. This variable, however, typesets accidentals
1818 individually for each voice. Apart from that, the rule is similar to
1822 accidentals from one voice do not get canceled in other
1823 voices, which is often unwanted result
1825 @lilypond[quote,raggedright,relative=1,fragment,verbatim]
1827 #(set-accidental-style 'voice)
1834 The @code{voice} option should be used if the voices
1835 are to be read solely by individual musicians. If the staff is to be
1836 used by one musician (e.g. a conductor) then
1837 @code{modern} or @code{modern-cautionary}
1838 should be used instead.
1841 @cindex @code{modern} style accidentals
1842 This rule corresponds to the common practice in the 20th
1844 This rule prints the same accidentals as @code{default}, but temporary
1845 accidentals also are canceled in other octaves. Furthermore,
1846 in the same octave, they also get canceled in the following
1849 @lilypond[quote,raggedright,fragment,verbatim]
1850 #(set-accidental-style 'modern)
1851 cis' c'' cis'2 | c'' c'
1854 @item @code{modern-cautionary}
1855 @cindex @code{modern-cautionary}
1856 This rule is similar to @code{modern}, but the
1857 ``extra'' accidentals (the ones not typeset by
1858 @code{default}) are typeset as cautionary accidentals.
1859 They are printed in reduced size or with parentheses
1860 @lilypond[quote,raggedright,fragment,verbatim]
1861 #(set-accidental-style 'modern-cautionary)
1862 cis' c'' cis'2 | c'' c'
1865 @cindex @code{modern-voice}
1867 This rule is used for multivoice accidentals to be read both by musicians
1868 playing one voice and musicians playing all voices. Accidentals are
1869 typeset for each voice, but they @emph{are} canceled across voices in
1870 the same @internalsref{Staff}.
1872 @cindex @code{modern-voice-cautionary}
1873 @item modern-voice-cautionary
1874 This rule is the same as @code{modern-voice}, but with the extra
1875 accidentals (the ones not typeset by @code{voice}) typeset
1876 as cautionaries. Even though all accidentals typeset by
1877 @code{default} @emph{are} typeset by this variable then
1878 some of them are typeset as cautionaries.
1881 @cindex @code{piano} accidentals
1882 This rule reflects 20th century practice for piano notation. Very similar to
1883 @code{modern} but accidentals also get canceled
1884 across the staves in the same @internalsref{GrandStaff} or
1885 @internalsref{PianoStaff}.
1887 @item piano-cautionary
1888 @cindex @code{#(set-accidental-style 'piano-cautionary)}
1889 As @code{#(set-accidental-style 'piano)} but with the extra accidentals
1890 typeset as cautionaries.
1893 @cindex @code{no-reset} accidental style
1895 This is the same as @code{default} but with accidentals lasting
1896 ``forever'' and not only until the next measure
1897 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1898 #(set-accidental-style 'no-reset)
1903 This is sort of the opposite of @code{no-reset}: Accidentals
1904 are not remembered at all---and hence all accidentals are
1905 typeset relative to the key signature, regardless of what was
1908 @lilypond[quote,raggedright,fragment,verbatim,relative=1]
1909 #(set-accidental-style 'forget)
1910 \key d\major c4 c cis cis d d dis dis
1917 Program reference: @internalsref{Accidental_engraver},
1918 @internalsref{Accidental}, and @internalsref{AccidentalPlacement}.
1923 Simultaneous notes are considered to be entered in sequential
1924 mode. This means that in a chord the accidentals are typeset as if the
1925 notes in the chord happened once at a time - in the order in which
1926 they appear in the input file.
1928 This is a problem when accidentals in a chord depend on each other,
1929 which does not happen for the default accidental style. The problem
1930 can be solved by manually inserting @code{!} and @code{?} for the
1934 @node Expressive marks
1935 @section Expressive marks
1938 @c todo: should change ordering
1939 @c where to put text spanners, metronome marks,
1948 * Analysis brackets::
1951 * Fingering instructions::
1962 A slur indicates that notes are to be played bound or @emph{legato}.
1964 They are entered using parentheses
1965 @lilypond[quote,relative=2,fragment,verbatim]
1966 f( g a) a8 b( a4 g2 f4)
1970 The direction of a slur can be set with the
1974 \override Slur #'direction = #UP
1975 \slurUp % shortcut for the previous line
1979 However, there is a convenient shorthand for forcing slur
1980 directions. By adding @code{_} or @code{^} before the opening
1981 parentheses, the direction is also set. For example,
1983 @lilypond[relative=2,verbatim,fragment]
1987 Some composers write two slurs when they want legato chords. This can
1988 be achieved in LilyPond, by setting @code{doubleSlurs},
1990 @lilypond[verbatim,raggedright]
1992 \set doubleSlurs = ##t
1993 <c e>4 ( <d f> <c e> <d f> )
2001 @cindex @code{\slurUp}
2003 @cindex @code{\slurDown}
2005 @cindex @code{\slurBoth}
2007 @cindex @code{\slurDotted}
2009 @cindex @code{\slurSolid}
2014 Program reference: @seeinternals{Slur}, and @internalsref{SlurEvent}.
2017 @node Phrasing slurs
2018 @subsection Phrasing slurs
2020 @cindex phrasing slurs
2021 @cindex phrasing marks
2023 A phrasing slur (or phrasing mark) connects chords and is used to
2024 indicate a musical sentence. It is started using @code{\(} and @code{\)}
2027 @lilypond[quote,fragment,verbatim,relative=1]
2028 \time 6/4 c'\( d( e) f( e) d\)
2031 Typographically, the phrasing slur behaves almost exactly like a
2032 normal slur. However, they are treated as different objects. A
2033 @code{\slurUp} will have no effect on a phrasing slur; instead, use
2034 @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
2035 @code{\phrasingSlurBoth}.
2037 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
2038 will only affect normal slurs and not phrasing slurs.
2042 @cindex @code{\phrasingSlurUp}
2043 @code{\phrasingSlurUp},
2044 @cindex @code{\phrasingSlurDown}
2045 @code{\phrasingSlurDown},
2046 @cindex @code{\phrasingSlurBoth}
2047 @code{\phrasingSlurBoth}.
2051 Program reference: see also @internalsref{PhrasingSlur}, and
2052 @internalsref{PhrasingSlurEvent}.
2056 Putting phrasing slurs over rests leads to spurious warnings.
2059 @subsection Breath marks
2061 Breath marks are entered using @code{\breathe}
2064 @lilypond[quote,fragment,relative=1,verbatim]
2068 The glyph of the breath mark can be tuned by overriding the
2069 @code{text} property of the @code{BreathingSign} layout object with
2070 any markup text. For example,
2071 @lilypond[quote,fragment,verbatim,relative=1]
2073 \override BreathingSign #'text
2074 = #(make-musicglyph-markup "scripts-rvarcomma")
2081 Program reference: @internalsref{BreathingSign},
2082 @internalsref{BreathingSignEvent}.
2084 Examples: @inputfileref{input/regression,breathing-sign.ly}.
2087 @node Metronome marks
2088 @subsection Metronome marks
2091 @cindex beats per minute
2092 @cindex metronome marking
2094 Metronome settings can be entered as follows
2096 i \tempo @var{duration} = @var{per-minute}
2099 In the MIDI output, they are interpreted as a tempo change, and in the
2100 paper output, a metronome marking is printed
2101 @cindex @code{\tempo}
2102 @lilypond[quote,fragment,verbatim]
2108 Program reference: @internalsref{MetronomeChangeEvent}.
2113 @subsection Text spanners
2114 @cindex Text spanners
2116 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
2117 are written as texts, and extended over many measures with dotted
2118 lines. Such texts are created using text spanners: attach
2119 @code{\startTextSpan} and @code{\stopTextSpan} to the start and ending
2120 note of the spanner.
2122 The string to be printed, as well as the style, is set through object
2125 @lilypond[quote,fragment,relative=1,verbatim]
2128 \override TextSpanner #'direction = #-1
2129 \override TextSpanner #'edge-text = #'("rall " . "")
2130 c2\startTextSpan b c\stopTextSpan a
2137 Internals @internalsref{TextSpanEvent},
2138 @internalsref{TextSpanner}.
2140 Examples: @inputfileref{input/regression,text-spanner.ly}.
2143 @node Analysis brackets
2144 @subsection Analysis brackets
2146 @cindex phrasing brackets
2147 @cindex musicological analysis
2148 @cindex note grouping bracket
2150 Brackets are used in musical analysis to indicate structure in musical
2151 pieces. LilyPond supports a simple form of nested horizontal brackets.
2152 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2153 @internalsref{Staff} context. A bracket is started with
2154 @code{\startGroup} and closed with @code{\stopGroup}
2156 @lilypond[quote,raggedright,verbatim]
2159 c4\startGroup\startGroup
2162 c4\stopGroup\stopGroup
2166 \Staff \consists "Horizontal_bracket_engraver"
2172 Program reference: @internalsref{HorizontalBracket},
2173 @internalsref{NoteGroupingEvent}.
2175 Examples: @inputfileref{input/regression,note-group-bracket.ly}.
2179 @subsection Articulations
2180 @cindex Articulations
2182 @cindex articulations
2186 A variety of symbols can appear above and below notes to indicate
2187 different characteristics of the performance. They are added to a note
2188 by adding a dash and the character signifying the
2189 articulation. They are demonstrated here
2191 @lilypondfile[quote,raggedright]{script-abbreviations.ly}
2193 The meanings of these shorthands can be changed. See
2194 @file{ly/script-init.ly} for examples.
2197 The script is automatically placed, but the direction can be forced as
2198 well. @code{_} will put them down, and @code{^} will put them up,
2201 @lilypond[quote,fragment,verbatim]
2205 Other symbols can be added using the syntax
2206 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2207 can be forced up or down using @code{^} and @code{_},
2210 @lilypond[quote,verbatim,fragment,relative=2]
2211 c\fermata c^\fermata c_\fermata
2218 @cindex staccatissimo
2227 @cindex organ pedal marks
2236 @cindex prallmordent
2240 @cindex thumb marking
2245 Here is a chart showing all scripts available,
2247 @lilypondfile[quote]{script-chart.ly}
2250 The vertical ordering of scripts is controlled with the
2251 @code{script-priority} property. The lower this number, the closer it
2252 will be put to the note. In this example, the
2253 @internalsref{TextScript} (the sharp symbol) first has the lowest
2254 priority, so it is put lowest in the first example. In the second, the
2255 prall trill (the @internalsref{Script}) has the lowest, so it on the
2256 inside. When two objects have the same priority, the order in which
2257 they are entered decides which one comes first.
2260 @lilypond[verbatim,raggedright]
2262 \once \override TextScript #'script-priority = #-100
2263 a4^\prall^\markup { \sharp }
2265 \once \override Script #'script-priority = #-100
2266 a4^\prall^\markup { \sharp }
2275 Program reference: @internalsref{ScriptEvent}, and @internalsref{Script}.
2279 These signs appear in the printed output but have no effect on the
2280 MIDI rendering of the music.
2284 @node Running trills
2285 @subsection Running trills
2287 Long running trills are made with @code{\startTrillSpan} and
2288 @code{\stopTrillSpan},
2291 @lilypond[verbatim,raggedright]
2292 \relative \new Voice {
2293 << { c1 \startTrillSpan }
2294 { s2. \grace { d16[\stopTrillSpan e] } } >>
2300 @code{\startTrillSpan},
2301 @cindex @code{\startTrillSpan}
2302 @code{\stopTrillSpan}.
2303 @cindex @code{\stopTrillSpan}
2307 Program reference: @internalsref{TrillSpanner},
2308 @internalsref{TrillSpanEvent}.
2310 @node Fingering instructions
2311 @subsection Fingering instructions
2315 Fingering instructions can be entered using
2317 @var{note}-@var{digit}
2319 For finger changes, use markup texts
2321 @lilypond[quote,verbatim,raggedright,fragment]
2322 c'4-1 c'4-2 c'4-3 c'4-4
2323 c'^\markup { \finger "2-3" }
2326 @cindex finger change
2331 You can use the thumb-script to indicate that a note should be
2332 played with the thumb (e.g. in cello music)
2334 @lilypond[quote,verbatim,raggedright,fragment]
2335 <a'_\thumb a''-3>8 <b'_\thumb b''-3>
2338 Fingerings for chords can also be added to individual notes
2339 of the chord by adding them after the pitches
2340 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
2341 < c-1 e-2 g-3 b-5 >4
2345 In this case, setting @code{fingeringOrientations} will put fingerings next
2348 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2349 \set fingeringOrientations = #'(left down)
2350 <c-1 es-2 g-4 bes-5 > 4
2351 \set fingeringOrientations = #'(up right down)
2352 <c-1 es-2 g-4 bes-5 > 4
2355 Using this feature, it is also possible to put fingering instructions
2356 very close to note heads in monophonic music,
2358 @lilypond[verbatim,raggedright]
2360 \set fingeringOrientations = #'(right)
2368 Program reference: @internalsref{FingerEvent}, and @internalsref{Fingering}.
2370 Examples: @inputfileref{input/regression,finger-chords.ly}.
2373 @subsection Text scripts
2374 @cindex Text scripts
2376 @cindex text items, non-empty
2377 @cindex non-empty texts
2379 It is possible to place arbitrary strings of text or markup text (see
2380 @ref{Text markup}) above or below notes by using a string
2381 @code{c^"text"}. By default, these indications do not influence the
2382 note spacing, but by using the command @code{\fatText}, the widths
2383 will be taken into account
2385 @lilypond[quote,fragment,raggedright,verbatim]
2387 c4^"longtext" \fatText c4_"longlongtext" c4
2391 More complex formatting may also be added to a note by using the
2393 @lilypond[fragment,raggedright,verbatim]
2395 c'4^\markup { bla \bold bla }
2399 The @code{\markup} is described in more detail in
2405 @cindex @code{\fatText}
2407 @cindex @code{\emptyText}
2412 In this manual: @ref{Text markup}.
2414 Program reference: @internalsref{TextScriptEvent}, @internalsref{TextScript}.
2420 @subsection Grace notes
2423 @c should have blurb about accaciatura / appogiatura
2425 @cindex @code{\grace}
2429 Grace notes are ornaments that are written out. The most common ones
2430 are acciaccatura, which should be played as very short. It is denoted
2431 by a slurred small note with a slashed stem. The appoggiatura is a
2432 grace note that takes a fixed fraction of the main note, is and
2433 denoted as a slurred note in small print without a slash.
2434 They are entered with the commands @code{\acciaccatura} and
2435 @code{\appoggiatura}, as demonstrated in the following example
2438 @cindex appoggiatura
2439 @cindex acciaccatura
2441 @lilypond[quote,relative=2,verbatim,fragment]
2442 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2443 \acciaccatura { g16[ f] } e4
2446 Both are special forms of the @code{\grace} command. By prefixing this
2447 keyword to a music expression, a new one is formed, which will be
2448 printed in a smaller font and takes up no logical time in a measure.
2450 @lilypond[quote,relative=2,verbatim,fragment]
2452 \grace { c16[ d16] } c2 c4
2456 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2457 @code{\grace} command does not start a slur.
2459 Internally, timing for grace notes is done using a second, `grace'
2460 time. Every point in time consists of two rational numbers: one
2461 denotes the logical time, one denotes the grace timing. The above
2462 example is shown here with timing tuples
2464 @lilypond[quote,raggedright]
2467 c4 \grace c16 c4 \grace {
2470 \new Lyrics \lyrics {
2471 \override LyricText #'font-family = #'typewriter
2475 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2476 \markup { (\fraction 1 4 , 0 ) } 4
2478 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2479 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2481 \markup { ( \fraction 2 4 , 0 ) }
2487 The placement of grace notes is synchronized between different staves.
2488 In the following example, there are two sixteenth graces notes for
2489 every eighth grace note
2491 @lilypond[quote,relative=2,verbatim,fragment]
2492 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2493 \new Staff { c4 \grace { g8[ b] } c4 } >>
2498 If you want to end a note with a grace, the standard trick is to put
2499 the grace notes after a ``space note''
2501 @lilypond[quote,fragment,verbatim,relative=2]
2504 { s2 \grace { c16[ d] } } >>
2510 By adjusting the duration of the skip note (here it is a half-note),
2511 the space between the main-note and the grace is adjusted.
2514 A @code{\grace} section will introduce special typesetting settings,
2515 for example, to produce smaller type, and set directions. Hence, when
2516 introducing layout tweaks, they should be inside the grace section,
2518 @lilypond[quote,fragment,verbatim,relative=2]
2521 \override Stem #'direction = #-1
2523 \revert Stem #'direction
2530 The overrides should also be reverted inside the grace section.
2532 The layout of grace sections can be changed throughout the music using
2533 the function @code{add-grace-property}. The following example
2534 undefines the Stem direction for this grace, so stems do not always
2539 #(add-grace-property 'Voice 'Stem 'direction '())
2545 Another option is to change the variables @code{startGraceMusic},
2546 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2547 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2548 @code{stopAppoggiaturaMusic}. More information is in the file
2549 @file{ly/grace-init.ly}.
2554 Program reference: @internalsref{GraceMusic}.
2558 A score that starts with a @code{\grace} section needs an explicit
2559 @code{\context Voice} declaration, otherwise the main note and grace
2560 note end up on different staves.
2562 Grace note synchronization can also lead to surprises. Staff notation,
2563 such as key signatures, bar lines, etc. are also synchronized. Take
2564 care when you mix staves with grace notes and staves without, for example,
2566 @lilypond[quote,relative=2,verbatim,fragment]
2567 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2568 \new Staff { c4 \bar "|:" d4 } >>
2572 This can be remedied by inserting grace skips, for the above example
2575 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
2578 Grace sections should only be used within sequential music
2579 expressions. Nesting or juxtaposing grace sections is not supported,
2580 and might produce crashes or other errors.
2584 @subsection Glissando
2587 @cindex @code{\glissando}
2589 A glissando is a smooth change in pitch. It is denoted by a line or a
2590 wavy line between two notes. It is requested by attaching
2591 @code{\glissando} to a note
2593 @lilypond[quote,fragment,relative=1,verbatim]
2599 Program reference: @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2601 Example files: @file{input/regression,glissando.ly}
2607 Printing text over the line (such as @emph{gliss.}) is not supported.
2611 @subsection Dynamics
2624 @cindex @code{\ffff}
2634 Absolute dynamic marks are specified using a command after a note
2635 @code{c4\ff}. The available dynamic marks are @code{\ppp},
2636 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2637 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2638 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}
2640 @lilypond[quote,verbatim,raggedright,fragment,relative=1]
2641 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2651 A crescendo mark is started with @code{\<} and terminated with
2652 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2653 with @code{\!}. Because these marks are bound to notes, if you must
2654 use spacer notes if multiple marks are needed during one note
2656 @lilypond[quote,fragment,verbatim]
2657 c''\< c''\! d''\> e''\!
2658 << f''1 { s4 s4\< s4\! \> s4\! } >>
2660 This may give rise to very short hairpins. Use @code{minimum-length}
2661 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2665 \override Staff.Hairpin #'minimum-length = #5
2668 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2669 is an example how to do it
2671 @lilypond[quote,fragment,relative=2,verbatim]
2681 You can also supply your own texts
2682 @lilypond[quote,fragment,relative=1,verbatim]
2684 \set crescendoText = \markup { \italic "cresc. poco" }
2685 \set crescendoSpanner = #'dashed-line
2695 @cindex @code{\dynamicUp}
2697 @cindex @code{\dynamicDown}
2698 @code{\dynamicDown},
2699 @cindex @code{\dynamicBoth}
2700 @code{\dynamicBoth}.
2702 @cindex direction, of dynamics
2706 Program reference: @internalsref{CrescendoEvent},
2707 @internalsref{DecrescendoEvent}, and
2708 @internalsref{AbsoluteDynamicEvent}.
2710 Dynamics are @internalsref{DynamicText} and @internalsref{Hairpin}
2711 objects. Vertical positioning of these symbols is handled by the
2712 @internalsref{DynamicLineSpanner} object.
2720 @cindex @code{\repeat}
2723 Repetition is a central concept in music, and multiple notations exist
2724 for repetitions. In LilyPond, most of these notations can be captured
2725 in a uniform syntax. One of the advantages is that repeats entered in
2726 this way can be rendered in MIDI accurately.
2728 The following types of repetition are supported
2732 Repeated music is fully written (played) out. Useful for MIDI
2733 output, and entering repetitive music.
2736 Repeats are not written out, but alternative endings (volte) are
2737 printed, left to right with brackets. This is the standard notation
2738 for repeats with alternatives.
2742 Alternative endings are written stacked. This has limited use but may be
2743 used to typeset two lines of lyrics in songs with repeats, see
2744 @inputfileref{input,star-spangled-banner.ly}.
2752 Make beat or measure repeats. These look like percent signs.
2758 * Repeats and MIDI::
2759 * Manual repeat commands::
2761 * Tremolo subdivisions::
2766 @subsection Repeat syntax
2769 LilyPond has one syntactic construct for specifying different types of
2770 repeats. The syntax is
2773 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2776 If you have alternative endings, you may add
2777 @cindex @code{\alternative}
2779 \alternative @code{@{} @var{alternative1}
2781 @var{alternative3} @dots{} @code{@}}
2783 where each @var{alternative} is a music expression. If you do not
2784 give enough alternatives for all of the repeats, the first alternative
2785 is assumed to be played more than once.
2787 Standard repeats are used like this
2788 @lilypond[quote,fragment,verbatim,relative=2]
2790 \repeat volta 2 { c4 d e f }
2791 \repeat volta 2 { f e d c }
2794 With alternative endings
2795 @lilypond[quote,fragment,verbatim,relative=2]
2797 \repeat volta 2 {c4 d e f}
2798 \alternative { {d2 d} {f f,} }
2802 @lilypond[quote,fragment,verbatim,relative=2]
2805 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2806 \alternative { { g4 g g } { a | a a a a | b2. } }
2810 It is possible to shorten volta brackets
2811 by setting @code{voltaSpannerDuration}. In the next example, the
2812 bracket only lasts one measure, which is a duration of 3/4.
2816 @lilypond[verbatim,raggedright]
2820 \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
2821 \repeat "volta" 5 { d d d }
2822 \alternative { { e e e f f f }
2832 Brackets for the repeat are normally only printed over the topmost
2833 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2834 property @inputfileref{input/regression,volta-multi-staff.ly},
2835 @inputfileref{input/regression,volta-chord-names.ly}
2840 A nested repeat like
2849 is ambiguous, since it is is not clear to which @code{\repeat} the
2850 @code{\alternative} belongs. This ambiguity is resolved by always
2851 having the @code{\alternative} belong to the inner @code{\repeat}.
2852 For clarity, it is advisable to use braces in such situations.
2857 Timing information is not remembered at the start of an alternative,
2858 so after a repeat timing information must be reset by hand, for
2859 example by setting @code{Score.measurePosition} or entering
2860 @code{\partial}. Similarly, slurs or ties are also not repeated.
2865 @node Repeats and MIDI
2866 @subsection Repeats and MIDI
2868 @cindex expanding repeats
2870 An advantage of the unified syntax for repeats, is that all repeats
2871 may be played out for the MIDI output. This is achieved by
2872 applying the @code{\unfoldrepeats} music function.
2874 @lilypond[verbatim,raggedright]
2877 \repeat tremolo 8 {c'32 e' }
2878 \repeat percent 2 { c''8 d'' }
2879 \repeat volta 2 {c'4 d' e' f'}
2888 When creating a score file using @code{\unfoldrepeats} for midi, then
2889 it is necessary to make two @code{\score} blocks. One for MIDI, with
2890 unfolded repeats, and one for notation, eg.
2898 \unfoldrepeats @var{..music..}
2903 @node Manual repeat commands
2904 @subsection Manual repeat commands
2906 @cindex @code{repeatCommands}
2908 The property @code{repeatCommands} can be used to control the layout of
2909 repeats. Its value is a Scheme list of repeat commands, where each repeat
2913 @item @code{start-repeat},
2914 which prints a @code{|:} bar line;
2915 @item @code{end-repeat},
2916 which prints a @code{:|} bar line;
2917 @item @code{(volta @var{text})},
2918 which prints a volta bracket saying @var{text}: The text can be specified as
2919 a text string or as a markup text, see @ref{Text markup}. Do not
2920 forget to change the font, as the default number font does not contain
2921 alphabetic characters;
2922 @item @code{(volta #f)}, which
2923 stops a running volta bracket.
2926 @lilypond[quote,verbatim,fragment,relative=2]
2928 \set Score.repeatCommands = #'((volta "93") end-repeat)
2930 \set Score.repeatCommands = #'((volta #f))
2938 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2939 @internalsref{VoltaRepeatedMusic},
2940 @internalsref{UnfoldedRepeatedMusic}, and
2941 @internalsref{FoldedRepeatedMusic}.
2943 @node Tremolo repeats
2944 @subsection Tremolo repeats
2945 @cindex tremolo beams
2947 To place tremolo marks between notes, use @code{\repeat} with tremolo
2949 @lilypond[quote,verbatim,raggedright]
2950 \context Voice \relative c' {
2951 \repeat "tremolo" 8 { c16 d16 }
2952 \repeat "tremolo" 4 { c16 d16 }
2953 \repeat "tremolo" 2 { c16 d16 }
2957 Tremolo marks can also be put on a single note. In this case, the
2958 note should not be surrounded by braces.
2959 @lilypond[quote,verbatim,raggedright]
2960 \repeat "tremolo" 4 c'16
2963 Similar output is obtained using the tremolo subdivision, described in
2964 @ref{Tremolo subdivisions}.
2968 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2970 Program reference: tremolo beams are @internalsref{Beam} objects. Single stem
2971 tremolos are @internalsref{StemTremolo} objects. The music expression is
2972 @internalsref{TremoloEvent}.
2974 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2975 @inputfileref{input/regression,stem-tremolo.ly}.
2977 @node Tremolo subdivisions
2978 @subsection Tremolo subdivisions
2979 @cindex tremolo marks
2980 @cindex @code{tremoloFlags}
2982 Tremolo marks can be printed on a single note by adding
2983 `@code{:}[@var{number}]' after the note. The number indicates the
2984 duration of the subdivision, and it must be at least 8. A
2985 @var{length} value of 8 gives one line across the note stem. If the
2986 length is omitted, the last value (stored in @code{tremoloFlags}) is
2989 @lilypond[quote,verbatim,fragment]
2990 c'2:8 c':32 | c': c': |
2993 @c [TODO : stok is te kort bij 32en]
2997 Tremolos entered in this way do not carry over into the MIDI output.
3001 In this manual: @ref{Tremolo repeats}.
3003 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
3005 @node Measure repeats
3006 @subsection Measure repeats
3008 @cindex percent repeats
3009 @cindex measure repeats
3011 In the @code{percent} style, a note pattern can be repeated. It is
3012 printed once, and then the pattern is replaced with a special sign.
3013 Patterns of one and two measures are replaced by percent-like signs,
3014 patterns that divide the measure length are replaced by slashes
3016 @lilypond[quote,verbatim,raggedright]
3018 \repeat "percent" 4 { c'4 }
3019 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
3025 Program reference: @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
3026 @internalsref{PercentRepeatedMusic}, and
3027 @internalsref{DoublePercentRepeat}.
3031 @node Rhythmic music
3032 @section Rhythmic music
3036 * Showing melody rhythms::
3037 * Entering percussion::
3038 * Percussion staves::
3042 @node Showing melody rhythms
3043 @subsection Showing melody rhythms
3045 Sometimes you might want to show only the rhythm of a melody. This
3046 can be done with the rhythmic staff. All pitches of notes on such a
3047 staff are squashed, and the staff itself has a single line
3049 @lilypond[quote,fragment,relative=1,verbatim]
3050 \context RhythmicStaff {
3052 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
3058 Program reference: @internalsref{RhythmicStaff}.
3060 Examples: @inputfileref{input/regression,rhythmic-staff.ly}.
3063 @node Entering percussion
3064 @subsection Entering percussion
3070 Percussion notes may be entered in @code{\drums} mode, which is
3071 similar to the standard mode for entering notes. Each piece of
3072 percussion has a full name and an abbreviated name, and both can be used
3075 @lilypond[quote,raggedright,verbatim]
3076 \new DrumStaff \drums {
3077 hihat hh bassdrum bd
3081 The complete list of drum names is in the init file
3082 @file{ly/drumpitch-init.ly}.
3083 @c TODO: properly document this.
3087 Program reference: @internalsref{DrumNoteEvent}.
3089 @node Percussion staves
3090 @subsection Percussion staves
3094 A percussion part for more than one instrument typically uses a
3095 multi line staff where each position in the staff refers to one piece
3099 To typeset the music, the notes must be interpreted in a
3100 @internalsref{DrumStaff} and @internalsref{DrumVoice} contexts
3103 @lilypond[quote,raggedright,verbatim]
3104 up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
3105 down = \drums { bassdrum4 snare8 bd r bd sn4 }
3107 \new DrumVoice { \voiceOne \up }
3108 \new DrumVoice { \voiceTwo \down }
3112 The above example shows verbose polyphonic notation. The short
3113 polyphonic notation, described in @ref{Polyphony}, can also be used if
3114 the @internalsref{DrumVoices} are instantiated by hand first. For example,
3116 @lilypond[quote,fragment,verbatim]
3118 \context DrumVoice = "1" { s1 *2 }
3119 \context DrumVoice = "2" { s1 *2 }
3123 { \repeat unfold 16 hh16 }
3132 There are also other layout possibilities. To use these, set the
3133 property @code{drumStyleTable} in context @internalsref{DrumVoice}.
3134 The following variables have been predefined
3138 This is the default. It typesets a typical drum kit on a five-line staff
3140 @lilypond[quote,noindent]
3141 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
3142 bd sn ss tomh tommh tomml toml tomfh tomfl }
3143 mus = \drums { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
3144 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
3146 << \new DrumStaff\with {
3147 \remove Bar_engraver
3148 \remove Time_signature_engraver
3149 \override Stem #'transparent = ##t
3150 \override Stem #'Y-extent-callback = ##f
3151 minimumVerticalExtent = #'(-4.0 . 5.0)
3153 \context Lyrics \nam
3156 %% need to do this, because of indented @itemize
3159 \override LyricText #'font-family = #'typewriter
3160 \override BarNumber #'transparent =##T
3164 The drum scheme supports six different toms. When there fewer toms, simply
3165 select the toms that produce the desired result, i.e. to get toms on
3166 the three middle lines you use @code{tommh}, @code{tomml} and
3169 @item timbales-style
3170 This typesets timbales on a two line staff
3172 @lilypond[quote,raggedright]
3173 nam = \lyrics { timh ssh timl ssl cb }
3174 mus = \drums { timh ssh timl ssl cb s16 }
3177 \context DrumStaff \with {
3178 \remove Bar_engraver
3179 \remove Time_signature_engraver
3180 \override Stem #'transparent = ##t
3181 \override Stem #'Y-extent-callback = ##f
3182 \override StaffSymbol #'line-count = #2
3183 \override StaffSymbol #'staff-space = #2
3184 minimumVerticalExtent = #'(-3.0 . 4.0)
3185 drumStyleTable = #timbales-style
3188 \override LyricText #'font-family = #'typewriter
3194 This typesets congas on a two line staff
3196 @lilypond[quote,raggedright]
3197 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
3198 mus = \drums { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
3200 \context DrumStaff\with {
3201 \remove Bar_engraver
3202 \remove Time_signature_engraver
3203 drumStyleTable = #congas-style
3204 \override StaffSymbol #'line-count = #2
3206 %% this sucks; it will lengthen stems.
3207 \override StaffSymbol #'staff-space = #2
3208 \override Stem #'transparent = ##t
3209 \override Stem #'Y-extent-callback = ##f
3212 \override LyricText #'font-family = #'typewriter
3217 This typesets bongos on a two line staff
3219 @lilypond[quote,raggedright]
3220 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
3221 mus = \drums { boh boho bohm ssh bol bolo bolm ssl s16 }
3223 \context DrumStaff\with {
3224 \remove Bar_engraver
3225 \remove Time_signature_engraver
3226 \override StaffSymbol #'line-count = #2
3227 drumStyleTable = #bongos-style
3229 %% this sucks; it will lengthen stems.
3230 \override StaffSymbol #'staff-space = #2
3231 \override Stem #'transparent = ##t
3232 \override Stem #'Y-extent-callback = ##f
3235 \override LyricText #'font-family = #'typewriter
3240 @item percussion-style
3241 to typeset all kinds of simple percussion on one line staves
3242 @lilypond[quote,raggedright]
3243 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
3244 mus = \drums { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
3246 \context DrumStaff\with{
3247 \remove Bar_engraver
3248 drumStyleTable = #percussion-style
3249 \override StaffSymbol #'line-count = #1
3250 \remove Time_signature_engraver
3251 \override Stem #'transparent = ##t
3252 \override Stem #'Y-extent-callback = ##f
3255 \override LyricText #'font-family = #'typewriter
3262 If you do not like any of the predefined lists you can define your own
3263 list at the top of your file
3265 @lilypond[quote,raggedright,verbatim]
3267 (bassdrum default #f -1)
3268 (snare default #f 0)
3270 (pedalhihat xcircle "stopped" 2)
3271 (lowtom diamond #f 3)))
3272 up = \drums { hh8 hh hh hh hhp4 hhp }
3273 down = \drums { bd4 sn bd toml8 toml }
3276 \set DrumStaff.drumStyleTable
3277 = #(alist->hash-table mydrums)
3278 \new DrumVoice { \voiceOne \up }
3279 \new DrumVoice { \voiceTwo \down }
3286 Init files: @file{ly/drumpitch-init.ly}.
3288 Program reference: @internalsref{DrumStaff}, @internalsref{DrumVoice}.
3292 Because general MIDI does not contain rim shots, the sidestick is used
3293 for this purpose instead.
3296 @section Piano music
3298 Piano staves are two normal staves coupled with a brace. The staves
3299 are largely independent, but sometimes voices can cross between the
3300 two staves. The same notation is also used for harps and other key
3301 instruments. The @internalsref{PianoStaff} is especially built to
3302 handle this cross-staffing behavior. In this section we discuss the
3303 @internalsref{PianoStaff} and some other pianistic peculiarities.
3307 * Automatic staff changes::
3308 * Manual staff switches::
3311 * Staff switch lines::
3312 * Cross staff stems::
3317 Dynamics are not centered, but workarounds do exist. See
3318 @inputfileref{input/template,piano-dynamics.ly}.
3320 @cindex cross staff stem
3321 @cindex stem, cross staff
3322 @cindex distance between staves in piano music
3324 The distance between the two staves is the same for all systems in the
3325 score. It is possible to override this per system, but it does require
3326 an arcane command incantation. See
3327 @inputfileref{input/test,piano-staff-distance.ly}.
3330 @node Automatic staff changes
3331 @subsection Automatic staff changes
3332 @cindex Automatic staff changes
3334 Voices can be made to switch automatically between the top and the bottom
3335 staff. The syntax for this is
3339 \autochange @dots{}@var{music}@dots{}
3344 This will create two staves inside the current PianoStaff, called
3345 @code{up} and @code{down}. The lower staff will be in bass clef by
3348 A @code{\relative} section that is outside of @code{\autochange} has
3349 no effect on the pitches of @var{music}, so, if necessary, put
3350 @code{\relative} inside @code{\autochange} like
3354 \autochange \relative @dots{} @dots{}
3359 The autochanger switches on basis of pitch (middle C is the turning
3360 point), and it looks ahead skipping over rests to switch in
3361 advance. Here is a practical example
3363 @lilypond[quote,verbatim,raggedright]
3365 \autochange \relative c'
3374 In this manual: @ref{Manual staff switches}.
3376 Program reference: @internalsref{AutoChangeMusic}.
3382 The staff switches may not end up in optimal places. For high
3383 quality output, staff switches should be specified manually.
3386 @code{\autochange} cannot be inside @code{\times}.
3388 Internally, the @code{\partcombine} interprets both arguments as
3389 @code{Voice}s named @code{one} and @code{two}, and then decides when
3390 the parts can be combined. Consequently, if the arguments switch to
3391 differently named @internalsref{Voice} contexts, the events in those
3395 @node Manual staff switches
3396 @subsection Manual staff switches
3398 @cindex manual staff switches
3399 @cindex staff switch, manual
3401 Voices can be switched between staves manually, using the command
3403 \change Staff = @var{staffname} @var{music}
3407 The string @var{staffname} is the name of the staff. It switches the
3408 current voice from its current staff to the Staff called
3409 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3410 @code{"down"}. The @context{Staff} referred to must already exist, so
3411 usually the setup for a score will start with a setup of the staves,
3415 \context Staff = up @{
3416 \skip 1 * 10 %@emph{ keep staff alive}
3418 \context Staff = down @{
3419 \skip 1 * 10 %@emph{idem}
3425 and the @context{Voice} is inserted afterwards
3428 \context Staff = down
3429 \new Voice @{ @dots{} \change Staff = up @dots{} @}
3437 Pianos have pedals that alter the way sound is produced. Generally, a
3438 piano has three pedals, sustain, una corda, and sostenuto.
3441 Piano pedal instruction can be expressed by attaching
3442 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3443 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3446 @lilypond[quote,fragment,verbatim]
3447 c'4\sustainDown c'4\sustainUp
3450 What is printed can be modified by setting @code{pedal@var{X}Strings},
3451 where @var{X} is one of the pedal types: @code{Sustain},
3452 @code{Sostenuto} or @code{UnaCorda}. Refer to
3453 @internalsref{SustainPedal} in the program reference for more
3456 Pedals can also be indicated by a sequence of brackets, by setting the
3457 @code{pedalSustainStyle} property to bracket objects
3459 @lilypond[quote,fragment,verbatim,relative=2]
3460 \set Staff.pedalSustainStyle = #'bracket
3462 b\sustainUp\sustainDown
3463 b g \sustainUp a \sustainDown \bar "|."
3466 A third style of pedal notation is a mixture of text and brackets,
3467 obtained by setting the @code{pedalSustainStyle} style property to
3470 @lilypond[quote,fragment,verbatim,relative=2]
3471 \set Staff.pedalSustainStyle = #'mixed
3473 b\sustainUp\sustainDown
3474 b g \sustainUp a \sustainDown \bar "|."
3477 The default `*Ped.' style for sustain and damper pedals corresponds to
3478 style @code{#'text}. The sostenuto pedal uses @code{mixed} style by
3481 @lilypond[quote,fragment,verbatim,relative=2]
3482 c\sostenutoDown d e c, f g a\sostenutoUp
3485 For fine-tuning of the appearance of a pedal bracket, the properties
3486 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3487 @code{PianoPedalBracket} objects (see
3488 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3489 bracket may be extended to the right edge of the note head
3491 @lilypond[quote,fragment,verbatim,relative=2]
3492 \override Staff.PianoPedalBracket
3493 #'shorten-pair = #'(0 . -1.0)
3494 c\sostenutoDown d e c, f g a\sostenutoUp
3498 @subsection Arpeggio
3501 @cindex broken arpeggio
3502 @cindex @code{\arpeggio}
3504 You can specify an arpeggio sign on a chord by attaching an
3505 @code{\arpeggio} to a chord
3508 @lilypond[quote,fragment,relative=1,verbatim]
3512 When an arpeggio crosses staves, you attach an arpeggio to the chords
3513 in both staves, and set
3514 @internalsref{PianoStaff}.@code{connectArpeggios}
3516 @lilypond[quote,fragment,relative=1,verbatim]
3517 \context PianoStaff <<
3518 \set PianoStaff.connectArpeggios = ##t
3519 \new Staff { <c' e g c>\arpeggio }
3520 \new Staff { \clef bass <c,, e g>\arpeggio }
3524 The direction of the arpeggio is sometimes denoted by adding an
3525 arrowhead to the wiggly line
3527 @lilypond[quote,fragment,relative=1,verbatim]
3536 A square bracket on the left indicates that the player should not
3537 arpeggiate the chord
3539 @c todo: ugh, lousy typography. Look for real example. --hwn
3541 @lilypond[quote,fragment,relative=1,verbatim]
3548 @cindex @code{\arpeggio}
3550 @cindex @code{\arpeggioUp}
3552 @cindex @code{\arpeggioDown}
3553 @code{\arpeggioDown},
3554 @cindex @code{\arpeggioBoth}
3555 @code{\arpeggioBoth},
3556 @cindex @code{\arpeggioBracket}
3557 @code{\arpeggioBracket}.
3561 Program reference: @internalsref{ArpeggioEvent},
3562 @internalsref{Arpeggio}.
3566 It is not possible to mix connected arpeggios and unconnected
3567 arpeggios in one @internalsref{PianoStaff} at the same point in time.
3569 @node Staff switch lines
3570 @subsection Staff switch lines
3573 @cindex follow voice
3574 @cindex staff switching
3577 @cindex @code{followVoice}
3579 Whenever a voice switches to another staff a line connecting the notes
3580 can be printed automatically. This is switched on by setting
3581 @code{PianoStaff.followVoice} to true
3583 @lilypond[quote,fragment,relative=1,verbatim]
3584 \context PianoStaff <<
3585 \set PianoStaff.followVoice = ##t
3586 \context Staff \context Voice {
3591 \context Staff=two { \clef bass \skip 1*2 }
3597 Program reference: @internalsref{VoiceFollower}.
3601 @cindex @code{\showStaffSwitch}
3602 @code{\showStaffSwitch},
3603 @cindex @code{\hideStaffSwitch}
3604 @code{\hideStaffSwitch}.
3607 @node Cross staff stems
3608 @subsection Cross staff stems
3610 The chords which cross staves may be produced by increasing the length
3611 of the stem in the lower stave, so it reaches the stem in the upper
3612 stave, or vice versa.
3614 @lilypond[raggedright,verbatim]
3615 stemExtend = \once \override Stem #'length = #22
3616 noFlag = \once \override Stem #'flag-style = #'no-flag
3617 \context PianoStaff <<
3619 \stemDown \stemExtend
3633 @section Vocal music
3635 There are three different issues when printing vocal music
3639 Song texts must be entered as texts, not notes. For example, for
3640 lyrics, the input @code{a} should be interpreted as
3641 a one letter text, and not the note A.
3643 Song texts must be printed as text, and not as notes.
3645 Song texts must be aligned with the notes of their melody
3648 The simplest solution to printing music uses the @code{\addlyrics}
3649 function to deal with these three problems in one go. However, these
3650 three functions can be controlled separately, which is necessary
3651 for complex vocal music.
3655 * Setting simple songs::
3657 * Hyphens and extenders::
3658 * The Lyrics context::
3659 * Flexibility in alignment::
3664 @node Setting simple songs
3665 @subsection Setting simple songs
3667 The easiest way to add lyrics to a melody is to append
3670 \addlyrics @{ @var{the lyrics} @}
3674 to a melody. Here is an example,
3676 @lilypond[raggedright,verbatim]
3679 \relative { c2 e4 g2. }
3680 \addlyrics { play the game }
3684 More stanzas can be added by adding more
3685 @code{\addlyrics} sections
3687 @lilypond[raggedright,verbatim]
3690 \relative { c2 e4 g2. }
3691 \addlyrics { play the game }
3692 \addlyrics { speel het spel }
3693 \addlyrics { joue le jeu }
3697 @node Entering lyrics
3698 @subsection Entering lyrics
3702 @cindex @code{\lyrics}
3705 Lyrics are entered in a special input mode. This mode is is introduced
3706 by the keyword @code{\lyrics}. In this mode you can enter lyrics,
3707 with punctuation and accents, and the input @code{a} is not parsed as
3708 a pitch, but rather as a one letter syllable. Syllables are entered
3709 like notes, but with pitches replaced by text. For example,
3711 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3715 A word lyrics mode begins with an alphabetic character, and ends with
3716 any space or digit. The following characters can be any character
3717 that is not a digit or white space. One important consequence of this
3718 is that a word can end with @code{@}}. The following example is
3719 usually a bug. The syllable includes a @code{@}}, so the
3720 opening brace is not balanced
3722 \lyrics @{ twinkle@}
3725 @cindex @code{\property}, in @code{\lyrics}
3727 Similarly, a period following an alphabetic sequence, is included in
3728 the resulting string. As a consequence, spaces must be inserted around
3731 \override Score . LyricText #'font-shape = #'italic
3735 @cindex spaces, in lyrics
3736 @cindex quotes, in lyrics
3738 Any @code{_} character which appears in an unquoted word is converted
3739 to a space. This provides a mechanism for introducing spaces into words
3740 without using quotes. Quoted words can also be used in Lyrics mode to
3741 specify words that cannot be written with the above rules. The
3742 following example incorporates double quotes
3745 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3748 This example is slightly academic, since it gives better looking
3749 results to use single quotes, @code{``} and @code{''}
3751 \lyrics @{ He said: ``Let my peo ple go'' @}
3755 The full definition of a word start in Lyrics mode is somewhat more
3758 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3759 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3760 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3761 any 8-bit character with ASCII code over 127, or a two-character
3762 combination of a backslash followed by one of @code{`}, @code{'},
3763 @code{"}, or @code{^}.
3769 Program reference: events @internalsref{LyricEvent}, and
3770 @internalsref{LyricText}.
3774 The definition of lyrics mode is too complex.
3776 @node Hyphens and extenders
3777 @subsection Hyphens and extenders
3781 Centered hyphens are entered as `@code{-}@code{-}' between syllables.
3782 The hyphen will have variable length depending on the space between
3783 the syllables and it will be centered between the syllables.
3788 When a lyric is sung over many notes (this is called a melisma), this is
3789 indicated with a horizontal line centered between a syllable and the
3790 next one. Such a line is called an extender line, and it is entered as
3796 Program reference: @internalsref{HyphenEvent},
3797 @internalsref{ExtenderEvent}, @internalsref{LyricHyphen}, and
3798 @internalsref{LyricExtender}
3800 Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
3804 @node The Lyrics context
3805 @subsection The Lyrics context
3808 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
3810 \context Lyrics \lyrics @dots{}
3813 @cindex automatic syllable durations
3814 @cindex @code{\lyricsto}
3815 @cindex lyrics and melodies
3817 This will place the lyrics according to the durations that were
3818 entered. The lyrics can also be aligned under a given melody
3819 automatically. In this case, it is no longer necessary to enter the
3820 correct duration for each syllable. This is achieved by combining the
3821 melody and the lyrics with the @code{\lyricsto} expression
3823 \lyricsto @var{name} \new Lyrics @dots{}
3826 This aligns the lyrics to the
3828 notes of the @internalsref{Voice} context called @var{name}, which has
3829 to exist. Therefore, normally the @code{Voice} is specified first, and
3830 then the lyrics are specified with @code{\lyricsto}. The command
3831 @code{\lyricsto} switches to @code{\lyrics} mode automatically, so the
3832 @code{\lyrics} keyword may be omitted.
3834 For different or more complex orderings, the best way is to setup the
3835 hierarchy of staves and lyrics first, e.g.
3837 \context ChoirStaff <<
3838 \context Lyrics = sopranoLyrics @{ s1 @}
3839 \context Voice = soprano @{ @emph{music} @}
3840 \context Lyrics = tenorLyrics @{ s1 @}
3841 \context Voice = tenor @{ @emph{music} @}
3844 and then combine the appropriate melodies and lyric lines
3846 \lyricsto "soprano" \context Lyrics = sopranoLyrics
3851 The final input would resemble
3854 << \context ChoirStaff << @emph{setup the music} >>
3855 \lyricsto "soprano" @emph{etc}
3856 \lyricsto "alto" @emph{etc}
3862 The @code{\lyricsto} command detects melismata: it only puts one
3863 syllable under a tied or slurred group of notes. If you want to force
3864 an unslurred group of notes to be a melisma, insert @code{\melisma}
3865 after the first note of the group, and @code{\melismaEnd} after the
3868 @lilypond[quote,relative=2,raggedright,fragment,verbatim]
3870 \context Voice = "lala" {
3878 \lyricsto "lala" \new Lyrics {
3884 In addition, notes are considered a melisma if they are manually
3885 beamed, and automatic beaming (see @ref{Setting automatic beam
3886 behavior}) is switched off.
3892 The criteria for deciding melismata can
3893 be tuned with the property @code{melismaBusyProperties}. See
3894 @internalsref{Melisma_translator} in the program reference for more
3899 Lyrics can also be entered without @code{\lyricsto}. In this case the
3900 durations of each syllable must be entered explicitly, for example,
3907 The alignment to a melody can be specified with the
3908 @code{associatedVoice} property,
3911 \set associatedVoice = #"lala"
3915 The value of the property (here: @code{"lala"}) should be the name of
3916 a @internalsref{Voice} context. Without this setting, extender lines
3917 will not be formatted properly.
3919 Here is an example demonstrating manual lyric durations,
3921 @lilypond[relative=1,verbatim,fragment]
3922 << \context Voice = melody {
3926 \new Lyrics \lyrics {
3927 \set associatedVoice = #"melody"
3933 @cindex choral score
3935 A complete example of a SATB score setup is in the file
3936 @inputfileref{input/template,satb.ly}.
3941 @code{\melisma}, @code{\melismaEnd}
3942 @cindex @code{\melismaEnd}
3943 @cindex @code{\melisma}
3947 Program reference: @internalsref{LyricCombineMusic},
3948 @internalsref{Lyrics}, @internalsref{Melisma_translator}.
3950 Examples: @inputfileref{input/template,satb.ly},
3951 @inputfileref{input/regression,lyric-combine-new.ly},
3952 @c TODO: make separate section for melismata
3953 @inputfileref{input/test,lyrics-melisma-variants.ly}.
3954 @inputfileref{input/test,lyrics-melisma-faster.ly}.
3958 Melismata are not detected automatically, and extender lines must be
3962 @c TODO: document \new Staff << Voice \lyricsto >> bug
3964 @node Flexibility in alignment
3965 @subsection Flexibility in alignment
3968 Often, different stanzas of one song are put to one melody in slightly
3969 differing ways. Such variations can still be captured with
3972 One possibility is that the text has a melisma in one stanza, but
3973 multiple syllables in another one. One solution is to make the faster
3974 voice ignore the melisma. This is done by setting
3975 @code{ignoreMelismata} in the Lyrics context.
3977 There has one tricky aspect. The setting for @code{ignoreMelismata}
3978 must be set one syllable @emph{before} the non-melismatic syllable
3979 in the text, as shown here,
3981 @lilypond[verbatim,raggedright]
3983 \relative \context Voice = "lahlah" {
3984 \set Staff.autoBeaming = ##f
3990 \new Lyrics \lyricsto "lahlah" {
3993 \new Lyrics \lyricsto "lahlah" {
3994 \set ignoreMelismata = ##t % applies to "fas"
3996 \unset ignoreMelismata
4003 The @code{ignoreMelismata} applies to the syllable ``fas'', so it
4004 should bev entered before ``go''.
4006 The reverse is also possible: making a lyric line slower than the
4007 standard. This can be achieved by insert @code{\skip}s into the
4008 lyrics. For every @code{\skip}, the text will be delayed another note.
4011 @lilypond[verbatim,raggedright]
4012 \relative { c c g' }
4019 More complex variations in text underlay are possible. It is possible
4020 to switch the melody for a line of lyrics during the text. This is
4021 done by setting the @code{associatedVoice} property. In the example
4023 @lilypond[raggedright]
4025 \relative \context Voice = "lahlah" {
4026 \set Staff.autoBeaming = ##f
4029 \context Voice = alternative {
4033 % show associations clearly.
4034 \override NoteColumn #'force-hshift = #-3
4046 \new Lyrics \lyricsto "lahlah" {
4047 Ju -- ras -- sic Park
4049 \new Lyrics \lyricsto "lahlah" {
4051 % Tricky: need to set associatedVoice
4052 % one syllable too soon!
4053 \set associatedVoice = alternative % applies to "ran"
4057 \set associatedVoice = lahlah % applies to "rus"
4063 the text for the first stanza is set to a melody called ``lahlah'',
4066 \new Lyrics \lyricsto "lahlah" {
4067 Ju -- ras -- sic Park
4072 The second stanza initially is set to the @code{lahlah} context, but
4073 for the syllable ``ran'', it switches to a different melody.
4074 This is achieved with
4076 \set associatedVoice = alternative
4080 Here, @code{alternative} is the name of the @code{Voice} context
4081 containing the triplet.
4083 Again, the command must be one syllable too early, before ``Ty'' in
4087 \new Lyrics \lyricsto "lahlah" {
4088 \set associatedVoice = alternative % applies to "ran"
4092 \set associatedVoice = lahlah % applies to "rus"
4098 The underlay is switched back to the starting situation by assigning
4099 @code{lahlah} to @code{associatedVoice}.
4105 @subsection More stanzas
4107 @cindex phrasing, in lyrics
4110 @cindex stanza number
4111 @cindex singer's names
4112 @cindex name of singer
4114 Stanza numbers can be added by setting @code{stanza}, e.g.
4116 @lilypond[quote,verbatim,relative=2,fragment]
4118 \time 3/4 g2 e4 a2 f4 g2.
4121 Hi, my name is Bert.
4124 Oh, che -- ri, je t'aime
4128 These numbers are put just before the start of first syllable.
4130 Names of singers can also be added. They are printed at the start of
4131 the line, just like instrument names. They are created by setting
4132 @code{vocalName}. A short version may be entered as @code{vocNam}.
4135 @lilypond[fragment,quote,verbatim,relative=2]
4137 \time 3/4 g2 e4 a2 f4 g2.
4139 \set vocalName = "Bert "
4140 Hi, my name is Bert.
4142 \set vocalName = "Ernie "
4143 Oh, che -- ri, je t'aime
4149 Program reference: Layout objects @internalsref{LyricText} and
4150 @internalsref{VocalName}. Music expressions
4151 @internalsref{LyricEvent}.
4159 The term @emph{ambitus} denotes a range of pitches for a given voice
4160 in a part of music. It also may denote the pitch range that a musical
4161 instrument is capable of playing. Ambits are printed on vocal parts,
4162 so performers can easily determine it meets their capabilities.
4164 It denoted at the beginning of a piece near the initial clef. The
4165 range is graphically specified by two note heads, that represent the
4166 minimum and maximum pitch. To print such ambits, add the
4167 @internalsref{Ambitus_engraver} to the @internalsref{Voice} context,
4174 \consists Ambitus_engraver
4179 This results in the following output
4181 @lilypond[quote,raggedright]
4185 \consists Ambitus_engraver
4189 \relative \new Staff {
4194 If you have multiple voices in a single staff, and you want a single
4195 ambitus per staff rather than per each voice, add the
4196 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
4197 rather than to the @internalsref{Voice} context. Here is an example,
4199 @lilypond[verbatim,raggedright]
4202 \consists "Ambitus_engraver"
4204 \override Ambitus #'X-offset-callbacks
4205 = #(list (lambda (grob axis) -1.0))
4210 \consists "Ambitus_engraver"
4219 This example uses one advanced feature,
4222 \override Ambitus #'X-offset-callbacks
4223 = #(list (lambda (grob axis) -1.0))
4227 This code moves the ambitus to the left. The same effect could have
4228 been achieved with @code{extra-offset}, but then the formatting system
4229 would not reserve space for the moved object.
4233 Program reference: @internalsref{Ambitus},
4234 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
4235 @internalsref{AmbitusAccidental}.
4237 Examples: @inputfileref{input/regression,ambitus.ly}.
4241 There is no collision handling in the case of multiple per-voice
4244 @node Other instrument specific notation, Tablatures, Vocal music, Notation manual
4245 @section Other instrument specific notation
4251 @node Harmonic notes, , Other instrument specific notation, Other instrument specific notation
4252 @subsection Harmonic notes
4254 @cindex artificial harmonics
4257 Artificial harmonics are notated with a different notehead style. They
4259 marking the harmonic pitch with @code{\harmonic}.
4261 @lilypond[raggedright,verbatim]
4268 @node Tablatures, Popular music, Other instrument specific notation, Notation manual
4272 @cindex guitar tablature
4274 Tablature notation is used for notating music for plucked string
4275 instruments. Pitches are not denoted with note heads, but by
4276 indicating on which string and fret a note must be played. LilyPond
4277 offers limited support for tablature.
4280 * Tablatures basic::
4281 * Non-guitar tablatures::
4284 @node Tablatures basic, Non-guitar tablatures, Tablatures, Tablatures
4285 @subsection Tablatures basic
4286 @cindex Tablatures basic
4288 The string number associated to a note is given as a backslash
4289 followed by a number, e.g. @code{c4\3} for a C quarter on the third
4290 string. By default, string 1 is the highest one, and the tuning
4291 defaults to the standard guitar tuning (with 6 strings). The notes
4292 are printed as tablature, by using @internalsref{TabStaff} and
4293 @internalsref{TabVoice} contexts
4295 @lilypond[quote,fragment,verbatim]
4302 @cindex @code{minimumFret}
4305 When no string is specified, the first string that does not give a
4306 fret number less than @code{minimumFret} is selected. The default
4307 value for @code{minimumFret} is 0
4312 \set TabStaff.minimumFret = #8
4315 @lilypond[quote,noindent,raggedright]
4319 \set TabStaff.minimumFret = #8
4322 \context StaffGroup <<
4323 \context Staff { \clef "G_8" \frag }
4324 \context TabStaff { \frag }
4330 Program reference: @internalsref{TabStaff}, @internalsref{TabVoice}, and
4331 @internalsref{StringNumberEvent}.
4335 Chords are not handled in a special way, and hence the automatic
4336 string selector may easily select the same string to two notes in a
4340 @node Non-guitar tablatures, , Tablatures basic, Tablatures
4341 @subsection Non-guitar tablatures
4342 @cindex Non-guitar tablatures
4344 You can change the number of strings, by setting the number of lines
4345 in the @internalsref{TabStaff}.
4347 You can change the tuning of the strings. A string tuning is given as
4348 a Scheme list with one integer number for each string, the number
4349 being the pitch (measured in semitones relative to middle C) of an
4350 open string. The numbers specified for @code{stringTuning} are the
4351 numbers of semitones to subtract or add, starting the specified pitch
4352 by default middle C, in string order. In the next example,
4353 @code{stringTunings} is set for the pitches e, a, d, and g
4355 @lilypond[quote,fragment,verbatim]
4356 \context TabStaff <<
4357 \set TabStaff.stringTunings = #'(-5 -10 -15 -20)
4360 a,4 c' a e' e c' a e'
4367 No guitar special effects have been implemented.
4371 Program reference: @internalsref{Tab_note_heads_engraver}.
4374 @node Popular music, Orchestral music, Tablatures, Notation manual
4375 @section Popular music
4382 * Printing chord names::
4386 @node Chord names, Chords mode, Popular music, Popular music
4387 @subsection Chord names
4390 LilyPond has support for both printing chord names. Chords may be
4391 entered in musical chord notation, i.e. @code{< .. >}, but they can
4392 also be entered by name. Internally, the chords are represented as a
4393 set of pitches, so they can be transposed
4396 @lilypond[quote,verbatim,raggedright]
4397 twoWays = \transpose c c' {
4406 << \context ChordNames \twoWays
4407 \context Voice \twoWays >>
4410 This example also shows that the chord printing routines do not try to
4411 be intelligent. The last chord (@code{f bes d}) is not interpreted as
4417 * Printing chord names::
4422 @subsection Chords mode
4425 In chord mode sets of pitches (chords) are entered with common names.
4426 A chord is entered by the root, which is entered like a common pitch
4428 @lilypond[quote,fragment,verbatim,relative=2]
4429 \chords { es4. d8 c2 }
4433 The mode is introduced by the keyword @code{\chords}.
4438 Other chords may be entered by suffixing a colon, and introducing a
4439 modifier, and optionally, a number
4441 @lilypond[quote,fragment,verbatim]
4442 \chords { e1:m e1:7 e1:m7 }
4444 The first number following the root is taken to be the `type' of the
4445 chord, thirds are added to the root until it reaches the specified
4447 @lilypond[quote,fragment,verbatim]
4448 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
4451 @cindex root of chord
4452 @cindex additions, in chords
4453 @cindex removals, in chords
4455 More complex chords may also be constructed adding separate steps
4456 to a chord. Additions are added after the number following
4457 the colon, and are separated by dots
4459 @lilypond[quote,verbatim,fragment]
4460 \chords { c:5.6 c:3.7.8 c:3.6.13 }
4462 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
4464 @lilypond[quote,verbatim,fragment]
4465 \chords { c:7+ c:5+.3- c:3-.5-.7- }
4467 Removals are specified similarly, and are introduced by a caret. They
4468 must come after the additions
4469 @lilypond[quote,verbatim,fragment]
4470 \chords { c^3 c:7^5 c:9^3.5 }
4473 Modifiers can be used to change pitches. The following modifiers are
4477 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
4479 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
4482 is the augmented chord. This modifier raises the 5th step.
4484 is the major 7th chord. This modifier raises the 7th step if present.
4486 is the suspended 4th or 2nd. This modifier removes the 3rd
4487 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
4490 Modifiers can be mixed with additions
4491 @lilypond[quote,verbatim,fragment]
4492 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
4495 @cindex modifiers, in chords.
4502 Since an unaltered 11 does not sound good when combined with an
4503 unaltered 3, the 11 is removed in this case (unless it is added
4506 @lilypond[quote,fragment,verbatim]
4507 \chords { c:13 c:13.11 c:m13 }
4512 An inversion (putting one pitch of the chord on the bottom), as well
4513 as bass notes, can be specified by appending
4514 @code{/}@var{pitch} to the chord
4515 @lilypond[quote,fragment,verbatim]
4516 \chords { c1 c/g c/f }
4520 A bass note can be added instead of transposed out of the chord,
4521 by using @code{/+}@var{pitch}.
4523 @lilypond[quote,fragment,verbatim]
4524 \chords { c1 c/+g c/+f }
4527 Chords is a mode similar to @code{\lyrics} etc. Most
4528 of the commands continue to work, for example, @code{r} and
4529 @code{\skip} can be used to insert rests and spaces, and property
4530 commands may be used to change various settings.
4536 Each step can only be present in a chord once. The following
4537 simply produces the augmented chord, since @code{5+} is interpreted
4540 @lilypond[quote,verbatim,fragment]
4541 \chords { c:5.5-.5+ }
4545 @node Printing chord names
4546 @subsection Printing chord names
4548 @cindex printing chord names
4552 For displaying printed chord names, use the @internalsref{ChordNames} context.
4553 The chords may be entered either using the notation
4554 described above, or directly using @code{<} and @code{>}
4556 @lilypond[quote,verbatim,raggedright]
4558 \chords {a1 b c} <d' f' a'> <e' g' b'>
4562 \context ChordNames \scheme
4563 \context Staff \scheme
4567 You can make the chord changes stand out by setting
4568 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
4569 display chord names when there is a change in the chords scheme and at
4570 the start of a new line
4572 @lilypond[quote,verbatim,linewidth=9\cm]
4574 c1:m c:m \break c:m c:m d
4577 \context ChordNames {
4578 \set chordChanges = ##t
4580 \context Staff \transpose c c' \scheme
4584 The previous examples all show chords over a staff. This is not
4585 necessary. Chords may also be printed separately. It may be necessary
4586 to add @internalsref{Volta_engraver} and @internalsref{Bar_engraver}
4587 for showing repeats.
4589 @lilypond[raggedright,verbatim]
4590 \new ChordNames \with {
4591 \override BarLine #'bar-size = #4
4592 voltaOnThisStaff = ##t
4593 \consists Bar_engraver
4594 \consists "Volta_engraver"
4596 \repeat volta 2 \chords {
4605 The default chord name layout is a system for Jazz music, proposed by
4606 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
4607 following properties
4610 @cindex @code{chordNameExceptions}
4611 @item chordNameExceptions
4612 This is a list that contains the chords that have special formatting.
4613 For an example of tuning this property, see
4614 @inputfileref{input/regression,chord-name-exceptions.ly}.
4615 @cindex exceptions, chord names.
4618 @cindex @code{majorSevenSymbol}
4619 @item majorSevenSymbol
4620 This property contains the markup object used for the 7th step, when
4621 it is major. Predefined options are @code{whiteTriangleMarkup} and
4622 @code{blackTriangleMarkup}. See
4623 @inputfileref{input/regression,chord-name-major7.ly} for an example.
4625 @cindex @code{chordNameSeparator}
4626 @item chordNameSeparator
4627 Different parts of a chord name are normally separated by a
4628 slash. By setting @code{chordNameSeparator}, you can specify other
4630 @lilypond[quote,fragment,verbatim]
4631 \context ChordNames \chords {
4633 \set chordNameSeparator
4634 = \markup { \typewriter "|" }
4639 @cindex @code{chordRootNamer}
4640 @item chordRootNamer
4641 The root of a chord is usually printed as a letter with an optional
4642 alteration. The transformation from pitch to letter is done by this
4643 function. Special note names (for example, the German ``H'' for a
4644 B-chord) can be produced by storing a new function in this property.
4646 @cindex @code{chordNoteNamer}
4647 @item chordNoteNamer
4648 The default is to print single pitch, e.g. the bass note, using the
4649 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4650 to a specialized function to change this behavior. For example, the
4651 base can be printed in lower case.
4655 The predefined variables @code{\germanChords},
4656 @code{\semiGermanChords} set these variables. The effect is
4659 @lilypondfile[]{chord-names-german.ly}
4661 There are also two other chord name schemes implemented: an alternate
4662 Jazz chord notation, and a systematic scheme called Banter chords. The
4663 alternate jazz notation is also shown on the chart in @ref{Chord name
4664 chart}. Turning on these styles is described in the input file
4665 @inputfileref{input/test,chord-names-jazz.ly}.
4669 @cindex chords, jazz
4674 @cindex @code{\germanChords}
4675 @code{\germanChords},
4676 @cindex @code{\semiGermanChords}
4677 @code{\semiGermanChords}.
4684 Examples: @inputfileref{input/regression,chord-name-major7.ly},
4685 @inputfileref{input/regression,chord-name-exceptions.ly},
4686 @inputfileref{input/test,chord-names-jazz.ly},
4687 @inputfileref{input/test,chords-without-melody.ly}.
4690 Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4695 Chord names are determined solely from the list of pitches. Chord
4696 inversions are not identified, and neither are added bass notes. This
4697 may result in strange chord names when chords are entered with the
4698 @code{< .. >} syntax.
4702 @subsection Improvisation
4704 Improvisation is sometimes denoted with slashed note heads. Such note
4705 heads can be created by adding a @internalsref{Pitch_squash_engraver}
4706 to the @internalsref{Staff} or @internalsref{Voice} context. Then, the
4710 \set squashedPosition = #0
4711 \override NoteHead #'style = #'slash
4715 switches on the slashes.
4717 There are shortcuts @code{\improvisationOn} (and an accompanying
4718 @code{\improvisationOff}) for this command sequence. They are used in
4719 the following example
4721 @lilypond[verbatim,raggedright]
4723 \consists Pitch_squash_engraver
4725 e8 e g a a16(bes)(a8) g \improvisationOn
4728 ~fis2 \improvisationOff a16(bes) a8 g e
4734 @node Orchestral music
4735 @section Orchestral music
4737 @cindex Writing parts
4739 Orchestral music involves some special notation, both in the full
4740 score and the individual parts. This section explains how to tackle
4741 some common problems in orchestral music.
4746 * System start delimiters::
4747 * Aligning to cadenzas::
4750 * Instrument names::
4752 * Instrument transpositions::
4753 * Multi measure rests::
4754 * Automatic part combining::
4756 * Different editions from one source::
4757 * Quoting other voices::
4760 @node System start delimiters
4761 @subsection System start delimiters
4763 Polyphonic scores consist of many staves. These staves can be
4764 constructed in three different ways
4766 @item The group is started with a brace at the left, and bar lines are
4767 connected. This is done with the @internalsref{GrandStaff} context.
4778 @item The group is started with a bracket, and bar lines are connected. This is done with the
4779 @internalsref{StaffGroup} context
4790 @item The group is started with a vertical line. Bar lines are not
4791 connected. This is the default for the score.
4802 @cindex Staff, multiple
4803 @cindex bracket, vertical
4804 @cindex brace, vertical
4811 The bar lines at the start of each system are
4812 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
4813 @internalsref{SystemStartBracket}. Only one of these types is created
4814 in every context, and that type is determined by the property
4815 @code{systemStartDelimiter}.
4817 @node Aligning to cadenzas
4818 @subsection Aligning to cadenzas
4821 In an orchestral context, cadenzas present a special problem:
4822 when constructing a score that includes a cadenza, all other
4823 instruments should skip just as many notes as the length of the
4824 cadenza, otherwise they will start too soon or too late.
4826 A solution to this problem are the functions @code{mmrest-of-length}
4827 and @code{skip-of-length}. These Scheme functions take a piece music
4828 as argument, and generate a @code{\skip} or multi rest, exactly as
4829 long as the piece. The use of @code{mmrest-of-length} is demonstrated
4830 in the following example.
4832 @lilypond[verbatim,raggedright]
4833 cadenza = \relative c' {
4834 c4 d8 << { e f g } \\ { d4. } >>
4839 \new Staff { \cadenza c'4 }
4841 #(ly:export (mmrest-of-length cadenza))
4851 @node Rehearsal marks
4852 @subsection Rehearsal marks
4853 @cindex Rehearsal marks
4855 @cindex @code{\mark}
4857 To print a rehearsal mark, use the @code{\mark} command
4859 @lilypond[quote,fragment,verbatim,relative=1]
4870 (The letter I is skipped in accordance with engraving traditions.)
4872 @c FIXME - should make that tunable.
4874 The mark is incremented automatically if you use @code{\mark
4875 \default}, but you can also use an integer argument to set the mark
4876 manually. The value to use is stored in the property
4877 @code{rehearsalMark}.
4879 The style is defined by the property @code{markFormatter}. It is a
4880 function taking the current mark (an integer) and the current context
4881 as argument. It should return a markup object. In the following
4882 example, @code{markFormatter} is set to a canned procedure. After a
4883 few measures, it is set to function that produces a boxed number.
4885 @lilypond[quote,verbatim,fragment,relative=2]
4886 \set Score.markFormatter = #format-mark-numbers
4889 \set Score.markFormatter
4890 = #(lambda (mark context)
4892 (make-box-markup (number->string mark))))
4897 The file @file{scm/translation-functions.scm} contains the definitions
4898 of @code{format-mark-numbers} (the default format) and
4899 @code{format-mark-letters}. These can be used as inspiration for other
4900 formatting functions.
4903 @cindex coda on bar line
4904 @cindex segno on bar line
4905 @cindex fermata on bar line
4906 @cindex bar lines, symbols on
4908 The @code{\mark} command can also be used to put signs like coda,
4909 segno and fermatas on a bar line. Use @code{\markup} to
4910 to access the appropriate symbol
4912 @lilypond[quote,fragment,verbatim,relative=2]
4913 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4917 In the case of a line break, marks must also be printed at the end of
4918 the line, and not at the beginning. Use the following to force that
4921 \override Score.RehearsalMark
4922 #'break-visibility = #begin-of-line-invisible
4928 @cindex bar lines, putting symbols on
4932 Program reference: @internalsref{MarkEvent}, @internalsref{RehearsalMark}.
4934 Init files: @file{scm/translation-functions.scm} contains the
4935 definition of @code{format-mark-numbers} and
4936 @code{format-mark-letters}. They can be used as inspiration for other
4937 formatting functions.
4939 Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
4941 @inputfileref{input/regression,rehearsal-mark-number.ly}.
4945 @subsection Bar numbers
4949 @cindex measure numbers
4950 @cindex @code{currentBarNumber}
4952 Bar numbers are printed by default at the start of the line. The
4953 number itself is stored in the @code{currentBarNumber} property, which
4954 is normally updated automatically for every measure.
4956 Bar numbers can be typeset at regular intervals instead of at the
4957 beginning of each line. This is illustrated in the following example,
4958 whose source is available as
4959 @inputfileref{input/test,bar-number-regular-interval.ly}
4961 @lilypondfile[quote]{bar-number-regular-interval.ly}
4965 Program reference: @internalsref{BarNumber}.
4967 Examples: @inputfileref{input/test,bar-number-every-five-reset.ly},
4968 and @inputfileref{input/test,bar-number-regular-interval.ly}.
4972 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4973 there is one at the top. To solve this, the
4974 @code{padding} property of @internalsref{BarNumber} can be
4975 used to position the number correctly.
4977 @node Instrument names
4978 @subsection Instrument names
4980 In an orchestral score, instrument names are printed left side of the
4983 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4984 and @internalsref{Staff}.@code{instr}. This will print a string before
4985 the start of the staff. For the first start, @code{instrument} is
4986 used, for the next ones @code{instr} is used.
4988 @lilypond[quote,verbatim,raggedright,relative=1,fragment]
4989 \set Staff.instrument = "Ploink "
4990 \set Staff.instr = "Plk "
4996 You can also use markup texts to construct more complicated instrument
4999 @lilypond[quote,fragment,verbatim,raggedright]
5001 \set Staff.instrument = \markup {
5002 \column < "Clarinetti" { "in B"
5003 \smaller \flat } > }
5008 For longer instrument names, it may be useful to increase the
5009 @code{indent} setting in the @code{\paper} block.
5013 Program reference: @internalsref{InstrumentName}.
5017 When you put a name on a grand staff or piano staff the width of the
5018 brace is not taken into account. You must add extra spaces to the end of
5019 the name to avoid a collision.
5022 @subsection Transpose
5024 @cindex transposition of pitches
5025 @cindex @code{\transpose}
5027 A music expression can be transposed with @code{\transpose}. The
5030 \transpose @var{from} @var{to} @var{musicexpr}
5033 This means that @var{musicexpr} is transposed by the interval between
5034 the pitches @var{from} and @var{to}: any note with pitch @code{from}
5035 is changed to @code{to}.
5038 For example, consider a piece written in the key of D major. If
5039 this piece is a little too low for its performer, it can be
5040 transposed up to E major with
5042 \transpose d e @dots{}
5045 Consider a part written for violin (a C instrument). If
5046 this part is to be played on the A clarinet, the following
5047 transposition will produce the appropriate part
5050 \transpose a c @dots{}
5053 @code{\transpose} distinguishes between enharmonic pitches: both
5054 @code{\transpose c cis} or @code{\transpose c des} will transpose up
5055 half a tone. The first version will print sharps and the second
5056 version will print flats
5058 @lilypond[quote,raggedright,verbatim]
5059 mus = { \key d \major cis d fis g }
5063 \transpose c g' \mus
5064 \transpose c f' \mus
5071 Program reference: @internalsref{TransposedMusic}, and
5072 @internalsref{UntransposableMusic}.
5076 If you want to use both @code{\transpose} and @code{\relative},
5077 you must put @code{\transpose} outside of @code{\relative}, since
5078 @code{\relative} will have no effect music that appears inside a
5081 @node Instrument transpositions
5082 @subsection Instrument transpositions
5084 The key of a transposing instrument can also be specified. This
5085 applies to many wind instruments, for example, clarinets (B-flat, A and
5086 E-flat), horn (F) and trumpet (B-flat, C, D and E-flat).
5089 The transposition is entered after the keyword @code{\transposition}
5092 \transposition bes %% B-flat clarinet
5095 This command sets the property @code{instrumentTransposition}. The value of
5096 this property is used for MIDI output and quotations. It does not
5097 affect how notes are printed in the current staff.
5099 @cindex transposition, MIDI
5100 @cindex transposition, instrument
5103 @node Multi measure rests
5104 @subsection Multi measure rests
5105 @cindex multi measure rests
5106 @cindex Rests, multi measure
5110 Multi measure rests are entered using `@code{R}'. It is specifically
5111 meant for full bar rests and for entering parts: the rest can expand
5112 to fill a score with rests, or it can be printed as a single
5113 multimeasure rest. This expansion is controlled by the property
5114 @code{Score.skipBars}. If this is set to true, empty measures will not
5115 be expanded, and the appropriate number is added automatically
5117 @lilypond[quote,fragment,verbatim]
5118 \time 4/4 r1 | R1 | R1*2
5119 \set Score.skipBars = ##t R1*17 R1*4
5122 The @code{1} in @code{R1} is similar to the duration notation used for
5123 notes. Hence, for time signatures other than 4/4, you must enter other
5124 durations. This can be done with augmentation dots or fractions
5126 @lilypond[quote,fragment,verbatim]
5127 \set Score.skipBars = ##t
5136 An @code{R} spanning a single measure is printed as either a whole rest
5137 or a breve, centered in the measure regardless of the time signature.
5139 @cindex text on multi-measure rest
5140 @cindex script on multi-measure rest
5141 @cindex fermata on multi-measure rest
5143 Texts can be added to multi-measure rests by using the
5144 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
5145 replaced. If you need both texts and the number, you must add the
5146 number by hand. A variable (@code{\fermataMarkup}) is provided for
5150 @lilypond[quote,verbatim,fragment]
5152 R2._\markup { "Ad lib" }
5156 If you want to have a text on the left end of a multi-measure rest,
5157 attach the text to a zero-length skip note, i.e.
5165 @cindex whole rests for a full measure
5169 Program reference: @internalsref{MultiMeasureRestEvent},
5170 @internalsref{MultiMeasureTextEvent},
5171 @internalsref{MultiMeasureRestMusicGroup}, and
5172 @internalsref{MultiMeasureRest}.
5174 The layout object @internalsref{MultiMeasureRestNumber} is for the
5175 default number, and @internalsref{MultiMeasureRestText} for user
5180 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
5181 over multi-measure rests.
5183 @cindex condensing rests
5185 There is no way to automatically condense multiple rests into a single
5186 multimeasure rest. Multi measure rests do not take part in rest
5189 Be careful when entering multimeasure rests followed by whole
5190 notes. The following will enter two notes lasting four measures each
5194 When @code{skipBars} is set, the result will look OK, but the bar
5195 numbering will be off.
5197 @node Automatic part combining
5198 @subsection Automatic part combining
5199 @cindex automatic part combining
5200 @cindex part combiner
5203 Automatic part combining is used to merge two parts of music onto a
5204 staff. It is aimed at typesetting orchestral scores. When the two
5205 parts are identical for a period of time, only one is shown. In
5206 places where the two parts differ, they are typeset as separate
5207 voices, and stem directions are set automatically. Also, solo and
5208 @emph{a due} parts are identified and can be marked.
5210 The syntax for part combining is
5213 \partcombine @var{musicexpr1} @var{musicexpr2}
5218 The following example demonstrates the basic functionality of the part
5219 combiner: putting parts on one staff, and setting stem directions and
5222 @lilypond[quote,verbatim,raggedright,fragment]
5223 \new Staff \partcombine
5224 \relative g' { g g a( b) c c r r }
5225 \relative g' { g g r4 r e e g g }
5228 The first @code{g} appears only once, although it was
5229 specified twice (once in each part). Stem, slur and tie directions are
5230 set automatically, depending whether there is a solo or unisono. The
5231 first part (with context called @code{one}) always gets up stems, and
5232 `solo', while the second (called @code{two}) always gets down stems and
5235 If you just want the merging parts, and not the textual markings, you
5236 may set the property @code{printPartCombineTexts} to false
5238 @lilypond[quote,verbatim,raggedright,fragment,relative=2]
5240 \set Staff.printPartCombineTexts = ##f
5242 \relative g' { g a( b) r }
5243 \relative g' { g r4 r f }
5248 Both arguments to @code{\partcombine} will be interpreted as
5249 @internalsref{Voice} contexts. If using relative octaves,
5250 @code{\relative} should be specified for both music expressions, i.e.
5254 \relative @dots{} @var{musicexpr1}
5255 \relative @dots{} @var{musicexpr2}
5259 A @code{\relative} section that is outside of @code{\partcombine} has
5260 no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
5264 Program reference: @internalsref{PartCombineMusic},
5265 @internalsref{SoloOneEvent}, and
5266 @internalsref{SoloTwoEvent}, and
5267 @internalsref{UnisonoEvent}.
5271 When @code{printPartCombineTexts} is set, when the two voices play the
5272 same notes on and off, the part combiner may typeset @code{a2} more
5273 than once in a measure.
5275 @code{\partcombine} cannot be inside @code{\times}.
5277 @code{\partcombine} cannot be inside @code{\relative}.
5279 Internally, the @code{\partcombine} interprets both arguments as
5280 @code{Voice}s named @code{one} and @code{two}, and then decides when
5281 the parts can be combined. Consequently, if the arguments switch to
5282 differently named @internalsref{Voice} contexts, the events in those
5286 @subsection Hiding staves
5288 @cindex Frenched scores
5289 @cindex Hiding staves
5291 In orchestral scores, staff lines that only have rests are usually
5292 removed. This saves some space. This style is called `French Score'.
5293 For @internalsref{Lyrics},
5294 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
5295 switched on by default. When these line of these contexts turn out
5296 empty after the line-breaking process, they are removed.
5298 For normal staves, a specialized @internalsref{Staff} context is
5299 available, which does the same: staves containing nothing (or only
5300 multi measure rests) are removed. The context definition is stored in
5301 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
5302 in this example disappears in the second line
5305 @lilypond[quote,verbatim]
5307 \context { \RemoveEmptyStaffContext }
5312 \new Staff { e4 f g a \break c1 }
5313 \new Staff { c4 d e f \break R1 }
5318 The first system shows all staves in full. If empty staves should be
5319 removed from the first system too, set @code{remove-first} to false in
5320 @internalsref{RemoveEmptyVerticalGroup}.
5322 Another application is making ossia sections, i.e. alternative
5323 melodies on a separate piece of staff, with help of a Frenched
5324 staff. See @inputfileref{input/test,ossia.ly} for an example.
5327 @node Different editions from one source
5328 @subsection Different editions from one source
5330 The @code{\tag} command marks music expressions with a name. These
5331 tagged expressions can be filtered out later. With this mechanism it
5332 is possible to make different versions of the same music source.
5334 In the following example, we see two versions of a piece of music, one
5335 for the full score, and one with cue notes for the instrumental part
5351 The same can be applied to articulations, texts, etc.: they are
5354 -\tag #@var{your-tag}
5356 to an articulation, for example,
5361 This defines a note with a conditional fingering indication.
5363 By applying the @code{remove-tag} function, tagged expressions can be
5364 filtered. For example,
5368 \applymusic #(remove-tag 'score) @var{the music}
5369 \applymusic #(remove-tag 'part) @var{the music}
5374 @lilypondfile[quote]{tag-filter.ly}
5376 The argument of the @code{\tag} command should be a symbol, or a list
5377 of symbols, for example,
5379 \tag #'(original-part transposed-part) @dots{}
5384 Examples: @inputfileref{input/regression,tag-filter.ly}.
5387 @node Quoting other voices
5388 @subsection Quoting other voices
5390 With quotations, fragments of other parts can be inserted into a part
5391 directly. Before a part can be quoted, it must be marked especially as
5392 quotable. This is done with code @code{\addquote} command.
5395 \addquote @var{name} @var{music}
5400 Here, @var{name} is an identifying string. The @var{music} is any kind
5401 of music. This is an example of @code{\addquote}
5404 \addquote clarinet \relative c' {
5409 This command must be entered at toplevel, i.e. outside any music
5412 After calling @code{\addquote}, the quotation may then be done with
5416 \quote @var{name} @var{duration}
5419 During a part, a piece of music can be quoted with the @code{\quote}
5426 This would cite three quarter notes (@code{2.} is a dotted half note)
5427 of the previously added @code{clarinet} voice.
5429 More precisely, it takes the current time-step of the part being
5430 printed, and extracts the notes at the corresponding point of the
5431 @code{\addquote}d voice. Therefore, the argument to @code{\addquote}
5432 should be the entire part of the voice to be quoted, including any
5433 rests at the beginning.
5435 Quotations take into account the transposition of both source and target
5436 instruments, if they are specified using the @code{\transposition} command.
5438 @lilypond[quote,raggedright,verbatim]
5439 \addquote clarinet \relative c' {
5445 e'8 f'8 \quote clarinet 2
5451 Only the contents of the first @internalsref{Voice} occurring in an
5452 @code{\addquote} command will be considered for quotation, so
5453 @var{music} can not contain @code{\new} and @code{\context Voice}
5454 statements that would switch to a different Voice.
5459 In this manual: @ref{Instrument transpositions}.
5461 Examples: @inputfileref{input/regression,quote.ly}
5462 @inputfileref{input/regression,quote-transposition.ly}
5464 Program reference: @internalsref{QuoteMusic}.
5466 @node Formatting cue notes
5467 @section Formatting cue notes
5470 The previous section deals with inserting notes from another
5471 voice. When making a part, these notes need to be specially formatted.
5472 Here is an example of formatted cue notes
5477 \override Stem #'length = #5.5
5478 \override Beam #'thickness = #0.384
5479 \override Beam #'space-function =
5480 #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult)))
5484 \set Staff.instrument = #"Horn in F"
5485 \set Score.skipBars = ##t
5488 \once \override Staff.MultiMeasureRest #'staff-position = #-6
5495 r8^"Bsn." c'8 f'8[ f'8]
5505 There are a couple of points to take care of:
5509 The multi rest of the original part should be moved up or down during
5512 Cue notes have smaller font sizes.
5514 When cued notes have a clef change relative to the original part, the
5515 clef should be restored after the cue section. This minimizes
5516 confusion for the reader,
5518 When the original part starts, this should be marked with the name of
5519 the instrument, in this case ``Horn.'' Of course, the cue part is
5520 marked with the instrument playing the cue.
5525 @node Ancient notation
5526 @section Ancient notation
5528 @cindex Vaticana, Editio
5529 @cindex Medicaea, Editio
5534 Support for ancient notation includes features for mensural notation
5535 and Gregorian Chant notation. There is also limited support for
5536 figured bass notation.
5538 Many graphical objects provide a @code{style} property, see
5541 @ref{Ancient note heads},
5543 @ref{Ancient accidentals},
5548 @ref{Ancient clefs},
5552 @ref{Ancient time signatures}.
5555 By manipulating such a grob property, the typographical appearance of
5556 the affected graphical objects can be accommodated for a specific
5557 notation flavor without need for introducing any new notational
5560 Other aspects of ancient notation can not that easily be expressed as
5561 in terms of just changing a style property of a graphical object.
5562 Therefore, some notational concepts are introduced specifically for
5577 * Ancient note heads::
5578 * Ancient accidentals::
5582 * Ancient time signatures::
5586 * Vaticana style contexts::
5590 If this all is too much of documentation for you, and you just want to
5591 dive into typesetting without worrying too much about the details on
5592 how to customize a context, you may have a look at the predefined
5593 contexts (see @ref{Vaticana style contexts}). Use them to set up
5594 predefined style-specific voice and staff contexts, and directly go
5595 ahead with the note entry.
5597 @node Ancient note heads
5598 @subsection Ancient note heads
5603 For ancient notation, a note head style other than the @code{default}
5604 style may be chosen. This is accomplished by setting the @code{style}
5605 property of the NoteHead object to @code{baroque}, @code{neomensural}
5606 or @code{mensural}. The @code{baroque} style differs from the
5607 @code{default} style only in using a square shape for @code{\breve}
5608 note heads. The @code{neomensural} style differs from the
5609 @code{baroque} style in that it uses rhomboidal heads for whole notes
5610 and all smaller durations. Stems are centered on the note heads.
5611 This style is in particular useful when transcribing mensural music,
5612 e.g. for the incipit. The @code{mensural} style finally produces note
5613 heads that mimic the look of note heads in historic printings of the
5616 The following example demonstrates the @code{neomensural} style
5618 @lilypond[quote,fragment,raggedright]
5619 \set Score.skipBars = ##T
5620 \override NoteHead #'style = #'neomensural
5621 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
5624 When typesetting a piece in Gregorian Chant notation, the
5625 @internalsref{Gregorian_ligature_engraver} will automatically select
5626 the proper note heads, such there is no need to explicitly set the
5627 note head style. Still, the note head style can be set e.g.@: to
5628 @code{vaticana_punctum} to produce punctum neumes. Similarly, a
5629 @internalsref{Mensural_ligature_engraver} is used to automatically
5630 assemble mensural ligatures. See @ref{Ligatures} for how ligature
5635 Examples: @inputfileref{input/regression,note-head-style.ly} gives an
5636 overview over all available note head styles.
5639 @node Ancient accidentals
5640 @subsection Ancient accidentals
5645 Use the @code{style} property of grob @internalsref{Accidental} to
5646 select ancient accidentals. Supported styles are
5647 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
5649 @lilypond[quote,raggedright,staffsize=26]
5657 { " " \musicglyph #"accidentals-vaticana-1"
5658 " " \musicglyph #"accidentals-vaticana0" }
5662 { " " \musicglyph #"accidentals-medicaea-1" }
5666 { " " \musicglyph #"accidentals-hufnagel-1" }
5670 { " " \musicglyph #"accidentals-mensural-1"
5671 " " \musicglyph #"accidentals-mensural1" }
5680 \remove "Bar_number_engraver"
5684 \remove "Clef_engraver"
5685 \remove "Key_engraver"
5686 \remove "Time_signature_engraver"
5687 \remove "Staff_symbol_engraver"
5688 minimumVerticalExtent = ##f
5694 As shown, not all accidentals are supported by each style. When
5695 trying to access an unsupported accidental, LilyPond will switch to a
5696 different style, as demonstrated in
5697 @inputfileref{input/test,ancient-accidentals.ly}.
5699 Similarly to local accidentals, the style of the key signature can be
5700 controlled by the @code{style} property of the
5701 @internalsref{KeySignature} grob.
5705 In this manual: @ref{Pitches}, @ref{Chromatic alterations} and
5706 @ref{Accidentals} give a general introduction into the use of
5707 accidentals. @ref{Key signature} gives a general introduction into
5708 the use of key signatures.
5710 Program reference: @internalsref{KeySignature}.
5712 Examples: @inputfileref{input/test,ancient-accidentals.ly}.
5715 @subsection Ancient rests
5720 Use the @code{style} property of grob @internalsref{Rest} to select
5721 ancient accidentals. Supported styles are @code{classical},
5722 @code{neomensural} and @code{mensural}. @code{classical} differs
5723 from the @code{default} style only in that the quarter rest looks like
5724 a horizontally mirrored 8th rest. The @code{neomensural} style suits
5725 well for e.g. the incipit of a transcribed mensural piece of music.
5726 The @code{mensural} style finally mimics the appearance of rests as
5727 in historic prints of the 16th century.
5729 The following example demonstrates the @code{neomensural} style
5731 @lilypond[quote,fragment,raggedright]
5732 \override Rest #'style = #'neomensural
5733 \set Score.skipBars = ##t
5734 r\longa r\breve r1 r2 r4 r8 r16
5737 There are no 32th and 64th rests specifically for the mensural or
5738 neo-mensural style. Instead, the rests from the default style will be
5739 taken. See @inputfileref{input/test,rests.ly} for a chart of all
5742 There are no rests in Gregorian Chant notation; instead, it uses
5747 In this manual: @ref{Rests} gives a general introduction into the use of rests.
5751 @subsection Ancient clefs
5756 LilyPond supports a variety of clefs, many of them ancient.
5758 The following table shows all ancient clefs that are supported via the
5759 @code{\clef} command. Some of the clefs use the same glyph, but
5760 differ only with respect to the line they are printed on. In such
5761 cases, a trailing number in the name is used to enumerate these clefs.
5762 Still, you can manually force a clef glyph to be typeset on an
5763 arbitrary line, as described in @ref{Clef}. The note printed to the
5764 right side of each clef in the example column denotes the @code{c'}
5765 with respect to that clef.
5767 @multitable @columnfractions .4 .4 .2
5770 @b{Description} @tab
5771 @b{Supported Clefs} @tab
5775 modern style mensural C clef @tab
5776 @code{neomensural_c1}, @code{neomensural_c2},
5777 @code{neomensural_c3}, @code{neomensural_c4} @tab
5778 @lilypond[fragment,quote,relative=1,notime]
5780 \clef "neomensural_c2" c
5784 petrucci style mensural C clefs, for use on different staff lines
5785 (the examples shows the 2nd staff line C clef).
5795 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5797 \clef "petrucci_c2" c
5801 petrucci style mensural F clef @tab
5802 @code{petrucci_f} @tab
5803 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5805 \clef "petrucci_f" c
5809 petrucci style mensural G clef @tab
5810 @code{petrucci_g} @tab
5811 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5813 \clef "petrucci_g" c
5817 historic style mensural C clef @tab
5818 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
5819 @code{mensural_c4} @tab
5820 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5822 \clef "mensural_c2" c
5826 historic style mensural F clef @tab
5827 @code{mensural_f} @tab
5828 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5830 \clef "mensural_f" c
5834 historic style mensural G clef @tab
5835 @code{mensural_g} @tab
5836 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5838 \clef "mensural_g" c
5842 Editio Vaticana style do clef @tab
5843 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
5844 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5845 \override Staff.StaffSymbol #'line-count = #4
5847 \clef "vaticana_do2" c
5851 Editio Vaticana style fa clef @tab
5852 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
5853 @lilypond[quote,relative=1,notime,indent=0.0\mm,fragment]
5854 \override Staff.StaffSymbol #'line-count = #4
5856 \clef "vaticana_fa2" c
5860 Editio Medicaea style do clef @tab
5861 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
5862 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5863 \override Staff.StaffSymbol #'line-count = #4
5865 \clef "medicaea_do2" c
5869 Editio Medicaea style fa clef @tab
5870 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
5871 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5872 \override Staff.StaffSymbol #'line-count = #4
5874 \clef "medicaea_fa2" c
5878 historic style hufnagel do clef @tab
5879 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
5880 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5881 \override Staff.StaffSymbol #'line-count = #4
5883 \clef "hufnagel_do2" c
5887 historic style hufnagel fa clef @tab
5888 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
5889 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5890 \override Staff.StaffSymbol #'line-count = #4
5892 \clef "hufnagel_fa2" c
5896 historic style hufnagel combined do/fa clef @tab
5897 @code{hufnagel_do_fa} @tab
5898 @lilypond[fragment,quote,relative=1,notime,indent=0.0\mm]
5899 \clef "hufnagel_do_fa" c
5906 @emph{Modern style} means ``as is typeset in contemporary editions of
5907 transcribed mensural music''.
5909 @emph{Petrucci style} means ``inspired by printings published by the
5910 famous engraver Petrucci (1466-1539)''.
5912 @emph{Historic style} means ``as was typeset or written in historic
5913 editions (other than those of Petrucci)''.
5915 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5917 Petrucci used C clefs with differently balanced left-side vertical
5918 beams, depending on which staff line it is printed.
5922 In this manual: see @ref{Clef}.
5926 The mensural g clef is mapped to the Petrucci g clef.
5931 @subsection Ancient flags
5936 Use the @code{flag-style} property of grob @internalsref{Stem} to
5937 select ancient flags. Besides the @code{default} flag style,
5938 only @code{mensural} style is supported
5940 @lilypond[quote,fragment,raggedright,verbatim]
5941 \override Stem #'flag-style = #'mensural
5942 \override Stem #'thickness = #1.0
5943 \override NoteHead #'style = #'mensural
5945 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5946 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5949 Note that the innermost flare of each mensural flag always is
5950 vertically aligned with a staff line. If you do not like this
5951 behavior, you can set the @code{adjust-if-on-staffline} property of
5952 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5953 of the end of each flare is different between notes on staff lines and
5954 notes between staff lines
5956 @lilypond[quote,fragment,raggedright]
5957 \override Stem #'flag-style = #'mensural
5958 \override Stem #'thickness = #1.0
5959 \override Stem #'adjust-if-on-staffline = ##f
5960 \override NoteHead #'style = #'mensural
5962 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5963 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5966 There is no particular flag style for neo-mensural notation. Hence,
5967 when typesetting the incipit of a transcribed piece of mensural
5968 music, the default flag style should be used. There are no flags in
5969 Gregorian Chant notation.
5972 @node Ancient time signatures
5973 @subsection Ancient time signatures
5975 @cindex time signatures
5978 There is limited support for mensural time signatures. The
5979 glyphs are hard-wired to particular time fractions. In other words,
5980 to get a particular mensural signature glyph with the @code{\time n/m}
5981 command, @code{n} and @code{m} have to be chosen according to the
5990 \remove Staff_symbol_engraver
5991 \remove Clef_engraver
5992 \remove Time_signature_engraver
5995 \set Score.timing = ##f
5996 \set Score.barAlways = ##t
5997 s_\markup { "$\\backslash$time 4/4" }
5998 ^\markup { " " \musicglyph #"timesig-neomensural4/4" }
6000 s_\markup { "$\\backslash$time 2/2" }
6001 ^\markup { " " \musicglyph #"timesig-neomensural2/2" }
6003 s_\markup { "$\\backslash$time 6/4" }
6004 ^\markup { " " \musicglyph #"timesig-neomensural6/4" }
6006 s_\markup { "$\\backslash$time 6/8" }
6007 ^\markup { " " \musicglyph #"timesig-neomensural6/8" }
6009 s_\markup { "$\\backslash$time 3/2" }
6010 ^\markup { " " \musicglyph #"timesig-neomensural3/2" }
6012 s_\markup { "$\\backslash$time 3/4" }
6013 ^\markup { " " \musicglyph #"timesig-neomensural3/4" }
6015 s_\markup { "$\\backslash$time 9/4" }
6016 ^\markup { " " \musicglyph #"timesig-neomensural9/4" }
6018 s_\markup { "$\\backslash$time 9/8" }
6019 ^\markup { " " \musicglyph #"timesig-neomensural9/8" }
6021 s_\markup { "$\\backslash$time 4/8" }
6022 ^\markup { " " \musicglyph #"timesig-neomensural4/8" }
6024 s_\markup { "$\\backslash$time 2/4" }
6025 ^\markup { " " \musicglyph #"timesig-neomensural2/4" }
6030 Use the @code{style} property of grob @internalsref{TimeSignature} to
6031 select ancient time signatures. Supported styles are
6032 @code{neomensural} and @code{mensural}. The above table uses the
6033 @code{neomensural} style. This style is appropriate for the
6034 incipit of transcriptions of mensural pieces. The @code{mensural}
6035 style mimics the look of historical printings of the 16th century.
6037 The following examples shows the differences in style,
6038 @lilypond[raggedright]
6041 c1^\markup { \hspace #-2.0 \typewriter default }
6043 \override Staff.TimeSignature #'style = #'numbered
6045 c1^\markup { \hspace #-2.0 \typewriter numbered }
6047 \override Staff.TimeSignature #'style = #'mensural
6049 c1^\markup { \hspace #-2.0 \typewriter mensural }
6051 \override Staff.TimeSignature #'style = #'neomensural
6053 c1^\markup { \hspace #-2.0 \typewriter neomensural }
6054 \override Staff.TimeSignature #'style = #'single-digit
6056 c1^\markup { \hspace #-2.0 \typewriter single-digit }
6062 This manual: @ref{Time signature} gives a general introduction into
6063 the use of time signatures.
6067 Ratios of note durations do not change with the time signature. For
6068 example, the ratio of 1 brevis = 3 semibrevis (tempus perfectum) must
6069 be made by hand, by setting
6072 breveTP = #(ly:make-duration -1 0 3 2)
6078 This sets @code{breveTP} to 3/2 times 2 = 3 times a whole note.
6080 The @code{old6/8alt} symbol (an alternate symbol for 6/8) is not
6081 addressable with @code{\time}. Use a @code{\markup} instead
6084 @subsection Custodes
6089 A @emph{custos} (plural: @emph{custodes}; Latin word for `guard') is a
6090 symbol that appears at the end of a staff. It anticipates the pitch
6091 of the first note(s) of the following line thus helping the performer
6092 to manage line breaks during performance.
6094 Custodes were frequently used in music notation until the 17th
6095 century. Nowadays, they have survived only in a few particular forms
6096 of musical notation such as contemporary editions of Gregorian chant
6097 like the @emph{editio vaticana}. There are different custos glyphs
6098 used in different flavors of notational style.
6100 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
6101 @internalsref{Staff} context when declaring the @code{\paper} block,
6102 as shown in the following example
6108 \consists Custos_engraver
6109 Custos \override #'style = #'mensural
6114 The result looks like this
6116 @lilypond[quote,raggedright]
6120 \override Staff.Custos #'style = #'mensural
6127 \consists Custos_engraver
6133 The custos glyph is selected by the @code{style} property. The styles
6134 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
6135 @code{mensural}. They are demonstrated in the following fragment
6139 \new Lyrics \lyrics {
6142 \typewriter "vaticana"
6143 { " " \musicglyph #"custodes-vaticana-u0" }
6146 \typewriter "medicaea"
6147 { " " \musicglyph #"custodes-medicaea-u0" }
6151 \typewriter "hufnagel"
6152 { " " \musicglyph #"custodes-hufnagel-u0" }
6156 \typewriter "mensural"
6157 { " " \musicglyph #"custodes-mensural-u0" }
6169 Program reference: @internalsref{Custos}.
6171 Examples: @inputfileref{input/regression,custos.ly}.
6175 @subsection Divisiones
6181 A @emph{divisio} (plural: @emph{divisiones}; Latin word for
6182 `division') is a staff context symbol that is used to structure
6183 Gregorian music into phrases and sections. The musical meaning of
6184 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
6185 can be characterized as short, medium and long pause, somewhat like
6186 the breathmarks from @ref{Breath marks}. The @emph{finalis} sign not
6187 only marks the end of a chant, but is also frequently used within a
6188 single antiphonal/responsorial chant to mark the end of each section.
6191 To use divisiones, include the file @code{gregorian-init.ly}. It
6192 contains definitions that you can apply by just inserting
6193 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
6194 and @code{\finalis} at proper places in the input. Some editions use
6195 @emph{virgula} or @emph{caesura} instead of divisio minima.
6196 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
6199 @lilypondfile[quote,raggedright]{divisiones.ly}
6203 @cindex @code{\virgula}
6205 @cindex @code{\caesura}
6207 @cindex @code{\divisioMinima}
6208 @code{\divisioMinima},
6209 @cindex @code{\divisioMaior}
6210 @code{\divisioMaior},
6211 @cindex @code{\divisioMaxima}
6212 @code{\divisioMaxima},
6213 @cindex @code{\finalis}
6218 In this manual: @ref{Breath marks}.
6220 Program reference: @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}.
6222 Examples: @inputfileref{input/test,divisiones.ly}.
6225 @subsection Ligatures
6229 @c TODO: Should double check if I recalled things correctly when I wrote
6230 @c down the following paragraph by heart.
6232 A ligature is a graphical symbol that represents at least two distinct
6233 notes. Ligatures originally appeared in the manuscripts of Gregorian
6234 chant notation to denote ascending or descending sequences of notes.
6236 Ligatures are entered by enclosing them in @code{\[} and @code{\]}.
6237 Some ligature styles may need additional input syntax specific for
6238 this particular type of ligature. By default, the
6239 @internalsref{LigatureBracket} engraver just puts a square bracket
6242 @lilypond[quote,raggedright,verbatim]
6250 To select a specific style of ligatures, a proper ligature engraver
6251 has to be added to the @internalsref{Voice} context, as explained in
6252 the following subsections. Only white mensural ligatures
6253 are supported with certain limitations.
6259 Ligatures need special spacing that has not yet been implemented. As
6260 a result, there is too much space between ligatures most of the time,
6261 and line breaking often is unsatisfactory. Also, lyrics do not
6262 correctly align with ligatures.
6264 Accidentals must not be printed within a ligature, but instead need to
6265 be collected and printed in front of it.
6267 Augmentum dots within ligatures are not handled correctly.
6271 * White mensural ligatures::
6272 * Gregorian square neumes ligatures::
6275 @node White mensural ligatures
6276 @subsubsection White mensural ligatures
6278 @cindex Mensural ligatures
6279 @cindex White mensural ligatures
6281 There is limited support for white mensural ligatures.
6283 To engrave white mensural ligatures, in the paper block the
6284 @internalsref{Mensural_ligature_engraver} has to be put into the
6285 @internalsref{Voice} context, and remove the
6286 @internalsref{Ligature_bracket_engraver}
6292 \remove Ligature_bracket_engraver
6293 \consists Mensural_ligature_engraver
6298 There is no additional input language to describe the shape of a
6299 white mensural ligature. The shape is rather determined solely from
6300 the pitch and duration of the enclosed notes. While this approach may
6301 take a new user a while to get accustomed, it has the great advantage
6302 that the full musical information of the ligature is known internally.
6303 This is not only required for correct MIDI output, but also allows for
6304 automatic transcription of the ligatures.
6309 \set Score.timing = ##f
6310 \set Score.defaultBarType = "empty"
6311 \override NoteHead #'style = #'neomensural
6312 \override Staff.TimeSignature #'style = #'neomensural
6314 \[ g\longa c\breve a\breve f\breve d'\longa \]
6316 \[ e1 f1 a\breve g\longa \]
6318 @lilypond[quote,raggedright]
6321 \set Score.timing = ##f
6322 \set Score.defaultBarType = "empty"
6323 \override NoteHead #'style = #'neomensural
6324 \override Staff.TimeSignature #'style = #'neomensural
6326 \[ g\longa c\breve a\breve f\breve d'\longa \]
6328 \[ e1 f1 a\breve g\longa \]
6333 \remove Ligature_bracket_engraver
6334 \consists Mensural_ligature_engraver
6340 Without replacing @internalsref{Ligature_bracket_engraver} with
6341 @internalsref{Mensural_ligature_engraver}, the same music transcribes
6344 @lilypond[quote,raggedright]
6346 \set Score.timing = ##f
6347 \set Score.defaultBarType = "empty"
6348 \override NoteHead #'style = #'neomensural
6349 \override Staff.TimeSignature #'style = #'neomensural
6351 \[ g\longa c\breve a\breve f\breve d'\longa \]
6353 \[ e1 f1 a\breve g\longa \]
6359 The implementation is experimental. It may output strange warnings,
6360 incorrect results, and might even crash on more complex ligatures.
6362 @node Gregorian square neumes ligatures
6363 @subsubsection Gregorian square neumes ligatures
6365 @cindex Square neumes ligatures
6366 @cindex Gregorian square neumes ligatures
6368 There is limited support for Gregorian square neumes notation
6369 (following the style of the Editio Vaticana). Core ligatures can
6370 already be typeset, but essential issues for serious typesetting are
6371 still lacking, such as (among others) horizontal alignment of multiple
6372 ligatures, lyrics alignment and proper accidentals handling.
6375 The following table contains the extended neumes table of the 2nd
6376 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
6377 1983 by the monks of Solesmes.
6379 @multitable @columnfractions .4 .2 .2 .2
6382 @b{Neuma aut@*Neumarum Elementa} @tab
6383 @b{Figurae@*Rectae} @tab
6384 @b{Figurae@*Liquescentes Auctae} @tab
6385 @b{Figurae@*Liquescentes Deminutae}
6387 @c TODO: \paper block is identical in all of the below examples.
6388 @c Therefore, it should somehow be included rather than duplicated all
6391 @c why not make identifiers in ly/engraver-init.ly? --hwn
6393 @c Because it's just used to typeset plain notes without
6394 @c a staff for demonstration purposes rather than something
6395 @c special of Gregorian chant notation. --jr
6400 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.5\cm]
6401 \include "gregorian-init.ly"
6406 \noBreak s^\markup {"a"} \noBreak
6408 % Punctum Inclinatum
6410 \noBreak s^\markup {"b"}
6412 \paper { \neumeDemoPaper }}
6415 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.5\cm]
6416 \include "gregorian-init.ly"
6419 % Punctum Auctum Ascendens
6420 \[ \auctum \ascendens b \]
6421 \noBreak s^\markup {"c"} \noBreak
6423 % Punctum Auctum Descendens
6424 \[ \auctum \descendens b \]
6425 \noBreak s^\markup {"d"} \noBreak
6427 % Punctum Inclinatum Auctum
6428 \[ \inclinatum \auctum b \]
6429 \noBreak s^\markup {"e"}
6431 \paper { \neumeDemoPaper }}
6434 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6435 \include "gregorian-init.ly"
6438 % Punctum Inclinatum Parvum
6439 \[ \inclinatum \deminutum b \]
6440 \noBreak s^\markup {"f"}
6442 \paper { \neumeDemoPaper }}
6448 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6449 \include "gregorian-init.ly"
6454 \noBreak s^\markup {"g"}
6456 \paper { \neumeDemoPaper }}
6462 @code{3. Apostropha vel Stropha}
6464 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6465 \include "gregorian-init.ly"
6470 \noBreak s^\markup {"h"}
6472 \paper { \neumeDemoPaper }}
6475 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6476 \include "gregorian-init.ly"
6480 \[ \stropha \auctum b \]
6481 \noBreak s^\markup {"i"}
6483 \paper { \neumeDemoPaper }}
6490 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6491 \include "gregorian-init.ly"
6496 \noBreak s^\markup {"j"}
6498 \paper { \neumeDemoPaper }}
6504 @code{5. Clivis vel Flexa}
6506 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6507 \include "gregorian-init.ly"
6514 \paper { \neumeDemoPaper }}
6517 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6518 \include "gregorian-init.ly"
6521 % Clivis Aucta Descendens
6522 \[ b \flexa \auctum \descendens g \]
6523 \noBreak s^\markup {"l"} \noBreak
6525 % Clivis Aucta Ascendens
6526 \[ b \flexa \auctum \ascendens g \]
6527 \noBreak s^\markup {"m"}
6529 \paper { \neumeDemoPaper }}
6532 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6533 \include "gregorian-init.ly"
6537 \[ b \flexa \deminutum g \]
6540 \paper { \neumeDemoPaper }}
6544 @code{6. Podatus vel Pes}
6546 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6547 \include "gregorian-init.ly"
6554 \paper { \neumeDemoPaper }}
6557 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=2.0\cm]
6558 \include "gregorian-init.ly"
6561 % Pes Auctus Descendens
6562 \[ g \pes \auctum \descendens b \]
6563 \noBreak s^\markup {"p"} \noBreak
6565 % Pes Auctus Ascendens
6566 \[ g \pes \auctum \ascendens b \]
6567 \noBreak s^\markup {"q"}
6569 \paper { \neumeDemoPaper }}
6572 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6573 \include "gregorian-init.ly"
6577 \[ g \pes \deminutum b \]
6580 \paper { \neumeDemoPaper }}
6584 @code{7. Pes Quassus}
6586 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6587 \include "gregorian-init.ly"
6591 \[ \oriscus g \pes \virga b \]
6594 \paper { \neumeDemoPaper }}
6597 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6598 \include "gregorian-init.ly"
6601 % Pes Quassus Auctus Descendens
6602 \[ \oriscus g \pes \auctum \descendens b \]
6605 \paper { \neumeDemoPaper }}
6610 @code{8. Quilisma Pes}
6612 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6613 \include "gregorian-init.ly"
6617 \[ \quilisma g \pes b \]
6620 \paper { \neumeDemoPaper }}
6623 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6624 \include "gregorian-init.ly"
6627 % Quilisma Pes Auctus Descendens
6628 \[ \quilisma g \pes \auctum \descendens b \]
6631 \paper { \neumeDemoPaper }}
6636 @code{9. Podatus Initio Debilis}
6638 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6639 \include "gregorian-init.ly"
6642 % Pes Initio Debilis
6643 \[ \deminutum g \pes b \]
6646 \paper { \neumeDemoPaper }}
6649 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6650 \include "gregorian-init.ly"
6653 % Pes Auctus Descendens Initio Debilis
6654 \[ \deminutum g \pes \auctum \descendens b \]
6657 \paper { \neumeDemoPaper }}
6664 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6665 \include "gregorian-init.ly"
6669 \[ a \pes b \flexa g \]
6672 \paper { \neumeDemoPaper }}
6675 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6676 \include "gregorian-init.ly"
6679 % Torculus Auctus Descendens
6680 \[ a \pes b \flexa \auctum \descendens g \]
6683 \paper { \neumeDemoPaper }}
6686 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6687 \include "gregorian-init.ly"
6690 % Torculus Deminutus
6691 \[ a \pes b \flexa \deminutum g \]
6694 \paper { \neumeDemoPaper }}
6698 @code{11. Torculus Initio Debilis}
6700 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6701 \include "gregorian-init.ly"
6704 % Torculus Initio Debilis
6705 \[ \deminutum a \pes b \flexa g \]
6708 \paper { \neumeDemoPaper }}
6711 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6712 \include "gregorian-init.ly"
6715 % Torculus Auctus Descendens Initio Debilis
6716 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6719 \paper { \neumeDemoPaper }}
6722 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6723 \include "gregorian-init.ly"
6726 % Torculus Deminutus Initio Debilis
6727 \[ \deminutum a \pes b \flexa \deminutum g \]
6730 \paper { \neumeDemoPaper }}
6734 @code{12. Porrectus}
6736 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6737 \include "gregorian-init.ly"
6741 \[ a \flexa g \pes b \]
6744 \paper { \neumeDemoPaper }}
6747 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6748 \include "gregorian-init.ly"
6751 % Porrectus Auctus Descendens
6752 \[ a \flexa g \pes \auctum \descendens b \]
6755 \paper { \neumeDemoPaper }}
6758 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6759 \include "gregorian-init.ly"
6762 % Porrectus Deminutus
6763 \[ a \flexa g \pes \deminutum b \]
6766 \paper { \neumeDemoPaper }}
6772 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6773 \include "gregorian-init.ly"
6777 \[ \virga b \inclinatum a \inclinatum g \]
6780 \paper { \neumeDemoPaper }
6784 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6785 \include "gregorian-init.ly"
6789 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6792 \paper { \neumeDemoPaper }}
6795 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6796 \include "gregorian-init.ly"
6799 % Climacus Deminutus
6800 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6803 \paper { \neumeDemoPaper }}
6807 @code{14. Scandicus}
6809 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6810 \include "gregorian-init.ly"
6814 \[ g \pes a \virga b \]
6817 \paper { \neumeDemoPaper }}
6820 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6821 \include "gregorian-init.ly"
6824 % Scandicus Auctus Descendens
6825 \[ g \pes a \pes \auctum \descendens b \]
6828 \paper { \neumeDemoPaper }}
6831 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6832 \include "gregorian-init.ly"
6835 % Scandicus Deminutus
6836 \[ g \pes a \pes \deminutum b \]
6839 \paper { \neumeDemoPaper }}
6845 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6846 \include "gregorian-init.ly"
6850 \[ g \oriscus a \pes \virga b \]
6853 \paper { \neumeDemoPaper }}
6856 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6857 \include "gregorian-init.ly"
6860 % Salicus Auctus Descendens
6861 \[ g \oriscus a \pes \auctum \descendens b \]
6864 \paper { \neumeDemoPaper }}
6871 @lilypond[quote,noindent,staffsize=26,nofragment,linewidth=1.0\cm]
6872 \include "gregorian-init.ly"
6876 \[ \stropha b \stropha b \stropha a \]
6879 \paper { \neumeDemoPaper }
6888 Unlike most other neumes notation systems, the input language for
6889 neumes does not reflect the typographical appearance, but is designed
6890 to focus on musical meaning. For example, @code{\[ a \pes b
6891 \flexa g \]} produces a Torculus consisting of three Punctum heads,
6892 while @code{\[ a \flexa g \pes b \]} produces a Porrectus with a
6893 curved flexa shape and only a single Punctum head. There is no
6894 command to explicitly typeset the curved flexa shape; the decision of
6895 when to typeset a curved flexa shape is based on the musical
6896 input. The idea of this approach is to separate the musical aspects
6897 of the input from the notation style of the output. This way, the
6898 same input can be reused to typeset the same music in a different
6899 style of Gregorian chant notation.
6901 The following table shows the code fragments that produce the
6902 ligatures in the above neumes table. The letter in the first column
6903 in each line of the below table indicates to which ligature in the
6904 above table it refers. The second column gives the name of the
6905 ligature. The third column shows the code fragment that produces this
6906 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6908 @multitable @columnfractions .1 .4 .5
6922 Punctum Inclinatum @tab
6923 @code{\[ \inclinatum b \]}
6927 Punctum Auctum Ascendens @tab
6928 @code{\[ \auctum \ascendens b \]}
6932 Punctum Auctum Descendens @tab
6933 @code{\[ \auctum \descendens b \]}
6937 Punctum Inclinatum Auctum @tab
6938 @code{\[ \inclinatum \auctum b \]}
6942 Punctum Inclinatum Parvum @tab
6943 @code{\[ \inclinatum \deminutum b \]}
6948 @code{\[ \virga b \]}
6953 @code{\[ \stropha b \]}
6958 @code{\[ \stropha \auctum b \]}
6963 @code{\[ \oriscus b \]}
6967 Clivis vel Flexa @tab
6968 @code{\[ b \flexa g \]}
6972 Clivis Aucta Descendens @tab
6973 @code{\[ b \flexa \auctum \descendens g \]}
6977 Clivis Aucta Ascendens @tab
6978 @code{\[ b \flexa \auctum \ascendens g \]}
6983 @code{\[ b \flexa \deminutum g \]}
6987 Podatus vel Pes @tab
6988 @code{\[ g \pes b \]}
6992 Pes Auctus Descendens @tab
6993 @code{\[ g \pes \auctum \descendens b \]}
6997 Pes Auctus Ascendens @tab
6998 @code{\[ g \pes \auctum \ascendens b \]}
7003 @code{\[ g \pes \deminutum b \]}
7008 @code{\[ \oriscus g \pes \virga b \]}
7012 Pes Quassus Auctus Descendens @tab
7013 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7018 @code{\[ \quilisma g \pes b \]}
7022 Quilisma Pes Auctus Descendens @tab
7023 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7027 Pes Initio Debilis @tab
7028 @code{\[ \deminutum g \pes b \]}
7032 Pes Auctus Descendens Initio Debilis @tab
7033 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7038 @code{\[ a \pes b \flexa g \]}
7042 Torculus Auctus Descendens @tab
7043 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7047 Torculus Deminutus @tab
7048 @code{\[ a \pes b \flexa \deminutum g \]}
7052 Torculus Initio Debilis @tab
7053 @code{\[ \deminutum a \pes b \flexa g \]}
7057 Torculus Auctus Descendens Initio Debilis @tab
7058 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7062 Torculus Deminutus Initio Debilis @tab
7063 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7068 @code{\[ a \flexa g \pes b \]}
7072 Porrectus Auctus Descendens @tab
7073 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7077 Porrectus Deminutus @tab
7078 @code{\[ a \flexa g \pes \deminutum b \]}
7083 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7087 Climacus Auctus @tab
7088 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7092 Climacus Deminutus @tab
7093 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7098 @code{\[ g \pes a \virga b \]}
7102 Scandicus Auctus Descendens @tab
7103 @code{\[ g \pes a \pes \auctum \descendens b \]}
7107 Scandicus Deminutus @tab
7108 @code{\[ g \pes a \pes \deminutum b \]}
7113 @code{\[ g \oriscus a \pes \virga b \]}
7117 Salicus Auctus Descendens @tab
7118 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7123 @code{\[ \stropha b \stropha b \stropha a \]}
7129 The following head prefixes are supported
7131 @cindex @code{\virga}
7133 @cindex @code{\stropha}
7135 @cindex @code{\inclinatum}
7137 @cindex @code{\auctum}
7139 @cindex @code{\descendens}
7141 @cindex @code{\ascendens}
7143 @cindex @code{\oriscus}
7145 @cindex @code{\quilisma}
7147 @cindex @code{\deminutum}
7150 Head prefixes can be accumulated, though restrictions apply. For
7151 example, either @code{\descendens} or @code{\ascendens} can be applied
7152 to a head, but not both to the same head.
7155 @cindex @code{\flexa}
7156 Two adjacent heads can be tied together with the @code{\pes} and
7157 @code{\flexa} infix commands for a rising and falling line of melody,
7162 @node Vaticana style contexts
7163 @subsection Vaticana style contexts
7165 @cindex VaticanaVoiceContext
7166 @cindex VaticanaStaffContext
7168 The predefined @code{VaticanaVoiceContext} and
7169 @code{VaticanaStaffContext} can be used to engrave a piece of
7170 Gregorian Chant in the style of the Editio Vaticana. These contexts
7171 initialize all relevant context properties and grob properties to
7172 proper values, so you can immediately go ahead entering the chant, as
7173 the following excerpt demonstrates
7175 @lilypond[quote,raggedright,verbatim,noindent]
7176 \include "gregorian-init.ly"
7179 \context VaticanaVoice = "cantus" {
7180 \override Score.BarNumber #'transparent = ##t
7182 \[ c'\melisma c' \flexa a \]
7183 \[ a \flexa \deminutum g\melismaEnd \]
7185 \[ f\melisma \pes a c' c' \pes d'\melismaEnd \]
7186 c' \divisioMinima \break
7187 \[ c'\melisma c' \flexa a \]
7188 \[ a \flexa \deminutum g\melismaEnd \] f \divisioMinima
7191 \lyricsto "cantus" \new Lyrics {
7192 San- ctus, San- ctus, San- ctus
7199 @subsection Figured bass
7201 @cindex Basso continuo
7203 @c TODO: musicological blurb about FB
7206 LilyPond has limited support for figured bass
7208 @lilypond[quote,verbatim,fragment]
7210 \context Voice { \clef bass dis4 c d ais }
7211 \context FiguredBass \figures {
7212 < 6 >4 < 7 >8 < 6+ [_!] >
7218 The support for figured bass consists of two parts: there is an input
7219 mode, introduced by @code{\figures}, where you can enter bass figures
7220 as numbers, and there is a context called @internalsref{FiguredBass} that
7221 takes care of making @internalsref{BassFigure} objects.
7223 In figures input mode, a group of bass figures is delimited by
7224 @code{<} and @code{>}. The duration is entered after the @code{>}
7228 @lilypond[quote,fragment]
7229 \context FiguredBass
7233 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7239 @lilypond[quote,fragment]
7240 \context FiguredBass
7241 \figures { <4- 6+ 7!> }
7244 Spaces or dashes may be inserted by using @code{_}. Brackets are
7245 introduced with @code{[} and @code{]}
7250 @lilypond[quote,fragment]
7251 \context FiguredBass
7252 \figures { < [4 6] 8 [_! 12]> }
7255 Although the support for figured bass may superficially resemble chord
7256 support, it works much simpler. The @code{\figures} mode simply
7257 stores the numbers , and @internalsref{FiguredBass} context prints
7258 them as entered. There is no conversion to pitches, and no
7259 realizations of the bass are played in the MIDI file.
7261 Internally, the code produces markup texts. You can use any of the
7262 markup text properties to override formatting. For example, the
7263 vertical spacing of the figures may be set with @code{baseline-skip}.
7267 Program reference: @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7268 and @internalsref{FiguredBass} context.
7272 Slash notation for alterations is not supported.
7274 @node Contemporary notation
7275 @section Contemporary notation
7277 In the 20th century, composers have greatly expanded the musical
7278 vocabulary. With this expansion, many innovations in musical notation
7279 have been tried. The book ``Music Notation in the 20th century'' by
7280 Kurt Stone gives a comprehensive overview (see @ref{Literature
7281 list}). In general, the use of new, innovative notation makes a piece
7282 harder to understand and perform and its use should therefore be
7283 avoided. For this reason, support for contemporary notation in
7284 LilyPond is limited.
7288 * Polymetric notation::
7290 * Special fermatas::
7294 @node Polymetric notation
7295 @subsection Polymetric notation
7297 Double time signatures are not supported explicitly, but they can be
7298 faked. In the next example, the markup for the time signature is
7299 created with a markup text. This markup text is inserted in the
7300 @internalsref{TimeSignature} grob.
7302 @lilypond[verbatim,raggedright]
7308 \musicglyph #"scripts-stopped"
7309 \bracket \column < "5" "8" >
7314 \override Staff.TimeSignature #'print-function = #Text_item::print
7315 \override Staff.TimeSignature #'text = #tsMarkup
7317 c'2 \bar ":" c'4 c'4.
7321 Each staff can also have its own time signature. This is done by
7322 moving the @internalsref{Timing_engraver} to @internalsref{Staff}
7329 \remove "Timing_engraver"
7333 \consists "Timing_engraver"
7339 Now, each staff has its own time signature.
7353 c4. c8 c c c4. c8 c c
7358 @lilypond[raggedright]
7362 \remove "Timing_engraver"
7366 \consists "Timing_engraver"
7382 c4. c8 c c c4. c8 c c
7388 A different form of polymetric notation is where note lengths have
7389 different values across staves.
7391 This notation can be created by setting a common time signature for
7392 each staff but replacing it manually using
7393 @code{timeSignatureFraction} to the desired fraction. Then the printed
7394 durations in each staff are scaled to the common time signature.
7395 The latter is done with @code{\compressmusic}, which is similar to
7396 @code{\times}, but does not create a tuplet bracket.
7399 In this example, music with the time signatures of 3/4, 9/8 and 10/8 are
7400 used in parallel. In the second staff, shown durations are multiplied by
7401 2/3, so that 2/3 * 9/8 = 3/4, and in the third staff, shown durations are
7402 multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
7404 @lilypond[raggedright,verbatim]
7412 \set Staff.timeSignatureFraction = #'(9 . 8)
7413 \compressmusic #'(2 . 3)
7414 \repeat unfold 6 { c8[ c c] }
7418 \set Staff.timeSignatureFraction = #'(10 . 8)
7419 \compressmusic #'(3 . 5)
7420 { \repeat unfold 2 { c8[ c c] }
7421 \repeat unfold 2 { c8[ c] }
7422 | c4. c4. \times 2/3 { c8 c c } c4 }
7432 When using different time signatures in parallel, the spacing is
7433 aligned vertically, but bar lines distort the regular spacing.
7438 @subsection Clusters
7442 A cluster indicates a continuous range of pitches to be played. They
7443 can be denoted as the envelope of a set of notes. They are entered by
7444 applying the function @code{makeClusters} to a sequence of
7447 @lilypond[quote,verbatim]
7449 \makeClusters { <c e > <b f'> }
7452 The following example (from
7453 @inputfileref{input/regression,cluster.ly}) shows what the result
7456 @lilypondfile[quote]{cluster.ly}
7458 Ordinary notes and clusters can be put together in the same staff,
7459 even simultaneously. In such a case no attempt is made to
7460 automatically avoid collisions between ordinary notes and clusters.
7464 Program reference: @internalsref{ClusterSpanner},
7465 @internalsref{ClusterSpannerBeacon},
7466 @internalsref{Cluster_spanner_engraver}, and
7467 @internalsref{ClusterNoteEvent}.
7469 Examples: @inputfileref{input/regression,cluster.ly}.
7473 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7474 accurately. Use @code{<g a>8 <e a>8} instead.
7478 @node Special fermatas
7479 @subsection Special Fermatas
7481 @cindex fermatas, special
7483 In contemporary music notation, special fermata symbols denote breaks
7484 of differing lengths. The following fermatas are supported
7486 @lilypond[quote,raggedright]
7508 \context Lyrics \lyrics {
7509 \override LyricText #'font-family = #'typewriter
7510 "shortfermata" "fermata" "longfermata" "verylongfermata"
7515 See @ref{Articulations} for general instructions how to apply scripts
7516 such as fermatas to notes.
7518 @node Feathered beams
7519 @subsection Feathered beams
7521 Feathered beams are not supported natively, but they can be faked by
7522 forcing two beams to overlap. Here is an example,
7524 @lilypond[raggedright]
7525 \relative \new Staff <<
7529 \once \override Voice.Beam #'positions = #'(0 . 0.5)
7534 \once \override Voice.Beam #'positions = #'(0 . -0.5)
7542 @node Educational use
7543 @section Educational use
7547 * Blank music paper::
7548 * Notation for excercises::
7549 * Easy Notation note heads::
7553 @subsection Balloon help
7555 Elements of notation can be marked and named with the help of a square
7556 balloon. The primary purpose of this feature is to explain notation.
7558 The following example demonstrates its use.
7560 @lilypond[quote,verbatim,fragment,raggedright,relative=2]
7563 #(add-balloon-text 'NoteHead "heads, or tails?"
7569 The function @code{add-balloon-text} takes the name of a grob, the
7570 label to print, and the position where to put the label relative to
7571 the object. In the above example, the text ``heads or tails?'' ends
7572 3 spaces below and 1 space to the right of the marked head.
7575 @cindex notation, explaining
7579 Program reference: @internalsref{text-balloon-interface}.
7581 Examples: @inputfileref{input/regression,balloon.ly}.
7586 @node Blank music paper
7587 @subsection Blank music paper
7589 A blank music paper can be produced also by using invisible notes, and
7590 removing @code{Bar_number_engraver}.
7595 \repeat unfold 2 % Change this for more lines.
7600 \override TimeSignature #'transparent = ##t
7601 defaultBarType = #""
7602 \remove Bar_number_engraver
7604 \context Staff \emptymusic
7605 \context TabStaff \emptymusic
7610 @node Notation for excercises
7611 @subsection Notation for excercises
7615 Invisible (or transparent) notes can be useful, when weird tricks are
7616 needed; especially, a slur cannot be attach to a rest or spacer rest.
7620 blanknotes = { \override NoteHead #'transparent = ##t
7621 \override Stem #'transparent = ##t }
7622 unblanknotes = { \revert NoteHead #'transparent
7623 \revert Stem #'transparent }
7628 \blanknotes e4 f4 \unblanknotes
7634 @node Easy Notation note heads
7635 @subsection Easy Notation note heads
7637 @cindex easy notation
7640 The `easy play' note head includes a note name inside the head. It is
7641 used in music for beginners
7643 @lilypond[quote,raggedright,verbatim,fragment,staffsize=26]
7648 The command @code{\setEasyHeads} overrides settings for the
7649 @internalsref{NoteHead} object. To make the letters readable, it has
7650 to be printed in a large font size. To print with a larger font, see
7651 @ref{Setting global staff size}.
7655 @cindex @code{\setEasyHeads}
7656 @code{\setEasyHeads}