3 @c A menu is needed before every deeper *section nesting of @node's; run
4 @c M-x texinfo-all-menus-update
5 @c to automagically fill in these menus before saving changes
7 @c FIXME: singular vs. plural: Beams/Beam
11 @chapter Notation manual
14 <!--- @@WEB-TITLE@@=Reference Manual --->
20 * Easier music entry::
27 * Fingering instructions::
36 * Contemporary notation::
42 @c FIXME: Note entry vs Music entry at top level menu is confusing.
53 * Chromatic alterations::
59 * Automatic note splitting ::
61 * Easy Notation note heads ::
69 A note is printed by specifying its pitch and then its duration.
70 @footnote{Notes constitute the most basic elements of LilyPond input,
71 but they do not form valid input on their own without a @code{\score}
72 block. However, for the sake of brevity and simplicity we will
73 generally omit @code{\score} blocks and @code{\paper} declarations in
76 @lilypond[fragment,verbatim]
85 @cindex Note specification
87 @cindex entering notes
89 The most common syntax for pitch entry is used in @code{\chords} and
90 @code{\notes} mode. In Note and Chord mode, pitches may be designated
91 by names. The notes are specified by the letters @code{a} through
92 @code{g}, while the octave is formed with notes ranging from @code{c}
93 to @code{b}. The pitch @code{c} is an octave below middle C and the
94 letters span the octave above that C.
96 @lilypond[fragment,verbatim]
98 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
101 @cindex note names, Dutch
103 A sharp is formed by adding @code{-is} to the end of a pitch
104 name and a flat is formed by adding @code{-es}. Double sharps and
105 double flats are obtained by adding @code{-isis} or @code{-eses}.
107 These default names are the Dutch note names. In Dutch, @code{aes} is
108 contracted to @code{as} in Dutch, but both forms are
109 accepted. Similarly, both @code{es} and @code{ees} are accepted.
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
122 deutsch.ly c d e f g a b h -is -es
123 norsk.ly c d e f g a b h -iss/-is -ess/-es
124 svenska.ly c d e f g a b h -iss -ess
125 italiano.ly do re mi fa sol la sib si -d -b
126 catalan.ly do re mi fa sol la sib si -d/-s -b
127 espanol.ly do re mi fa sol la sib si -s -b
136 The optional octave specification takes the form of a series of
137 single quote (`@code{'}') characters or a series of comma
138 (`@code{,}') characters. Each @code{'} raises the pitch by one
139 octave; each @code{,} lowers the pitch by an octave.
141 @lilypond[fragment,verbatim,center]
142 c' c'' es' g' as' gisis' ais'
146 The verbose syntax for pitch specification is
148 @cindex @code{\pitch}
150 \pitch @var{scmpitch}
153 where @var{scmpitch} is a Scheme object of the @code{Pitch} type.
158 @internalsref{NoteEvent}, @internalsref{NoteHead}
160 @node Chromatic alterations
161 @subsection Chromatic alterations
163 Normally accidentals are printed automatically, but you may also
164 print them manually. A reminder accidental
165 @cindex reminder accidental
167 can be forced by adding an exclamation mark @code{!}
168 after the pitch. A cautionary accidental
169 @cindex cautionary accidental
170 @cindex parenthesized accidental
171 (an accidental within parentheses) can be obtained by adding the
172 question mark `@code{?}' after the pitch.
174 @lilypond[fragment,verbatim]
175 cis' cis' cis'! cis'?
179 The automatic production of accidentals can be tuned in many
180 ways. For more information, refer to @ref{Accidentals}.
185 A chord is formed by a enclosing a set of pitches in @code{<<} and
188 TODO: accidental overides?
197 Rests are entered like notes, with the note name @code{r}.
199 @lilypond[singleline,verbatim]
203 Whole bar rests, centered in middle of the bar, are specified using
204 @code{R} (capital R); see @ref{Multi measure rests}. See also
207 For some music, you may wish to explicitly specify the rest's vertical
208 position. This can be achieved by entering a note with the @code{\rest}
209 keyword appended. Rest collision testing will leave these rests alone.
211 @lilypond[singleline,verbatim]
217 @internalsref{RestEvent}, @internalsref{Rest}
224 @cindex Invisible rest
227 An invisible rest (also called a `skip') can be entered like a note
228 with note name `@code{s}' or with @code{\skip @var{duration}}:
230 @lilypond[singleline,verbatim]
234 The @code{s} syntax is only available in Note mode and Chord
235 mode. In other situations, you should use the @code{\skip} command,
236 which will work outside of those two modes:
238 @lilypond[singleline,verbatim]
241 { \time 4/8 \skip 2 \time 4/4 }
242 \notes\relative c'' { a2 a1 }
247 The skip command is merely an empty musical placeholder. It does not
248 produce any output, not even transparent output.
252 @internalsref{SkipEvent}
257 @subsection Durations
261 @cindex @code{\duration}
264 In Note, Chord, and Lyrics mode, durations are designated by numbers
265 and dots: durations are entered as their reciprocal values. For example,
266 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
267 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
268 longer than a whole you must use variables.
270 @c FIXME: what is an identifier? I do not think it's been introduced yet.
271 @c and if it has, I obviously skipped that part. - Graham
275 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
277 r1 r2 r4 r8 r16 r32 r64 r64
282 \notes \relative c'' {
284 a1 a2 a4 a8 a16 a32 a64 a64
286 r1 r2 r4 r8 r16 r32 r64 r64
291 \remove "Clef_engraver"
292 \remove "Staff_symbol_engraver"
293 \remove "Time_signature_engraver"
294 \consists "Pitch_squash_engraver"
301 If the duration is omitted then it is set to the previously entered
302 duration. Default for the first note is a quarter note. The duration
303 can be followed by dots (`@code{.}') in order to obtain dotted note
307 @lilypond[fragment,verbatim,center]
308 a' b' c''8 b' a'4 a'4. b'4.. c'8.
313 You can alter the length of duration by a fraction @var{N/M}
314 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
315 will not affect the appearance of the notes or rests produced.
317 @lilypond[fragment,verbatim]
318 a'2*2 b'4*2 a'8*4 a'4*3/2 gis'4*3/2 a'4*3/2 a'4
321 Durations can also be produced through GUILE extension mechanism.
322 @lilypond[verbatim,fragment]
323 c'\duration #(ly:make-duration 2 1)
329 Dot placement for chords is not perfect. In some cases, dots overlap:
342 A tie connects two adjacent note heads of the same pitch. The tie in
343 effect extends the length of a note. Ties should not be confused with
344 slurs, which indicate articulation, or phrasing slurs, which indicate
345 musical phrasing. A tie is entered using the tilde symbol `@code{~}'.
347 @lilypond[fragment,verbatim,center]
348 e' ~ e' <<c' e' g'>> ~ <<c' e' g'>>
351 When a tie is applied to a chord, all note heads whose pitches match
352 are connected. When no note heads match, no ties will be created.
354 In its meaning a tie is just a way of extending a note duration, similar
355 to the augmentation dot: the following example are two ways of notating
356 exactly the same concept.
358 @lilypond[fragment, singleline,quote]
359 \time 3/4 c'2. c'2 ~ c'4
361 If you need to tie notes over bars, it may be easier to use automatic
362 note splitting (See @ref{Automatic note splitting}).
367 @internalsref{TieEvent}, @internalsref{NewTieEvent},
368 @internalsref{Tie}, @ref{Automatic note splitting}.
371 ties created for a chord, see @inputfileref{input/test,tie-sparse.ly}.
375 Tieing only a subset of the note heads of a pair of chords is not
376 supported in a simple way. It can be achieved by moving the
377 tie-engraver into the @internalsref{Thread} context and turning on and
378 off ties per @internalsref{Thread}.
380 Switching staves when a tie is active, will produce a horizontal tie
383 Formatting of ties is a difficult subject. The results are often not
388 @node Automatic note splitting
389 @subsection Automatic note splitting
390 @c FIXME: This subsection does not belong in @ref{Note entry}.
392 Long notes can be converted automatically to tied notes. This is done
393 by replacing the @internalsref{Note_heads_engraver} by the
394 @internalsref{Completion_heads_engraver}.
397 \paper @{ \translator @{
399 \remove "Note_heads_engraver"
400 \consists "Completion_heads_engraver"
407 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
414 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
416 \paper { \translator {
418 \remove "Note_heads_engraver"
419 \consists "Completion_heads_engraver"
424 This engraver splits all running notes at the bar line, and inserts
425 ties. One of its uses is to debug complex scores: if the measures are
426 not entirely filled, then the ties exactly show how much each measure
431 Not all durations (especially those containing tuplets) can be
432 represented exactly; the engraver will not insert tuplets.
439 @cindex @code{\times}
441 Tuplets are made out of a music expression by multiplying all durations
444 @cindex @code{\times}
446 \times @var{fraction} @var{musicexpr}
449 The duration of @var{musicexpr} will be multiplied by the fraction.
450 In the sheet music, the fraction's denominator will be printed over
451 the notes, optionally with a bracket. The most common tuplet is the
452 triplet in which 3 notes have the length of 2, so the notes are 2/3
453 of their written length:
455 @lilypond[fragment,verbatim,center]
456 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
459 The property @code{tupletSpannerDuration} specifies how long each bracket
460 should last. With this, you can make lots of tuplets while typing
461 @code{\times} only once, saving lots of typing.
463 @lilypond[fragment, relative, singleline, verbatim]
464 \property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
465 \times 2/3 { c'8 c c c c c }
468 The format of the number is determined by the property
469 @code{tupletNumberFormatFunction}. The default prints only the
470 denominator, but if it is set to the Scheme function
471 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
475 @cindex @code{tupletNumberFormatFunction}
476 @cindex tuplet formatting
480 @seeinternals{TupletBracket}, @seeinternals{TimeScaledMusic}.
484 Nested tuplets are not formatted automatically. In this case, outer
485 tuplet brackets should be moved manually.
487 @node Easy Notation note heads
488 @subsection Easy Notation note heads
490 @cindex easy notation
493 The `easyplay' note head includes a note name inside the head. It is
494 used in music aimed at beginners.
496 @lilypond[singleline,verbatim,26pt]
498 \notes { c'2 e'4 f' | g'1 }
499 \paper { \translator { \EasyNotation } }
503 The @code{EasyNotation} variable overrides a @internalsref{Score}
504 context. You probably will want to print it with magnification or a
505 large font size to make it more readable. To print with
506 magnification, you must create a DVI file (with @file{ly2dvi}) and
507 then enlarge it with something like @file{dvips -x 2000 file.dvi}.
508 See @file{man dvips} for details. To print with a larger font, see
515 If you view the result with Xdvi, then staff lines will show through
516 the letters. Printing the PostScript file obtained with ly2dvi does
517 produce the correct result.
520 @node Easier music entry
521 @section Easier music entry
526 * Skipping corrected music::
529 When entering music it is easy to introduce errors. This section deals
530 with tricks and features that help entering music, and find and
531 correct mistakes. It is also possible to use external programs, for
532 example GUI interfaces, or MIDI transcription programs, to enter or
533 edit music. Refer to the website for more information.
537 @node Relative octaves
538 @subsection Relative octaves
540 @cindex relative octave specification
542 Octaves are specified by adding @code{'} and @code{,} to pitch names.
543 When you copy existing music, it is easy to accidentally put a pitch
544 in the wrong octave and hard to find such an error. The relative
545 octave mode prevents these errors
547 @cindex @code{\relative}
549 \relative @var{startpitch} @var{musicexpr}
552 The octave of notes that appear in @var{musicexpr} are calculated as
553 follows: If no octave changing marks are used, the basic interval
554 between this and the last note is always taken to be a fourth or less
555 (This distance is determined without regarding alterations; a
556 @code{fisis} following a @code{ceses} will be put above the
559 The octave changing marks @code{'} and @code{,} can be added to raise or
560 lower the pitch by an extra octave. Upon entering relative mode, an
561 absolute starting pitch must be specified that will act as the
562 predecessor of the first note of @var{musicexpr}.
564 Entering music that changes octave frequently is easy in relative mode.
565 @lilypond[fragment,singleline,verbatim,center]
571 And octave changing marks are used for intervals greater than a fourth.
572 @lilypond[fragment,verbatim,center]
577 If the preceding item is a chord, the first note of the chord is used
578 to determine the first note of the next chord. However, other notes
579 within the second chord are determined by looking at the immediately
582 @lilypond[fragment,verbatim,center]
589 @cindex @code{\notes}
591 The pitch after the @code{\relative} contains a note name. To parse
592 the pitch as a note name, you have to be in note mode, so there must
593 be a surrounding @code{\notes} keyword (which is not
596 The relative conversion will not affect @code{\transpose},
597 @code{\chords} or @code{\relative} sections in its argument. If you
598 want to use relative within transposed music, you must place an
599 additional @code{\relative} inside the @code{\transpose}.
603 @subsection Bar check
607 @cindex @code{barCheckSynchronize}
611 Whenever a bar check is encountered during interpretation, a warning
612 message is issued if it does not fall at a measure boundary. This can
613 help find errors in the input. Depending on the value of
614 @code{barCheckSynchronize}, the beginning of the measure will be
615 relocated. A bar check is entered using the bar symbol, `@code{|}'.
618 \time 3/4 c2 e4 | g2.
623 @cindex skipTypesetting
625 Failed bar checks are caused by entering incorrect
626 durations. Incorrect durations often completely garble up the score,
627 especially if it is polyphonic, so you should start correcting the
628 score by scanning for failed bar checks and incorrect durations. To
629 speed up this process, you can use @code{skipTypesetting}, described
632 @node Skipping corrected music
633 @subsection Skipping corrected music
635 The property @code{Score.skipTypesetting} can be used to switch on and
636 off typesetting completely during the interpretation phase. When
637 typesetting is switched off, the music is processed much more quickly.
638 This can be used to skip over the parts of a score that have already
639 been checked for errors.
641 @lilypond[fragment,singleline,verbatim]
643 \property Score.skipTypesetting = ##t
645 \property Score.skipTypesetting = ##f
653 @section Staff notation
655 This section describes with music notation that occurs on staff level,
656 such as keys, clefs and time signatures.
658 @cindex Staff notation
671 @subsection Staff symbol
673 @cindex adjusting staff symbol
674 @cindex StaffSymbol, using \property
675 @cindex staff lines, setting number of
677 Notes, dynamic signs, etc. are grouped
678 with a set of horizontal lines, into a staff (plural `staves'). In our
679 system, these lines are drawn using a separate graphical object called
682 This object is created whenever a @internalsref{Staff} context is
683 created. The appearance of the staff symbol cannot be changed by
684 using @code{\override} or @code{\set}. At the moment that
685 @code{\property Staff} is interpreted, a @internalsref{Staff} context
686 is made, and the @internalsref{StaffSymbol} is created before any
687 @code{\override} is effective. Properties can be changed in a
688 @code{\translator} definition, or by using @code{\outputproperty}.
692 If a staff is ended halfway a piece, the staff symbol may not end
693 exactly on the barline.
697 @subsection Key signature
702 The key signature indicates the scale in which a piece is played. It
703 is denoted by a set of alterations (flats or sharps) at the start of
708 Setting or changing the key signature is done with the @code{\key}
711 @code{\key} @var{pitch} @var{type}
714 @cindex @code{\minor}
715 @cindex @code{\major}
716 @cindex @code{\minor}
717 @cindex @code{\ionian}
718 @cindex @code{\locrian}
719 @cindex @code{\aeolian}
720 @cindex @code{\mixolydian}
721 @cindex @code{\lydian}
722 @cindex @code{\phrygian}
723 @cindex @code{\dorian}
725 Here, @var{type} should be @code{\major} or @code{\minor} to get
726 @var{pitch}-major or @var{pitch}-minor, respectively.
727 The standard mode names @code{\ionian},
728 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
729 @code{\phrygian}, and @code{\dorian} are also defined.
731 This command sets the context property
732 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
733 can be specified by setting this property directly.
737 The ordering of a key restoration (alterations that change back to
738 natural) is wrong when combined with a repeat barline.
742 @internalsref{KeyChangeEvent}, @internalsref{KeySignature}.
744 @cindex @code{keySignature}
751 The clef indicates which lines of the staff correspond to which
756 The clef can be set or changed with the @code{\clef} command:
757 @lilypond[fragment,verbatim]
758 \key f\major c''2 \clef alto g'2
761 Supported clef-names include
762 @c Moved standard clefs to the top /MB
764 @item treble, violin, G, G2
773 G clef on 1st line, so-called French violin clef
788 By adding @code{_8} or @code{^8} to the clef name, the clef is
789 transposed one octave down or up, respectively. @var{clefname} must
790 be enclosed in quotes when it contains underscores or digits. For
796 This command is equivalent to setting @code{clefGlyph},
797 @code{clefPosition} (which controls the Y position of the clef),
798 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
799 when any of these properties are changed.
803 The object for this symbol is @internalsref{Clef}.
807 @node Ottava brackets
808 @subsection Ottava brackets
810 ``Ottava'' brackets introduce an extra transposition of an octave for
811 the staff. They are created by invoking the function
812 @code{set-octavation}
818 @lilypond[verbatim,fragment]
827 Internally the @code{set-octavation} sets @code{ottavation} (eg. to
828 @code{"8va"}) and @code{centralCPosition} properties.
832 @internalsref{OttavaBracket}
836 @code{set-octavation} will get confused when clef changes happen
837 during an octavation bracket.
840 @subsection Time signature
841 @cindex Time signature
845 Time signature indicates the metrum of a piece: a regular pattern of
846 strong and weak beats. It is denoted by a fraction at the start of the
851 The time signature is set or changed by the @code{\time}
853 @lilypond[fragment,verbatim]
854 \time 2/4 c'2 \time 3/4 c'2.
857 The actual symbol that is printed can be customized with the
858 @code{style} property. Setting it to @code{#'()} uses fraction style
859 for 4/4 and 2/2 time. There are many more options for its layout.
860 See @inputfileref{input/test,time.ly} for more examples.
863 This command sets the property @code{timeSignatureFraction},
864 @code{beatLength} and @code{measureLength} in the @code{Timing}
865 context, which is normally aliased to @internalsref{Score}. The
866 property @code{timeSignatureFraction} determines where bar lines
867 should be inserted, and how automatic beams should be generated.
868 Changing the value of @code{timeSignatureFraction} also causes the
869 symbol to be printed.
871 More options are available through the Scheme function
872 @code{set-time-signature}. In combination with the
873 @internalsref{Measure_grouping_engraver}, it will create
874 @internalsref{MeasureGrouping} signs. Such signs ease reading
875 rhythmically complex modern music. In the following example, the 9/8
876 measure is subdivided in 2, 2, 2 and 3. This is passed to
877 @code{set-time-signature} as the third argument @code{(2 2 2 3)}.
880 \score { \notes \relative c'' {
881 #(set-time-signature 9 8 '(2 2 2 3))
882 g8-[ g-] d-[ d-] g-[ g-] a8-[-( bes g-]-) |
883 #(set-time-signature 5 8 '(3 2))
888 \translator { \StaffContext
889 \consists "Measure_grouping_engraver"
895 @internalsref{TimeSignature}, @internalsref{Timing_engraver}.
900 Automatic beaming does not use measure grouping specified with
901 @code{set-time-signature}.
908 @cindex partial measure
909 @cindex measure, partial
910 @cindex shorten measures
911 @cindex @code{\partial}
913 Partial measures, for example in upbeats, are entered using the
914 @code{\partial} command:
915 @lilypond[fragment,verbatim]
916 \partial 16*5 c'16 c4 f16 a'2. ~ a'8. a'16 | g'1
919 The syntax for this command is
921 \partial @var{duration}
923 This is internally translated into
925 \property Timing.measurePosition = -@var{length of duration}
928 The property @code{measurePosition} contains a rational number
929 indicating how much of the measure has passed at this point.
931 @node Unmetered music
932 @subsection Unmetered music
934 Bar lines and bar numbers are calculated automatically. For unmetered
935 music (e.g. cadenzas), this is not desirable. By setting
936 @code{Score.timing} to false, this automatic timing can be switched
940 @subsection Bar lines
944 @cindex measure lines
948 Bar lines delimit measures, but are also used to indicate
949 repeats. Line breaks may only happen on barlines.
953 Bar lines are inserted automatically. Special types
954 of barlines can be forced with the @code{\bar} command:
955 @lilypond[relative=1,fragment,verbatim]
959 The following bar types are available
960 @lilypond[fragment, relative, singleline, verbatim]
972 In scores with many staves, the barlines are automatically placed at
973 top level, and they are connected between different staves of a
974 @internalsref{StaffGroup}:
975 @lilypond[fragment, verbatim]
976 < \context StaffGroup <
977 \context Staff = up { e'4 d'
980 \context Staff = down { \clef bass c4 g e g } >
981 \context Staff = pedal { \clef bass c2 c2 } >
985 The command @code{\bar @var{bartype}} is a short cut for
986 doing @code{\property Score.whichBar = @var{bartype}}
987 Whenever @code{whichBar} is set to a string, a bar line of that type is
988 created. @code{whichBar} is usually set automatically: at the start of
989 a measure it is set to @code{defaultBarType}. The contents of
990 @code{repeatCommands} is used to override default measure bars.
992 @code{whichBar} can also be set directly, using @code{\property} or
993 @code{\bar }. These settings take precedence over the automatic
994 @code{whichBar} settings.
997 @cindex repeatCommands
998 @cindex defaultBarType
1000 You are encouraged to use @code{\repeat} for repetitions. See
1010 The bar line objects that are created at @internalsref{Staff} level
1011 are called @internalsref{BarLine}, the bar lines that span staffs are
1012 @internalsref{SpanBar}s.
1019 The easiest way to enter fragments with more than one voice on a staff
1020 is to split chords using the separator @code{\\}. You can use it for
1021 small, short-lived voices or for single chords:
1023 @lilypond[verbatim,fragment]
1024 \context Voice = VA \relative c'' {
1025 c4 < { f d e } \\ { b c2 } > c4 < g' \\ b, \\ f' \\ d' >
1029 The separator causes @internalsref{Voice} contexts to be instantiated,
1030 bearing the names @code{"1"}, @code{"2"}, etc. In each of these
1031 contexts, vertical direction of slurs, stems, etc. are set
1034 This can also be done by instantiating @internalsref{Voice} contexts
1035 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1036 a stem directions and horizontal shift for each part.
1039 @lilypond[singleline, verbatim]
1041 \context Staff < \context Voice = VA { \voiceOne cis2 b }
1042 \context Voice = VB { \voiceThree b4 ais ~ ais4 gis4 }
1043 \context Voice = VC { \voiceTwo fis4~ fis4 f ~ f } >
1046 Normally, note heads with a different number of dots are not merged, but
1047 when the object property @code{merge-differently-dotted} is set in
1048 the @internalsref{NoteCollision} object, they are:
1049 @lilypond[verbatim,fragment,singleline]
1050 \relative c' \context Voice < {
1052 \property Staff.NoteCollision \override
1053 #'merge-differently-dotted = ##t
1055 } \\ { g8.-[ f16-] g8.-[ f16-] }
1059 Similarly, you can merge half note heads with eighth notes, by setting
1060 @code{merge-differently-headed}:
1061 @lilypond[fragment, relative=2,verbatim]
1064 \property Staff.NoteCollision
1065 \override #'merge-differently-headed = ##t
1066 c8 c4. } \\ { c2 c2 } >
1069 LilyPond also vertically shifts rests that are opposite of a stem.
1071 @lilypond[singleline,fragment,verbatim]
1072 \context Voice < c''4 \\ r4 >
1077 The objects responsible for resolving collisions are
1078 @internalsref{NoteCollision} and @internalsref{RestCollision}. See
1079 also example files @inputfileref{input/regression,collision-dots.ly},
1080 @inputfileref{input/regression,collision-head-chords.ly},
1081 @inputfileref{input/regression,collision-heads.ly},
1082 @inputfileref{input/regression,collision-mesh.ly}, and
1083 @inputfileref{input/regression,collisions.ly}.
1088 Resolving collisions is a intricate subject, and only a few situations
1089 are handled. When LilyPond cannot cope, the @code{force-hshift}
1090 property of the @internalsref{NoteColumn} object and pitched rests can
1091 be used to override typesetting decisions.
1096 Beams are used to group short notes into chunks that are aligned with
1097 the metrum. They are inserted automatically in most cases.
1099 @lilypond[fragment,verbatim, relative=2]
1100 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1103 When these automatic decisions are not good enough, beaming can be
1104 entered explicitly. It is also possible to define beaming patterns
1105 that differ from the defaults.
1109 @internalsref{Beam}.
1112 @cindex Automatic beams
1113 @subsection Manual beams
1114 @cindex beams, manual
1118 In some cases it may be necessary to override the automatic beaming
1119 algorithm. For example, the auto beamer will not beam over rests or
1120 bar lines, If you want that, specify the begin and end point manually
1121 using @code{[} and @code{]}.
1123 @lilypond[fragment,relative,verbatim]
1125 r4 r8-[ g' a r8-] r8 g-[ | a-] r8
1129 @cindex @code{stemLeftBeamCount}
1131 Normally, beaming patterns within a beam are determined automatically.
1132 When this mechanism fouls up, the properties
1133 @code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
1134 be used to control the beam subdivision on a stem. If either property
1135 is set, its value will be used only once, and then it is erased.
1137 @lilypond[fragment,relative,verbatim]
1140 f8-[ r16 \property Voice.stemLeftBeamCount = #1 f g a-]
1143 @cindex @code{stemRightBeamCount}
1146 The property @code{subdivideBeams} can be set in order to subdivide
1147 all 16th or shorter beams at beat positions. This accomplishes the
1148 same effect as twiddling with @code{stemLeftBeamCount} and
1149 @code{stemRightBeamCount}, but it take less typing.
1152 @lilypond[relative=1,verbatim,noindent]
1153 c16-[ c c c c c c c-]
1154 \property Voice.subdivideBeams = ##t
1155 c16-[ c c c c c c c-]
1156 c32-[ c c c c c c c c c c c c c c c-]
1157 \property Score.beatLength = #(ly:make-moment 1 8)
1158 c32-[ c c c c c c c c c c c c c c c-]
1160 @cindex subdivideBeams
1162 Kneed beams are inserted automatically, when a large gap is detected
1163 between the note heads. This behavior can be tuned through the object
1164 property @code{auto-knee-gap}.
1166 @cindex beams, kneed
1168 @cindex auto-knee-gap
1176 Automatically kneed beams cannot be used together with Hara Kiri
1181 * Setting automatic beam behavior ::
1185 @no de Beam typography
1186 @sub section Beam typography
1188 One of the strong points of LilyPond is how beams are formatted. Beams
1189 are quantized, meaning that the left and right endpoints beams start
1190 exactly on staff lines. Without quantization, small wedges of white
1191 space appear between the beam and staff line, and this looks untidy.
1193 Beams are also slope-damped: melodies that go up or down should also
1194 have beams that go up or down, but the slope of the beams should be
1195 less than the slope of the notes themselves.
1197 Some beams should be horizontal. These are so-called concave beams.
1199 [TODO: some pictures.]
1203 @node Setting automatic beam behavior
1204 @subsection Setting automatic beam behavior
1206 @cindex @code{autoBeamSettings}
1207 @cindex @code{(end * * * *)}
1208 @cindex @code{(begin * * * *)}
1209 @cindex automatic beams, tuning
1210 @cindex tuning automatic beaming
1212 [TODO: use \applycontext]
1214 In normal time signatures, automatic beams can start on any note but can
1215 only end in a few positions within the measure: beams can end on a beat,
1216 or at durations specified by the properties in
1217 @code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
1218 are defined in @file{scm/auto-beam.scm}.
1220 The value of @code{autoBeamSettings} is changed using
1221 @code{\override} and unset using @code{\revert}:
1223 \property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
1224 \property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
1226 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
1227 whether the rule applies to begin or end-points. The quantity
1228 @var{P}/@var{Q} refers to the length of the beamed notes (and `@code{*
1229 *}' designates notes of any length), @var{N}/@var{M} refers to a time
1230 signature (wildcards, `@code{* *}' may be entered to designate all time
1233 For example, if automatic beams should end on every quarter note, use
1236 \property Voice.autoBeamSettings \override
1237 #'(end * * * *) = #(ly:make-moment 1 4)
1239 Since the duration of a quarter note is 1/4 of a whole note, it is
1240 entered as @code{(ly:make-moment 1 4)}.
1242 The same syntax can be used to specify beam starting points. In this
1243 example, automatic beams can only end on a dotted quarter note.
1245 \property Voice.autoBeamSettings \override
1246 #'(end * * * *) = #(ly:make-moment 3 8)
1248 In 4/4 time signature, this means that automatic beams could end only on
1249 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1250 3/8 has passed within the measure).
1252 Rules can also be restricted to specific time signatures. A rule that
1253 should only be applied in @var{N}/@var{M} time signature is formed by
1254 replacing the second asterisks by @var{N} and @var{M}. For example, a
1255 rule for 6/8 time exclusively looks like
1257 \property Voice.autoBeamSettings \override
1258 #'(begin * * 6 8) = ...
1261 If a rule should be to applied only to certain types of beams, use the
1262 first pair of asterisks. Beams are classified according to the
1263 shortest note they contain. For a beam ending rule that only applies
1264 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1267 If a score ends while an automatic beam has not been ended and is still
1268 accepting notes, this last beam will not be typeset at all.
1270 @cindex automatic beam generation
1272 @cindex @code{Voice.autoBeaming}
1275 For melodies that have lyrics, you may want to switch off
1276 automatic beaming. This is done by setting @code{Voice.autoBeaming} to
1282 It is not possible to specify beaming parameters for beams with mixed
1283 durations, that differ from the beaming parameters of all separate
1284 durations, i.e., you will have to specify manual beams to get:
1286 @lilypond[singleline,fragment,relative,noverbatim,quote]
1287 \property Voice.autoBeamSettings
1288 \override #'(end * * * *) = #(ly:make-moment 3 8)
1289 \time 12/8 c'8 c c c16 c c c c c c-[ c c c-] c8 c c4
1291 It is not possible to specify beaming parameters that act differently in
1292 different parts of a measure. This means that it is not possible to use
1293 automatic beaming in irregular meters such as @code{5/8}.
1296 @section Accidentals
1299 This section describes how to change the way that LilyPond automatically
1300 inserts accidentals before the running notes.
1304 * Using the predefined accidental variables::
1305 * Customized accidental rules::
1308 @node Using the predefined accidental variables
1309 @subsection Using the predefined accidental variables
1311 The constructs for describing the accidental typesetting rules are
1312 quite hairy, so non-experts should stick to the variables
1313 defined in @file{ly/property-init.ly}.
1314 @cindex @file{property-init.ly}
1316 The variables set properties in the ``Current'' context (see
1317 @ref{Context properties}). This means that the variables should
1318 normally be added right after the creation of the context in which the
1319 accidental typesetting described by the variable is to take
1320 effect. For example, if you want to use piano-accidentals in a piano
1321 staff then issue @code{\pianoAccidentals} first thing after the
1322 creation of the piano staff:
1325 \notes \relative c'' <
1326 \context Staff = sa @{ cis4 d e2 @}
1327 \context GrandStaff <
1329 \context Staff = sb @{ cis4 d e2 @}
1330 \context Staff = sc @{ es2 c @}
1332 \context Staff = sd @{ es2 c @}
1336 @lilypond[singleline]
1338 \notes \relative c'' <
1339 \context Staff = sa { cis4 d e2 }
1340 \context GrandStaff <
1342 \context Staff = sb { cis4 d e2 }
1343 \context Staff = sc { es2 c }
1345 \context Staff = sd { es2 c }
1350 minimumVerticalExtent = #'(-4.0 . 4.0)
1358 @item \defaultAccidentals
1359 @cindex @code{\defaultAccidentals}
1360 This is the default typesetting behaviour. It should correspond
1361 to 18th century common practice: Accidentals are
1362 remembered to the end of the measure in which they occur and
1363 only on their own octave.
1365 @item \voiceAccidentals
1366 @cindex @code{\voiceAccidentals}
1368 The normal behaviour is to
1369 remember the accidentals on Staff-level. This variable, however,
1370 typesets accidentals individually for each voice. Apart from that the
1371 rule is similar to @code{\defaultAccidentals}.
1373 This leads to some weird and often unwanted results
1374 because accidentals from one voice do not get cancelled in other
1376 @lilypond[singleline,relative,fragment,verbatim,quote]
1384 Hence you should only use @code{\voiceAccidentals} if the voices
1385 are to be read solely by individual musicians. If the staff is to be
1386 used by one musician (e.g., a conductor) then you use
1387 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1390 @item \modernAccidentals
1391 @cindex @code{\modernAccidentals}
1392 This rule corresponds to the common practice in the 20th
1394 The rule is more complex than @code{\defaultAccidentals}.
1395 You get all the same accidentals, but temporary
1396 accidentals also get cancelled in other octaves. Further more,
1397 in the same octave, they also get cancelled in the following measure:
1398 @lilypond[singleline,fragment,verbatim]
1400 cis' c'' cis'2 | c'' c'
1403 @item \modernCautionaries
1404 @cindex @code{\modernCautionaries}
1405 This rule is similar to @code{\modernAccidentals}, but the
1406 ``extra'' accidentals (the ones not typeset by
1407 @code{\defaultAccidentals}) are typeset as cautionary accidentals
1408 (i.e. in reduced size):
1409 @lilypond[singleline,fragment,verbatim]
1411 cis' c'' cis'2 | c'' c'
1414 @cindex @code{\modernVoiceAccidentals}
1415 @item \modernVoiceAccidentals
1416 is used for multivoice accidentals to be read both by musicians
1417 playing one voice and musicians playing all voices. Accidentals are
1418 typeset for each voice, but they @emph{are} cancelled across voices in
1419 the same @internalsref{Staff}.
1421 @cindex @code{\modernVoiceCautionaries}
1422 @item \modernVoiceCautionaries
1423 is the same as @code{\modernVoiceAccidentals}, but with the extra
1424 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1425 as cautionaries. Even though all accidentals typeset by
1426 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1427 some of them are typeset as cautionaries.
1429 @item \pianoAccidentals
1430 @cindex @code{\pianoAccidentals}
1431 20th century practice for piano notation. Very similar to
1432 @code{\modernAccidentals} but accidentals also get cancelled
1433 across the staves in the same @internalsref{GrandStaff} or
1434 @internalsref{PianoStaff}.
1436 @item \pianoCautionaries
1437 @cindex @code{\pianoCautionaries}
1438 As @code{\pianoAccidentals} but with the extra accidentals
1439 typeset as cautionaries.
1442 @cindex @code{\noResetKey}
1443 Same as @code{\defaultAccidentals} but with accidentals lasting
1444 ``forever'' and not only until the next measure:
1445 @lilypond[singleline,fragment,verbatim,relative]
1450 @item \forgetAccidentals
1451 @cindex @code{\forgetAccidentals}
1452 This is sort of the opposite of @code{\noResetKey}: Accidentals
1453 are not remembered at all - and hence all accidentals are
1454 typeset relative to the key signature, regardless of what was
1455 before in the music:
1456 @lilypond[singleline,fragment,verbatim,relative]
1458 \key d\major c4 c cis cis d d dis dis
1462 @node Customized accidental rules
1463 @subsection Customized accidental rules
1465 This section must be considered gurus-only, and hence it must be
1466 sufficient with a short description of the system and a reference to
1467 the internal documentation.
1469 The algorithm tries several different rules, and uses the rule
1470 that gives the highest number of accidentals. Each rule consists of
1473 In which context is the rule applied. For example, if
1474 @var{context} is @internalsref{Score} then all staves share
1475 accidentals, and if @var{context} is @internalsref{Staff} then all
1476 voices in the same staff share accidentals, but staves do not.
1478 Whether the accidental changes all octaves or only the current
1481 Over how many barlines the accidental lasts.
1482 If @var{lazyness} is @code{-1} then the accidental is forget
1483 immediately, and if @var{lazyness} is @code{#t} then the accidental
1486 [TODO: should use +infinity for this case?]
1492 @internalsref{Accidental_engraver}, @internalsref{Accidental},
1493 @internalsref{AccidentalPlacement}.
1498 Currently the simultaneous notes are considered to be entered in
1499 sequential mode. This means that in a chord the accidentals are
1500 typeset as if the notes in the chord happened one at a time - in the
1501 order in which they appear in the input file.
1503 This is only a problem when there are simultaneous notes whose
1504 accidentals depend on each other. The problem only occurs when using
1505 non-default accidentals. In the default scheme, accidentals only
1506 depend on other accidentals with the same pitch on the same staff, so
1507 no conflicts possible.
1509 This example shows two examples of the same music giving different
1510 accidentals depending on the order in which the notes occur in the
1513 @lilypond[singleline,fragment,verbatim]
1514 \property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1515 cis'4 <<c'' c'>> r2 | cis'4 <<c' c''>> r2
1516 | <<cis' c''>> r | <<c'' cis'>> r |
1519 This problem can be solved by manually inserting @code{!} and @code{?}
1520 for the problematic notes.
1522 @node Expressive marks
1523 @section Expressive marks
1531 * Analysis brackets::
1538 A slur indicates that notes are to be played bound or @emph{legato}.
1542 They are entered using parentheses:
1543 @lilypond[fragment,verbatim,center]
1544 f'-( g'-)-( a'-) a'8-[ b'-(-] a'4 g'2 f'4-)
1545 <<c' e'>>2-( <<b d'>>2-)
1549 @c TODO: should explain that ^( and _( set directions
1550 @c should set attachments with ^ and _ ?
1552 Slurs avoid crossing stems, and are generally attached to note heads.
1553 However, in some situations with beams, slurs may be attached to stem
1554 ends. If you want to override this layout you can do this through the
1555 object property @code{attachment} of @internalsref{Slur} in
1556 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1557 the attachment type of the left and right end points.
1559 @lilypond[fragment,relative,verbatim]
1561 \property Voice.Stem \set #'length = #5.5
1563 \property Voice.Slur \set #'attachment = #'(stem . stem)
1567 If a slur would strike through a stem or beam, the slur will be moved
1568 away upward or downward. If this happens, attaching the slur to the
1569 stems might look better:
1571 @lilypond[fragment,relative,verbatim]
1574 \property Voice.Slur \set #'attachment = #'(stem . stem)
1580 @seeinternals{Slur}, @internalsref{SlurEvent}.
1585 Producing nice slurs is a difficult problem, and LilyPond currently
1586 uses a simple, empiric method to produce slurs. In some cases, the
1587 results of this method are ugly.
1590 @cindex Adjusting slurs
1592 @node Phrasing slurs
1593 @subsection Phrasing slurs
1595 @cindex phrasing slurs
1596 @cindex phrasing marks
1598 A phrasing slur (or phrasing mark) connects chords and is used to
1599 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1602 @lilypond[fragment,verbatim,center,relative]
1603 \time 6/4 c'-\( d-( e-) f-( e-) d-\)
1606 Typographically, the phrasing slur behaves almost exactly like a
1607 normal slur. However, they are treated as different objects. A
1608 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1609 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1610 @code{\phrasingSlurBoth}.
1612 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1613 will only affect normal slurs and not phrasing slurs.
1617 See also @internalsref{PhrasingSlur},
1618 @internalsref{PhrasingSlurEvent}.
1622 Phrasing slurs have the same limitations in their formatting as normal
1626 @subsection Breath marks
1628 Breath marks are entered using @code{\breathe}.
1631 @lilypond[fragment,relative]
1635 The glyph of the breath mark can be tweaked by overriding the
1636 @code{text} property of the @code{BreathingSign} grob with the name of
1637 any glyph of @ref{The Feta font}. For example,
1638 @lilypond[fragment,verbatim,relative]
1640 \property Voice.BreathingSign \override #'text = #"scripts-rvarcomma"
1647 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
1648 @inputfileref{input/regression,breathing-sign.ly}.
1651 @node Metronome marks
1652 @subsection Metronome marks
1655 @cindex beats per minute
1656 @cindex metronome marking
1658 Metronome settings can be entered as follows:
1660 \tempo @var{duration} = @var{perminute}
1663 In the MIDI output, they are interpreted as a tempo change, and in the
1664 paper output, a metronome marking is printed
1665 @cindex @code{\tempo}
1666 @lilypond[fragment,verbatim]
1672 @internalsref{TempoEvent}
1677 @subsection Text spanners
1678 @cindex Text spanners
1680 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1681 are written as texts, and extended over many measures with dotted
1682 lines. You can create such texts using text spanners: attach
1683 @code{\startTextSpan} and @code{\stopTextSpan} to the
1684 start and ending note of the spanner.
1686 The string to be printed, as well as the style, is set through object
1689 @lilypond[fragment,relative,verbatim]
1691 \property Voice.TextSpanner \set #'direction = #-1
1692 \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
1693 c2-\startTextSpan b c-\stopTextSpan a }
1699 @internalsref{TextSpanEvent},
1700 @internalsref{TextSpanner}, @inputfileref{input/regression,text-spanner.ly}.
1703 @node Analysis brackets
1704 @subsection Analysis brackets
1706 @cindex phrasing brackets
1707 @cindex musicological analysis
1708 @cindex note grouping bracket
1710 Brackets are used in musical analysis to indicate structure in musical
1711 pieces. LilyPond supports a simple form of nested horizontal brackets.
1712 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1713 @internalsref{Staff} context. A bracket is started with
1714 @code{\startGroup} and closed with @code{\stopGroup}.
1716 @lilypond[singleline,verbatim]
1717 \score { \notes \relative c'' {
1718 c4-\startGroup-\startGroup
1721 c4-\stopGroup-\stopGroup
1723 \paper { \translator {
1724 \StaffContext \consists "Horizontal_bracket_engraver"
1730 @internalsref{HorizontalBracket}, @internalsref{NoteGroupingEvent},
1731 @inputfileref{input/regression,note-group-bracket.ly}.
1735 Bracket endings should be angled/slanted. (TODO)
1742 @section Articulations
1743 @cindex Articulations
1745 @cindex articulations
1749 A variety of symbols can appear above and below notes to indicate
1750 different characteristics of the performance. They are added to a note
1751 by adding a dash and the character signifying the
1752 articulation. They are demonstrated here.
1754 @lilypondfile[notexidoc]{script-abbreviations.ly}
1756 The script is automatically placed, but if you need to force
1757 directions, you can use @code{_} to force them down, or @code{^} to
1759 @lilypond[fragment, verbatim]
1766 Other symbols can be added using the syntax
1767 @var{note}@code{-\}@var{name}. Again, they can be forced up or down
1768 using @code{^} and @code{_}.
1772 @cindex staccatissimo
1781 @cindex organ pedal marks
1790 @cindex prallmordent
1794 @cindex thumb marking
1799 @lilypondfile[notexidoc]{script-chart.ly}
1803 @internalsref{ScriptEvent}, @internalsref{Script}.
1807 All of these note ornaments appear in the printed output but have no
1808 effect on the MIDI rendering of the music.
1811 @node Fingering instructions
1812 @section Fingering instructions
1816 Fingering instructions can be entered using
1818 @var{note}-@var{digit}
1820 For finger changes, use markup texts:
1822 @lilypond[verbatim, singleline, fragment]
1823 c'4-1 c'4-2 c'4-3 c'4-4
1824 c'^\markup { \fontsize #-3 \number "2-3" }
1827 @cindex finger change
1832 @lilypond[verbatim,singleline,fragment,relative=1]
1833 << c-1 e-2 g-3 b-5 >> 4
1834 \property Voice.fingerHorizontalDirection = #LEFT
1835 << c-1 es-3 g-5 >> 4
1836 \property Voice.fingerHorizontalDirection = #RIGHT
1837 << c-1 e-2 g-3 b-5 >>4
1838 \property Voice.fingerHorizontalDirection = #LEFT
1839 << c_1 e-2 g-3 b^5 >>4
1844 @internalsref{FingerEvent} and @internalsref{Fingering}.
1855 @subsection Text scripts
1856 @cindex Text scripts
1858 It is possible to place arbitrary strings of text or markup text (see
1859 @ref{Text markup}) above or below notes by using a string:
1860 @code{c^"text"}. By default, these indications do not influence the
1861 note spacing, but by using the command @code{\fatText}, the widths
1862 will be taken into account.
1864 @lilypond[fragment,singleline,verbatim] \relative c' {
1865 c4^"longtext" \fatText c4_"longlongtext" c4 }
1868 It is possible to use @TeX{} commands in the strings, but this should be
1869 avoided because it makes it impossible for LilyPond to compute the
1870 exact length of the string, which may lead to collisions. Also, @TeX{}
1871 commands will not work with direct PostScript output.
1876 @internalsref{TextScriptEvent}, @internalsref{TextScript},
1882 @subsection Grace notes
1886 @cindex @code{\grace}
1890 Grace notes are ornaments that are written out
1892 @lilypond[relative=2,verbatim,fragment] c4 \grace c16 c4 \grace {
1896 In normal notation, grace notes take up no logical
1897 time in a measure. Such an idea is practical for normal notation, but
1898 is not strict enough to put it into a program. The model that LilyPond
1899 uses for grace notes internally is that all timing is done in two
1902 Every point in musical time consists of two rational numbers: one
1903 denotes the logical time, one denotes the grace timing. The above
1904 example is shown here with timing tuples.
1907 \score { \notes \relative c''{
1908 c4^"(0,0)" \grace c16_" "_"(1/4,-1/16)" c4^"(1/4,0)" \grace {
1909 c16_"(2/4,-1/8)"-[ d16^"(2/4,-1/16)" ] } c4_" "_"(2/4,0)"
1911 \paper { linewidth = 8.\cm }
1916 The placement of these grace notes is synchronized between different
1919 @lilypond[relative=2,verbatim,fragment]
1920 < \context Staff = SA { e4 \grace { c16-[ d e f-] } e4 }
1921 \context Staff = SB { c'4 \grace { g8 b } c4 } >
1925 Unbeamed eighth notes and shorter by default have a slash through the
1926 stem. This can be controlled with object property @code{stroke-style} of
1927 @internalsref{Stem}. For proper matching of override and reverts of
1928 such properties, it is necessary to use a Scheme function.
1930 The following fragment overrides the default formatting Grace style stems.
1932 #(add-to-grace-init "Voice" 'Stem 'stroke-style '())
1935 The @code{\override} is carefully matched with a @code{\revert}.
1940 @lilypond[fragment,verbatim]
1941 \relative c'' \context Voice {
1942 \grace c8 c4 \grace { c16-[ c16-] } c4
1944 \property Voice.Stem \override #'stroke-style = #'()
1946 \property Voice.Stem \revert #'stroke-style
1951 If you want to end a note with a grace note, then the standard trick
1952 is to put the grace notes before a phantom ``space note'', e.g.
1953 @lilypond[fragment,verbatim, relative=2]
1956 { s2 \grace { c16-[ d-] } } >
1961 A @code{\grace} section has some default values, and LilyPond will
1962 use those default values unless you specify otherwise inside the
1963 @code{\grace} section. For example, if you specify \slurUp
1964 @emph{before} your @code{\grace} section, a slur which starts inside
1965 the @code{\grace} will not be forced up, even if the slur ends outside
1966 of the @code{\grace}. Note the difference between the first and
1967 second bars in this example:
1969 @lilypond[fragment,verbatim]
1970 \relative c'' \context Voice {
1988 @internalsref{GraceMusic}.
1992 Grace notes cannot be used in the smallest size (@file{paper11.ly}).
1994 Grace note synchronization can also lead to surprises. Staff notation,
1995 such as key signatures, barlines, etc. are also synchronized. Take
1996 care when you mix staves with grace notes and staves without.
1998 @lilypond[relative=2,verbatim,fragment]
1999 < \context Staff = SA { e4 \bar "|:" \grace c16 d4 }
2000 \context Staff = SB { c4 \bar "|:" d4 } >
2003 Grace sections should only be used within sequential music
2004 expressions. Nesting, juxtaposing, or ending sequential music with a
2005 grace section is not supported, and might produce crashes or other
2008 Overriding settings for grace music using @code{add-to-grace-init}
2009 cannot be done in a modular way.
2013 @subsection Glissando
2016 @cindex @code{\glissando}
2018 A glissando is a smooth change in pitch. It is denoted by a line or a
2019 wavy line between two notes.
2023 A glissando line can be requested by attaching a @code{\glissando} to
2026 @lilypond[fragment,relative,verbatim]
2032 @internalsref{Glissando}, @internalsref{GlissandoEvent}.
2037 Printing of an additional text (such as @emph{gliss.}) must be done
2042 @subsection Dynamics
2055 @cindex @code{\ffff}
2065 Absolute dynamic marks are specified using an variable after a
2066 note: @code{c4-\ff}. The available dynamic marks are: @code{\ppp},
2067 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2068 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2069 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
2071 @lilypond[verbatim,singleline,fragment,relative]
2072 c'-\ppp c-\pp c -\p c-\mp c-\mf c-\f c-\ff c-\fff
2078 @cindex @code{\decr}
2079 @cindex @code{\rced}
2086 A crescendo mark is started with @code{\cr} and terminated with
2087 @code{\endcr}, and decrescendi similarly with @code{\decr} and
2088 @code{\enddecr}. There are also shorthands for these marks. A
2089 crescendo can be started with @code{\<} and a decrescendo can be
2090 started with @code{\>}. Either one can be terminated with @code{\!}.
2091 Because these marks are bound to notes, if you must use spacer notes
2092 if multiple marks during one note are needed.
2094 @lilypond[fragment,verbatim,center,quote]
2095 c''-\< c''-\! d''-\decr e''-\rced
2096 < f''1 { s4 s4-\< s4-\! \> s4-\! } >
2098 This may give rise to very short hairpins. Use @code{minimum-length}
2099 in @internalsref{Voice}.@internalsref{HairPin} to lengthen them, for
2103 \property Staff.Hairpin \override #'minimum-length = #5
2106 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2107 is an example how to do it:
2109 @lilypond[fragment,relative=2,verbatim]
2110 c4 \cresc c4 \endcresc c4
2117 You can also supply your own texts:
2118 @lilypond[fragment,relative,verbatim]
2120 \property Voice.crescendoText = "cresc. poco"
2121 \property Voice.crescendoSpanner = #'dashed-line
2130 @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent},
2131 @internalsref{AbsoluteDynamicEvent}.
2133 Dynamics are objects of @internalsref{DynamicText} and
2134 @internalsref{Hairpin}. Vertical positioning of these symbols is
2135 handled by the @internalsref{DynamicLineSpanner} object.
2137 If you want to adjust padding or vertical direction of the dynamics,
2138 you must set properties for the @internalsref{DynamicLineSpanner}
2139 object. Predefined variables to set the vertical direction are
2140 @code{\dynamicUp} and @code{\dynamicDown}.
2142 @cindex direction, of dynamics
2143 @cindex @code{\dynamicDown}
2144 @cindex @code{\dynamicUp}
2152 @cindex @code{\repeat}
2155 Repetition is a central concept in music, and multiple notations exist
2156 for repetitions. In LilyPond, most of these notations can be captured
2157 in a uniform syntax. One of the advantages is, all these repetitions
2158 can be rendered in MIDI accurately.
2160 The following types of repetition are supported:
2164 Repeated music is fully written (played) out. Useful for MIDI
2165 output, and entering repetitive music.
2168 This is the normal notation: Repeats are not written out, but
2169 alternative endings (voltas) are printed, left to right.
2173 Alternative endings are written stacked. This has limited use but may be
2174 used to typeset two lines of lyrics in songs with repeats, see
2175 @inputfileref{input,star-spangled-banner.ly}.
2182 Make beat or measure repeats. These look like percent signs.
2188 * Repeats and MIDI::
2189 * Manual repeat commands::
2191 * Tremolo subdivisions::
2196 @subsection Repeat syntax
2200 LilyPond has one syntactic construct for specifying different types of
2201 repeats. The syntax is
2204 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2207 If you have alternative endings, you may add
2208 @cindex @code{\alternative}
2210 \alternative @code{@{} @var{alternative1}
2212 @var{alternative3} @dots{} @code{@}}
2214 where each @var{alternative} is a music expression. If you do not
2215 give enough alternatives for all of the repeats, then the first
2216 alternative is assumed to be played more than once.
2218 Normal notation repeats are used like this:
2219 @lilypond[fragment,verbatim]
2221 \repeat volta 2 { c'4 d' e' f' }
2222 \repeat volta 2 { f' e' d' c' }
2225 With alternative endings:
2226 @lilypond[fragment,verbatim]
2228 \repeat volta 2 {c'4 d' e' f'}
2229 \alternative { {d'2 d'} {f' f} }
2233 @lilypond[fragment,verbatim]
2237 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2238 \alternative { { g4 g g } { a | a a a a | b2. } }
2245 If you do a nested repeat like
2254 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2255 belongs. This ambiguity is resolved by always having the
2256 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2257 it is advisable to use braces in such situations.
2260 @node Repeats and MIDI
2261 @subsection Repeats and MIDI
2263 @cindex expanding repeats
2265 For instructions on how to unfold repeats for MIDI output, see the
2266 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2271 Timing information is not remembered at the start of an alternative,
2272 so you have to reset timing information after a repeat, e.g. using a
2273 bar-check (See @ref{Bar check}), setting @code{Score.measurePosition}
2274 or entering @code{\partial}. Similarly, slurs or ties are also not
2278 @node Manual repeat commands
2279 @subsection Manual repeat commands
2281 @cindex @code{repeatCommands}
2283 The property @code{repeatCommands} can be used to control the layout of
2284 repeats. Its value is a Scheme list of repeat commands, where each repeat
2292 @item (volta . @var{text})
2293 Print a volta bracket saying @var{text}. The text can be specified as
2294 a text string or as a markup text, see @ref{Text markup}. Do not
2295 forget to change the font, as the default number font does not contain
2296 alphabetic characters.
2298 Stop a running volta bracket
2301 @lilypond[verbatim, fragment]
2303 \property Score.repeatCommands = #'((volta "93") end-repeat)
2305 \property Score.repeatCommands = #'((volta #f))
2312 @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2313 @internalsref{VoltaRepeatedMusic},
2314 @internalsref{UnfoldedRepeatedMusic}
2315 @internalsref{FoldedRepeatedMusic}.
2317 @node Tremolo repeats
2318 @subsection Tremolo repeats
2319 @cindex tremolo beams
2321 To place tremolo marks between notes, use @code{\repeat} with tremolo
2323 @lilypond[verbatim,center,singleline]
2325 \context Voice \notes\relative c' {
2326 \repeat "tremolo" 8 { c16 d16 }
2327 \repeat "tremolo" 4 { c16 d16 }
2328 \repeat "tremolo" 2 { c16 d16 }
2329 \repeat "tremolo" 4 c16
2336 Tremolo beams are @internalsref{Beam} objects. Single stem tremolos are
2337 @internalsref{StemTremolo}. @internalsref{TremoloEvent}.
2342 The single stem tremolo @emph{must} be entered without @code{@{} and
2345 @node Tremolo subdivisions
2346 @subsection Tremolo subdivisions
2347 @cindex tremolo marks
2348 @cindex @code{tremoloFlags}
2350 Tremolo marks can be printed on a single note by adding
2351 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2352 A @var{length} value of 8 gives one line across the note stem. If the
2353 length is omitted, then then the last value (stored in
2354 @code{Voice.tremoloFlags}) is used.
2356 @lilypond[verbatim,fragment,center]
2357 c'2:8 c':32 | c': c': |
2360 [TODO : stok is te kort bij 32en]
2364 Tremolos in this style do not carry over into the MIDI output.
2367 @node Measure repeats
2368 @subsection Measure repeats
2370 @cindex percent repeats
2371 @cindex measure repeats
2373 In the @code{percent} style, a note pattern can be repeated. It is
2374 printed once, and then the pattern is replaced with a special sign.
2375 Patterns of a one and two measures are replaced by percent-like signs,
2376 patterns that divide the measure length are replaced by slashes.
2378 @lilypond[verbatim,singleline]
2379 \context Voice { \repeat "percent" 4 { c'4 }
2380 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2386 @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2387 @internalsref{PercentRepeatedMusic}, and
2388 @internalsref{DoublePercentRepeat}.
2393 Single measure and double measure percent-repeats cannot be nested.
2395 @node Rhythmic music
2396 @section Rhythmic music
2398 Sometimes you might want to show only the rhythm of a melody. This
2399 can be done with the rhythmic staff. All pitches of notes on such a
2400 staff are squashed, and the staff itself has a single line:
2402 @lilypond[fragment,relative,verbatim]
2403 \context RhythmicStaff {
2405 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2410 * Percussion staves::
2411 * Percussion midi output::
2414 @node Percussion staves
2415 @subsection Percussion staves
2419 To typeset more than one piece of percussion to be played by the same
2420 musician one typically uses a multiline staff where each staff
2421 position refers to a specific piece of percussion.
2425 Percussion staves are typeset with help of a set of Scheme
2426 functions. The system is based on the general MIDI drum-pitches.
2427 Include @file{ly/drumpitch-init.ly} to use drum pitches. This file
2428 defines the pitches from the Scheme variable @code{drum-pitch-names},
2429 the definition of which can be read in @file{scm/drums.scm}. Each
2430 piece of percussion has a full name and an abbreviated name, and both
2431 the full name or the abbreviation may be used in input files.
2433 To typeset the music on a staff apply the function @code{drums->paper}
2434 to the percussion music. This function takes a list of percussion
2435 instrument names, notehead scripts and staff positions (that is:
2436 pitches relative to the C-clef) and transforms the input
2437 music by moving the pitch, changing the notehead and (optionally)
2440 @lilypond[singleline,verbatim,quote]
2441 \include "drumpitch-init.ly"
2442 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2443 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2445 \apply #(drums->paper 'drums) \context Staff <
2447 \context Voice = up { \voiceOne \up }
2448 \context Voice = down { \voiceTwo \down }
2453 In the above example the music was transformed using the list @code{'drums}.
2454 Currently the following lists are defined in @file{scm/drums.scm}:
2457 To typeset a typical drum kit on a five-line staff.
2460 \include "drumpitch-init.ly"
2461 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2462 bd sn ss tomh tommh tomml toml tomfh tomfl }
2463 mus = \notes { cymc cyms cymr hh hhc hho hhho hhp cb hc
2464 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2467 \apply #(drums->paper 'drums) \context Staff <
2471 \context Lyrics \nam
2474 linewidth = 100.0\mm
2477 \remove Bar_engraver
2478 \remove Time_signature_engraver
2479 minimumVerticalExtent = #'(-4.0 . 5.0)
2483 \remove Stem_engraver
2489 The drum scheme supports six different toms. When there fewer toms, simply
2490 select the toms that produce the desired result, i.e., to get toms on
2491 the three middle lines you use @code{tommh}, @code{tomml} and
2494 Because general MIDI does not contain rimshots the sidestick is used
2495 for this purpose instead.
2497 To typeset timbales on a two line staff.
2499 @lilypond[singleline]
2500 \include "drumpitch-init.ly"
2501 nam = \lyrics { timh ssh timl ssl cb }
2502 mus = \notes { timh ssh timl ssl cb s16 }
2505 \apply #(drums->paper 'timbales) \context Staff <
2509 \context Lyrics \nam
2514 \remove Bar_engraver
2515 \remove Time_signature_engraver
2516 StaffSymbol \override #'line-count = #2
2517 StaffSymbol \override #'staff-space = #2
2518 minimumVerticalExtent = #'(-3.0 . 4.0)
2522 \remove Stem_engraver
2529 To typeset congas on a two line staff.
2531 @lilypond[singleline]
2532 \include "drumpitch-init.ly"
2533 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2534 mus = \notes { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2537 \apply #(drums->paper 'congas) \context Staff <
2541 \context Lyrics \nam
2546 \remove Bar_engraver
2547 \remove Time_signature_engraver
2548 StaffSymbol \override #'line-count = #2
2549 StaffSymbol \override #'staff-space = #2
2550 minimumVerticalExtent = #'(-3.0 . 4.0)
2554 \remove Stem_engraver
2560 To typeset bongos on a two line staff.
2562 @lilypond[singleline]
2563 \include "drumpitch-init.ly"
2564 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2565 mus = \notes { boh boho bohm ssh bol bolo bolm ssl s16 }
2568 \apply #(drums->paper 'bongos) \context Staff <
2572 \context Lyrics \nam
2577 \remove Bar_engraver
2578 \remove Time_signature_engraver
2579 StaffSymbol \override #'line-count = #2
2580 StaffSymbol \override #'staff-space = #2
2581 minimumVerticalExtent = #'(-3.0 . 4.0)
2585 \remove Stem_engraver
2591 To typeset all kinds of simple percussion on one line staves.
2592 @lilypond[singleline]
2593 \include "drumpitch-init.ly"
2594 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2595 mus = \notes { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2598 \apply #(drums->paper 'percussion) \context Staff <
2602 \context Lyrics \nam
2607 \remove Bar_engraver
2608 \remove Time_signature_engraver
2609 StaffSymbol \override #'line-count = #1
2610 minimumVerticalExtent = #'(-2.0 . 3.0)
2614 \remove Stem_engraver
2621 If you do not like any of the predefined lists you can define your own
2622 list at the top of your file:
2624 @lilypond[singleline, verbatim]
2626 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2627 (snare default #f ,(ly:make-pitch 0 1 0))
2628 (hihat cross #f ,(ly:make-pitch 0 5 0))
2629 (pedalhihat xcircle "stopped" ,(ly:make-pitch 0 5 0))
2630 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2632 \include "drumpitch-init.ly"
2633 up = \notes { hh8 hh hh hh hhp4 hhp }
2634 down = \notes { bd4 sn bd toml8 toml }
2636 \apply #(drums->paper 'mydrums) \context Staff <
2638 \context Voice = up { \voiceOne \up }
2639 \context Voice = down { \voiceTwo \down }
2644 To use a modified existing list, one can prepend modifications to the
2648 #(define mydrums (append `(
2649 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2650 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2654 The file @file{drumpitch-init.ly} replaces the normal pitch names, so
2655 you have to reinclude @file{nederlands.ly} after the
2656 drum-pattern-definitions to enter normal notes.
2658 @lilypond[singleline,verbatim]
2659 \include "drumpitch-init.ly"
2660 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2661 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2662 \include "nederlands.ly"
2663 bass = \notes \transpose c c,, { a4. e8 r e g e }
2666 \apply #(drums->paper 'drums) \context Staff = drums <
2668 \context Voice = up { \voiceOne \up }
2669 \context Voice = down { \voiceTwo \down }
2671 \context Staff = bass { \clef "F_8" \bass }
2676 @node Percussion midi output
2677 @subsection Percussion midi output
2679 In order to produce correct midi output you need to produce two score
2680 blocks---one for the paper and one for the midi output. To use the
2681 percussion channel you set the property @code{instrument} to
2682 @code{'drums}. Because the drum-pitches themself are similar to the
2683 general midi pitches all you have to do is to insert the voices with
2684 none of the scheme functions to get the correct midi output:
2688 \apply #(drums->paper 'mydrums) \context Staff <
2697 \property Staff.instrument = #'drums
2706 This scheme is to be considered a temporary implementation.
2710 @section Piano music
2712 Piano staves are two normal staves coupled with a brace. The staves
2713 are largely independent, but sometimes voices can cross between the
2714 two staves. The same notation is also used for harps and other key
2715 instruments. The @internalsref{PianoStaff} is especially built to
2716 handle this cross-staffing behavior. In this section we discuss the
2717 @internalsref{PianoStaff} and some other pianistic peculiarities.
2721 * Automatic staff changes::
2722 * Manual staff switches::
2725 * Staff switch lines::
2730 There is no support for putting chords across staves. You can get
2731 this result by increasing the length of the stem in the lower stave so
2732 it reaches the stem in the upper stave, or vice versa. An example is
2733 included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
2735 Dynamics are not centered, but kludges do exist. See
2736 @inputfileref{input/templates,piano-dynamics.ly}.
2738 @cindex cross staff stem
2739 @cindex stem, cross staff
2742 @c fixme: should have hyperlinks as well.
2748 @node Automatic staff changes
2749 @subsection Automatic staff changes
2750 @cindex Automatic staff changes
2752 Voices can switch automatically between the top and the bottom
2753 staff. The syntax for this is
2755 \autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
2757 The autochanger switches on basis of pitch (central C is the turning
2758 point), and it looks ahead skipping over rests to switch rests in
2759 advance. Here is a practical example:
2761 @lilypond[verbatim,singleline,quote]
2762 \score { \notes \context PianoStaff <
2763 \context Staff = "up" {
2764 \autochange Staff \context Voice = VA < \relative c' {
2765 g4 a b c d r4 a g } > }
2766 \context Staff = "down" {
2771 Spacer rests are used to prevent the bottom staff from
2772 terminating too soon.
2777 The staff switches often do not end up in optimal places. For high
2778 quality output staff switches should be specified manually.
2782 @node Manual staff switches
2783 @subsection Manual staff switches
2785 @cindex manual staff switches
2786 @cindex staff switch, manual
2788 Voices can be switched between staves manually, using the following command:
2790 \translator Staff = @var{staffname} @var{music}
2792 The string @var{staffname} is the name of the staff. It switches the
2793 current voice from its current staff to the Staff called
2794 @var{staffname}. Typically @var{staffname} is @code{"up"} or
2802 Pianos have pedals that alter the way sound are produced. Generally, a
2803 piano has three pedals, sustain, una corda, and sostenuto.
2807 Piano pedal instruction can be expressed by attaching
2808 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
2809 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
2812 The symbols that are printed can be modified by setting
2813 @code{pedal@var{X}Strings}, where @var{X} is one of the pedal types:
2814 Sustain, Sostenuto or UnaCorda. Refer to the generated documentation
2815 of @internalsref{SustainPedal} for more information.
2817 Pedals can also be indicated by a sequence of brackets, by setting the
2818 @code{pedal-type} property of @internalsref{SustainPedal} objects:
2820 @lilypond[fragment,verbatim]
2821 \property Staff.SustainPedal \override #'pedal-type = #'bracket
2822 c''4-\sustainDown d''4 e''4
2823 a'4-\sustainUp-\sustainDown
2824 f'4 g'4 a'4-\sustainUp
2827 A third style of pedal notation is a mixture of text and brackets,
2828 obtained by setting @code{pedal-type} to @code{mixed}:
2830 @lilypond[fragment,verbatim]
2831 \property Staff.SustainPedal \override #'pedal-type = #'mixed
2832 c''4-\sustainDown d''4 e''4
2833 c'4-\sustainUp-\sustainDown
2834 f'4 g'4 a'4-\sustainUp
2837 The default `*Ped' style for sustain and damper pedals corresponds to
2838 @code{\pedal-type = #'text}. However, @code{mixed} is the default style
2839 for a sostenuto pedal:
2841 @lilypond[fragment,verbatim]
2842 c''4-\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4-\sostenutoUp
2845 For fine-tuning of the appearance of a pedal bracket, the properties
2846 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
2847 @code{PianoPedalBracket} objects (see the detailed documentation of
2848 @internalsref{PianoPedalBracket}) can be modified. For example, the bracket
2849 may be extended to the end of the note head.
2851 @lilypond[fragment,verbatim]
2852 \property Staff.PianoPedalBracket \override
2853 #'shorten-pair = #'(0 . -1.0)
2854 c''4-\sostenutoDown d''4 e''4 c'4
2855 f'4 g'4 a'4-\sostenutoUp
2859 @subsection Arpeggio
2862 @cindex broken arpeggio
2863 @cindex @code{\arpeggio}
2865 You can specify an arpeggio sign on a chord by attaching an
2866 @code{\arpeggio} to a chord.
2869 @lilypond[fragment,relative,verbatim]
2870 <<c e g c>>-\arpeggio
2873 When an arpeggio crosses staves in piano music, you attach an arpeggio
2874 to the chords in both staves, and set
2875 @internalsref{PianoStaff}.@code{connectArpeggios}.
2877 @lilypond[fragment,relative,verbatim]
2878 \context PianoStaff <
2879 \property PianoStaff.connectArpeggios = ##t
2880 \context Voice = one { <<c' e g c>>-\arpeggio }
2881 \context Voice = other { \clef bass <<c,, e g>>-\arpeggio }
2885 This command creates @internalsref{Arpeggio} objects. Cross staff
2886 arpeggios are @internalsref{PianoStaff}.@internalsref{Arpeggio}.
2888 The direction of the arpeggio is sometimes denoted by adding an
2889 arrowhead to the wiggly line. This can be typeset by setting
2890 @code{arpeggio-direction}.
2892 @lilypond[fragment,relative,verbatim]
2894 \property Voice.Arpeggio \set #'arpeggio-direction = #1
2895 <<c e g c>>-\arpeggio
2896 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
2897 <<c e g c>>-\arpeggio
2901 A square bracket on the left indicates that the player should not
2902 arpeggiate the chord. To draw these brackets, set the
2903 @code{molecule-callback} property of @code{Arpeggio} or
2904 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
2905 @code{\arpeggio} statements within the chords as before.
2907 @lilypond[fragment,relative,verbatim]
2908 \property PianoStaff.Arpeggio \override
2909 #'molecule-callback = \arpeggioBracket
2910 <<c' e g c>>-\arpeggio
2916 It is not possible to mix connected arpeggios and unconnected
2917 arpeggios in one @internalsref{PianoStaff} at the same time.
2919 @node Staff switch lines
2920 @subsection Staff switch lines
2923 @cindex follow voice
2924 @cindex staff switching
2927 @cindex @code{followVoice}
2929 Whenever a voice switches to another staff a line connecting the notes
2930 can be printed automatically. This is enabled if the property
2931 @code{PianoStaff.followVoice} is set to true:
2933 @lilypond[fragment,relative,verbatim]
2934 \context PianoStaff <
2935 \property PianoStaff.followVoice = ##t
2936 \context Staff \context Voice {
2938 \translator Staff=two
2941 \context Staff=two { \clef bass \skip 1*2 }
2945 The associated object is @internalsref{VoiceFollower}.
2949 @section Vocal music
2951 For a discussion of how to put lyrics into a score, see section
2952 @code{Printing lyrics} in the tutorial.
2954 @cindex context variables
2955 @cindex setting context variables
2956 An interpretation context has variables that tune its behavior. These
2957 variables are also called @emph{properties}. The @code{autoBeaming}
2958 variable in a @code{Staff} controls whether 8th and shorter notes are
2959 beamed automatically. Setting the variable to @code{##f}, which is the
2960 boolean value @var{false}, turns it off.
2963 This will create an extender, which is a line
2964 that extends over the entire duration of the lyric. This line will
2965 run all the way to the start of the next lyric, so you may want to
2966 shorten it by using a blank lyric (using @code{_}).
2969 @cindex @code{\lyrics}
2971 To get them printed, you must do two
2972 things: indicate that lyrics are entered with @code{\lyrics}, and
2973 indicate that this type of music must be interpreted as texts (and not
2974 notes). This is done with @code{\context Lyrics}.
2976 You can enter lyrics in a special input mode of LilyPond. This mode is
2977 called Lyrics mode, and it is introduced by the keyword
2978 @code{\lyrics}. In this mode you can enter lyrics, with punctuation
2979 and accents without any hassle. Syllables are entered like notes, but
2980 with pitches replaced by text. For example,
2988 You can use ordinary hyphens at the end of a syllable, i.e.
2992 but then the hyphen will be attached to the end of the first syllable.
2994 If you want them centered between syllables you can use the special
2995 `@code{-}@code{-}' lyric as a separate word between syllables. The
2996 hyphen will have variable length depending on the space between
2997 the syllables and it will be centered between the syllables.
3002 Normally the notes that you enter are transformed into note heads.
3003 Note heads alone make no sense. They need surrounding information: a
3004 key signature, a clef, staff lines, etc. They need @emph{context}.
3005 In LilyPond, these symbols are created by objects called
3006 `interpretation contexts'. Interpretation contexts exist for
3007 generating notation (`notation context') and for generating sound
3008 (`performance context'). These objects only exist while LilyPond is
3009 executing. For lyrics, the command
3013 must be used to interpret a set of syllables as lyrics.
3018 @cindex interpretation context
3019 @cindex notation context
3023 The melody and the lyrics can be combined with the @code{\addlyrics}:
3026 \notes \relative c' @dots{}
3027 \context Lyrics \lyrics @dots{}
3030 [TODO: Move lyrics section from tutorial to here?]
3032 See also the sections on @ref{Slurs} and @ref{Breath marks}.
3034 [TODO: Move slurs / breath marks section to here?]
3036 [TODO: Write subsection upon usage of ChoirStaff.]
3045 @subsection More stanzas
3050 If you have multiple stanzas printed underneath each other, the vertical
3051 groups of syllables should be aligned around punctuation. LilyPond can
3052 do this if you tell it which lyric lines belong to which melody.
3053 We show how you can do this by showing how you could print a frivolous
3054 fragment of a fictional Sesame Street duet.
3056 @lilypond[singleline,verbatim]
3059 \notes \relative c'' \context Voice = duet { \time 3/4
3061 \lyrics \context Lyrics <
3062 \context LyricsVoice = "duet-1" {
3063 \property LyricsVoice . stanza = "Bert"
3064 Hi, my name is bert. }
3065 \context LyricsVoice = "duet-2" {
3066 \property LyricsVoice . stanza = "Ernie"
3067 Ooooo, ch\'e -- ri, je t'aime. }
3072 To this end, give the Voice context an identity, and set the
3073 LyricsVoice to a name starting with that identity followed by a dash.
3074 In the following example, the Voice identity is @code{duet},
3076 \context Voice = duet @{
3081 identities of the LyricsVoices are @code{duet-1} and @code{duet-2}.
3083 \context LyricsVoice = "duet-1" @{
3084 Hi, my name is bert. @}
3085 \context LyricsVoice = "duet-2" @{
3086 Ooooo, ch\'e -- ri, je t'aime. @}
3088 The convention for naming @code{LyricsVoice} and @code{Voice} must
3089 also be used to get melismata on rests correct.
3092 We add the names of the singers. This can be done by setting
3093 @code{LyricsVoice.Stanza} (for the first system) and
3094 @code{LyricsVoice.stz} for the following systems. You must
3095 surround dots with spaces in @code{\lyrics} mode.
3098 \property LyricsVoice . stanza = "Bert"
3100 \property LyricsVoice . stanza = "Ernie"
3106 For entering quotes in Lyrics mode, use the following
3108 "\"God\"" is "`King'"
3111 You can use empty syllables, e.g. @code{_4} or @code{" "4} to enter
3112 lyrics. This can confuse the LilyPond -- for example, this might put
3113 (empty) lyrics under rests. To remedy this, use @code{\skip}.
3121 Input for lyrics introduces a syntactical ambiguity:
3128 is interpreted as assigning a string identifier @code{\foo} such that
3129 it contains @code{"bar"}. However, it could also be interpreted as
3130 making or a music identifier @code{\foo} containing the syllable
3131 `bar'. The force the latter interpretation, use
3141 The term @emph{ambitus} denotes a range of pitches for a given voice in
3142 a part of music. It also may denote the pitch range that a musical
3143 instrument is capable of playing. Most musical instruments have their
3144 ambitus standardized (or at least there is agreement upon the minimal
3145 ambitus of a particular type of instrument), such that a composer or
3146 arranger of a piece of music can easily meet the ambitus constraints of
3147 the targeted instrument. However, the ambitus of the human voice
3148 depends on individual physiological state, including education and
3149 training of the voice. Therefore, a singer potentially has to check for
3150 each piece of music if the ambitus of that piece meets his individual
3151 capabilities. This is why the ambitus of a piece may be of particular
3152 value to vocal performers.
3154 The ambitus is typically notated on a per-voice basis at the very
3155 beginning of a piece, e.g. nearby the initial clef or time signature of
3156 each staff. The range is graphically specified by two noteheads, that
3157 represent the minimum and maximum pitch. Some publishers use a textual
3158 notation: they put the range in words in front of the corresponding
3159 staff. Lilypond currently only supports the graphical ambitus notation.
3161 To apply, add the @internalsref{Ambitus_engraver} to the
3162 @internalsref{Voice} context, i.e.
3165 \paper @{ \translator @{
3167 \consists Ambitus_engraver
3173 @lilypond[singleline]
3174 upper = \notes \relative c {
3177 as'' c e2 bes f cis d4 e f2 g
3179 lower = \notes \relative c {
3182 e'4 b g a c es fis a cis b a g f e d2
3185 \context ChoirStaff {
3187 \context Staff = one { \upper }
3188 \context Staff = three { \lower }
3194 \consists Ambitus_engraver
3203 @internalsref{Ambitus}, @inputfileref{input/regression,ambitus.ly}.
3208 Tablature notation is used for notating music for plucked string
3209 instruments. It notates pitches not by using note heads, but by
3210 indicating on which string and fret a note must be played. LilyPond
3211 offers limited support for tablature.
3214 * Tablatures basic::
3215 * Non-guitar tablatures::
3218 @node Tablatures basic
3219 @subsection Tablatures basic
3220 @cindex Tablatures basic
3222 The string number associated to a note is given as a backslash
3223 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3224 string. By default, string 1 is the highest one, and the tuning
3225 defaults to the standard guitar tuning (with 6 strings). The notes
3226 are printed as tablature, by using @internalsref{TabStaff} and
3227 @internalsref{TabVoice} contexts.
3229 @lilypond[fragment,verbatim]
3230 \notes \context TabStaff {
3236 If you do not specify a string number then one is selected
3237 automatically: the first string that does not give a fret number less
3238 than @code{minimumFret} is selected. The default value for
3239 @code{minimumFret} is 0.
3243 e8 fis gis a b cis' dis' e'
3244 \property TabStaff.minimumFret = #8
3245 e8 fis gis a b cis' dis' e'
3250 e8 fis gis a b cis' dis' e'
3251 \property TabStaff.minimumFret = #8
3252 e8 fis gis a b cis' dis' e'
3255 \context StaffGroup <
3256 \context Staff { \clef "G_8" \frag }
3257 \context TabStaff { \frag }
3264 @internalsref{TabStaff}, @internalsref{TabVoice}, and
3265 @internalsref{StringNumberEvent}.
3269 Chords are not handled in a special way, and hence the automatic
3270 string selector may easily select the same string to two notes in a
3274 @node Non-guitar tablatures
3275 @subsection Non-guitar tablatures
3276 @cindex Non-guitar tablatures
3278 You can change the number of strings, by setting the number of lines
3279 in the @internalsref{TabStaff} (the @code{line-count} property of
3280 @internalsref{TabStaff} can only be changed using
3281 @code{\outputproperty}, for more information, see @ref{Tuning objects}.
3283 You can change the tuning of the strings. A string tuning is given as
3284 a Scheme list with one integer number for each string, the number
3285 being the pitch (measured in semitones relative to central C) of an
3286 open string. The numbers specified for @code{stringTuning} are the
3287 numbers of semitones to subtract or add, starting the specified pitch
3288 by default middle C, in string order: thus the notes are e, a, d, and
3291 @lilypond[fragment,verbatim]
3294 \outputproperty #(make-type-checker 'staff-symbol-interface)
3296 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3299 a,4 c' a e' e c' a e'
3304 It is possible to change the Scheme function to format the tablature
3305 note text. The default is @code{fret-number-tablature-format}, which
3306 uses the fret number. For instruments that do not use this notation,
3307 you can create a special tablature formatting function. This function
3308 takes three argument: the string number, the string tuning and the
3313 As tablature is a recent feature, most of the guitar special effects
3314 such as bend are not yet supported.
3318 @section Chord namess
3321 LilyPond has support for both entering and printing named chords.
3322 These chords are internally represented as a set of pitches. Therefore
3323 they can be entered by name and printed as notes, entered as notes and
3324 printed as chord names, or (the most common case) entered them by
3325 name, and print them as name. The following fragment shows these
3328 @lilypond[verbatim,singleline]
3329 twoWays = \notes \transpose c c' {
3339 < \context ChordNames \twoWays
3340 \context Voice \twoWays > }
3343 This example also shows that the chord printing routines do not try to
3344 be intelligent. The chord @code{f bes d}, is not interpreted as an
3350 * Printing chord names::
3355 @subsection Chords mode
3358 Chord mode is a mode where you can input sets of pitches using common
3359 names. It is introduced by the keyword @code{\chords}.
3360 In chords mode, a chord is entered by the root, which is entered
3361 like a common pitch, for example,
3362 @lilypond[fragment,verbatim,quote, relative=1]
3363 \chords { es4. d8 c2 }
3368 Other chords may be entered by suffixing a colon, and introducing a
3369 modifier, and optionally, a number, for example
3371 @lilypond[fragment,verbatim,quote]
3372 \chords { e1:m e1:7 e1:m7 }
3374 The first number following the root is taken to be the `type' of the
3375 chord, thirds are added to the root until it reaches the specified
3376 number, for example.
3377 @lilypond[fragment,verbatim]
3378 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3381 @cindex root of chord
3382 @cindex additions, in chords
3383 @cindex removals, in chords
3385 More complex chords may also be constructed adding separate steps
3386 to a chord. Additions are added after the number following
3387 the colon, and are separated by dots. For example
3389 @lilypond[verbatim,fragment,quote]
3390 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3392 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3393 to the number, for example:
3394 @lilypond[verbatim,fragment,quote]
3395 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3397 Removals are specified similarly, and are introduced by a caret. They
3398 must come after the additions.
3399 @lilypond[verbatim,fragment]
3400 \chords { c^3 c:7^5 c:9^3.5 }
3403 Modifiers can be used to change pitches. The following modifiers are
3407 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3409 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3412 is the augmented chord. This modifier raises the 5th step.
3414 is the major 7th chord. This modifier raises the 7th step if present.
3416 is the suspended 4th or 2nd. This modifier removes the 3rd
3417 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3420 Modifiers can be mixed with additions.
3421 @lilypond[verbatim,fragment]
3422 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3425 @cindex modifiers, in chords.
3432 Since the unaltered 11 does sound well when combined with the
3433 unaltered 3, the 11 is removed in this case, unless it is added
3434 explicitly). For example,
3435 @lilypond[fragment,verbatim]
3436 \chords { c:13 c:13.11 c:m13 }
3441 An inversion (putting one pitch of the chord on the bottom), as well
3442 as bass notes, can be specified by appending
3443 @code{/}@var{pitch} to the chord.
3444 @lilypond[fragment,verbatim,center]
3445 \chords { c1 c/g c/f }
3448 If you do not want to remove the bass note from the chord, but rather
3449 add the note, then you can use @code{/+}@var{pitch}.
3451 @lilypond[fragment,verbatim,center]
3452 \chords { c1 c/+g c/+f }
3455 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3456 of the commands continue to work, for example, @code{r} and
3457 @code{\skip} can be used to insert rests and spaces, and
3458 @code{\property} may be used to change various settings.
3464 Each step can only be present in a chord once. The following
3465 simply produces the augmented chord, since @code{5+} is interpreted
3468 @lilypond[verbatim,fragment]
3469 \chords { c:5.5-.5+ }
3472 In chord mode, dashes and carets are used to indicate chord additions
3473 and subtractions, so articulation scripts cannot be entered.
3476 @node Printing chord names
3477 @subsection Printing chord names
3479 @cindex printing chord names
3483 For displaying printed chord names, use the @internalsref{ChordNames}
3484 context. The chords may be entered either using the notation
3485 described above, or directly using @code{<<} and @code{>>}.
3487 @lilypond[verbatim,singleline]
3489 \chords {a1 b c} <<d' f' g'>> <<e' g' b'>>
3493 \context ChordNames \scheme
3494 \context Staff \scheme
3499 You can make the chord changes stand out by setting
3500 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3501 display chord names when there is a change in the chords scheme and at
3502 the start of a new line.
3506 c1:m c:m \break c:m c:m d
3510 \context ChordNames {
3511 \property ChordNames.chordChanges = ##t
3513 \context Staff \transpose c c' \scheme
3515 \paper{linewidth= 9.\cm}
3519 The default chord name layout is a system for Jazz music, proposed by
3520 Klaus Ignatzek (See @ref{Literature}).
3522 The Ignatzek chord name formatting can be tuned in a number of ways
3523 through the following properties:
3526 @cindex chordNameExceptions
3527 @item chordNameExceptions
3528 This is a list that contains the chords that have special formatting.
3530 @inputfileref{input/regression,chord-name-exceptions.ly}.
3531 @cindex exceptions, chord names.
3534 @cindex majorSevenSymbol
3535 @item majorSevenSymbol
3536 This property contains the markup object used for the 7th step, when
3537 it is major. Predefined options are @code{whiteTriangleMarkup} and
3538 @code{blackTriangleMarkup}. See
3539 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3541 @cindex chordNameSeparator
3542 @item chordNameSeparator
3543 Different parts of a chord name are normally separated by a
3544 slash. By setting @code{chordNameSeparator}, you can specify other
3546 @lilypond[fragment,verbatim]
3547 \context ChordNames \chords {
3549 \property ChordNames.chordNameSeparator
3554 @cindex chordRootNamer
3555 @item chordRootNamer
3556 The root of a chord is usually printed as a letter with an optional
3557 alteration. The transformation from pitch to letter is done by this
3558 function. Special note names (for example, the German ``H'' for a
3559 B-chord) can be produced by storing a new function in this property.
3561 @cindex chordNoteNamer
3562 @item chordNoteNamer
3563 The default is to print single notes (as for instance the bass note)
3564 using the @code{chordRootNamer}. However, by setting this function to a non-null
3565 value you can specify a different function. I.e. you could use letters
3566 in lower case for the base note.
3572 @inputfileref{input/regression,chord-name-major7.ly},
3573 @inputfileref{input/regression,chord-name-exceptions.ly},
3574 @inputfileref{input/test,chord-names-german.ly},
3575 @file{scm/chords-ignatzek.scm}, @file{scm/chord-entry.scm}
3580 Chord names are determined solely from the list of pitches. Chord
3581 inversions are not identified, and neither are added bass notes. This
3582 may result in strange chord names when chords are entered with the
3583 @code{<< .. >>} syntax.
3589 @section Writing parts
3591 Orchestral music involves some special notation, both in the full
3592 score and the individual parts. This section explains how to tackle
3593 some common problems in orchestral music.
3600 * Instrument names::
3602 * Multi measure rests::
3603 * Automatic part combining::
3605 * Sound output for transposing instruments::
3609 @node Rehearsal marks
3610 @subsection Rehearsal marks
3611 @cindex Rehearsal marks
3613 @cindex @code{\mark}
3615 To print a rehearsal mark, use the @code{\mark} command.
3616 @lilypond[fragment,verbatim]
3626 The mark is incremented automatically if you use @code{\mark
3627 \default}. The value to use is stored in the property
3628 @code{rehearsalMark} is used and automatically incremented.
3630 The @code{\mark} command can also be used to put signs like coda,
3631 segno and fermatas on a barline. Use @code{\markup} to
3632 to access the appropriate symbol.
3634 @lilypond[fragment,verbatim,relative=1]
3635 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
3639 In this case, during line breaks,
3640 marks must also be printed at the end of the line, and not at the
3641 beginning. Use the following to force that behavior
3643 \property Score.RehearsalMark \override
3644 #'break-visibility = #begin-of-line-invisible
3647 See @inputfileref{input/test,boxed-molecule.ly}. for putting boxes
3653 @cindex barlines, putting symbols on
3657 @internalsref{MarkEvent}, @internalsref{RehearsalMark},
3658 @inputfileref{input/test,boxed-molecule.ly}.
3662 @subsection Bar numbers
3666 @cindex measure numbers
3667 @cindex currentBarNumber
3669 Bar numbers are printed by default at the start of the line. The
3670 number itself is stored in the
3671 @code{currentBarNumber} property,
3672 which is normally updated automatically for every measure.
3674 Bar numbers can be typeset at regular intervals instead of at the
3675 beginning of each line. This is illustrated in the following example,
3676 whose source is available as
3677 @inputfileref{input/test,bar-number-every-fifth.ly}
3679 @lilypondfile[notexidoc]{bar-number-every-fifth.ly}
3681 The start of that numbering can also be reset, as demonstrated in
3682 @inputfileref{input/test,bar-number-every-5-reset.ly}.
3684 @lilypondfile[notexidoc]{bar-number-every-5-reset.ly}
3689 @internalsref{BarNumber}.
3690 @inputfileref{input/test,bar-number-every-5-reset.ly}.
3691 @inputfileref{input/test,bar-number-every-fifth.ly}
3695 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
3696 there is one at the top. To solve this, You have to twiddle with the
3697 @internalsref{padding} property of @internalsref{BarNumber} if your
3698 score starts with a @internalsref{StaffGroup}.
3700 @node Instrument names
3701 @subsection Instrument names
3703 In an orchestral score, instrument names are printed left of the
3706 This can be achieved by setting @internalsref{Staff}.@code{instrument}
3707 and @internalsref{Staff}.@code{instr}. This will print a string before
3708 the start of the staff. For the first start, @code{instrument} is
3709 used, for the next ones @code{instr} is used.
3711 @lilypond[verbatim,singleline]
3712 \property Staff.instrument = "ploink " { c''4 }
3715 You can also use markup texts to construct more complicated instrument
3718 @lilypond[fragment,verbatim,singleline]
3719 \notes \context Staff = treble {
3720 \property Staff.instrument = \markup {
3721 \column << "Clarinetti"
3723 \smaller \musicglyph #"accidentals--1"
3734 @internalsref{InstrumentName}
3738 When you put a name on a grand staff or piano staff the width of the
3739 brace is not taken into account. You must add extra spaces to the end of
3740 the name to avoid a collision.
3743 @subsection Transpose
3745 @cindex transposition of pitches
3746 @cindex @code{\transpose}
3748 A music expression can be transposed with @code{\transpose}. The syntax
3751 \transpose @var{from} @var{to} @var{musicexpr}
3754 This means that @var{musicexpr} is transposed by the interval
3755 between @var{from} and @var{to}.
3757 @code{\transpose} distinguishes between enharmonic pitches: both
3758 @code{\transpose c cis} or @code{\transpose c des} will transpose up
3759 half a tone. The first version will print sharps and the second
3760 version will print flats.
3762 @lilypond[singleline, verbatim]
3763 mus =\notes { \key d \major cis d fis g }
3764 \score { \notes \context Staff {
3767 \transpose c g' \mus
3768 \transpose c f' \mus
3774 @internalsref{TransposedMusic}, @internalsref{UntransposableMusic}.
3778 If you want to use both @code{\transpose} and @code{\relative}, then
3779 you must put @code{\transpose} outside of @code{\relative}, since
3780 @code{\relative} will have no effect music that appears inside a
3786 @node Multi measure rests
3787 @subsection Multi measure rests
3788 @cindex Multi measure rests
3792 Multi measure rests are entered using `@code{R}'. It is specifically
3793 meant for full bar rests and for entering parts: the rest can expand to
3794 fill a score with rests, or it can be printed as a single multimeasure
3795 rest. This expansion is controlled by the property
3796 @code{Score.skipBars}. If this is set to true, Lily will not expand
3797 empty measures, and the appropriate number is added automatically.
3799 @lilypond[fragment,verbatim]
3800 \time 4/4 r1 | R1 | R1*2
3801 \property Score.skipBars = ##t R1*17 R1*4
3804 The @code{1} in @code{R1} is similar to the duration notation used for
3805 notes. Hence, for time signatures other than 4/4, you must enter other
3806 durations. This can be done with augmentation dots or fractions:
3808 @lilypond[fragment,verbatim]
3809 \property Score.skipBars = ##t
3817 A @code{R} spanning a single measure is printed as a whole rest
3818 centered in the measure (or a breve when the measure lasts longer than
3819 two whole notes), regardless of the time signature.
3823 @cindex text on multi-measure rest
3824 @cindex script on multi-measure rest
3825 @cindex fermata on multi-measure rest
3827 Texts can be added to multi-measure rests by using the
3828 @var{note}-@code{markup} syntax. In this case, the number is
3829 replaced. If you need both texts and the number, you must add the
3830 number by hand. A variable (@code{\fermataMarkup}) is provided for
3834 @lilypond[verbatim,fragment]
3836 R2._\markup { "Ad lib" }
3841 @cindex whole rests for a full measure
3845 @internalsref{MultiMeasureRestEvent},
3846 @internalsref{MultiMeasureTextEvent},
3847 @internalsref{MultiMeasureRestMusicGroup},
3848 @internalsref{MultiMeasureRest}.
3850 The graphical object @internalsref{MultiMeasureRestNumber} is for the
3851 default number, and @internalsref{MultiMeasureRestText} for user
3856 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
3857 over multi-measure rests.
3859 @cindex condensing rests
3861 There is no way to automatically condense multiple rests into a single
3862 multimeasure rest. Multi measure rests do not take part in rest
3865 Be careful when entering multimeasure rests followed by whole notes,
3869 will enter two notes lasting four measures each. When @code{skipBars}
3870 is set, then the result will look OK6, but the bar numbering will be
3873 @node Automatic part combining
3874 @subsection Automatic part combining
3875 @cindex automatic part combining
3876 @cindex part combiner
3879 Automatic part combining is used to merge two parts of music onto a
3880 staff. It is aimed at typesetting orchestral scores. When the two
3881 parts are identical for a period of time, only one is shown. In
3882 places where the two parts differ, they are typeset as separate
3883 voices, and stem directions are set automatically. Also, solo and
3884 @emph{a due} parts are identified and can be marked.
3888 The syntax for part combining is
3891 \partcombine @var{context} @var{musicexpr1} @var{musicexpr2}
3893 where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
3894 combined into one context of type @var{context}. The music expressions
3895 must be interpreted by contexts whose names should start with @code{one}
3898 The following example demonstrates the basic functionality of the part
3899 combiner: putting parts on one staff, and setting stem directions and
3902 @lilypond[verbatim,singleline,fragment]
3904 \context Voice=one \partcombine Voice
3905 \context Thread=one \relative c'' {
3908 \context Thread=two \relative c'' {
3914 The first @code{g} appears only once, although it was
3915 specified twice (once in each part). Stem, slur and tie directions are
3916 set automatically, depending whether there is a solo or unisono. The
3917 first part (with context called @code{one}) always gets up stems, and
3918 `solo', while the second (called @code{two}) always gets down stems and
3921 If you just want the merging parts, and not the textual markings, you
3922 may set the property @var{soloADue} to false.
3924 @lilypond[verbatim,singleline,fragment]
3926 \property Staff.soloADue = ##f
3927 \context Voice=one \partcombine Voice
3928 \context Thread=one \relative c'' {
3931 \context Thread=two \relative c'' {
3939 @internalsref{PartCombineMusic},
3940 @internalsref{Thread_devnull_engraver},
3941 @internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}.
3945 The syntax for naming contexts in inconsistent with the syntax for
3948 In @code{soloADue} mode, when the two voices play the same notes on and
3949 off, the part combiner may typeset @code{a2} more than once in a
3952 @lilypond[fragment,singleline]
3954 \context Voice=one \partcombine Voice
3955 \context Thread=one \relative c'' {
3958 \context Thread=two \relative c'' {
3964 The part combiner is slated to be rewritten [TODO: explain why] .
3966 @cindex @code{Thread_devnull_engraver}
3967 @cindex @code{Voice_engraver}
3968 @cindex @code{A2_engraver}
3970 @node Frenched scores
3971 @subsection Frenched scores
3973 In orchestral scores, staff lines that only have rests are usually removed.
3974 This saves some space. This style is called `French Score'.
3978 This is supported through the @code{FrenchStaff}. This staff is
3979 removed when it turns out empty (or containing multimeasure rests)
3980 after the line-breaking process.
3983 For @internalsref{Lyrics}, @internalsref{LyricsVoice},
3984 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
3985 switched on by default. For normal staffs, it is available as a
3986 specialized @internalsref{Staff} context, with the name variable
3987 @code{\FrenchStaffContext}. Observe how the second staff in this
3988 example disappears in the second line.
3992 \notes \relative c' <
3993 \context Staff = SA { e4 f g a \break c1 }
3994 \context Staff = SB { c4 d e f \break R1 }
3998 \translator { \FrenchStaffContext }
4004 @node Sound output for transposing instruments
4005 @subsection Sound output for transposing instruments
4007 When you want to make a MIDI file from a score containing transposed
4008 and untransposed instruments, you have to instruct LilyPond the pitch
4009 offset (in semitones) for the transposed instruments. This is done
4010 using the @code{transposing} property. It does not affect printed
4013 @cindex @code{transposing}
4016 \property Staff.instrument = #"Cl. in B-flat"
4017 \property Staff.transposing = #-2
4021 @node Ancient notation
4022 @section Ancient notation
4024 @cindex Vaticana, Editio
4025 @cindex Medicaea, Editio
4030 [TODO: write introduction on ancient notation]
4033 * Ancient note heads::
4042 @node Ancient note heads
4043 @subsection Ancient note heads
4045 To get a longa note head, you have to use mensural note heads. This
4046 is accomplished by setting the @code{style} property of the
4047 NoteHead object to @code{mensural}. There is also a note head style
4048 @code{baroque} which gives mensural note heads for @code{\longa} and
4049 @code{\breve} but standard note heads for shorter notes.
4051 @lilypond[fragment,singleline,verbatim]
4052 \property Voice.NoteHead \set #'style = #'mensural
4057 @subsection Ancient clefs
4059 LilyPond supports a variety of clefs, many of them ancient.
4061 For modern clefs, see section @ref{Clef}. For the percussion clef, see
4062 section @ref{Percussion staves}. For the @code{TAB} clef, see section
4065 The following table shows all ancient clefs that are supported via the
4066 @code{\clef} command. Some of the clefs use the same glyph, but
4067 differ only with respect to the line they are printed on. In such
4068 cases, a trailing number in the name is used to enumerate these clefs.
4069 Still, you can manually force a clef glyph to be typeset on an
4070 arbitrary line, as described in section @ref{Clef}. The note printed
4071 to the right side of each clef in the example column denotes the
4072 @code{c'} with respect to that clef.
4074 @c --- This should go somewhere else: ---
4075 @c @item modern style G clef (glyph: @code{clefs-G})
4078 @c @code{treble}, @code{violin}, @code{G}, @code{G2}, @code{french}
4080 @c @lilypond[26pt]{\property Staff.TimeSignature \set #'transparent = ##t \clef "G" c'}
4082 @c @item modern style F clef (glyph: @code{clefs-F})
4085 @c @code{varbaritone}, @code{bass}, @code{F}, @code{subbass}
4087 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "F" c'}
4089 @c @item modern style C clef (glyph: @code{clefs-C})
4092 @c @code{soprano}, @code{mezzosoprano}, @code{alto}, @code{C},
4093 @c @code{tenor}, @code{baritone}
4095 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "C" c'}
4097 @multitable @columnfractions .3 .3 .3 .1
4101 @b{Description} @tab
4102 @b{Supported Clefs} @tab
4106 @code{clefs-neo_mensural_c} @tab
4107 modern style mensural C clef @tab
4108 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4109 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4110 @lilypond[relative 0, notime]
4111 \property Staff.TimeSignature \set #'transparent = ##t
4112 \clef "neo_mensural_c2" c
4116 @code{clefs-petrucci_c1}
4117 @code{clefs-petrucci_c2}
4118 @code{clefs-petrucci_c3}
4119 @code{clefs-petrucci_c4}
4120 @code{clefs-petrucci_c5}
4123 petrucci style mensural C clefs, for use on different stafflines
4124 (the examples shows the 2nd staffline C clef).
4134 @lilypond[relative 0, notime]
4135 \property Staff.TimeSignature \set #'transparent = ##t
4136 \clef "petrucci_c2" c
4140 @code{clefs-petrucci_f} @tab
4141 petrucci style mensural F clef @tab
4142 @code{petrucci_f} @tab
4143 @lilypond[relative 0, notime]
4144 \property Staff.TimeSignature \set #'transparent = ##t
4145 \clef "petrucci_f" c
4149 @code{clefs-petrucci_g} @tab
4150 petrucci style mensural G clef @tab
4151 @code{petrucci_g} @tab
4152 @lilypond[relative 0, notime]
4153 \property Staff.TimeSignature \set #'transparent = ##t
4154 \clef "petrucci_g" c
4158 @code{clefs-mensural_c'} @tab
4159 historic style mensural C clef @tab
4160 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4161 @code{mensural_c4} @tab
4162 @lilypond[relative 0, notime]
4163 \property Staff.TimeSignature \set #'transparent = ##t
4164 \clef "mensural_c2" c
4168 @code{clefs-mensural_f} @tab
4169 historic style mensural F clef @tab
4170 @code{mensural_f} @tab
4171 @lilypond[relative 0, notime]
4172 \property Staff.TimeSignature \set #'transparent = ##t
4173 \clef "mensural_f" c
4177 @code{clefs-mensural_g} @tab
4178 historic style mensural G clef @tab
4179 @code{mensural_g} @tab
4180 @lilypond[relative 0, notime]
4181 \property Staff.TimeSignature \set #'transparent = ##t
4182 \clef "mensural_g" c
4186 @code{clefs-vaticana_do} @tab
4187 Editio Vaticana style do clef @tab
4188 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4189 @lilypond[relative 0, notime]
4191 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4192 \property Staff.TimeSignature \set #'transparent = ##t
4193 \clef "vaticana_do2" c
4197 @code{clefs-vaticana_fa} @tab
4198 Editio Vaticana style fa clef @tab
4199 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4200 @lilypond[relative 0, notime]
4202 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4203 \property Staff.TimeSignature \set #'transparent = ##t
4204 \clef "vaticana_fa2" c
4208 @code{clefs-medicaea_do} @tab
4209 Editio Medicaea style do clef @tab
4210 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4211 @lilypond[relative 0, notime]
4213 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4214 \property Staff.TimeSignature \set #'transparent = ##t
4215 \clef "medicaea_do2" c
4219 @code{clefs-medicaea_fa} @tab
4220 Editio Medicaea style fa clef @tab
4221 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4222 @lilypond[relative 0, notime]
4224 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4225 \property Staff.TimeSignature \set #'transparent = ##t
4226 \clef "medicaea_fa2" c
4230 @code{clefs-hufnagel_do} @tab
4231 historic style hufnagel do clef @tab
4232 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
4233 @lilypond[relative 0, notime]
4235 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4236 \property Staff.TimeSignature \set #'transparent = ##t
4237 \clef "hufnagel_do2" c
4241 @code{clefs-hufnagel_fa} @tab
4242 historic style hufnagel fa clef @tab
4243 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
4244 @lilypond[relative 0, notime]
4246 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4247 \property Staff.TimeSignature \set #'transparent = ##t
4248 \clef "hufnagel_fa2" c
4252 @code{clefs-hufnagel_do_fa} @tab
4253 historic style hufnagel combined do/fa clef @tab
4254 @code{hufnagel_do_fa} @tab
4255 @lilypond[relative 0, notime]
4256 \property Staff.TimeSignature \set #'transparent = ##t
4257 \clef "hufnagel_do_fa" c
4262 @c --- This should go somewhere else: ---
4263 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
4266 @c @code{percussion}
4268 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
4270 @c @item modern style tab clef (glyph: @code{clefs-tab})
4275 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
4277 @emph{Modern style} means ``as is typeset in contemporary editions of
4278 transcribed mensural music''.
4280 @emph{Petrucci style} means ``inspired by printings published by the
4281 famous engraver Petrucci (1466-1539)''.
4283 @emph{Historic style} means ``as was typeset or written in historic
4284 editions (other than those of Petrucci)''.
4286 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
4288 Petrucci used C clefs with differently balanced left-side vertical
4289 beams, depending on which staffline it is printed.
4293 @subsection Custodes
4298 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
4299 symbol that appears at the end of a staff. It anticipates the pitch
4300 of the first note(s) of the following line and thus helps the player
4301 or singer to manage line breaks during performance, thus enhancing
4302 readability of a score.
4304 Custodes were frequently used in music notation until the 17th
4305 century. Nowadays, they have survived only in a few particular forms
4306 of musical notation such as contemporary editions of Gregorian chant
4307 like the @emph{editio vaticana}. There are different custos glyphs
4308 used in different flavours of notational style.
4310 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
4311 @internalsref{Staff} context when declaring the @code{\paper} block,
4312 as shown in the following example.
4318 \consists Custos_engraver
4319 Custos \override #'style = #'mensural
4324 The result looks like this:
4330 \property Staff.Custos \set #'style = #'mensural
4337 \consists Custos_engraver
4344 The custos glyph is selected by the @code{style} property. The styles
4345 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
4346 @code{mensural}. They are demonstrated in the following fragment:
4356 { " " \musicglyph #"custodes-vaticana-u0" }
4360 { " " \musicglyph #"custodes-medicaea-u0" }
4364 { " " \musicglyph #"custodes-hufnagel-u0" }
4368 { " " \musicglyph #"custodes-mensural-u0" }
4377 \remove "Bar_number_engraver"
4381 \remove "Clef_engraver"
4382 \remove "Key_engraver"
4383 \remove "Time_signature_engraver"
4384 \remove "Staff_symbol_engraver"
4385 minimumVerticalExtent = ##f
4391 If the boolean property @code{adjust-if-on-staffline} is set to
4392 @code{#t} (which it is by default), lily typesets slightly different
4393 variants of the custos glyph, depending on whether the custos, is
4394 typeset on or between stafflines. The glyph will
4395 optically fit well into the staff, with the appendage on the right of
4396 the custos always ending at the same vertical position between two
4397 stafflines regardless of the pitch. If you set
4398 @code{adjust-if-on-staffline} to @code{#f}, then
4399 a compromise between both forms is used.
4401 Just like stems can be attached to noteheads in two directions
4402 @emph{up} and @emph{down}, each custos glyph is available with its
4403 appendage pointing either up or down. If the pitch of a custos is
4404 above a selectable position, the appendage will point downwards; if
4405 the pitch is below this position, the appendage will point upwards.
4406 Use property @code{neutral-position} to select this position. By
4407 default, it is set to @code{0}, such that the neutral position is the
4408 center of the staff. Use property @code{neutral-direction} to control
4409 what happens if a custos is typeset on the neutral position itself.
4410 By default, this property is set to @code{-1}, such that the appendage
4411 will point downwards. If set to @code{1}, the appendage will point
4412 upwards. Other values such as @code{0} are reserved for future
4413 extensions and should not be used.
4418 @internalsref{Custos}, @inputfileref{input/test,custos-style.ly} and
4419 @inputfileref{input/regression,custos.ly}.
4423 @subsection Divisiones
4429 A @emph{divisio} (plural: @emph{divisiones}; latin word for
4430 `division') is a staff context symbol that is used to structure
4431 Gregorian music into phrases and sections. The musical meaning of
4432 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
4433 can be characterized as short, medium and long pause, somewhat like
4434 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
4435 a chant, but is also frequently used within a single
4436 antiphonal/responsorial chant to mark the end of each section.
4440 To use divisiones, include the file @code{gregorian-init.ly}. It
4441 contains definitions that you can apply by just inserting
4442 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
4443 and @code{\finalis} at proper places in the input. Some editions use
4444 @emph{virgula} or @emph{caesura} instead of divisio minima.
4445 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
4449 @lilypondfile[notexidoc]{divisiones.ly}
4453 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
4454 @inputfileref{input/test,divisiones.ly}, @ref{Breath marks}.
4457 @subsection Ligatures
4461 @c TODO: Should double check if I recalled things correctly when I wrote
4462 @c down the following paragraph by heart.
4464 In musical terminology, a ligature is a coherent graphical symbol that
4465 represents at least two different notes. Ligatures originally appeared
4466 in the manuscripts of Gregorian chant notation roughly since the 9th
4467 century as an allusion to the accent symbols of greek lyric poetry to
4468 denote ascending or descending sequences of notes. Both, the shape and
4469 the exact meaning of ligatures changed tremendously during the following
4470 centuries: In early notation, ligatures where used for monophonic tunes
4471 (Gregorian chant) and very soon denoted also the way of performance in
4472 the sense of articulation. With upcoming multiphony, the need for a
4473 metric system arised, since multiple voices of a piece have to be
4474 synchronized some way. New notation systems were invented that used
4475 the manifold shapes of ligatures to now denote rhythmical patterns
4476 (e.g. black mensural notation, mannered notation, ars nova). With the
4477 invention of the metric system of the white mensural notation, the need
4478 for ligatures to denote such patterns disappeared. Nevertheless,
4479 ligatures were still in use in the mensural system for a couple of
4480 decades until they finally disappeared during the late 16th / early 17th
4481 century. Still, ligatures have survived in contemporary editions of
4482 Gregorian chant such as the Editio Vaticana from 1905/08.
4486 Syntactically, ligatures are simply enclosed by @code{\[} and
4487 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
4488 additional input syntax specific for this particular type of ligature.
4489 By default, the @internalsref{LigatureBracket} engraver just puts a
4490 square bracket above the ligature.
4492 @lilypond[singleline,verbatim]
4494 \notes \transpose c c' {
4502 To select a specific style of ligatures, a proper ligature engraver
4503 has to be added to the @internalsref{Voice} context, as explained in
4504 the following subsections. Currently, only white mensural ligatures
4505 are supported with certain limitations. Support for Editio Vaticana
4506 will be added in the future.
4509 * White mensural ligatures::
4510 * Gregorian square neumes ligatures::
4513 @node White mensural ligatures
4514 @subsubsection White mensural ligatures
4516 @cindex Mensural ligatures
4517 @cindex White mensural ligatures
4519 There is limited support for white mensural ligatures. The
4520 implementation is still experimental; it currently may output strange
4521 warnings or even crash in some cases or produce weird results on more
4522 complex ligatures. To engrave white mensural ligatures, in the paper
4523 block the @internalsref{Mensural_ligature_engraver} has to be put into
4524 the @internalsref{Voice} context, and remove the
4525 @internalsref{Ligature_bracket_engraver}:
4531 \remove Ligature_bracket_engraver
4532 \consists Mensural_ligature_engraver
4537 There is no additional input language to describe the shape of a
4538 white mensural ligature. The shape is rather determined solely from
4539 the pitch and duration of the enclosed notes. While this approach may
4540 take a new user a while to get accustomed, it has the great advantage
4541 that the full musical information of the ligature is known internally.
4542 This is not only required for correct MIDI output, but also allows for
4543 automatic transcription of the ligatures.
4548 \property Score.timing = ##f
4549 \property Score.defaultBarType = "empty"
4550 \property Voice.NoteHead \set #'style = #'neo_mensural
4551 \property Staff.TimeSignature \set #'style = #'neo_mensural
4553 \[ g\longa c\breve a\breve f\breve d'\longa \]
4555 \[ e1 f1 a\breve g\longa \]
4557 @lilypond[singleline]
4559 \notes \transpose c c' {
4560 \property Score.timing = ##f
4561 \property Score.defaultBarType = "empty"
4562 \property Voice.NoteHead \set #'style = #'neo_mensural
4563 \property Staff.TimeSignature \set #'style = #'neo_mensural
4565 \[ g\longa c\breve a\breve f\breve d'\longa \]
4567 \[ e1 f1 a\breve g\longa \]
4572 \remove Ligature_bracket_engraver
4573 \consists Mensural_ligature_engraver
4579 Without replacing @internalsref{Ligature_bracket_engraver} with
4580 @internalsref{Mensural_ligature_engraver}, the same music transcribes
4583 @lilypond[singleline]
4585 \notes \transpose c c' {
4586 \property Score.timing = ##f
4587 \property Score.defaultBarType = "empty"
4588 \property Voice.NoteHead \set #'style = #'neo_mensural
4589 \property Staff.TimeSignature \set #'style = #'neo_mensural
4591 \[ g\longa c\breve a\breve f\breve d'\longa \]
4593 \[ e1 f1 a\breve g\longa \]
4598 @node Gregorian square neumes ligatures
4599 @subsubsection Gregorian square neumes ligatures
4601 @cindex Square neumes ligatures
4602 @cindex Gregorian square neumes ligatures
4604 Gregorian square neumes notation (following the style of the Editio
4605 Vaticana) is under heavy development, but not yet really usable for
4606 production purposes. The following table contains the extended neumes
4607 table of the 2nd volume of the Antiphonale Romanum (@emph{Liber
4608 Hymnarius}), published 1983 by the monks of Solesmes.
4610 @multitable @columnfractions .4 .2 .2 .2
4613 @b{Neuma aut@*Neumarum Elementa} @tab
4614 @b{Figurae@*Rectae} @tab
4615 @b{Figurae@*Liquescentes Auctae} @tab
4616 @b{Figurae@*Liquescentes Deminutae}
4618 @c TODO: \paper block is identical in all of the below examples.
4619 @c Therefore, it should somehow be included rather than duplicated all
4623 @code{1. Punctum} @tab
4624 @lilypond[noindent, 26pt, nofragment, linewidth=1.5cm]
4625 \include "gregorian-init.ly"
4627 \notes \transpose c c' {
4631 % Punctum Inclinatum
4638 \remove "Bar_number_engraver"
4642 \remove "Clef_engraver"
4643 \remove "Key_engraver"
4644 \remove "Staff_symbol_engraver"
4645 \remove "Time_signature_engraver"
4646 \remove "Bar_engraver"
4647 minimumVerticalExtent = ##f
4651 \remove Ligature_bracket_engraver
4652 \consists Vaticana_ligature_engraver
4653 NoteHead \set #'style = #'vaticana_punctum
4654 Stem \set #'transparent = ##t
4659 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4660 \include "gregorian-init.ly"
4662 \notes \transpose c c' {
4663 % Punctum Auctum Ascendens
4664 \[ \auctum \ascendens b \]
4666 % Punctum Auctum Descendens
4667 \[ \auctum \descendens b \]
4669 % Punctum Inclinatum Auctum
4670 \[ \inclinatum \auctum b \]
4676 \remove "Bar_number_engraver"
4680 \remove "Clef_engraver"
4681 \remove "Key_engraver"
4682 \remove "Staff_symbol_engraver"
4683 \remove "Time_signature_engraver"
4684 \remove "Bar_engraver"
4685 minimumVerticalExtent = ##f
4689 \remove Ligature_bracket_engraver
4690 \consists Vaticana_ligature_engraver
4691 NoteHead \set #'style = #'vaticana_punctum
4692 Stem \set #'transparent = ##t
4697 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4698 \include "gregorian-init.ly"
4700 \notes \transpose c c' {
4701 % Punctum Inclinatum Parvum
4702 \[ \inclinatum \deminutum b \]
4708 \remove "Bar_number_engraver"
4712 \remove "Clef_engraver"
4713 \remove "Key_engraver"
4714 \remove "Staff_symbol_engraver"
4715 \remove "Time_signature_engraver"
4716 \remove "Bar_engraver"
4717 minimumVerticalExtent = ##f
4721 \remove Ligature_bracket_engraver
4722 \consists Vaticana_ligature_engraver
4723 NoteHead \set #'style = #'vaticana_punctum
4724 Stem \set #'transparent = ##t
4731 @code{2. Virga} @tab
4732 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4733 \include "gregorian-init.ly"
4735 \notes \transpose c c' {
4743 \remove "Bar_number_engraver"
4747 \remove "Clef_engraver"
4748 \remove "Key_engraver"
4749 \remove "Staff_symbol_engraver"
4750 \remove "Time_signature_engraver"
4751 \remove "Bar_engraver"
4752 minimumVerticalExtent = ##f
4756 \remove Ligature_bracket_engraver
4757 \consists Vaticana_ligature_engraver
4758 NoteHead \set #'style = #'vaticana_punctum
4759 Stem \set #'transparent = ##t
4763 @end lilypond @tab @tab
4766 @code{3. Apostropha vel Stropha} @tab
4767 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4768 \include "gregorian-init.ly"
4770 \notes \transpose c c' {
4778 \remove "Bar_number_engraver"
4782 \remove "Clef_engraver"
4783 \remove "Key_engraver"
4784 \remove "Staff_symbol_engraver"
4785 \remove "Time_signature_engraver"
4786 \remove "Bar_engraver"
4787 minimumVerticalExtent = ##f
4791 \remove Ligature_bracket_engraver
4792 \consists Vaticana_ligature_engraver
4793 NoteHead \set #'style = #'vaticana_punctum
4794 Stem \set #'transparent = ##t
4799 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4800 \include "gregorian-init.ly"
4802 \notes \transpose c c' {
4804 \[ \stropha \auctum b \]
4810 \remove "Bar_number_engraver"
4814 \remove "Clef_engraver"
4815 \remove "Key_engraver"
4816 \remove "Staff_symbol_engraver"
4817 \remove "Time_signature_engraver"
4818 \remove "Bar_engraver"
4819 minimumVerticalExtent = ##f
4823 \remove Ligature_bracket_engraver
4824 \consists Vaticana_ligature_engraver
4825 NoteHead \set #'style = #'vaticana_punctum
4826 Stem \set #'transparent = ##t
4833 @code{4. Oriscus} @tab
4834 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4835 \include "gregorian-init.ly"
4837 \notes \transpose c c' {
4845 \remove "Bar_number_engraver"
4849 \remove "Clef_engraver"
4850 \remove "Key_engraver"
4851 \remove "Staff_symbol_engraver"
4852 \remove "Time_signature_engraver"
4853 \remove "Bar_engraver"
4854 minimumVerticalExtent = ##f
4858 \remove Ligature_bracket_engraver
4859 \consists Vaticana_ligature_engraver
4860 NoteHead \set #'style = #'vaticana_punctum
4861 Stem \set #'transparent = ##t
4865 @end lilypond @tab @tab
4868 @code{5. Clivis vel Flexa} @tab
4869 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4870 \include "gregorian-init.ly"
4872 \notes \transpose c c' {
4880 \remove "Bar_number_engraver"
4884 \remove "Clef_engraver"
4885 \remove "Key_engraver"
4886 \remove "Staff_symbol_engraver"
4887 \remove "Time_signature_engraver"
4888 \remove "Bar_engraver"
4889 minimumVerticalExtent = ##f
4893 \remove Ligature_bracket_engraver
4894 \consists Vaticana_ligature_engraver
4895 NoteHead \set #'style = #'vaticana_punctum
4896 Stem \set #'transparent = ##t
4901 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4902 \include "gregorian-init.ly"
4904 \notes \transpose c c' {
4905 % Clivis Aucta Descendens
4906 \[ b \flexa \auctum \descendens g \]
4908 % Clivis Aucta Ascendens
4909 \[ b \flexa \auctum \ascendens g \]
4915 \remove "Bar_number_engraver"
4919 \remove "Clef_engraver"
4920 \remove "Key_engraver"
4921 \remove "Staff_symbol_engraver"
4922 \remove "Time_signature_engraver"
4923 \remove "Bar_engraver"
4924 minimumVerticalExtent = ##f
4928 \remove Ligature_bracket_engraver
4929 \consists Vaticana_ligature_engraver
4930 NoteHead \set #'style = #'vaticana_punctum
4931 Stem \set #'transparent = ##t
4936 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4937 \include "gregorian-init.ly"
4939 \notes \transpose c c' {
4941 \[ b \flexa \deminutum g \]
4947 \remove "Bar_number_engraver"
4951 \remove "Clef_engraver"
4952 \remove "Key_engraver"
4953 \remove "Staff_symbol_engraver"
4954 \remove "Time_signature_engraver"
4955 \remove "Bar_engraver"
4956 minimumVerticalExtent = ##f
4960 \remove Ligature_bracket_engraver
4961 \consists Vaticana_ligature_engraver
4962 NoteHead \set #'style = #'vaticana_punctum
4963 Stem \set #'transparent = ##t
4970 @code{6. Podatus vel Pes} @tab
4971 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
4972 \include "gregorian-init.ly"
4974 \notes \transpose c c' {
4982 \remove "Bar_number_engraver"
4986 \remove "Clef_engraver"
4987 \remove "Key_engraver"
4988 \remove "Staff_symbol_engraver"
4989 \remove "Time_signature_engraver"
4990 \remove "Bar_engraver"
4991 minimumVerticalExtent = ##f
4995 \remove Ligature_bracket_engraver
4996 \consists Vaticana_ligature_engraver
4997 NoteHead \set #'style = #'vaticana_punctum
4998 Stem \set #'transparent = ##t
5003 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5004 \include "gregorian-init.ly"
5006 \notes \transpose c c' {
5007 % Pes Auctus Descendens
5008 \[ g \pes \auctum \descendens b \]
5010 % Pes Auctus Ascendens
5011 \[ g \pes \auctum \ascendens b \]
5017 \remove "Bar_number_engraver"
5021 \remove "Clef_engraver"
5022 \remove "Key_engraver"
5023 \remove "Staff_symbol_engraver"
5024 \remove "Time_signature_engraver"
5025 \remove "Bar_engraver"
5026 minimumVerticalExtent = ##f
5030 \remove Ligature_bracket_engraver
5031 \consists Vaticana_ligature_engraver
5032 NoteHead \set #'style = #'vaticana_punctum
5033 Stem \set #'transparent = ##t
5038 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5039 \include "gregorian-init.ly"
5041 \notes \transpose c c' {
5043 \[ g \pes \deminutum b \]
5049 \remove "Bar_number_engraver"
5053 \remove "Clef_engraver"
5054 \remove "Key_engraver"
5055 \remove "Staff_symbol_engraver"
5056 \remove "Time_signature_engraver"
5057 \remove "Bar_engraver"
5058 minimumVerticalExtent = ##f
5062 \remove Ligature_bracket_engraver
5063 \consists Vaticana_ligature_engraver
5064 NoteHead \set #'style = #'vaticana_punctum
5065 Stem \set #'transparent = ##t
5072 @code{7. Pes Quassus} @tab
5073 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5074 \include "gregorian-init.ly"
5076 \notes \transpose c c' {
5078 \[ \oriscus g \pes \virga b \]
5084 \remove "Bar_number_engraver"
5088 \remove "Clef_engraver"
5089 \remove "Key_engraver"
5090 \remove "Staff_symbol_engraver"
5091 \remove "Time_signature_engraver"
5092 \remove "Bar_engraver"
5093 minimumVerticalExtent = ##f
5097 \remove Ligature_bracket_engraver
5098 \consists Vaticana_ligature_engraver
5099 NoteHead \set #'style = #'vaticana_punctum
5100 Stem \set #'transparent = ##t
5105 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5106 \include "gregorian-init.ly"
5108 \notes \transpose c c' {
5109 % Pes Quassus Auctus Descendens
5110 \[ \oriscus g \pes \auctum \descendens b \]
5116 \remove "Bar_number_engraver"
5120 \remove "Clef_engraver"
5121 \remove "Key_engraver"
5122 \remove "Staff_symbol_engraver"
5123 \remove "Time_signature_engraver"
5124 \remove "Bar_engraver"
5125 minimumVerticalExtent = ##f
5129 \remove Ligature_bracket_engraver
5130 \consists Vaticana_ligature_engraver
5131 NoteHead \set #'style = #'vaticana_punctum
5132 Stem \set #'transparent = ##t
5139 @code{8. Quilisma Pes} @tab
5140 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5141 \include "gregorian-init.ly"
5143 \notes \transpose c c' {
5145 \[ \quilisma g \pes b \]
5151 \remove "Bar_number_engraver"
5155 \remove "Clef_engraver"
5156 \remove "Key_engraver"
5157 \remove "Staff_symbol_engraver"
5158 \remove "Time_signature_engraver"
5159 \remove "Bar_engraver"
5160 minimumVerticalExtent = ##f
5164 \remove Ligature_bracket_engraver
5165 \consists Vaticana_ligature_engraver
5166 NoteHead \set #'style = #'vaticana_punctum
5167 Stem \set #'transparent = ##t
5172 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5173 \include "gregorian-init.ly"
5175 \notes \transpose c c' {
5176 % Quilisma Pes Auctus Descendens
5177 \[ \quilisma g \pes \auctum \descendens b \]
5183 \remove "Bar_number_engraver"
5187 \remove "Clef_engraver"
5188 \remove "Key_engraver"
5189 \remove "Staff_symbol_engraver"
5190 \remove "Time_signature_engraver"
5191 \remove "Bar_engraver"
5192 minimumVerticalExtent = ##f
5196 \remove Ligature_bracket_engraver
5197 \consists Vaticana_ligature_engraver
5198 NoteHead \set #'style = #'vaticana_punctum
5199 Stem \set #'transparent = ##t
5206 @code{9. Podatus Initio Debilis} @tab
5207 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5208 \include "gregorian-init.ly"
5210 \notes \transpose c c' {
5211 % Pes Initio Debilis
5212 \[ \deminutum g \pes b \]
5218 \remove "Bar_number_engraver"
5222 \remove "Clef_engraver"
5223 \remove "Key_engraver"
5224 \remove "Staff_symbol_engraver"
5225 \remove "Time_signature_engraver"
5226 \remove "Bar_engraver"
5227 minimumVerticalExtent = ##f
5231 \remove Ligature_bracket_engraver
5232 \consists Vaticana_ligature_engraver
5233 NoteHead \set #'style = #'vaticana_punctum
5234 Stem \set #'transparent = ##t
5239 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5240 \include "gregorian-init.ly"
5242 \notes \transpose c c' {
5243 % Pes Auctus Descendens Initio Debilis
5244 \[ \deminutum g \pes \auctum \descendens b \]
5250 \remove "Bar_number_engraver"
5254 \remove "Clef_engraver"
5255 \remove "Key_engraver"
5256 \remove "Staff_symbol_engraver"
5257 \remove "Time_signature_engraver"
5258 \remove "Bar_engraver"
5259 minimumVerticalExtent = ##f
5263 \remove Ligature_bracket_engraver
5264 \consists Vaticana_ligature_engraver
5265 NoteHead \set #'style = #'vaticana_punctum
5266 Stem \set #'transparent = ##t
5273 @code{10. Torculus} @tab
5274 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5275 \include "gregorian-init.ly"
5277 \notes \transpose c c' {
5279 \[ a \pes b \flexa g \]
5285 \remove "Bar_number_engraver"
5289 \remove "Clef_engraver"
5290 \remove "Key_engraver"
5291 \remove "Staff_symbol_engraver"
5292 \remove "Time_signature_engraver"
5293 \remove "Bar_engraver"
5294 minimumVerticalExtent = ##f
5298 \remove Ligature_bracket_engraver
5299 \consists Vaticana_ligature_engraver
5300 NoteHead \set #'style = #'vaticana_punctum
5301 Stem \set #'transparent = ##t
5306 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5307 \include "gregorian-init.ly"
5309 \notes \transpose c c' {
5310 % Torculus Auctus Descendens
5311 \[ a \pes b \flexa \auctum \descendens g \]
5317 \remove "Bar_number_engraver"
5321 \remove "Clef_engraver"
5322 \remove "Key_engraver"
5323 \remove "Staff_symbol_engraver"
5324 \remove "Time_signature_engraver"
5325 \remove "Bar_engraver"
5326 minimumVerticalExtent = ##f
5330 \remove Ligature_bracket_engraver
5331 \consists Vaticana_ligature_engraver
5332 NoteHead \set #'style = #'vaticana_punctum
5333 Stem \set #'transparent = ##t
5338 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5339 \include "gregorian-init.ly"
5341 \notes \transpose c c' {
5342 % Torculus Deminutus
5343 \[ a \pes b \flexa \deminutum g \]
5349 \remove "Bar_number_engraver"
5353 \remove "Clef_engraver"
5354 \remove "Key_engraver"
5355 \remove "Staff_symbol_engraver"
5356 \remove "Time_signature_engraver"
5357 \remove "Bar_engraver"
5358 minimumVerticalExtent = ##f
5362 \remove Ligature_bracket_engraver
5363 \consists Vaticana_ligature_engraver
5364 NoteHead \set #'style = #'vaticana_punctum
5365 Stem \set #'transparent = ##t
5372 @code{11. Torculus Initio Debilis} @tab
5373 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5374 \include "gregorian-init.ly"
5376 \notes \transpose c c' {
5377 % Torculus Initio Debilis
5378 \[ \deminutum a \pes b \flexa g \]
5384 \remove "Bar_number_engraver"
5388 \remove "Clef_engraver"
5389 \remove "Key_engraver"
5390 \remove "Staff_symbol_engraver"
5391 \remove "Time_signature_engraver"
5392 \remove "Bar_engraver"
5393 minimumVerticalExtent = ##f
5397 \remove Ligature_bracket_engraver
5398 \consists Vaticana_ligature_engraver
5399 NoteHead \set #'style = #'vaticana_punctum
5400 Stem \set #'transparent = ##t
5405 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5406 \include "gregorian-init.ly"
5408 \notes \transpose c c' {
5409 % Torculus Auctus Descendens Initio Debilis
5410 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
5416 \remove "Bar_number_engraver"
5420 \remove "Clef_engraver"
5421 \remove "Key_engraver"
5422 \remove "Staff_symbol_engraver"
5423 \remove "Time_signature_engraver"
5424 \remove "Bar_engraver"
5425 minimumVerticalExtent = ##f
5429 \remove Ligature_bracket_engraver
5430 \consists Vaticana_ligature_engraver
5431 NoteHead \set #'style = #'vaticana_punctum
5432 Stem \set #'transparent = ##t
5437 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5438 \include "gregorian-init.ly"
5440 \notes \transpose c c' {
5441 % Torculus Deminutus Initio Debilis
5442 \[ \deminutum a \pes b \flexa \deminutum g \]
5448 \remove "Bar_number_engraver"
5452 \remove "Clef_engraver"
5453 \remove "Key_engraver"
5454 \remove "Staff_symbol_engraver"
5455 \remove "Time_signature_engraver"
5456 \remove "Bar_engraver"
5457 minimumVerticalExtent = ##f
5461 \remove Ligature_bracket_engraver
5462 \consists Vaticana_ligature_engraver
5463 NoteHead \set #'style = #'vaticana_punctum
5464 Stem \set #'transparent = ##t
5471 @code{12. Porrectus} @tab
5472 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5473 \include "gregorian-init.ly"
5475 \notes \transpose c c' {
5477 \[ a \flexa g \pes b \]
5483 \remove "Bar_number_engraver"
5487 \remove "Clef_engraver"
5488 \remove "Key_engraver"
5489 \remove "Staff_symbol_engraver"
5490 \remove "Time_signature_engraver"
5491 \remove "Bar_engraver"
5492 minimumVerticalExtent = ##f
5496 \remove Ligature_bracket_engraver
5497 \consists Vaticana_ligature_engraver
5498 NoteHead \set #'style = #'vaticana_punctum
5499 Stem \set #'transparent = ##t
5504 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5505 \include "gregorian-init.ly"
5507 \notes \transpose c c' {
5508 % Porrectus Auctus Descendens
5509 \[ a \flexa g \pes \auctum \descendens b \]
5515 \remove "Bar_number_engraver"
5519 \remove "Clef_engraver"
5520 \remove "Key_engraver"
5521 \remove "Staff_symbol_engraver"
5522 \remove "Time_signature_engraver"
5523 \remove "Bar_engraver"
5524 minimumVerticalExtent = ##f
5528 \remove Ligature_bracket_engraver
5529 \consists Vaticana_ligature_engraver
5530 NoteHead \set #'style = #'vaticana_punctum
5531 Stem \set #'transparent = ##t
5536 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5537 \include "gregorian-init.ly"
5539 \notes \transpose c c' {
5540 % Porrectus Deminutus
5541 \[ a \flexa g \pes \deminutum b \]
5547 \remove "Bar_number_engraver"
5551 \remove "Clef_engraver"
5552 \remove "Key_engraver"
5553 \remove "Staff_symbol_engraver"
5554 \remove "Time_signature_engraver"
5555 \remove "Bar_engraver"
5556 minimumVerticalExtent = ##f
5560 \remove Ligature_bracket_engraver
5561 \consists Vaticana_ligature_engraver
5562 NoteHead \set #'style = #'vaticana_punctum
5563 Stem \set #'transparent = ##t
5570 @code{13. Climacus} @tab
5571 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5572 \include "gregorian-init.ly"
5574 \notes \transpose c c' {
5576 \[ \virga b \inclinatum a \inclinatum g \]
5582 \remove "Bar_number_engraver"
5586 \remove "Clef_engraver"
5587 \remove "Key_engraver"
5588 \remove "Staff_symbol_engraver"
5589 \remove "Time_signature_engraver"
5590 \remove "Bar_engraver"
5591 minimumVerticalExtent = ##f
5595 \remove Ligature_bracket_engraver
5596 \consists Vaticana_ligature_engraver
5597 NoteHead \set #'style = #'vaticana_punctum
5598 Stem \set #'transparent = ##t
5603 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5604 \include "gregorian-init.ly"
5606 \notes \transpose c c' {
5608 \[ \virga b \inclinatum a \inclinatum \auctum g \]
5614 \remove "Bar_number_engraver"
5618 \remove "Clef_engraver"
5619 \remove "Key_engraver"
5620 \remove "Staff_symbol_engraver"
5621 \remove "Time_signature_engraver"
5622 \remove "Bar_engraver"
5623 minimumVerticalExtent = ##f
5627 \remove Ligature_bracket_engraver
5628 \consists Vaticana_ligature_engraver
5629 NoteHead \set #'style = #'vaticana_punctum
5630 Stem \set #'transparent = ##t
5635 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5636 \include "gregorian-init.ly"
5638 \notes \transpose c c' {
5639 % Climacus Deminutus
5640 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
5646 \remove "Bar_number_engraver"
5650 \remove "Clef_engraver"
5651 \remove "Key_engraver"
5652 \remove "Staff_symbol_engraver"
5653 \remove "Time_signature_engraver"
5654 \remove "Bar_engraver"
5655 minimumVerticalExtent = ##f
5659 \remove Ligature_bracket_engraver
5660 \consists Vaticana_ligature_engraver
5661 NoteHead \set #'style = #'vaticana_punctum
5662 Stem \set #'transparent = ##t
5669 @code{14. Scandicus} @tab
5670 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5671 \include "gregorian-init.ly"
5673 \notes \transpose c c' {
5675 \[ g \pes a \virga b \]
5681 \remove "Bar_number_engraver"
5685 \remove "Clef_engraver"
5686 \remove "Key_engraver"
5687 \remove "Staff_symbol_engraver"
5688 \remove "Time_signature_engraver"
5689 \remove "Bar_engraver"
5690 minimumVerticalExtent = ##f
5694 \remove Ligature_bracket_engraver
5695 \consists Vaticana_ligature_engraver
5696 NoteHead \set #'style = #'vaticana_punctum
5697 Stem \set #'transparent = ##t
5702 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5703 \include "gregorian-init.ly"
5705 \notes \transpose c c' {
5706 % Scandicus Auctus Descendens
5707 \[ g \pes a \pes \auctum \descendens b \]
5713 \remove "Bar_number_engraver"
5717 \remove "Clef_engraver"
5718 \remove "Key_engraver"
5719 \remove "Staff_symbol_engraver"
5720 \remove "Time_signature_engraver"
5721 \remove "Bar_engraver"
5722 minimumVerticalExtent = ##f
5726 \remove Ligature_bracket_engraver
5727 \consists Vaticana_ligature_engraver
5728 NoteHead \set #'style = #'vaticana_punctum
5729 Stem \set #'transparent = ##t
5734 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5735 \include "gregorian-init.ly"
5737 \notes \transpose c c' {
5738 % Scandicus Deminutus
5739 \[ g \pes a \pes \deminutum b \]
5745 \remove "Bar_number_engraver"
5749 \remove "Clef_engraver"
5750 \remove "Key_engraver"
5751 \remove "Staff_symbol_engraver"
5752 \remove "Time_signature_engraver"
5753 \remove "Bar_engraver"
5754 minimumVerticalExtent = ##f
5758 \remove Ligature_bracket_engraver
5759 \consists Vaticana_ligature_engraver
5760 NoteHead \set #'style = #'vaticana_punctum
5761 Stem \set #'transparent = ##t
5768 @code{15. Salicus} @tab
5769 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5770 \include "gregorian-init.ly"
5772 \notes \transpose c c' {
5774 \[ g \oriscus a \pes \virga b \]
5780 \remove "Bar_number_engraver"
5784 \remove "Clef_engraver"
5785 \remove "Key_engraver"
5786 \remove "Staff_symbol_engraver"
5787 \remove "Time_signature_engraver"
5788 \remove "Bar_engraver"
5789 minimumVerticalExtent = ##f
5793 \remove Ligature_bracket_engraver
5794 \consists Vaticana_ligature_engraver
5795 NoteHead \set #'style = #'vaticana_punctum
5796 Stem \set #'transparent = ##t
5801 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5802 \include "gregorian-init.ly"
5804 \notes \transpose c c' {
5805 % Salicus Auctus Descendens
5806 \[ g \oriscus a \pes \auctum \descendens b \]
5812 \remove "Bar_number_engraver"
5816 \remove "Clef_engraver"
5817 \remove "Key_engraver"
5818 \remove "Staff_symbol_engraver"
5819 \remove "Time_signature_engraver"
5820 \remove "Bar_engraver"
5821 minimumVerticalExtent = ##f
5825 \remove Ligature_bracket_engraver
5826 \consists Vaticana_ligature_engraver
5827 NoteHead \set #'style = #'vaticana_punctum
5828 Stem \set #'transparent = ##t
5835 @code{16. Trigomus} @tab
5836 @lilypond[noindent, 26pt, nofragment, linewidth=3.0cm]
5837 \include "gregorian-init.ly"
5839 \notes \transpose c c' {
5841 \[ \stropha b \stropha b \stropha a \]
5847 \remove "Bar_number_engraver"
5851 \remove "Clef_engraver"
5852 \remove "Key_engraver"
5853 \remove "Staff_symbol_engraver"
5854 \remove "Time_signature_engraver"
5855 \remove "Bar_engraver"
5856 minimumVerticalExtent = ##f
5860 \remove Ligature_bracket_engraver
5861 \consists Vaticana_ligature_engraver
5862 NoteHead \set #'style = #'vaticana_punctum
5863 Stem \set #'transparent = ##t
5867 @end lilypond @tab @tab
5873 Horizontal head alignment is broken in Pes Initio Debilis.
5875 Use special heads for lower/upper head of Pes only when heads are
5879 @subsection Figured bass
5881 @cindex Basso continuo
5883 @c TODO: musicological blurb about FB
5887 LilyPond has limited support for figured bass:
5889 @lilypond[verbatim,fragment]
5891 \context Voice \notes { \clef bass dis4 c d ais}
5892 \context FiguredBass
5894 < 6 >4 < 7 >8 < 6+ [_!] >
5900 The support for figured bass consists of two parts: there is an input
5901 mode, introduced by @code{\figures}, where you can enter bass figures
5902 as numbers, and there is a context called @internalsref{FiguredBass}
5903 that takes care of making @internalsref{BassFigure} objects.
5905 In figures input mode, a group of bass figures is delimited by
5906 @code{<} and @code{>}. The duration is entered after the @code{>}.
5911 \context FiguredBass
5915 Accidentals are added to the numbers if you alterate them by
5916 appending @code{-}, @code{!} and @code{+}.
5922 \context FiguredBass
5923 \figures { <4- 6+ 7!> }
5926 Spaces or dashes may be inserted by using @code{_}. Brackets are
5927 introduced with @code{[} and @code{]}.
5933 \context FiguredBass
5934 \figures { < [4 6] 8 [_ 12]> }
5937 Although the support for figured bass may superficially resemble chord
5938 support, it works much simpler. The @code{\figures} mode simply
5939 stores the numbers , and @internalsref{FiguredBass} context prints
5940 them as entered. There is no conversion to pitches, and no
5941 realizations of the bass are played in the MIDI file.
5943 Internally, the code produces markup texts. You can use any of the
5944 markup text properties to override formatting. For example, the
5945 vertical spacing of the figures may be set with @code{baseline-skip}.
5949 @internalsref{BassFigureEvent} music, @internalsref{BassFigure} grob,
5950 @internalsref{FiguredBass} context
5954 Slash notation for alterations is not supported.
5957 @node Contemporary notation
5958 @section Contemporary notation
5960 In the 20th century, composers have greatly expanded the musical
5961 vocabulary. With this expansion, many innovations in musical notation
5962 have been tried. For a comprehensive overview, refer to @cite{Stone
5963 1980} (see @ref{Literature}). In general, the use of new, innovative
5964 notation makes a piece harder to understand and perform and its use
5965 should be avoided if possible. For this reason, support for
5966 contemporary notation in LilyPond is limited.
5975 @subsection Clusters
5979 In musical terminology, a @emph{cluster} denotes a range of
5980 simultaneously sounding pitches that may change over time. The set of
5981 available pitches to apply usually depends on the accoustic source.
5982 Thus, in piano music, a cluster typically consists of a continous range
5983 of the semitones as provided by the piano's fixed set of a chromatic
5984 scale. In choral music, each singer of the choir typically may sing an
5985 arbitrary pitch within the cluster's range that is not bound to any
5986 diatonic, chromatic or other scale. In electronic music, a cluster
5987 (theoretically) may even cover a continuous range of pitches, thus
5988 resulting in coloured noise, such as pink noise.
5990 Clusters can be denoted in the context of ordinary staff notation by
5991 engraving simple geometrical shapes that replace ordinary notation of
5992 notes. Ordinary notes as musical events specify starting time and
5993 duration of pitches; however, the duration of a note is expressed by the
5994 shape of the note head rather than by the horizontal graphical extent of
5995 the note symbol. In contrast, the shape of a cluster geometrically
5996 describes the development of a range of pitches (vertical extent) over
5997 time (horizontal extent). Still, the geometrical shape of a cluster
5998 covers the area in wich any single pitch contained in the cluster would
5999 be notated as an ordinary note. From this point of view, it is
6000 reasonable to specify a cluster as the envelope of a set of notes.
6004 A cluster is engraved as the envelope of a set of notes. The starting
6005 note is marked with @code{\startCluster}, and the ending note with
6006 @code{\stopCluster}, e.g.,
6014 The following example (from
6015 @inputfileref{input/regression,cluster.ly}) shows what the result
6018 @lilypondfile[notexidoc]{cluster.ly}
6020 By default, @internalsref{Cluster_engraver} is in the
6021 @internalsref{Voice} context. This allows putting ordinary notes and
6022 clusters together in the same staff, even simultaneously. In such a
6023 case no attempt is made to automatically avoid collisions between
6024 ordinary notes and clusters.
6028 @internalsref{Cluster}, @inputfileref{input/regression,cluster.ly},
6029 @internalsref{Cluster_engraver}, @internalsref{ClusterEvent}.
6033 When a cluster is active, note heads must be switched off manually using
6036 Music expressions like @code{< @{ g8 e8 @} a4 >} are not printed
6037 accurately. Use @code{<<g a>>8 <<e a>>8} instead.
6042 @subsection Fermatas
6048 Contemporary music notation frequently uses special fermata symbols to
6049 indicate fermatas of differing lengths.
6053 The following are supported
6055 @lilypond[singleline]
6078 \context Lyrics \lyrics {
6079 "shortfermata" "fermata" "longfermata" "verylongfermata"
6084 See @ref{Articulations} for general instructions how to apply scripts
6085 such as fermatas to a @code{\notes@{@}} block.
6088 @section Tuning output
6090 There are situations where default layout decisions are not
6091 sufficient. In this section we discuss ways to override these
6094 Formatting is internally done by manipulating so called objects (graphic
6095 objects). Each object carries with it a set of properties (object
6096 properties) specific to that object. For example, a stem object has
6097 properties that specify its direction, length and thickness.
6099 The most direct way of tuning the output is by altering the values of
6100 these properties. There are two ways of doing that: first, you can
6101 temporarily change the definition of one type of object, thus
6102 affecting a whole set of objects. Second, you can select one specific
6103 object, and set a object property in that object.
6113 @node Tuning objects
6114 @subsection Tuning objects
6116 @cindex object description
6118 The definition of an object is actually a list of default object
6119 properties. For example, the definition of the Stem object (available
6120 in @file{scm/grob-description.scm}), includes the following definitions for
6125 (beamed-lengths . (0.0 2.5 2.0 1.5))
6126 (Y-extent-callback . ,Stem::height)
6131 By adding variables on top of these existing definitions, the system
6132 defaults is overriden, and the appearance of a graphical objects is
6138 Changing a variable for only one object is commonly achieved with
6142 \once \property @var{context}.@var{grobname}
6143 \override @var{symbol} = @var{value}
6145 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
6146 and @var{grobname} is a string and @var{value} is a Scheme expression.
6147 This command applies a setting only during one moment in the score.
6149 In the following example, only one @internalsref{Stem} object is
6150 changed from its original setting:
6152 @lilypond[verbatim, fragment, relative=1]
6154 \once \property Voice.Stem \set #'thickness = #4
6158 @cindex @code{\once}
6160 For changing more objects, the same command, without @code{\once} can
6163 \property @var{context}.@var{grobname} \override @var{symbol} = @var{value}
6165 This command adds @code{@var{symbol} = @var{value}} to the definition
6166 of @var{grobname} in the context @var{context}, and this definition
6167 stays in place until it is removed.
6169 An existing definition may be removed by the following command
6172 \property @var{context}.@var{grobname} \revert @var{symbol}
6175 All @code{\override} and @code{\revert} commands should be balanced.
6176 The @code{\set} shorthand, performs a revert followed by an override,
6177 and is often more convenient to use
6180 \property @var{context}.@var{grobname} \set @var{symbol} = @var{value}
6184 @lilypond[verbatim,quote]
6185 c'4 \property Voice.Stem \override #'thickness = #4.0
6187 c'4 \property Voice.Stem \revert #'thickness
6191 The following example gives exactly the same result as the previous
6192 one (assuming the system default for stem thickness is 1.3).
6194 @lilypond[verbatim,quote]
6195 c'4 \property Voice.Stem \set #'thickness = #4.0
6197 c'4 \property Voice.Stem \set #'thickness = #1.3
6201 Reverting a setting which was not set in the first place has no
6202 effect. However, if the setting was set as a system default, this may
6203 remove the default value, and this may give surprising results,
6204 including crashes. In other words, @code{\override} and
6205 @code{\revert} must be carefully balanced.
6207 These are examples of correct nesting of @code{\override}, @code{\set},
6210 A clumsy but correct form:
6212 \override \revert \override \revert \override \revert
6215 Shorter version of the same:
6217 \override \set \set \revert
6220 A short form, using only @code{\set}. This requires you to know the
6223 \set \set \set \set @var{to default value}
6226 If there is no default (i.e. by default, the object property is unset),
6229 \set \set \set \revert
6232 For the digirati, the object description is an Scheme association
6233 list. Since a Scheme list is a singly linked list, we can treat it as
6234 a stack, and @code{\override} and @code{\revert} are push and pop
6235 operations. The association list is stored in a normal context
6238 \property Voice.NoteHead = #'()
6240 will effectively erase @internalsref{NoteHead}s from the current
6241 @internalsref{Voice}. However, this mechanism is not guaranteed to
6242 work, and may cause crashes or other anomalous behavior.
6246 @internalsref{OverrideProperty}, @internalsref{RevertProperty},
6247 @internalsref{PropertySet}, @internalsref{backend properties},
6248 @internalsref{All Graphical Objects}.
6253 The backend is not very strict in type-checking object properties.
6254 Cyclic references in @var{value} cause hangs and/or crashes.
6255 Similarly, reverting properties that are system defaults may also lead
6260 @subsection Applyoutput
6262 The most versatile way of tuning object is @code{\applyoutput}. Its
6265 \applyoutput @var{proc}
6267 where @var{proc} is a Scheme function, taking four arguments.
6269 When interpreted, the function @var{proc} is called for every grob found
6270 in the context, with the following arguments:
6272 @item the grob itself
6273 @item the context where the grob was created
6274 @item the context where @code{\applyoutput} is processed.
6277 In addition, the cause of the grob, i.e. the music expression or object
6278 that was responsible for creating the object, is in the object property
6279 @code{cause}. For example, for a note head, this is a
6280 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
6281 this is a @internalsref{NoteHead} object.
6284 @node Outputproperty
6285 @subsection Outputproperty
6287 @cindex \outputproperty
6289 Another way of tuning objects is the more arcane @code{\outputproperty}
6290 feature. The syntax is as follows:
6292 \outputproperty @var{predicate} @var{symbol} = @var{value}
6294 Here @code{predicate} is a Scheme function taking an object argument, and
6295 returning a boolean. This statement is processed by the
6296 @code{Output_property_engraver}. It instructs the engraver to feed all
6297 objects that it sees to @var{predicate}. Whenever the predicate returns
6298 true, the object property @var{symbol} will be set to @var{value}.
6300 You will need to combine this statement with @code{\context} to select
6301 the appropriate context to apply this to.
6302 @inputfileref{input/regression,output-property.ly} shows an example of
6303 the use of @code{\outputproperty}.
6307 If possible, avoid this feature: the semantics are not very clean, and
6308 the syntax and semantics are up for rewrite.
6311 @node Font selection
6312 @subsection Font selection
6314 The most common thing to change about the appearance of fonts is
6315 their size. The font size of any context can be easily
6316 changed by setting the @code{fontSize} property for that context:
6318 @lilypond[fragment,relative=1,verbatim,quote]
6319 c4 c4 \property Voice.fontSize = #-1
6322 This command will set @code{font-relative-size} (see below),
6323 and does not change the size of variable symbols, such as
6324 beams or slurs. You can use this command to get smaller symbol for
6325 cue notes, but that involves some more subtleties. An elaborate
6326 example of those is in @inputfileref{input/test,cue-notes.ly}.
6328 @cindex magnification
6330 The size of the font may be scaled with the object property
6331 @code{font-magnification}. For example, @code{2.0} blows up all
6332 letters by a factor 2 in both directions.
6341 The font used for printing a object can be selected by setting
6342 @code{font-name}, e.g.
6344 \property Staff.TimeSignature
6345 \set #'font-name = #"cmr17"
6347 You may use any font which is available to @TeX{}, such as foreign
6348 fonts or fonts that do not belong to the Computer Modern font family.
6350 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
6351 can also be adjusted with a more fine-grained mechanism. By setting
6352 the object properties described below, you can select a different font.
6353 All three mechanisms work for every object that supports
6354 @code{font-interface}.
6358 A symbol indicating the general class of the typeface. Supported are
6359 @code{roman} (Computer Modern), @code{braces} (for piano staff
6360 braces), @code{music} (the standard music font, including ancient
6361 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
6364 A symbol indicating the shape of the font, there are typically several
6365 font shapes available for each font family. Choices are @code{italic},
6366 @code{caps} and @code{upright}
6369 A symbol indicating the series of the font. There are typically several
6370 font series for each font family and shape. Choices are @code{medium}
6373 @item font-relative-size
6374 A number indicating the size relative the standard size. For example,
6375 with 20pt staff height, relative size -1 corresponds to 16pt staff
6376 height, and relative size +1 corresponds to 23 pt staff height.
6378 There are small differences in design between fonts designed for
6379 different sizes, hence @code{font-relative-size} is preferred over
6380 @code{font-magnification} for changing font sizes.
6383 @item font-design-size
6384 A number indicating the design size of the font.
6386 This is a feature of the Computer Modern Font: each point size has a
6387 slightly different design. Smaller design sizes are relatively wider,
6388 which enhances readability.
6391 For any of these properties, the value @code{*} (i.e. the symbol
6392 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
6393 to override default setting, which are always present. For example:
6395 \property Lyrics.LyricText \override #'font-series = #'bold
6396 \property Lyrics.LyricText \override #'font-family = #'typewriter
6397 \property Lyrics.LyricText \override #'font-shape = #'*
6400 @cindex @code{font-style}
6406 Relative size is not linked to any real size.
6408 There is no style sheet provided for other fonts besides the @TeX{}
6409 family, and the style sheet cannot be modified easily.
6411 @cindex font selection
6412 @cindex font magnification
6413 @cindex @code{font-interface}
6417 @subsection Text markup
6422 @cindex typeset text
6424 LilyPond has an internal mechanism to typeset texts. You can access it
6425 with the keyword @code{\markup}. Within markup mode, you can enter texts
6426 similar to lyrics: simply enter them, surrounded by spaces.
6429 @lilypond[verbatim,fragment,relative=1]
6430 c1^\markup { hello }
6431 c1_\markup { hi there }
6432 c1^\markup { hi \bold there, is \italic anyone home? }
6435 @cindex font switching
6437 The line of the example demonstrates font switching commands. The
6438 command only apply to the first following word; enclose a set of texts
6439 with braces to apply a command to more words.
6441 \markup @{ \bold @{ hi there @} @}
6443 For clarity, you can also do this for single arguments, e.g.
6445 \markup @{ is \italic @{ anyone @} home @}
6448 @cindex font size, texts
6450 The following size commands set abolute sizes
6466 You can also make letter larger or smaller relative to their neighbors,
6467 with the commands @code{\larger} and @code{\smaller}.
6471 @cindex font style, for texts
6477 The following font change commands are defined:
6480 This changes to the font used for dynamic signs. This font does not
6481 contain all characters of the alphabet, so when producing ``piu f'',
6482 the ``piu'' should be done in a different font.
6486 This changes to the font used for time signatures. It only contains
6487 numbers and a few punctuation marks.
6489 Changes @code{font-shape} to @code{italic}
6491 Changes @code{font-series} to @code{bold}
6494 @cindex raising text
6495 @cindex lowering text
6497 @cindex translating text
6502 Raising and lowering texts can be done with @code{\super} and
6505 @lilypond[verbatim,fragment,relative=1]
6506 c1^\markup { E "=" mc \super "2" }
6511 If you want to give an explicit amount for lowering or raising, use
6512 @code{\raise}. This command takes a Scheme valued first argument, and
6513 a markup object as second argument
6515 @lilypond[verbatim,fragment,relative=1,quote]
6516 c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}
6518 The argument to @code{\raise} is the vertical displacement amount,
6519 measured in (global) staff spaces.
6521 Other commands taking single arguments include
6524 @item \bracket, \hbracket
6525 Bracket the argument markup with normal and horizontal brackets
6530 This is converted to a musical symbol, e.g. @code{\musicglyph
6531 #"accidentals-0"} will select the natural sign from the music font.
6532 See @ref{The Feta font} for a complete listing of the possible glyphs.
6534 This produces a single character, e.g. @code{\char #65} produces the
6537 @item \hspace #@var{amount}
6539 This produces a invisible object taking horizontal space.
6541 \markup @{ A \hspace #2.0 B @}
6543 will put extra space between A and B, on top of the space that is
6544 normally inserted before elements on a line.
6546 @item \fontsize #@var{size}
6548 This sets the relative font size, eg.
6550 A \fontsize #2 @{ B C @} D
6554 This will enlarge the B and the C by two steps.
6555 @item \translate #(cons @var{x} @var{y})
6557 This translates an object. Its first argument is a cons of numbers
6559 A \translate #(cons 2 -3) @{ B C @} D
6561 This moves `B C' 2 spaces to the right, and 3 down.
6563 @item \magnify #@var{mag}
6565 This sets the font magnification for the its argument. In the following
6566 example, the middle A will be 10% larger.
6568 A \magnify #1.1 @{ A @} A
6572 @item \override #(@var{key} . @var{value})
6574 This overrides a formatting property for its argument. The argument
6575 should be a key/value pair, e.g.
6577 m \override #'(font-family . math) m m
6581 In markup mode you can compose expressions, similar to mathematical
6582 expressions, XML documents and music expressions. The braces group
6583 notes into horizontal lines. Other types of lists also exist: you can
6584 stack expressions grouped with @code{<<}, and @code{>>} vertically with
6585 the command @code{\column}. Similarly, @code{\center} aligns texts by
6588 @lilypond[verbatim,fragment,relative=1]
6589 c1^\markup { \column << a bbbb c >> }
6590 c1^\markup { \center << a bbbb c >> }
6591 c1^\markup { \line << a b c >> }
6594 The markup mechanism is extensible. Refer to
6595 @file{scm/new-markup.scm} for more information on extending the markup
6602 @internalsref{Markup functions}, @file{scm/new-markup.scm}
6609 Text layout is ultimately done by @TeX{}, which does kerning of
6610 letters. LilyPond does not account for kerning, so texts will be
6611 spaced slightly too wide.
6613 Syntax errors for markup mode are confusing.
6617 @section Global layout
6619 The global layout determined by three factors: the page layout, the
6620 line breaks and the spacing. These all influence each other. The
6621 choice of spacing determines how densely each system of music is set,
6622 which influences where line breaks breaks are chosen, and thus
6623 ultimately how many pages a piece of music takes. In this section, the
6624 algorithm for spacing music is explained, and how spacing can be
6627 Globally spoken, this procedure happens in three steps: first,
6628 flexible distances (``springs'') are chosen, based on durations. All
6629 possible line breaking combination are tried, and the one with the
6630 best results---a layout that has uniform density and requires as
6631 little stretching or cramping as possible---is chosen. When the score
6632 is processed by @TeX{}, each page is filled with systems, and page breaks
6633 are chosen whenever the page gets full.
6638 * Vertical spacing::
6639 * Horizontal spacing::
6646 @node Vertical spacing
6647 @subsection Vertical spacing
6649 @cindex vertical spacing
6650 @cindex distance between staves
6651 @cindex staff distance
6652 @cindex between staves, distance
6653 @cindex staffs per page
6656 The height of each system is determined automatically by lilypond, to
6657 keep systems from bumping into each other, some minimum distances are
6658 set. By changing these, you can put staves closer together, and thus
6659 put more systems onto one page.
6661 Normally staves are stacked vertically. To make
6662 staves maintain a distance, their vertical size is padded. This is
6663 done with the property @code{minimumVerticalExtent}. It takes a pair
6664 of numbers, so if you want to make it smaller from its, then you could
6667 \property Staff.minimumVerticalExtent = #'(-4 . 4)
6669 This sets the vertical size of the current staff to 4 staff-space on
6670 either side of the center staff line. The argument of
6671 @code{minimumVerticalExtent} is interpreted as an interval, where the
6672 center line is the 0, so the first number is generally negative. The
6673 staff can be made larger at the bottom by setting it to @code{(-6
6676 The piano staves are handled a little differently: to make cross-staff
6677 beaming work correctly, it necessary that the distance between staves
6678 is fixed beforehand. This is also done with a
6679 @internalsref{VerticalAlignment} object, created in
6680 @internalsref{PianoStaff}. In this object the distance between the
6681 staves is fixed by setting @code{forced-distance}. If you want to
6682 override this, use a @code{\translator} block as follows:
6686 VerticalAlignment \override #'forced-distance = #9
6689 This would bring the staves together at a distance of 9 staff spaces,
6690 measured from the center line of each staff.
6694 Vertical aligment of staves is handled by the
6695 @internalsref{VerticalAlignment} object.
6699 @node Horizontal spacing
6700 @subsection Horizontal Spacing
6702 The spacing engine translates differences in durations into
6703 stretchable distances (``springs'') of differing lengths. Longer
6704 durations get more space, shorter durations get less. The shortest
6705 durations get a fixed amount of space (which is controlled by
6706 @code{shortest-duration-space} in the @internalsref{SpacingSpanner}
6707 object). The longer the duration, the more space it gets: doubling a
6708 duration adds a fixed amount (this amount is controlled by
6709 @code{spacing-increment}) of space to the note.
6711 For example, the following piece contains lots of half, quarter and
6712 8th notes, the eighth note is followed by 1 note head width (NHW).
6713 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
6714 @lilypond[fragment, verbatim, relative=1] c2 c4. c8 c4. c8 c4. c8 c8
6718 Normally, @code{shortest-duration-space} is set to 1.2, which is the
6719 width of a note head, and @code{shortest-duration-space} is set to
6720 2.0, meaning that the shortest note gets 2 NHW (2 times
6721 @code{shortest-duration-space}) of space. For normal notes, this space
6722 is always counted from the left edge of the symbol, so the shortest
6723 notes are generally followed by one NHW of space.
6725 If one would follow the above procedure exactly, then adding a single
6726 32th note to a score that uses 8th and 16th notes, would widen up the
6727 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
6728 thus adding 2 noteheads of space to every note. To prevent this, the
6729 shortest duration for spacing is not the shortest note in the score,
6730 but the most commonly found shortest note. Notes that are even
6731 shorter this are followed by a space that is proportonial to their
6732 duration relative to the common shortest note. So if we were to add
6733 only a few 16th notes to the example above, they would be followed by
6736 @lilypond[fragment, verbatim, relative=2]
6737 c2 c4. c8 c4. c16-[ c-] c4. c8 c8 c8 c4 c4 c4
6740 The most common shortest duration is determined as follows: in every
6741 measure, the shortest duration is determined. The most common short
6742 duration, is taken as the basis for the spacing, with the stipulation
6743 that this shortest duration should always be equal to or shorter than
6744 1/8th note. The shortest duration is printed when you run lilypond
6745 with @code{--verbose}. These durations may also be customized. If you
6746 set the @code{common-shortest-duration} in
6747 @internalsref{SpacingSpanner}, then this sets the base duration for
6748 spacing. The maximum duration for this base (normally 1/8th), is set
6749 through @code{base-shortest-duration}.
6751 @cindex @code{common-shortest-duration}
6752 @cindex @code{base-shortest-duration}
6753 @cindex @code{stem-spacing-correction}
6754 @cindex @code{spacing}
6756 In the introduction it was explained that stem directions influence
6757 spacing. This is controlled with @code{stem-spacing-correction}
6758 property in @internalsref{NoteSpacing}, which are generated for every
6759 @internalsref{Voice} context. The @code{StaffSpacing} object
6760 (generated at @internalsref{Staff} context) contains the same property
6761 for controlling the stem/barline spacing. The following example
6762 shows these corrections, once with default settings, and once with
6763 exaggerated corrections.
6769 \property Staff.NoteSpacing \override #'stem-spacing-correction
6771 \property Staff.StaffSpacing \override #'stem-spacing-correction
6776 \paper { raggedright = ##t } }
6779 @cindex SpacingSpanner, overriding properties
6781 Properties of the @internalsref{SpacingSpanner} must be overriden
6782 from the @code{\paper} block, since the @internalsref{SpacingSpanner}
6783 is created before any @code{\property} statements are interpreted.
6785 \paper @{ \translator @{
6787 SpacingSpanner \override #'spacing-increment = #3.0
6794 @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
6795 @internalsref{StaffSpacing}, @internalsref{SeparationItem},
6796 @internalsref{SeparatingGroupSpanner}.
6800 Spacing is determined on a score wide basis. If you have a score that
6801 changes its character (measured in durations) halfway during the
6802 score, the part containing the longer durations will be spaced too
6805 There is no convenient mechanism to manually override spacing.
6810 @subsection Font size
6811 @cindex font size, setting
6812 @cindex staff size, setting
6813 @cindex @code{paper} file
6815 The Feta font provides musical symbols at seven different sizes.
6816 These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
6817 26 point. The point size of a font is the height of the corresponding
6818 staff (excluding line thicknesses).
6820 Definitions for these sizes are the files @file{paperSZ.ly}, where
6821 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
6822 of these files, the variables @code{paperEleven},
6823 @code{paperThirteen}, @code{paperSixteen},
6824 @code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
6825 are defined respectively. The default @code{\paper} block is also
6826 set. These files should be imported at toplevel, i.e.
6828 \include "paper26.ly"
6832 The font definitions are generated using a Scheme function. For more
6833 details, see the file @file{scm/font.scm}.
6838 @subsection Line breaking
6841 @cindex breaking lines
6843 Line breaks are normally computed automatically. They are chosen such
6844 that lines look neither cramped nor loose, and that consecutive lines
6845 have similar density.
6847 Occasionally you might want to override the automatic breaks; you can
6848 do this by specifying @code{\break}. This will force a line break at
6849 this point. Line breaks can only occur at places where there are bar
6850 lines. If you want to have a line break where there is no bar line,
6851 you can force an invisible bar line by entering @code{\bar
6852 ""}. Similarly, @code{\noBreak} forbids a line break at a
6856 @cindex regular line breaks
6857 @cindex four bar music.
6859 If you want linebreaks at regular intervals, you can use the following:
6861 < \repeat unfold 7 @{ s1 * 4 \break @}
6862 @emph{the real music}
6865 This makes the following 28 measures (assuming 4/4 time) be broken every
6870 @internalsref{BreakEvent}
6874 @subsection Page layout
6877 @cindex breaking pages
6879 @cindex @code{indent}
6880 @cindex @code{linewidth}
6882 The most basic settings influencing the spacing are @code{indent} and
6883 @code{linewidth}. They are set in the @code{\paper} block. They
6884 control the indentation of the first line of music, and the lengths of
6887 If @code{raggedright} is set to true in the @code{\paper}
6888 block, then the lines are justified at their natural length. This
6889 useful for short fragments, and for checking how tight the natural
6893 @cindex vertical spacing
6895 The page layout process happens outside the LilyPond formatting
6896 engine: variables controlling page layout are passed to the output,
6897 and are further interpreted by @code{ly2dvi}. @code{ly2dvi} responds
6898 to the following variables in the @code{\paper} block. The variable
6899 @code{textheight} sets the total height of the music on each page.
6900 The spacing between systems is controlled with @code{interscoreline},
6901 its default is 16pt. The distance between the score lines will
6902 stretch in order to fill the full page @code{interscorelinefill} is
6903 set to a positive number. In that case @code{interscoreline}
6904 specifies the minimum spacing.
6906 @cindex @code{textheight}
6907 @cindex @code{interscoreline}
6908 @cindex @code{interscorelinefill}
6910 If the variable @code{lastpagefill} is defined,
6911 @c fixme: this should only be done if lastpagefill == #t
6912 systems are evenly distributed vertically on the last page. This
6913 might produce ugly results in case there are not enough systems on the
6914 last page. The @command{lilypond-book} command ignores
6915 @code{lastpagefill}. See @ref{lilypond-book manual} for more
6918 @cindex @code{lastpagefill}
6920 Page breaks are normally computed by @TeX{}, so they are not under
6921 direct control of LilyPond. However, you can insert a commands into
6922 the @file{.tex} output to instruct @TeX{} where to break pages. This
6923 is done by setting the @code{between-systems-strings} on the
6924 @internalsref{NonMusicalPaperColumn} where the system is broken.
6925 An example is shown in @inputfileref{input/regression,between-systems.ly}.
6929 @cindex @code{papersize}
6931 To change the paper size, you must first set the
6932 @code{papersize} paper variable variable. Set it to
6933 the strings @code{a4}, @code{letter}, or @code{legal}. After this
6934 specification, you must set the font as described above. If you want
6935 the default font, then use the 20 point font.
6938 \paper@{ papersize = "a4" @}
6939 \include "paper16.ly"
6942 The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
6943 will set the paper variables @code{hsize} and @code{vsize} (used by
6944 Lilypond and @code{ly2dvi})
6949 @ref{Invoking ly2dvi},
6950 @inputfileref{input/regression,between-systems.ly},
6951 @internalsref{NonMusicalPaperColumn}.
6955 There is no concept of page breaking, which makes it difficult to
6956 choose sensible page breaks in multi-page pieces.
6965 Entered music can also be converted to MIDI output. The performance
6966 is good enough for proof-hearing the music for errors.
6969 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
6970 crescendi and decrescendi translate into MIDI volume levels. Dynamic
6971 marks translate to a fixed fraction of the available MIDI volume
6972 range, crescendi and decrescendi make the volume vary linearly
6973 between their two extremities. The fractions be adjusted by
6974 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
6976 For each type of musical instrument (that MIDI supports), a volume range
6977 can be defined. This gives you basic equalizer control, which can
6978 enhance the quality of the MIDI output remarkably. The equalizer
6979 can be controlled by setting @code{instrumentEqualizer}.
6981 Both loudness controls are combined to produce the final MIDI volume.
6985 Many musically interesting effects, such as swing, articulation,
6986 slurring, etc., are translated to MIDI.
6991 * MIDI instrument names::
6996 @subsection MIDI block
7000 The MIDI block is analogous to the paper block, but it is somewhat
7001 simpler. The @code{\midi} block can contain:
7005 @item a @code{\tempo} definition
7006 @item context definitions
7009 Assignments in the @code{\midi} block are not allowed.
7013 @cindex context definition
7015 Context definitions follow precisely the same syntax as within the
7016 \paper block. Translation modules for sound are called performers.
7017 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
7020 @node MIDI instrument names
7021 @subsection MIDI instrument names
7023 @cindex instrument names
7024 @cindex @code{Staff.midiInstrument}
7025 @cindex @code{Staff.instrument}
7027 The MIDI instrument name is set by the @code{Staff.midiInstrument}
7028 property or, if that property is not set, the @code{Staff.instrument}
7029 property. The instrument name should be chosen from the list in
7030 @ref{MIDI instruments}.
7034 If the selected string does not exactly match, then LilyPond uses the
7035 default (Grand Piano). It is not possible to select an instrument by