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@@=Notation 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::
60 * Easy Notation note heads ::
68 A note is printed by specifying its pitch and then its duration.
69 @footnote{Notes constitute the most basic elements of LilyPond input,
70 but they do not form valid input on their own without a @code{\score}
71 block. However, for the sake of brevity and simplicity we will
72 generally omit @code{\score} blocks and @code{\paper} declarations in
75 @lilypond[fragment,verbatim]
84 @cindex Note specification
86 @cindex entering notes
88 The most common syntax for pitch entry is used in @code{\chords} and
89 @code{\notes} mode. In Note and Chord mode, pitches may be designated
90 by names. The notes are specified by the letters @code{a} through
91 @code{g}, while the octave is formed with notes ranging from @code{c}
92 to @code{b}. The pitch @code{c} is an octave below middle C and the
93 letters span the octave above that C.
95 @lilypond[fragment,verbatim]
97 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
100 @cindex note names, Dutch
102 A sharp is formed by adding @code{-is} to the end of a pitch
103 name and a flat is formed by adding @code{-es}. Double sharps and
104 double flats are obtained by adding @code{-isis} or @code{-eses}.
106 These default names are the Dutch note names. In Dutch, @code{aes} is
107 contracted to @code{as} in Dutch, but both forms are
108 accepted. Similarly, both @code{es} and @code{ees} are accepted.
110 There are predefined sets of note names for various other languages.
111 To use them, include the language specific init file. For
112 example: @code{\include "english.ly"}. The available language files
113 and the note names they define are:
118 Note Names sharp flat
119 nederlands.ly c d e f g a bes b -is -es
120 english.ly c d e f g a bf b -s/-sharp -f/-flat
121 deutsch.ly c d e f g a b h -is -es
122 norsk.ly c d e f g a b h -iss/-is -ess/-es
123 svenska.ly c d e f g a b h -iss -ess
124 italiano.ly do re mi fa sol la sib si -d -b
125 catalan.ly do re mi fa sol la sib si -d/-s -b
126 espanol.ly do re mi fa sol la sib si -s -b
135 The optional octave specification takes the form of a series of
136 single quote (`@code{'}') characters or a series of comma
137 (`@code{,}') characters. Each @code{'} raises the pitch by one
138 octave; each @code{,} lowers the pitch by an octave.
140 @lilypond[fragment,verbatim,center]
141 c' c'' es' g' as' gisis' ais'
145 The verbose syntax for pitch specification is
147 @cindex @code{\pitch}
149 \pitch @var{scmpitch}
152 where @var{scmpitch} is a Scheme object of the @code{Pitch} type.
157 @internalsref{NoteEvent}, @internalsref{NoteHead}
159 @node Chromatic alterations
160 @subsection Chromatic alterations
162 Normally accidentals are printed automatically, but you may also
163 print them manually. A reminder accidental
164 @cindex reminder accidental
166 can be forced by adding an exclamation mark @code{!}
167 after the pitch. A cautionary accidental
168 @cindex cautionary accidental
169 @cindex parenthesized accidental
170 (an accidental within parentheses) can be obtained by adding the
171 question mark `@code{?}' after the pitch.
173 @lilypond[fragment,verbatim]
174 cis' cis' cis'! cis'?
178 The automatic production of accidentals can be tuned in many
179 ways. For more information, refer to @ref{Accidentals}.
184 A chord is formed by a enclosing a set of pitches in @code{<<} and
185 @code{>>}. A chord may be followed by a duration, and a set of
186 articulations, just like simple notes.
188 Additionally, fingerings and articulations may be attached to
189 individual pitches of the chord:
191 @lilypond[singleline,verbatim,relative 1]
204 Rests are entered like notes, with the note name @code{r}.
206 @lilypond[singleline,verbatim]
210 Whole bar rests, centered in middle of the bar, are specified using
211 @code{R} (capital R); see @ref{Multi measure rests}. See also
214 For some music, you may wish to explicitly specify the rest's vertical
215 position. This can be achieved by entering a note with the @code{\rest}
216 keyword appended. Rest collision testing will leave these rests alone.
218 @lilypond[singleline,verbatim]
224 @internalsref{RestEvent}, @internalsref{Rest}
231 @cindex Invisible rest
234 An invisible rest (also called a `skip') can be entered like a note
235 with note name `@code{s}' or with @code{\skip @var{duration}}:
237 @lilypond[singleline,verbatim]
241 The @code{s} syntax is only available in Note mode and Chord
242 mode. In other situations, you should use the @code{\skip} command,
243 which will work outside of those two modes:
245 @lilypond[singleline,verbatim]
248 { \time 4/8 \skip 2 \time 4/4 }
249 \notes\relative c'' { a2 a1 }
254 The skip command is merely an empty musical placeholder. It does not
255 produce any output, not even transparent output.
259 @internalsref{SkipEvent}
264 @subsection Durations
268 @cindex @code{\duration}
271 In Note, Chord, and Lyrics mode, durations are designated by numbers
272 and dots: durations are entered as their reciprocal values. For example,
273 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
274 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
275 longer than a whole you must use variables.
277 @c FIXME: what is an identifier? I do not think it's been introduced yet.
278 @c and if it has, I obviously skipped that part. - Graham
282 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
284 r1 r2 r4 r8 r16 r32 r64 r64
289 \notes \relative c'' {
291 a1 a2 a4 a8 a16 a32 a64 a64
293 r1 r2 r4 r8 r16 r32 r64 r64
298 \remove "Clef_engraver"
299 \remove "Staff_symbol_engraver"
300 \remove "Time_signature_engraver"
301 \consists "Pitch_squash_engraver"
308 If the duration is omitted then it is set to the previously entered
309 duration. Default for the first note is a quarter note. The duration
310 can be followed by dots (`@code{.}') in order to obtain dotted note
314 @lilypond[fragment,verbatim,center]
315 a' b' c''8 b' a'4 a'4. b'4.. c'8.
320 You can alter the length of duration by a fraction @var{N/M}
321 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
322 will not affect the appearance of the notes or rests produced.
324 @lilypond[fragment,verbatim]
325 a'2*2 b'4*2 a'8*4 a'4*3/2 gis'4*3/2 a'4*3/2 a'4
328 Durations can also be produced through GUILE extension mechanism.
329 @lilypond[verbatim,fragment]
330 c'\duration #(ly:make-duration 2 1)
336 Dot placement for chords is not perfect. In some cases, dots overlap:
349 A tie connects two adjacent note heads of the same pitch. The tie in
350 effect extends the length of a note. Ties should not be confused with
351 slurs, which indicate articulation, or phrasing slurs, which indicate
352 musical phrasing. A tie is entered using the tilde symbol `@code{~}'.
354 @lilypond[fragment,verbatim,center]
355 e' ~ e' <<c' e' g'>> ~ <<c' e' g'>>
358 When a tie is applied to a chord, all note heads whose pitches match
359 are connected. When no note heads match, no ties will be created.
361 In its meaning a tie is just a way of extending a note duration, similar
362 to the augmentation dot: the following example are two ways of notating
363 exactly the same concept.
365 @lilypond[fragment, singleline,quote]
366 \time 3/4 c'2. c'2 ~ c'4
368 If you need to tie notes over bars, it may be easier to use automatic
369 note splitting (See @ref{Automatic note splitting}).
374 @internalsref{TieEvent}, @internalsref{NewTieEvent},
375 @internalsref{Tie}, @ref{Automatic note splitting}.
378 ties created for a chord, see @inputfileref{input/test,tie-sparse.ly}.
382 Tieing only a subset of the note heads of a pair of chords is not
383 supported in a simple way. It can be achieved by moving the
384 tie-engraver into the @internalsref{Thread} context and turning on and
385 off ties per @internalsref{Thread}.
387 Switching staves when a tie is active, will produce a horizontal tie
390 Formatting of ties is a difficult subject. The results are often not
400 @cindex @code{\times}
402 Tuplets are made out of a music expression by multiplying all durations
405 @cindex @code{\times}
407 \times @var{fraction} @var{musicexpr}
410 The duration of @var{musicexpr} will be multiplied by the fraction.
411 In the sheet music, the fraction's denominator will be printed over
412 the notes, optionally with a bracket. The most common tuplet is the
413 triplet in which 3 notes have the length of 2, so the notes are 2/3
414 of their written length:
416 @lilypond[fragment,verbatim,center]
417 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
420 The property @code{tupletSpannerDuration} specifies how long each bracket
421 should last. With this, you can make lots of tuplets while typing
422 @code{\times} only once, saving lots of typing.
424 @lilypond[fragment, relative, singleline, verbatim]
425 \property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
426 \times 2/3 { c'8 c c c c c }
429 The format of the number is determined by the property
430 @code{tupletNumberFormatFunction}. The default prints only the
431 denominator, but if it is set to the Scheme function
432 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
436 @cindex @code{tupletNumberFormatFunction}
437 @cindex tuplet formatting
441 @seeinternals{TupletBracket}, @seeinternals{TimeScaledMusic}.
445 Nested tuplets are not formatted automatically. In this case, outer
446 tuplet brackets should be moved manually.
448 @node Easy Notation note heads
449 @subsection Easy Notation note heads
451 @cindex easy notation
454 The `easyplay' note head includes a note name inside the head. It is
455 used in music aimed at beginners.
457 @lilypond[singleline,verbatim,26pt]
459 \notes { c'2 e'4 f' | g'1 }
460 \paper { \translator { \EasyNotation } }
464 The @code{EasyNotation} variable overrides a @internalsref{Score}
465 context. You probably will want to print it with magnification or a
466 large font size to make it more readable. To print with
467 magnification, you must create a DVI file (with @file{ly2dvi}) and
468 then enlarge it with something like @file{dvips -x 2000 file.dvi}.
469 See @file{man dvips} for details. To print with a larger font, see
476 If you view the result with Xdvi, then staff lines will show through
477 the letters. Printing the PostScript file obtained with ly2dvi does
478 produce the correct result.
481 @node Easier music entry
482 @section Easier music entry
485 When entering music it is easy to introduce errors. This section deals
486 with tricks and features of the input language that help when entering
487 music, and find and correct mistakes.
489 Some features of the input language ease entering music, for example
490 the use of variables (for splitting up large pieces of music), and
491 unfolded repeats for writing repetitive parts. They are described in
492 other sections (see @ref{Repeats} and @ref{Assignments}), since they
493 are not especially aimed at easing entry
495 It is also possible to use external programs, for example GUI
496 interfaces, or MIDI transcription programs, to enter or edit
497 music. Refer to the website for more information. Finally, there are
498 tools make debugging easier, by linking the input file and the output
499 shown on screen. See @ref{Point and click} for more information.
505 * Skipping corrected music::
506 * Automatic note splitting ::
512 @node Relative octaves
513 @subsection Relative octaves
515 @cindex relative octave specification
517 Octaves are specified by adding @code{'} and @code{,} to pitch names.
518 When you copy existing music, it is easy to accidentally put a pitch
519 in the wrong octave and hard to find such an error. The relative
520 octave mode prevents these errors
522 @cindex @code{\relative}
524 \relative @var{startpitch} @var{musicexpr}
527 The octave of notes that appear in @var{musicexpr} are calculated as
528 follows: If no octave changing marks are used, the basic interval
529 between this and the last note is always taken to be a fourth or less
530 (This distance is determined without regarding alterations; a
531 @code{fisis} following a @code{ceses} will be put above the
534 The octave changing marks @code{'} and @code{,} can be added to raise or
535 lower the pitch by an extra octave. Upon entering relative mode, an
536 absolute starting pitch must be specified that will act as the
537 predecessor of the first note of @var{musicexpr}.
539 Entering music that changes octave frequently is easy in relative mode.
540 @lilypond[fragment,singleline,verbatim,center]
546 And octave changing marks are used for intervals greater than a fourth.
547 @lilypond[fragment,verbatim,center]
552 If the preceding item is a chord, the first note of the chord is used
553 to determine the first note of the next chord. However, other notes
554 within the second chord are determined by looking at the immediately
557 @lilypond[fragment,verbatim,center]
564 @cindex @code{\notes}
566 The pitch after the @code{\relative} contains a note name. To parse
567 the pitch as a note name, you have to be in note mode, so there must
568 be a surrounding @code{\notes} keyword (which is not
571 The relative conversion will not affect @code{\transpose},
572 @code{\chords} or @code{\relative} sections in its argument. If you
573 want to use relative within transposed music, you must place an
574 additional @code{\relative} inside the @code{\transpose}.
578 @subsection Bar check
582 @cindex @code{barCheckSynchronize}
586 Whenever a bar check is encountered during interpretation, a warning
587 message is issued if it does not fall at a measure boundary. This can
588 help find errors in the input. Depending on the value of
589 @code{barCheckSynchronize}, the beginning of the measure will be
590 relocated. A bar check is entered using the bar symbol, `@code{|}'.
593 \time 3/4 c2 e4 | g2.
598 @cindex skipTypesetting
600 Failed bar checks are caused by entering incorrect
601 durations. Incorrect durations often completely garble up the score,
602 especially if it is polyphonic, so you should start correcting the
603 score by scanning for failed bar checks and incorrect durations. To
604 speed up this process, you can use @code{skipTypesetting}, described
607 @node Skipping corrected music
608 @subsection Skipping corrected music
610 The property @code{Score.skipTypesetting} can be used to switch on and
611 off typesetting completely during the interpretation phase. When
612 typesetting is switched off, the music is processed much more quickly.
613 This can be used to skip over the parts of a score that have already
614 been checked for errors.
616 @lilypond[fragment,singleline,verbatim]
618 \property Score.skipTypesetting = ##t
620 \property Score.skipTypesetting = ##f
624 @node Automatic note splitting
625 @subsection Automatic note splitting
627 Long notes can be converted automatically to tied notes. This is done
628 by replacing the @internalsref{Note_heads_engraver} by the
629 @internalsref{Completion_heads_engraver}.
632 \paper @{ \translator @{
634 \remove "Note_heads_engraver"
635 \consists "Completion_heads_engraver"
642 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
649 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
651 \paper { \translator {
653 \remove "Note_heads_engraver"
654 \consists "Completion_heads_engraver"
659 This engraver splits all running notes at the bar line, and inserts
660 ties. One of its uses is to debug complex scores: if the measures are
661 not entirely filled, then the ties exactly show how much each measure
666 Not all durations (especially those containing tuplets) can be
667 represented exactly; the engraver will not insert tuplets.
673 @section Staff notation
675 This section describes with music notation that occurs on staff level,
676 such as keys, clefs and time signatures.
678 @cindex Staff notation
691 @subsection Staff symbol
693 @cindex adjusting staff symbol
694 @cindex StaffSymbol, using \property
695 @cindex staff lines, setting number of
697 Notes, dynamic signs, etc. are grouped
698 with a set of horizontal lines, into a staff (plural `staves'). In our
699 system, these lines are drawn using a separate graphical object called
702 This object is created whenever a @internalsref{Staff} context is
703 created. The appearance of the staff symbol cannot be changed by
704 using @code{\override} or @code{\set}. At the moment that
705 @code{\property Staff} is interpreted, a @internalsref{Staff} context
706 is made, and the @internalsref{StaffSymbol} is created before any
707 @code{\override} is effective. Properties can be changed in a
708 @code{\translator} definition, or by using @code{\outputproperty}.
712 If a staff is ended halfway a piece, the staff symbol may not end
713 exactly on the barline.
717 @subsection Key signature
722 The key signature indicates the scale in which a piece is played. It
723 is denoted by a set of alterations (flats or sharps) at the start of
728 Setting or changing the key signature is done with the @code{\key}
731 @code{\key} @var{pitch} @var{type}
734 @cindex @code{\minor}
735 @cindex @code{\major}
736 @cindex @code{\minor}
737 @cindex @code{\ionian}
738 @cindex @code{\locrian}
739 @cindex @code{\aeolian}
740 @cindex @code{\mixolydian}
741 @cindex @code{\lydian}
742 @cindex @code{\phrygian}
743 @cindex @code{\dorian}
745 Here, @var{type} should be @code{\major} or @code{\minor} to get
746 @var{pitch}-major or @var{pitch}-minor, respectively.
747 The standard mode names @code{\ionian},
748 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
749 @code{\phrygian}, and @code{\dorian} are also defined.
751 This command sets the context property
752 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
753 can be specified by setting this property directly.
757 The ordering of a key restoration (alterations that change back to
758 natural) is wrong when combined with a repeat barline.
762 @internalsref{KeyChangeEvent}, @internalsref{KeySignature}.
764 @cindex @code{keySignature}
771 The clef indicates which lines of the staff correspond to which
776 The clef can be set or changed with the @code{\clef} command:
777 @lilypond[fragment,verbatim]
778 \key f\major c''2 \clef alto g'2
781 Supported clef-names include
782 @c Moved standard clefs to the top /MB
784 @item treble, violin, G, G2
793 G clef on 1st line, so-called French violin clef
808 By adding @code{_8} or @code{^8} to the clef name, the clef is
809 transposed one octave down or up, respectively. @var{clefname} must
810 be enclosed in quotes when it contains underscores or digits. For
816 This command is equivalent to setting @code{clefGlyph},
817 @code{clefPosition} (which controls the Y position of the clef),
818 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
819 when any of these properties are changed.
823 The object for this symbol is @internalsref{Clef}.
827 @node Ottava brackets
828 @subsection Ottava brackets
830 ``Ottava'' brackets introduce an extra transposition of an octave for
831 the staff. They are created by invoking the function
832 @code{set-octavation}
838 @lilypond[verbatim,fragment]
847 Internally the @code{set-octavation} sets @code{ottavation} (eg. to
848 @code{"8va"}) and @code{centralCPosition} properties.
852 @internalsref{OttavaBracket}
856 @code{set-octavation} will get confused when clef changes happen
857 during an octavation bracket.
860 @subsection Time signature
861 @cindex Time signature
865 Time signature indicates the metrum of a piece: a regular pattern of
866 strong and weak beats. It is denoted by a fraction at the start of the
871 The time signature is set or changed by the @code{\time}
873 @lilypond[fragment,verbatim]
874 \time 2/4 c'2 \time 3/4 c'2.
877 The actual symbol that is printed can be customized with the
878 @code{style} property. Setting it to @code{#'()} uses fraction style
879 for 4/4 and 2/2 time. There are many more options for its layout.
880 See @inputfileref{input/test,time.ly} for more examples.
883 This command sets the property @code{timeSignatureFraction},
884 @code{beatLength} and @code{measureLength} in the @code{Timing}
885 context, which is normally aliased to @internalsref{Score}. The
886 property @code{timeSignatureFraction} determines where bar lines
887 should be inserted, and how automatic beams should be generated.
888 Changing the value of @code{timeSignatureFraction} also causes the
889 symbol to be printed.
891 More options are available through the Scheme function
892 @code{set-time-signature}. In combination with the
893 @internalsref{Measure_grouping_engraver}, it will create
894 @internalsref{MeasureGrouping} signs. Such signs ease reading
895 rhythmically complex modern music. In the following example, the 9/8
896 measure is subdivided in 2, 2, 2 and 3. This is passed to
897 @code{set-time-signature} as the third argument @code{(2 2 2 3)}.
900 \score { \notes \relative c'' {
901 #(set-time-signature 9 8 '(2 2 2 3))
902 g8-[ g-] d-[ d-] g-[ g-] a8-[-( bes g-]-) |
903 #(set-time-signature 5 8 '(3 2))
908 \translator { \StaffContext
909 \consists "Measure_grouping_engraver"
915 @internalsref{TimeSignature}, @internalsref{Timing_engraver}.
920 Automatic beaming does not use measure grouping specified with
921 @code{set-time-signature}.
928 @cindex partial measure
929 @cindex measure, partial
930 @cindex shorten measures
931 @cindex @code{\partial}
933 Partial measures, for example in upbeats, are entered using the
934 @code{\partial} command:
935 @lilypond[fragment,verbatim]
936 \partial 16*5 c'16 c4 f16 a'2. ~ a'8. a'16 | g'1
939 The syntax for this command is
941 \partial @var{duration}
943 This is internally translated into
945 \property Timing.measurePosition = -@var{length of duration}
948 The property @code{measurePosition} contains a rational number
949 indicating how much of the measure has passed at this point.
951 @node Unmetered music
952 @subsection Unmetered music
954 Bar lines and bar numbers are calculated automatically. For unmetered
955 music (e.g. cadenzas), this is not desirable. By setting
956 @code{Score.timing} to false, this automatic timing can be switched
960 @subsection Bar lines
964 @cindex measure lines
968 Bar lines delimit measures, but are also used to indicate
969 repeats. Line breaks may only happen on barlines.
973 Bar lines are inserted automatically. Special types
974 of barlines can be forced with the @code{\bar} command:
975 @lilypond[relative=1,fragment,verbatim]
979 The following bar types are available
980 @lilypond[fragment, relative, singleline, verbatim]
992 In scores with many staves, the barlines are automatically placed at
993 top level, and they are connected between different staves of a
994 @internalsref{StaffGroup}:
995 @lilypond[fragment, verbatim]
996 < \context StaffGroup <
997 \context Staff = up { e'4 d'
1000 \context Staff = down { \clef bass c4 g e g } >
1001 \context Staff = pedal { \clef bass c2 c2 } >
1005 The command @code{\bar @var{bartype}} is a short cut for
1006 doing @code{\property Score.whichBar = @var{bartype}}
1007 Whenever @code{whichBar} is set to a string, a bar line of that type is
1008 created. @code{whichBar} is usually set automatically: at the start of
1009 a measure it is set to @code{defaultBarType}. The contents of
1010 @code{repeatCommands} is used to override default measure bars.
1012 @code{whichBar} can also be set directly, using @code{\property} or
1013 @code{\bar }. These settings take precedence over the automatic
1014 @code{whichBar} settings.
1017 @cindex repeatCommands
1018 @cindex defaultBarType
1020 You are encouraged to use @code{\repeat} for repetitions. See
1030 The bar line objects that are created at @internalsref{Staff} level
1031 are called @internalsref{BarLine}, the bar lines that span staffs are
1032 @internalsref{SpanBar}s.
1039 The easiest way to enter fragments with more than one voice on a staff
1040 is to split chords using the separator @code{\\}. You can use it for
1041 small, short-lived voices or for single chords:
1043 @lilypond[verbatim,fragment]
1044 \context Voice = VA \relative c'' {
1045 c4 < { f d e } \\ { b c2 } > c4 < g' \\ b, \\ f' \\ d' >
1049 The separator causes @internalsref{Voice} contexts to be instantiated,
1050 bearing the names @code{"1"}, @code{"2"}, etc. In each of these
1051 contexts, vertical direction of slurs, stems, etc. are set
1054 This can also be done by instantiating @internalsref{Voice} contexts
1055 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1056 a stem directions and horizontal shift for each part.
1059 @lilypond[singleline, verbatim]
1061 \context Staff < \context Voice = VA { \voiceOne cis2 b }
1062 \context Voice = VB { \voiceThree b4 ais ~ ais4 gis4 }
1063 \context Voice = VC { \voiceTwo fis4~ fis4 f ~ f } >
1066 Normally, note heads with a different number of dots are not merged, but
1067 when the object property @code{merge-differently-dotted} is set in
1068 the @internalsref{NoteCollision} object, they are:
1069 @lilypond[verbatim,fragment,singleline]
1070 \relative c' \context Voice < {
1072 \property Staff.NoteCollision \override
1073 #'merge-differently-dotted = ##t
1075 } \\ { g8.-[ f16-] g8.-[ f16-] }
1079 Similarly, you can merge half note heads with eighth notes, by setting
1080 @code{merge-differently-headed}:
1081 @lilypond[fragment, relative=2,verbatim]
1084 \property Staff.NoteCollision
1085 \override #'merge-differently-headed = ##t
1086 c8 c4. } \\ { c2 c2 } >
1089 LilyPond also vertically shifts rests that are opposite of a stem.
1091 @lilypond[singleline,fragment,verbatim]
1092 \context Voice < c''4 \\ r4 >
1097 The objects responsible for resolving collisions are
1098 @internalsref{NoteCollision} and @internalsref{RestCollision}. See
1099 also example files @inputfileref{input/regression,collision-dots.ly},
1100 @inputfileref{input/regression,collision-head-chords.ly},
1101 @inputfileref{input/regression,collision-heads.ly},
1102 @inputfileref{input/regression,collision-mesh.ly}, and
1103 @inputfileref{input/regression,collisions.ly}.
1108 Resolving collisions is a intricate subject, and only a few situations
1109 are handled. When LilyPond cannot cope, the @code{force-hshift}
1110 property of the @internalsref{NoteColumn} object and pitched rests can
1111 be used to override typesetting decisions.
1116 Beams are used to group short notes into chunks that are aligned with
1117 the metrum. They are inserted automatically in most cases.
1119 @lilypond[fragment,verbatim, relative=2]
1120 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1123 When these automatic decisions are not good enough, beaming can be
1124 entered explicitly. It is also possible to define beaming patterns
1125 that differ from the defaults.
1129 @internalsref{Beam}.
1132 @cindex Automatic beams
1133 @subsection Manual beams
1134 @cindex beams, manual
1138 In some cases it may be necessary to override the automatic beaming
1139 algorithm. For example, the auto beamer will not beam over rests or
1140 bar lines, If you want that, specify the begin and end point manually
1141 using @code{[} and @code{]}.
1143 @lilypond[fragment,relative,verbatim]
1145 r4 r8-[ g' a r8-] r8 g-[ | a-] r8
1149 @cindex @code{stemLeftBeamCount}
1151 Normally, beaming patterns within a beam are determined automatically.
1152 When this mechanism fouls up, the properties
1153 @code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
1154 be used to control the beam subdivision on a stem. If either property
1155 is set, its value will be used only once, and then it is erased.
1157 @lilypond[fragment,relative,verbatim]
1160 f8-[ r16 \property Voice.stemLeftBeamCount = #1 f g a-]
1163 @cindex @code{stemRightBeamCount}
1166 The property @code{subdivideBeams} can be set in order to subdivide
1167 all 16th or shorter beams at beat positions. This accomplishes the
1168 same effect as twiddling with @code{stemLeftBeamCount} and
1169 @code{stemRightBeamCount}, but it take less typing.
1172 @lilypond[relative=1,verbatim,noindent]
1173 c16-[ c c c c c c c-]
1174 \property Voice.subdivideBeams = ##t
1175 c16-[ c c c c c c c-]
1176 c32-[ c c c c c c c c c c c c c c c-]
1177 \property Score.beatLength = #(ly:make-moment 1 8)
1178 c32-[ c c c c c c c c c c c c c c c-]
1180 @cindex subdivideBeams
1182 Kneed beams are inserted automatically, when a large gap is detected
1183 between the note heads. This behavior can be tuned through the object
1184 property @code{auto-knee-gap}.
1186 @cindex beams, kneed
1188 @cindex auto-knee-gap
1196 Automatically kneed beams cannot be used together with Hara Kiri
1201 * Setting automatic beam behavior ::
1205 @no de Beam typography
1206 @sub section Beam typography
1208 One of the strong points of LilyPond is how beams are formatted. Beams
1209 are quantized, meaning that the left and right endpoints beams start
1210 exactly on staff lines. Without quantization, small wedges of white
1211 space appear between the beam and staff line, and this looks untidy.
1213 Beams are also slope-damped: melodies that go up or down should also
1214 have beams that go up or down, but the slope of the beams should be
1215 less than the slope of the notes themselves.
1217 Some beams should be horizontal. These are so-called concave beams.
1219 [TODO: some pictures.]
1223 @node Setting automatic beam behavior
1224 @subsection Setting automatic beam behavior
1226 @cindex @code{autoBeamSettings}
1227 @cindex @code{(end * * * *)}
1228 @cindex @code{(begin * * * *)}
1229 @cindex automatic beams, tuning
1230 @cindex tuning automatic beaming
1232 [TODO: use \applycontext]
1234 In normal time signatures, automatic beams can start on any note but can
1235 only end in a few positions within the measure: beams can end on a beat,
1236 or at durations specified by the properties in
1237 @code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
1238 are defined in @file{scm/auto-beam.scm}.
1240 The value of @code{autoBeamSettings} is changed using
1241 @code{\override} and unset using @code{\revert}:
1243 \property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
1244 \property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
1246 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
1247 whether the rule applies to begin or end-points. The quantity
1248 @var{P}/@var{Q} refers to the length of the beamed notes (and `@code{*
1249 *}' designates notes of any length), @var{N}/@var{M} refers to a time
1250 signature (wildcards, `@code{* *}' may be entered to designate all time
1253 For example, if automatic beams should end on every quarter note, use
1256 \property Voice.autoBeamSettings \override
1257 #'(end * * * *) = #(ly:make-moment 1 4)
1259 Since the duration of a quarter note is 1/4 of a whole note, it is
1260 entered as @code{(ly:make-moment 1 4)}.
1262 The same syntax can be used to specify beam starting points. In this
1263 example, automatic beams can only end on a dotted quarter note.
1265 \property Voice.autoBeamSettings \override
1266 #'(end * * * *) = #(ly:make-moment 3 8)
1268 In 4/4 time signature, this means that automatic beams could end only on
1269 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1270 3/8 has passed within the measure).
1272 Rules can also be restricted to specific time signatures. A rule that
1273 should only be applied in @var{N}/@var{M} time signature is formed by
1274 replacing the second asterisks by @var{N} and @var{M}. For example, a
1275 rule for 6/8 time exclusively looks like
1277 \property Voice.autoBeamSettings \override
1278 #'(begin * * 6 8) = ...
1281 If a rule should be to applied only to certain types of beams, use the
1282 first pair of asterisks. Beams are classified according to the
1283 shortest note they contain. For a beam ending rule that only applies
1284 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1287 If a score ends while an automatic beam has not been ended and is still
1288 accepting notes, this last beam will not be typeset at all.
1290 @cindex automatic beam generation
1292 @cindex @code{Voice.autoBeaming}
1295 For melodies that have lyrics, you may want to switch off
1296 automatic beaming. This is done by setting @code{Voice.autoBeaming} to
1302 It is not possible to specify beaming parameters for beams with mixed
1303 durations, that differ from the beaming parameters of all separate
1304 durations, i.e., you will have to specify manual beams to get:
1306 @lilypond[singleline,fragment,relative,noverbatim,quote]
1307 \property Voice.autoBeamSettings
1308 \override #'(end * * * *) = #(ly:make-moment 3 8)
1309 \time 12/8 c'8 c c c16 c c c c c c-[ c c c-] c8 c c4
1311 It is not possible to specify beaming parameters that act differently in
1312 different parts of a measure. This means that it is not possible to use
1313 automatic beaming in irregular meters such as @code{5/8}.
1316 @section Accidentals
1319 This section describes how to change the way that LilyPond automatically
1320 inserts accidentals before the running notes.
1324 * Using the predefined accidental variables::
1325 * Customized accidental rules::
1328 @node Using the predefined accidental variables
1329 @subsection Using the predefined accidental variables
1331 The constructs for describing the accidental typesetting rules are
1332 quite hairy, so non-experts should stick to the variables
1333 defined in @file{ly/property-init.ly}.
1334 @cindex @file{property-init.ly}
1336 The variables set properties in the ``Current'' context (see
1337 @ref{Context properties}). This means that the variables should
1338 normally be added right after the creation of the context in which the
1339 accidental typesetting described by the variable is to take
1340 effect. For example, if you want to use piano-accidentals in a piano
1341 staff then issue @code{\pianoAccidentals} first thing after the
1342 creation of the piano staff:
1345 \notes \relative c'' <
1346 \context Staff = sa @{ cis4 d e2 @}
1347 \context GrandStaff <
1349 \context Staff = sb @{ cis4 d e2 @}
1350 \context Staff = sc @{ es2 c @}
1352 \context Staff = sd @{ es2 c @}
1356 @lilypond[singleline]
1358 \notes \relative c'' <
1359 \context Staff = sa { cis4 d e2 }
1360 \context GrandStaff <
1362 \context Staff = sb { cis4 d e2 }
1363 \context Staff = sc { es2 c }
1365 \context Staff = sd { es2 c }
1370 minimumVerticalExtent = #'(-4.0 . 4.0)
1378 @item \defaultAccidentals
1379 @cindex @code{\defaultAccidentals}
1380 This is the default typesetting behaviour. It should correspond
1381 to 18th century common practice: Accidentals are
1382 remembered to the end of the measure in which they occur and
1383 only on their own octave.
1385 @item \voiceAccidentals
1386 @cindex @code{\voiceAccidentals}
1388 The normal behaviour is to
1389 remember the accidentals on Staff-level. This variable, however,
1390 typesets accidentals individually for each voice. Apart from that the
1391 rule is similar to @code{\defaultAccidentals}.
1393 This leads to some weird and often unwanted results
1394 because accidentals from one voice do not get cancelled in other
1396 @lilypond[singleline,relative,fragment,verbatim,quote]
1404 Hence you should only use @code{\voiceAccidentals} if the voices
1405 are to be read solely by individual musicians. If the staff is to be
1406 used by one musician (e.g., a conductor) then you use
1407 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1410 @item \modernAccidentals
1411 @cindex @code{\modernAccidentals}
1412 This rule corresponds to the common practice in the 20th
1414 The rule is more complex than @code{\defaultAccidentals}.
1415 You get all the same accidentals, but temporary
1416 accidentals also get cancelled in other octaves. Further more,
1417 in the same octave, they also get cancelled in the following measure:
1418 @lilypond[singleline,fragment,verbatim]
1420 cis' c'' cis'2 | c'' c'
1423 @item \modernCautionaries
1424 @cindex @code{\modernCautionaries}
1425 This rule is similar to @code{\modernAccidentals}, but the
1426 ``extra'' accidentals (the ones not typeset by
1427 @code{\defaultAccidentals}) are typeset as cautionary accidentals
1428 (i.e. in reduced size):
1429 @lilypond[singleline,fragment,verbatim]
1431 cis' c'' cis'2 | c'' c'
1434 @cindex @code{\modernVoiceAccidentals}
1435 @item \modernVoiceAccidentals
1436 is used for multivoice accidentals to be read both by musicians
1437 playing one voice and musicians playing all voices. Accidentals are
1438 typeset for each voice, but they @emph{are} cancelled across voices in
1439 the same @internalsref{Staff}.
1441 @cindex @code{\modernVoiceCautionaries}
1442 @item \modernVoiceCautionaries
1443 is the same as @code{\modernVoiceAccidentals}, but with the extra
1444 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1445 as cautionaries. Even though all accidentals typeset by
1446 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1447 some of them are typeset as cautionaries.
1449 @item \pianoAccidentals
1450 @cindex @code{\pianoAccidentals}
1451 20th century practice for piano notation. Very similar to
1452 @code{\modernAccidentals} but accidentals also get cancelled
1453 across the staves in the same @internalsref{GrandStaff} or
1454 @internalsref{PianoStaff}.
1456 @item \pianoCautionaries
1457 @cindex @code{\pianoCautionaries}
1458 As @code{\pianoAccidentals} but with the extra accidentals
1459 typeset as cautionaries.
1462 @cindex @code{\noResetKey}
1463 Same as @code{\defaultAccidentals} but with accidentals lasting
1464 ``forever'' and not only until the next measure:
1465 @lilypond[singleline,fragment,verbatim,relative]
1470 @item \forgetAccidentals
1471 @cindex @code{\forgetAccidentals}
1472 This is sort of the opposite of @code{\noResetKey}: Accidentals
1473 are not remembered at all - and hence all accidentals are
1474 typeset relative to the key signature, regardless of what was
1475 before in the music:
1476 @lilypond[singleline,fragment,verbatim,relative]
1478 \key d\major c4 c cis cis d d dis dis
1482 @node Customized accidental rules
1483 @subsection Customized accidental rules
1485 This section must be considered gurus-only, and hence it must be
1486 sufficient with a short description of the system and a reference to
1487 the internal documentation.
1489 The algorithm tries several different rules, and uses the rule
1490 that gives the highest number of accidentals. Each rule consists of
1493 In which context is the rule applied. For example, if
1494 @var{context} is @internalsref{Score} then all staves share
1495 accidentals, and if @var{context} is @internalsref{Staff} then all
1496 voices in the same staff share accidentals, but staves do not.
1498 Whether the accidental changes all octaves or only the current
1501 Over how many barlines the accidental lasts.
1502 If @var{lazyness} is @code{-1} then the accidental is forget
1503 immediately, and if @var{lazyness} is @code{#t} then the accidental
1506 [TODO: should use +infinity for this case?]
1512 @internalsref{Accidental_engraver}, @internalsref{Accidental},
1513 @internalsref{AccidentalPlacement}.
1518 Currently the simultaneous notes are considered to be entered in
1519 sequential mode. This means that in a chord the accidentals are
1520 typeset as if the notes in the chord happened one at a time - in the
1521 order in which they appear in the input file.
1523 This is only a problem when there are simultaneous notes whose
1524 accidentals depend on each other. The problem only occurs when using
1525 non-default accidentals. In the default scheme, accidentals only
1526 depend on other accidentals with the same pitch on the same staff, so
1527 no conflicts possible.
1529 This example shows two examples of the same music giving different
1530 accidentals depending on the order in which the notes occur in the
1533 @lilypond[singleline,fragment,verbatim]
1534 \property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1535 cis'4 <<c'' c'>> r2 | cis'4 <<c' c''>> r2
1536 | <<cis' c''>> r | <<c'' cis'>> r |
1539 This problem can be solved by manually inserting @code{!} and @code{?}
1540 for the problematic notes.
1542 @node Expressive marks
1543 @section Expressive marks
1551 * Analysis brackets::
1558 A slur indicates that notes are to be played bound or @emph{legato}.
1562 They are entered using parentheses:
1563 @lilypond[fragment,verbatim,center]
1564 f'-( g'-)-( a'-) a'8-[ b'-(-] a'4 g'2 f'4-)
1565 <<c' e'>>2-( <<b d'>>2-)
1569 @c TODO: should explain that ^( and _( set directions
1570 @c should set attachments with ^ and _ ?
1572 Slurs avoid crossing stems, and are generally attached to note heads.
1573 However, in some situations with beams, slurs may be attached to stem
1574 ends. If you want to override this layout you can do this through the
1575 object property @code{attachment} of @internalsref{Slur} in
1576 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1577 the attachment type of the left and right end points.
1579 @lilypond[fragment,relative,verbatim]
1581 \property Voice.Stem \set #'length = #5.5
1583 \property Voice.Slur \set #'attachment = #'(stem . stem)
1587 If a slur would strike through a stem or beam, the slur will be moved
1588 away upward or downward. If this happens, attaching the slur to the
1589 stems might look better:
1591 @lilypond[fragment,relative,verbatim]
1594 \property Voice.Slur \set #'attachment = #'(stem . stem)
1600 @seeinternals{Slur}, @internalsref{SlurEvent}.
1605 Producing nice slurs is a difficult problem, and LilyPond currently
1606 uses a simple, empiric method to produce slurs. In some cases, the
1607 results of this method are ugly.
1610 @cindex Adjusting slurs
1612 @node Phrasing slurs
1613 @subsection Phrasing slurs
1615 @cindex phrasing slurs
1616 @cindex phrasing marks
1618 A phrasing slur (or phrasing mark) connects chords and is used to
1619 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1622 @lilypond[fragment,verbatim,center,relative]
1623 \time 6/4 c'-\( d-( e-) f-( e-) d-\)
1626 Typographically, the phrasing slur behaves almost exactly like a
1627 normal slur. However, they are treated as different objects. A
1628 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1629 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1630 @code{\phrasingSlurBoth}.
1632 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1633 will only affect normal slurs and not phrasing slurs.
1637 See also @internalsref{PhrasingSlur},
1638 @internalsref{PhrasingSlurEvent}.
1642 Phrasing slurs have the same limitations in their formatting as normal
1646 @subsection Breath marks
1648 Breath marks are entered using @code{\breathe}.
1651 @lilypond[fragment,relative]
1655 The glyph of the breath mark can be tweaked by overriding the
1656 @code{text} property of the @code{BreathingSign} grob with the name of
1657 any glyph of @ref{The Feta font}. For example,
1658 @lilypond[fragment,verbatim,relative]
1660 \property Voice.BreathingSign \override #'text = #"scripts-rvarcomma"
1667 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
1668 @inputfileref{input/regression,breathing-sign.ly}.
1671 @node Metronome marks
1672 @subsection Metronome marks
1675 @cindex beats per minute
1676 @cindex metronome marking
1678 Metronome settings can be entered as follows:
1680 \tempo @var{duration} = @var{perminute}
1683 In the MIDI output, they are interpreted as a tempo change, and in the
1684 paper output, a metronome marking is printed
1685 @cindex @code{\tempo}
1686 @lilypond[fragment,verbatim]
1692 @internalsref{TempoEvent}
1697 @subsection Text spanners
1698 @cindex Text spanners
1700 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1701 are written as texts, and extended over many measures with dotted
1702 lines. You can create such texts using text spanners: attach
1703 @code{\startTextSpan} and @code{\stopTextSpan} to the
1704 start and ending note of the spanner.
1706 The string to be printed, as well as the style, is set through object
1709 @lilypond[fragment,relative,verbatim]
1711 \property Voice.TextSpanner \set #'direction = #-1
1712 \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
1713 c2-\startTextSpan b c-\stopTextSpan a }
1719 @internalsref{TextSpanEvent},
1720 @internalsref{TextSpanner}, @inputfileref{input/regression,text-spanner.ly}.
1723 @node Analysis brackets
1724 @subsection Analysis brackets
1726 @cindex phrasing brackets
1727 @cindex musicological analysis
1728 @cindex note grouping bracket
1730 Brackets are used in musical analysis to indicate structure in musical
1731 pieces. LilyPond supports a simple form of nested horizontal brackets.
1732 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1733 @internalsref{Staff} context. A bracket is started with
1734 @code{\startGroup} and closed with @code{\stopGroup}.
1736 @lilypond[singleline,verbatim]
1737 \score { \notes \relative c'' {
1738 c4-\startGroup-\startGroup
1741 c4-\stopGroup-\stopGroup
1743 \paper { \translator {
1744 \StaffContext \consists "Horizontal_bracket_engraver"
1750 @internalsref{HorizontalBracket}, @internalsref{NoteGroupingEvent},
1751 @inputfileref{input/regression,note-group-bracket.ly}.
1755 Bracket endings should be angled/slanted. (TODO)
1762 @section Articulations
1763 @cindex Articulations
1765 @cindex articulations
1769 A variety of symbols can appear above and below notes to indicate
1770 different characteristics of the performance. They are added to a note
1771 by adding a dash and the character signifying the
1772 articulation. They are demonstrated here.
1774 @lilypondfile[notexidoc]{script-abbreviations.ly}
1776 The script is automatically placed, but if you need to force
1777 directions, you can use @code{_} to force them down, or @code{^} to
1779 @lilypond[fragment, verbatim]
1786 Other symbols can be added using the syntax
1787 @var{note}@code{-\}@var{name}. Again, they can be forced up or down
1788 using @code{^} and @code{_}.
1792 @cindex staccatissimo
1801 @cindex organ pedal marks
1810 @cindex prallmordent
1814 @cindex thumb marking
1819 @lilypondfile[notexidoc]{script-chart.ly}
1823 @internalsref{ScriptEvent}, @internalsref{Script}.
1827 All of these note ornaments appear in the printed output but have no
1828 effect on the MIDI rendering of the music.
1831 @node Fingering instructions
1832 @section Fingering instructions
1836 Fingering instructions can be entered using
1838 @var{note}-@var{digit}
1840 For finger changes, use markup texts:
1842 @lilypond[verbatim, singleline, fragment]
1843 c'4-1 c'4-2 c'4-3 c'4-4
1844 c'^\markup { \fontsize #-3 \number "2-3" }
1847 @cindex finger change
1852 @lilypond[verbatim,singleline,fragment,relative=1]
1853 << c-1 e-2 g-3 b-5 >> 4
1854 \property Voice.fingerHorizontalDirection = #LEFT
1855 << c-1 es-3 g-5 >> 4
1856 \property Voice.fingerHorizontalDirection = #RIGHT
1857 << c-1 e-2 g-3 b-5 >>4
1858 \property Voice.fingerHorizontalDirection = #LEFT
1859 << c_1 e-2 g-3 b^5 >>4
1864 @internalsref{FingerEvent} and @internalsref{Fingering}.
1875 @subsection Text scripts
1876 @cindex Text scripts
1878 It is possible to place arbitrary strings of text or markup text (see
1879 @ref{Text markup}) above or below notes by using a string:
1880 @code{c^"text"}. By default, these indications do not influence the
1881 note spacing, but by using the command @code{\fatText}, the widths
1882 will be taken into account.
1884 @lilypond[fragment,singleline,verbatim] \relative c' {
1885 c4^"longtext" \fatText c4_"longlongtext" c4 }
1888 It is possible to use @TeX{} commands in the strings, but this should be
1889 avoided because it makes it impossible for LilyPond to compute the
1890 exact length of the string, which may lead to collisions. Also, @TeX{}
1891 commands will not work with direct PostScript output.
1896 @internalsref{TextScriptEvent}, @internalsref{TextScript},
1902 @subsection Grace notes
1906 @cindex @code{\grace}
1910 Grace notes are ornaments that are written out
1912 @lilypond[relative=2,verbatim,fragment] c4 \grace c16 c4 \grace {
1916 In normal notation, grace notes take up no logical
1917 time in a measure. Such an idea is practical for normal notation, but
1918 is not strict enough to put it into a program. The model that LilyPond
1919 uses for grace notes internally is that all timing is done in two
1922 Every point in musical time consists of two rational numbers: one
1923 denotes the logical time, one denotes the grace timing. The above
1924 example is shown here with timing tuples.
1927 \score { \notes \relative c''{
1928 c4^"(0,0)" \grace c16_" "_"(1/4,-1/16)" c4^"(1/4,0)" \grace {
1929 c16_"(2/4,-1/8)"-[ d16^"(2/4,-1/16)" ] } c4_" "_"(2/4,0)"
1931 \paper { linewidth = 8.\cm }
1936 The placement of these grace notes is synchronized between different
1939 @lilypond[relative=2,verbatim,fragment]
1940 < \context Staff = SA { e4 \grace { c16-[ d e f-] } e4 }
1941 \context Staff = SB { c'4 \grace { g8 b } c4 } >
1945 Unbeamed eighth notes and shorter by default have a slash through the
1946 stem. This can be controlled with object property @code{stroke-style} of
1947 @internalsref{Stem}. For proper matching of override and reverts of
1948 such properties, it is necessary to use a Scheme function.
1950 The following fragment overrides the default formatting Grace style stems.
1952 #(add-to-grace-init "Voice" 'Stem 'stroke-style '())
1955 The @code{\override} is carefully matched with a @code{\revert}.
1960 @lilypond[fragment,verbatim]
1961 \relative c'' \context Voice {
1962 \grace c8 c4 \grace { c16-[ c16-] } c4
1964 \property Voice.Stem \override #'stroke-style = #'()
1966 \property Voice.Stem \revert #'stroke-style
1971 If you want to end a note with a grace note, then the standard trick
1972 is to put the grace notes before a phantom ``space note'', e.g.
1973 @lilypond[fragment,verbatim, relative=2]
1976 { s2 \grace { c16-[ d-] } } >
1981 A @code{\grace} section has some default values, and LilyPond will
1982 use those default values unless you specify otherwise inside the
1983 @code{\grace} section. For example, if you specify \slurUp
1984 @emph{before} your @code{\grace} section, a slur which starts inside
1985 the @code{\grace} will not be forced up, even if the slur ends outside
1986 of the @code{\grace}. Note the difference between the first and
1987 second bars in this example:
1989 @lilypond[fragment,verbatim]
1990 \relative c'' \context Voice {
2008 @internalsref{GraceMusic}.
2012 Grace notes cannot be used in the smallest size (@file{paper11.ly}).
2014 Grace note synchronization can also lead to surprises. Staff notation,
2015 such as key signatures, barlines, etc. are also synchronized. Take
2016 care when you mix staves with grace notes and staves without.
2018 @lilypond[relative=2,verbatim,fragment]
2019 < \context Staff = SA { e4 \bar "|:" \grace c16 d4 }
2020 \context Staff = SB { c4 \bar "|:" d4 } >
2023 Grace sections should only be used within sequential music
2024 expressions. Nesting, juxtaposing, or ending sequential music with a
2025 grace section is not supported, and might produce crashes or other
2028 Overriding settings for grace music using @code{add-to-grace-init}
2029 cannot be done in a modular way.
2033 @subsection Glissando
2036 @cindex @code{\glissando}
2038 A glissando is a smooth change in pitch. It is denoted by a line or a
2039 wavy line between two notes.
2043 A glissando line can be requested by attaching a @code{\glissando} to
2046 @lilypond[fragment,relative,verbatim]
2052 @internalsref{Glissando}, @internalsref{GlissandoEvent}.
2057 Printing of an additional text (such as @emph{gliss.}) must be done
2062 @subsection Dynamics
2075 @cindex @code{\ffff}
2085 Absolute dynamic marks are specified using an variable after a
2086 note: @code{c4-\ff}. The available dynamic marks are: @code{\ppp},
2087 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2088 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2089 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
2091 @lilypond[verbatim,singleline,fragment,relative]
2092 c'-\ppp c-\pp c -\p c-\mp c-\mf c-\f c-\ff c-\fff
2098 @cindex @code{\decr}
2099 @cindex @code{\rced}
2106 A crescendo mark is started with @code{\cr} and terminated with
2107 @code{\endcr}, and decrescendi similarly with @code{\decr} and
2108 @code{\enddecr}. There are also shorthands for these marks. A
2109 crescendo can be started with @code{\<} and a decrescendo can be
2110 started with @code{\>}. Either one can be terminated with @code{\!}.
2111 Because these marks are bound to notes, if you must use spacer notes
2112 if multiple marks during one note are needed.
2114 @lilypond[fragment,verbatim,center,quote]
2115 c''-\< c''-\! d''-\decr e''-\rced
2116 < f''1 { s4 s4-\< s4-\! \> s4-\! } >
2118 This may give rise to very short hairpins. Use @code{minimum-length}
2119 in @internalsref{Voice}.@internalsref{HairPin} to lengthen them, for
2123 \property Staff.Hairpin \override #'minimum-length = #5
2126 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2127 is an example how to do it:
2129 @lilypond[fragment,relative=2,verbatim]
2130 c4 \cresc c4 \endcresc c4
2137 You can also supply your own texts:
2138 @lilypond[fragment,relative,verbatim]
2140 \property Voice.crescendoText = "cresc. poco"
2141 \property Voice.crescendoSpanner = #'dashed-line
2150 @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent},
2151 @internalsref{AbsoluteDynamicEvent}.
2153 Dynamics are objects of @internalsref{DynamicText} and
2154 @internalsref{Hairpin}. Vertical positioning of these symbols is
2155 handled by the @internalsref{DynamicLineSpanner} object.
2157 If you want to adjust padding or vertical direction of the dynamics,
2158 you must set properties for the @internalsref{DynamicLineSpanner}
2159 object. Predefined variables to set the vertical direction are
2160 @code{\dynamicUp} and @code{\dynamicDown}.
2162 @cindex direction, of dynamics
2163 @cindex @code{\dynamicDown}
2164 @cindex @code{\dynamicUp}
2172 @cindex @code{\repeat}
2175 Repetition is a central concept in music, and multiple notations exist
2176 for repetitions. In LilyPond, most of these notations can be captured
2177 in a uniform syntax. One of the advantages is, all these repetitions
2178 can be rendered in MIDI accurately.
2180 The following types of repetition are supported:
2184 Repeated music is fully written (played) out. Useful for MIDI
2185 output, and entering repetitive music.
2188 This is the normal notation: Repeats are not written out, but
2189 alternative endings (voltas) are printed, left to right.
2193 Alternative endings are written stacked. This has limited use but may be
2194 used to typeset two lines of lyrics in songs with repeats, see
2195 @inputfileref{input,star-spangled-banner.ly}.
2202 Make beat or measure repeats. These look like percent signs.
2208 * Repeats and MIDI::
2209 * Manual repeat commands::
2211 * Tremolo subdivisions::
2216 @subsection Repeat syntax
2220 LilyPond has one syntactic construct for specifying different types of
2221 repeats. The syntax is
2224 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2227 If you have alternative endings, you may add
2228 @cindex @code{\alternative}
2230 \alternative @code{@{} @var{alternative1}
2232 @var{alternative3} @dots{} @code{@}}
2234 where each @var{alternative} is a music expression. If you do not
2235 give enough alternatives for all of the repeats, then the first
2236 alternative is assumed to be played more than once.
2238 Normal notation repeats are used like this:
2239 @lilypond[fragment,verbatim]
2241 \repeat volta 2 { c'4 d' e' f' }
2242 \repeat volta 2 { f' e' d' c' }
2245 With alternative endings:
2246 @lilypond[fragment,verbatim]
2248 \repeat volta 2 {c'4 d' e' f'}
2249 \alternative { {d'2 d'} {f' f} }
2253 @lilypond[fragment,verbatim]
2257 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2258 \alternative { { g4 g g } { a | a a a a | b2. } }
2265 If you do a nested repeat like
2274 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2275 belongs. This ambiguity is resolved by always having the
2276 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2277 it is advisable to use braces in such situations.
2280 @node Repeats and MIDI
2281 @subsection Repeats and MIDI
2283 @cindex expanding repeats
2285 For instructions on how to unfold repeats for MIDI output, see the
2286 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2291 Timing information is not remembered at the start of an alternative,
2292 so you have to reset timing information after a repeat, e.g. using a
2293 bar-check (See @ref{Bar check}), setting @code{Score.measurePosition}
2294 or entering @code{\partial}. Similarly, slurs or ties are also not
2298 @node Manual repeat commands
2299 @subsection Manual repeat commands
2301 @cindex @code{repeatCommands}
2303 The property @code{repeatCommands} can be used to control the layout of
2304 repeats. Its value is a Scheme list of repeat commands, where each repeat
2312 @item (volta . @var{text})
2313 Print a volta bracket saying @var{text}. The text can be specified as
2314 a text string or as a markup text, see @ref{Text markup}. Do not
2315 forget to change the font, as the default number font does not contain
2316 alphabetic characters.
2318 Stop a running volta bracket
2321 @lilypond[verbatim, fragment]
2323 \property Score.repeatCommands = #'((volta "93") end-repeat)
2325 \property Score.repeatCommands = #'((volta #f))
2332 @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2333 @internalsref{VoltaRepeatedMusic},
2334 @internalsref{UnfoldedRepeatedMusic}
2335 @internalsref{FoldedRepeatedMusic}.
2337 @node Tremolo repeats
2338 @subsection Tremolo repeats
2339 @cindex tremolo beams
2341 To place tremolo marks between notes, use @code{\repeat} with tremolo
2343 @lilypond[verbatim,center,singleline]
2345 \context Voice \notes\relative c' {
2346 \repeat "tremolo" 8 { c16 d16 }
2347 \repeat "tremolo" 4 { c16 d16 }
2348 \repeat "tremolo" 2 { c16 d16 }
2349 \repeat "tremolo" 4 c16
2356 Tremolo beams are @internalsref{Beam} objects. Single stem tremolos are
2357 @internalsref{StemTremolo}. @internalsref{TremoloEvent}.
2362 The single stem tremolo @emph{must} be entered without @code{@{} and
2365 @node Tremolo subdivisions
2366 @subsection Tremolo subdivisions
2367 @cindex tremolo marks
2368 @cindex @code{tremoloFlags}
2370 Tremolo marks can be printed on a single note by adding
2371 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2372 A @var{length} value of 8 gives one line across the note stem. If the
2373 length is omitted, then then the last value (stored in
2374 @code{Voice.tremoloFlags}) is used.
2376 @lilypond[verbatim,fragment,center]
2377 c'2:8 c':32 | c': c': |
2380 @c [TODO : stok is te kort bij 32en]
2384 Tremolos in this style do not carry over into the MIDI output.
2387 @node Measure repeats
2388 @subsection Measure repeats
2390 @cindex percent repeats
2391 @cindex measure repeats
2393 In the @code{percent} style, a note pattern can be repeated. It is
2394 printed once, and then the pattern is replaced with a special sign.
2395 Patterns of a one and two measures are replaced by percent-like signs,
2396 patterns that divide the measure length are replaced by slashes.
2398 @lilypond[verbatim,singleline]
2399 \context Voice { \repeat "percent" 4 { c'4 }
2400 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2406 @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2407 @internalsref{PercentRepeatedMusic}, and
2408 @internalsref{DoublePercentRepeat}.
2413 Single measure and double measure percent-repeats cannot be nested.
2415 @node Rhythmic music
2416 @section Rhythmic music
2418 Sometimes you might want to show only the rhythm of a melody. This
2419 can be done with the rhythmic staff. All pitches of notes on such a
2420 staff are squashed, and the staff itself has a single line:
2422 @lilypond[fragment,relative,verbatim]
2423 \context RhythmicStaff {
2425 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2430 * Percussion staves::
2431 * Percussion midi output::
2434 @node Percussion staves
2435 @subsection Percussion staves
2439 To typeset more than one piece of percussion to be played by the same
2440 musician one typically uses a multiline staff where each staff
2441 position refers to a specific piece of percussion.
2445 Percussion staves are typeset with help of a set of Scheme
2446 functions. The system is based on the general MIDI drum-pitches.
2447 Include @file{ly/drumpitch-init.ly} to use drum pitches. This file
2448 defines the pitches from the Scheme variable @code{drum-pitch-names},
2449 the definition of which can be read in @file{scm/drums.scm}. Each
2450 piece of percussion has a full name and an abbreviated name, and both
2451 the full name or the abbreviation may be used in input files.
2453 To typeset the music on a staff apply the function @code{drums->paper}
2454 to the percussion music. This function takes a list of percussion
2455 instrument names, notehead scripts and staff positions (that is:
2456 pitches relative to the C-clef) and transforms the input
2457 music by moving the pitch, changing the notehead and (optionally)
2460 @lilypond[singleline,verbatim,quote]
2461 \include "drumpitch-init.ly"
2462 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2463 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2465 \apply #(drums->paper 'drums) \context Staff <
2467 \context Voice = up { \voiceOne \up }
2468 \context Voice = down { \voiceTwo \down }
2473 In the above example the music was transformed using the list @code{'drums}.
2474 Currently the following lists are defined in @file{scm/drums.scm}:
2477 To typeset a typical drum kit on a five-line staff.
2480 \include "drumpitch-init.ly"
2481 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2482 bd sn ss tomh tommh tomml toml tomfh tomfl }
2483 mus = \notes { cymc cyms cymr hh hhc hho hhho hhp cb hc
2484 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2487 \apply #(drums->paper 'drums) \context Staff <
2491 \context Lyrics \nam
2494 linewidth = 100.0\mm
2497 \remove Bar_engraver
2498 \remove Time_signature_engraver
2499 minimumVerticalExtent = #'(-4.0 . 5.0)
2503 \remove Stem_engraver
2509 The drum scheme supports six different toms. When there fewer toms, simply
2510 select the toms that produce the desired result, i.e., to get toms on
2511 the three middle lines you use @code{tommh}, @code{tomml} and
2514 Because general MIDI does not contain rimshots the sidestick is used
2515 for this purpose instead.
2517 To typeset timbales on a two line staff.
2519 @lilypond[singleline]
2520 \include "drumpitch-init.ly"
2521 nam = \lyrics { timh ssh timl ssl cb }
2522 mus = \notes { timh ssh timl ssl cb s16 }
2525 \apply #(drums->paper 'timbales) \context Staff <
2529 \context Lyrics \nam
2534 \remove Bar_engraver
2535 \remove Time_signature_engraver
2536 StaffSymbol \override #'line-count = #2
2537 StaffSymbol \override #'staff-space = #2
2538 minimumVerticalExtent = #'(-3.0 . 4.0)
2542 \remove Stem_engraver
2549 To typeset congas on a two line staff.
2551 @lilypond[singleline]
2552 \include "drumpitch-init.ly"
2553 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2554 mus = \notes { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2557 \apply #(drums->paper 'congas) \context Staff <
2561 \context Lyrics \nam
2566 \remove Bar_engraver
2567 \remove Time_signature_engraver
2568 StaffSymbol \override #'line-count = #2
2569 StaffSymbol \override #'staff-space = #2
2570 minimumVerticalExtent = #'(-3.0 . 4.0)
2574 \remove Stem_engraver
2580 To typeset bongos on a two line staff.
2582 @lilypond[singleline]
2583 \include "drumpitch-init.ly"
2584 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2585 mus = \notes { boh boho bohm ssh bol bolo bolm ssl s16 }
2588 \apply #(drums->paper 'bongos) \context Staff <
2592 \context Lyrics \nam
2597 \remove Bar_engraver
2598 \remove Time_signature_engraver
2599 StaffSymbol \override #'line-count = #2
2600 StaffSymbol \override #'staff-space = #2
2601 minimumVerticalExtent = #'(-3.0 . 4.0)
2605 \remove Stem_engraver
2611 To typeset all kinds of simple percussion on one line staves.
2612 @lilypond[singleline]
2613 \include "drumpitch-init.ly"
2614 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2615 mus = \notes { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2618 \apply #(drums->paper 'percussion) \context Staff <
2622 \context Lyrics \nam
2627 \remove Bar_engraver
2628 \remove Time_signature_engraver
2629 StaffSymbol \override #'line-count = #1
2630 minimumVerticalExtent = #'(-2.0 . 3.0)
2634 \remove Stem_engraver
2641 If you do not like any of the predefined lists you can define your own
2642 list at the top of your file:
2644 @lilypond[singleline, verbatim]
2646 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2647 (snare default #f ,(ly:make-pitch 0 1 0))
2648 (hihat cross #f ,(ly:make-pitch 0 5 0))
2649 (pedalhihat xcircle "stopped" ,(ly:make-pitch 0 5 0))
2650 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2652 \include "drumpitch-init.ly"
2653 up = \notes { hh8 hh hh hh hhp4 hhp }
2654 down = \notes { bd4 sn bd toml8 toml }
2656 \apply #(drums->paper 'mydrums) \context Staff <
2658 \context Voice = up { \voiceOne \up }
2659 \context Voice = down { \voiceTwo \down }
2664 To use a modified existing list, one can prepend modifications to the
2668 #(define mydrums (append `(
2669 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2670 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2674 The file @file{drumpitch-init.ly} replaces the normal pitch names, so
2675 you have to reinclude @file{nederlands.ly} after the
2676 drum-pattern-definitions to enter normal notes.
2678 @lilypond[singleline,verbatim]
2679 \include "drumpitch-init.ly"
2680 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2681 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2682 \include "nederlands.ly"
2683 bass = \notes \transpose c c,, { a4. e8 r e g e }
2686 \apply #(drums->paper 'drums) \context Staff = drums <
2688 \context Voice = up { \voiceOne \up }
2689 \context Voice = down { \voiceTwo \down }
2691 \context Staff = bass { \clef "F_8" \bass }
2696 @node Percussion midi output
2697 @subsection Percussion midi output
2699 In order to produce correct midi output you need to produce two score
2700 blocks---one for the paper and one for the midi output. To use the
2701 percussion channel you set the property @code{instrument} to
2702 @code{'drums}. Because the drum-pitches themself are similar to the
2703 general midi pitches all you have to do is to insert the voices with
2704 none of the scheme functions to get the correct midi output:
2708 \apply #(drums->paper 'mydrums) \context Staff <
2717 \property Staff.instrument = #'drums
2726 This scheme is to be considered a temporary implementation.
2730 @section Piano music
2732 Piano staves are two normal staves coupled with a brace. The staves
2733 are largely independent, but sometimes voices can cross between the
2734 two staves. The same notation is also used for harps and other key
2735 instruments. The @internalsref{PianoStaff} is especially built to
2736 handle this cross-staffing behavior. In this section we discuss the
2737 @internalsref{PianoStaff} and some other pianistic peculiarities.
2741 * Automatic staff changes::
2742 * Manual staff switches::
2745 * Staff switch lines::
2750 There is no support for putting chords across staves. You can get
2751 this result by increasing the length of the stem in the lower stave so
2752 it reaches the stem in the upper stave, or vice versa. An example is
2753 included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
2755 Dynamics are not centered, but kludges do exist. See
2756 @inputfileref{input/templates,piano-dynamics.ly}.
2758 @cindex cross staff stem
2759 @cindex stem, cross staff
2762 @c fixme: should have hyperlinks as well.
2768 @node Automatic staff changes
2769 @subsection Automatic staff changes
2770 @cindex Automatic staff changes
2772 Voices can switch automatically between the top and the bottom
2773 staff. The syntax for this is
2775 \autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
2777 The autochanger switches on basis of pitch (central C is the turning
2778 point), and it looks ahead skipping over rests to switch rests in
2779 advance. Here is a practical example:
2781 @lilypond[verbatim,singleline,quote]
2782 \score { \notes \context PianoStaff <
2783 \context Staff = "up" {
2784 \autochange Staff \context Voice = VA < \relative c' {
2785 g4 a b c d r4 a g } > }
2786 \context Staff = "down" {
2791 Spacer rests are used to prevent the bottom staff from
2792 terminating too soon.
2797 The staff switches often do not end up in optimal places. For high
2798 quality output staff switches should be specified manually.
2802 @node Manual staff switches
2803 @subsection Manual staff switches
2805 @cindex manual staff switches
2806 @cindex staff switch, manual
2808 Voices can be switched between staves manually, using the following command:
2810 \translator Staff = @var{staffname} @var{music}
2812 The string @var{staffname} is the name of the staff. It switches the
2813 current voice from its current staff to the Staff called
2814 @var{staffname}. Typically @var{staffname} is @code{"up"} or
2822 Pianos have pedals that alter the way sound are produced. Generally, a
2823 piano has three pedals, sustain, una corda, and sostenuto.
2827 Piano pedal instruction can be expressed by attaching
2828 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
2829 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
2832 The symbols that are printed can be modified by setting
2833 @code{pedal@var{X}Strings}, where @var{X} is one of the pedal types:
2834 Sustain, Sostenuto or UnaCorda. Refer to the generated documentation
2835 of @internalsref{SustainPedal} for more information.
2837 Pedals can also be indicated by a sequence of brackets, by setting the
2838 @code{pedal-type} property of @internalsref{SustainPedal} objects:
2840 @lilypond[fragment,verbatim]
2841 \property Staff.SustainPedal \override #'pedal-type = #'bracket
2842 c''4-\sustainDown d''4 e''4
2843 a'4-\sustainUp-\sustainDown
2844 f'4 g'4 a'4-\sustainUp
2847 A third style of pedal notation is a mixture of text and brackets,
2848 obtained by setting @code{pedal-type} to @code{mixed}:
2850 @lilypond[fragment,verbatim]
2851 \property Staff.SustainPedal \override #'pedal-type = #'mixed
2852 c''4-\sustainDown d''4 e''4
2853 c'4-\sustainUp-\sustainDown
2854 f'4 g'4 a'4-\sustainUp
2857 The default `*Ped' style for sustain and damper pedals corresponds to
2858 @code{\pedal-type = #'text}. However, @code{mixed} is the default style
2859 for a sostenuto pedal:
2861 @lilypond[fragment,verbatim]
2862 c''4-\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4-\sostenutoUp
2865 For fine-tuning of the appearance of a pedal bracket, the properties
2866 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
2867 @code{PianoPedalBracket} objects (see the detailed documentation of
2868 @internalsref{PianoPedalBracket}) can be modified. For example, the bracket
2869 may be extended to the end of the note head.
2871 @lilypond[fragment,verbatim]
2872 \property Staff.PianoPedalBracket \override
2873 #'shorten-pair = #'(0 . -1.0)
2874 c''4-\sostenutoDown d''4 e''4 c'4
2875 f'4 g'4 a'4-\sostenutoUp
2879 @subsection Arpeggio
2882 @cindex broken arpeggio
2883 @cindex @code{\arpeggio}
2885 You can specify an arpeggio sign on a chord by attaching an
2886 @code{\arpeggio} to a chord.
2889 @lilypond[fragment,relative,verbatim]
2890 <<c e g c>>-\arpeggio
2893 When an arpeggio crosses staves in piano music, you attach an arpeggio
2894 to the chords in both staves, and set
2895 @internalsref{PianoStaff}.@code{connectArpeggios}.
2897 @lilypond[fragment,relative,verbatim]
2898 \context PianoStaff <
2899 \property PianoStaff.connectArpeggios = ##t
2900 \context Voice = one { <<c' e g c>>-\arpeggio }
2901 \context Voice = other { \clef bass <<c,, e g>>-\arpeggio }
2905 This command creates @internalsref{Arpeggio} objects. Cross staff
2906 arpeggios are @internalsref{PianoStaff}.@internalsref{Arpeggio}.
2908 The direction of the arpeggio is sometimes denoted by adding an
2909 arrowhead to the wiggly line. This can be typeset by setting
2910 @code{arpeggio-direction}.
2912 @lilypond[fragment,relative,verbatim]
2914 \property Voice.Arpeggio \set #'arpeggio-direction = #1
2915 <<c e g c>>-\arpeggio
2916 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
2917 <<c e g c>>-\arpeggio
2921 A square bracket on the left indicates that the player should not
2922 arpeggiate the chord. To draw these brackets, set the
2923 @code{molecule-callback} property of @code{Arpeggio} or
2924 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
2925 @code{\arpeggio} statements within the chords as before.
2927 @lilypond[fragment,relative,verbatim]
2928 \property PianoStaff.Arpeggio \override
2929 #'molecule-callback = \arpeggioBracket
2930 <<c' e g c>>-\arpeggio
2936 It is not possible to mix connected arpeggios and unconnected
2937 arpeggios in one @internalsref{PianoStaff} at the same time.
2939 @node Staff switch lines
2940 @subsection Staff switch lines
2943 @cindex follow voice
2944 @cindex staff switching
2947 @cindex @code{followVoice}
2949 Whenever a voice switches to another staff a line connecting the notes
2950 can be printed automatically. This is enabled if the property
2951 @code{PianoStaff.followVoice} is set to true:
2953 @lilypond[fragment,relative,verbatim]
2954 \context PianoStaff <
2955 \property PianoStaff.followVoice = ##t
2956 \context Staff \context Voice {
2958 \translator Staff=two
2961 \context Staff=two { \clef bass \skip 1*2 }
2965 The associated object is @internalsref{VoiceFollower}.
2969 @section Vocal music
2971 This section discusses how to enter, and print lyrics.
2975 * The Lyrics context::
2980 @node Entering lyrics
2981 @subsection Entering lyrics
2985 @cindex @code{\lyrics}
2988 Lyrics are entered in a special input mode. This mode is is introduced
2989 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
2990 punctuation and accents without any hassle. Syllables are entered like
2991 notes, but with pitches replaced by text. For example,
2993 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
2996 A word in Lyrics mode begins with: an alphabetic character, @code{_},
2997 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
2998 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
2999 any 8-bit character with ASCII code over 127, or a two-character
3000 combination of a backslash followed by one of @code{`}, @code{'},
3001 @code{"}, or @code{^}.
3003 Subsequent characters of a word can be any character that is not a digit
3004 and not white space. One important consequence of this is that a word
3005 can end with @code{@}}. The following example is usually a bug. The
3006 syllable includes a @code{@}}, and hence the opening brace is not balanced.
3008 \lyrics @{ twinkle@}
3010 which may be confusing.
3012 @cindex @code{\property}, in @code{\lyrics}
3013 Similarly, a period following a alphabetic sequence, is included in the
3014 resulting string. As a consequence, spaces must be inserted around
3015 @code{\property} commands:
3017 \property Lyrics . LyricText \set #'font-shape = #'italic
3021 @cindex spaces, in lyrics
3022 @cindex quotes, in lyrics
3024 Any @code{_} character which appears in an unquoted word is converted
3025 to a space. This provides a mechanism for introducing spaces into words
3026 without using quotes. Quoted words can also be used in Lyrics mode to
3027 specify words that cannot be written with the above rules:
3030 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3034 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3039 These will be attached to the end of the first syllable.
3041 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3042 as a separate word between syllables. The hyphen will have variable
3043 length depending on the space between the syllables and it will be
3044 centered between the syllables.
3049 When a lyric is sung over many notes (this is called a melisma), this is
3050 indicated with a horizontal line centered between a syllable and the
3051 next one. Such a line is called an extender line, and it is entered as
3056 @internalsref{LyricEvent}, @internalsref{HyphenEvent},
3057 @internalsref{ExtenderEvent}.
3061 The definition of lyrics mode is too complex.
3063 @node The Lyrics context
3064 @subsection The Lyrics context
3066 Lyrics are printed by interpreting them in @internalsref{Lyrics}
3069 \context Lyrics \lyrics @dots{}
3072 @cindex automatic syllable durations
3073 @cindex @code{\addlyrics}
3074 @cindex lyrics and melodies
3076 This will place the lyrics according to the durations that were
3077 entered. The lyrics can also be aligned under a given melody
3078 automatically. In this case, it is no longer necessary to enter the
3079 correct duration for each syllable. This is achieved by combining the
3080 melody and the lyrics with the @code{\addlyrics} expression
3084 \context Lyrics @dots{}
3087 @cindex staff order, with @code{\addlyrics}
3089 Normally, this will put the lyrics below the staff. For different or
3090 more complex orderings, the best way is to setup the hierarchy of
3091 staffs and lyrics first, e.g.
3093 \context ChoirStaff \notes <
3094 \context Lyrics = LA @{ s1 @}
3095 \context Staff = SA @{ s1 @}
3096 \context Lyrics = LB @{ s1 @}
3097 \context Staff = SB @{ s1 @}
3100 and then combine the appropriate melodies and lyric lines:
3103 \context Staff = SA @emph{the music}
3104 \context Lyrics = LA @emph{the lyrics}
3107 putting both together, you would get
3109 \context ChoirStaff \notes <
3110 \context Lyrics = LA @dots{}
3111 \context Staff = SB @dots{}
3117 @cindex choral score
3119 An example of a SATB score setup is in the file
3120 @inputfileref{input/template,satb}.
3124 @internalsref{LyricCombineMusic}, @internalsref{Lyrics},
3125 @inputfileref{input/template,satb}.
3129 @code{\addlyrics} is not automatic enough: melismata are not detected
3130 automatically, and melismata are not stopped when they hit a rest.
3134 @subsection More stanzas
3137 @cindex phrasing, in lyrics
3139 When multiple stanzas are printed underneath each other, the vertical
3140 groups of syllables should be aligned around punctuation. This can be
3141 done automatically when corresponding lyric lines and melodies are
3144 To this end, give the @internalsref{Voice} context an identity,
3146 \context Voice = duet @{
3151 Then set the @internalsref{LyricsVoice} contexts to names starting with
3152 that identity followed by a dash. In the preceding example, the
3153 @internalsref{Voice} identity is @code{duet}, so the identities of the
3154 @internalsref{LyricsVoices} are marked @code{duet-1} and @code{duet-2}.
3156 \context LyricsVoice = "duet-1" @{
3157 Hi, my name is bert. @}
3158 \context LyricsVoice = "duet-2" @{
3159 Ooooo, ch\'e -- ri, je t'aime. @}
3161 The convention for naming @internalsref{LyricsVoice} and
3162 @internalsref{Voice} must also be used to get melismata on rests
3165 The complete example is shown here.
3166 @lilypond[singleline,verbatim]
3169 \notes \relative c'' \context Voice = duet { \time 3/4
3171 \lyrics \context Lyrics <
3172 \context LyricsVoice = "duet-1" {
3173 \property LyricsVoice . stanza = "Bert"
3174 Hi, my name is bert. }
3175 \context LyricsVoice = "duet-2" {
3176 \property LyricsVoice . stanza = "Ernie"
3177 Ooooo, ch\'e -- ri, je t'aime. }
3182 Stanza numbers, or the names of the singers can be added by setting
3183 @code{LyricsVoice.Stanza} (for the first system) and
3184 @code{LyricsVoice.stz} for the following systems. Notice how dots are
3185 surrounded with spaces in @code{\lyrics} mode.
3188 \property LyricsVoice . stanza = "Bert"
3190 \property LyricsVoice . stanza = "Ernie"
3193 You can use empty syllables, e.g. @code{_4} or @code{" "4} to enter
3194 lyrics. This can confuse the LilyPond -- for example, this might put
3195 (empty) lyrics under rests. To remedy this, use @code{\skip} instead.
3203 Input for lyrics introduces a syntactical ambiguity:
3210 is interpreted as assigning a string identifier @code{\foo} such that
3211 it contains @code{"bar"}. However, it could also be interpreted as
3212 making or a music identifier @code{\foo} containing the syllable
3213 `bar'. The force the latter interpretation, use
3223 The term @emph{ambitus} denotes a range of pitches for a given voice in
3224 a part of music. It also may denote the pitch range that a musical
3225 instrument is capable of playing. Most musical instruments have their
3226 ambitus standardized (or at least there is agreement upon the minimal
3227 ambitus of a particular type of instrument), such that a composer or
3228 arranger of a piece of music can easily meet the ambitus constraints of
3229 the targeted instrument. However, the ambitus of the human voice
3230 depends on individual physiological state, including education and
3231 training of the voice. Therefore, a singer potentially has to check for
3232 each piece of music if the ambitus of that piece meets his individual
3233 capabilities. This is why the ambitus of a piece may be of particular
3234 value to vocal performers.
3236 The ambitus is typically notated on a per-voice basis at the very
3237 beginning of a piece, e.g. nearby the initial clef or time signature of
3238 each staff. The range is graphically specified by two noteheads, that
3239 represent the minimum and maximum pitch. Some publishers use a textual
3240 notation: they put the range in words in front of the corresponding
3241 staff. Lilypond currently only supports the graphical ambitus notation.
3243 To apply, add the @internalsref{Ambitus_engraver} to the
3244 @internalsref{Voice} context, i.e.
3247 \paper @{ \translator @{
3249 \consists Ambitus_engraver
3255 @lilypond[singleline]
3256 upper = \notes \relative c {
3259 as'' c e2 bes f cis d4 e f2 g
3261 lower = \notes \relative c {
3264 e'4 b g a c es fis a cis b a g f e d2
3267 \context ChoirStaff {
3269 \context Staff = one { \upper }
3270 \context Staff = three { \lower }
3276 \consists Ambitus_engraver
3285 @internalsref{Ambitus}, @inputfileref{input/regression,ambitus.ly}.
3290 Tablature notation is used for notating music for plucked string
3291 instruments. It notates pitches not by using note heads, but by
3292 indicating on which string and fret a note must be played. LilyPond
3293 offers limited support for tablature.
3296 * Tablatures basic::
3297 * Non-guitar tablatures::
3300 @node Tablatures basic
3301 @subsection Tablatures basic
3302 @cindex Tablatures basic
3304 The string number associated to a note is given as a backslash
3305 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3306 string. By default, string 1 is the highest one, and the tuning
3307 defaults to the standard guitar tuning (with 6 strings). The notes
3308 are printed as tablature, by using @internalsref{TabStaff} and
3309 @internalsref{TabVoice} contexts.
3311 @lilypond[fragment,verbatim]
3312 \notes \context TabStaff {
3318 If you do not specify a string number then one is selected
3319 automatically: the first string that does not give a fret number less
3320 than @code{minimumFret} is selected. The default value for
3321 @code{minimumFret} is 0.
3325 e8 fis gis a b cis' dis' e'
3326 \property TabStaff.minimumFret = #8
3327 e8 fis gis a b cis' dis' e'
3332 e8 fis gis a b cis' dis' e'
3333 \property TabStaff.minimumFret = #8
3334 e8 fis gis a b cis' dis' e'
3337 \context StaffGroup <
3338 \context Staff { \clef "G_8" \frag }
3339 \context TabStaff { \frag }
3346 @internalsref{TabStaff}, @internalsref{TabVoice}, and
3347 @internalsref{StringNumberEvent}.
3351 Chords are not handled in a special way, and hence the automatic
3352 string selector may easily select the same string to two notes in a
3356 @node Non-guitar tablatures
3357 @subsection Non-guitar tablatures
3358 @cindex Non-guitar tablatures
3360 You can change the number of strings, by setting the number of lines
3361 in the @internalsref{TabStaff} (the @code{line-count} property of
3362 @internalsref{TabStaff} can only be changed using
3363 @code{\outputproperty}, for more information, see @ref{Tuning objects}.
3365 You can change the tuning of the strings. A string tuning is given as
3366 a Scheme list with one integer number for each string, the number
3367 being the pitch (measured in semitones relative to central C) of an
3368 open string. The numbers specified for @code{stringTuning} are the
3369 numbers of semitones to subtract or add, starting the specified pitch
3370 by default middle C, in string order: thus the notes are e, a, d, and
3373 @lilypond[fragment,verbatim]
3376 \outputproperty #(make-type-checker 'staff-symbol-interface)
3378 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3381 a,4 c' a e' e c' a e'
3386 It is possible to change the Scheme function to format the tablature
3387 note text. The default is @code{fret-number-tablature-format}, which
3388 uses the fret number. For instruments that do not use this notation,
3389 you can create a special tablature formatting function. This function
3390 takes three argument: the string number, the string tuning and the
3395 As tablature is a recent feature, most of the guitar special effects
3396 such as bend are not yet supported.
3400 @section Chord names
3403 LilyPond has support for both entering and printing named chords.
3404 These chords are internally represented as a set of pitches. Therefore
3405 they can be entered by name and printed as notes, entered as notes and
3406 printed as chord names, or (the most common case) entered them by
3407 name, and print them as name. The following fragment shows these
3410 @lilypond[verbatim,singleline]
3411 twoWays = \notes \transpose c c' {
3421 < \context ChordNames \twoWays
3422 \context Voice \twoWays > }
3425 This example also shows that the chord printing routines do not try to
3426 be intelligent. The chord @code{f bes d}, is not interpreted as an
3432 * Printing chord names::
3437 @subsection Chords mode
3440 Chord mode is a mode where you can input sets of pitches using common
3441 names. It is introduced by the keyword @code{\chords}.
3442 In chords mode, a chord is entered by the root, which is entered
3443 like a common pitch, for example,
3444 @lilypond[fragment,verbatim,quote, relative=1]
3445 \chords { es4. d8 c2 }
3450 Other chords may be entered by suffixing a colon, and introducing a
3451 modifier, and optionally, a number, for example
3453 @lilypond[fragment,verbatim,quote]
3454 \chords { e1:m e1:7 e1:m7 }
3456 The first number following the root is taken to be the `type' of the
3457 chord, thirds are added to the root until it reaches the specified
3458 number, for example.
3459 @lilypond[fragment,verbatim]
3460 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3463 @cindex root of chord
3464 @cindex additions, in chords
3465 @cindex removals, in chords
3467 More complex chords may also be constructed adding separate steps
3468 to a chord. Additions are added after the number following
3469 the colon, and are separated by dots. For example
3471 @lilypond[verbatim,fragment,quote]
3472 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3474 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3475 to the number, for example:
3476 @lilypond[verbatim,fragment,quote]
3477 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3479 Removals are specified similarly, and are introduced by a caret. They
3480 must come after the additions.
3481 @lilypond[verbatim,fragment]
3482 \chords { c^3 c:7^5 c:9^3.5 }
3485 Modifiers can be used to change pitches. The following modifiers are
3489 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3491 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3494 is the augmented chord. This modifier raises the 5th step.
3496 is the major 7th chord. This modifier raises the 7th step if present.
3498 is the suspended 4th or 2nd. This modifier removes the 3rd
3499 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3502 Modifiers can be mixed with additions.
3503 @lilypond[verbatim,fragment]
3504 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3507 @cindex modifiers, in chords.
3514 Since the unaltered 11 does sound well when combined with the
3515 unaltered 3, the 11 is removed in this case, unless it is added
3516 explicitly). For example,
3517 @lilypond[fragment,verbatim]
3518 \chords { c:13 c:13.11 c:m13 }
3523 An inversion (putting one pitch of the chord on the bottom), as well
3524 as bass notes, can be specified by appending
3525 @code{/}@var{pitch} to the chord.
3526 @lilypond[fragment,verbatim,center]
3527 \chords { c1 c/g c/f }
3530 If you do not want to remove the bass note from the chord, but rather
3531 add the note, then you can use @code{/+}@var{pitch}.
3533 @lilypond[fragment,verbatim,center]
3534 \chords { c1 c/+g c/+f }
3537 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3538 of the commands continue to work, for example, @code{r} and
3539 @code{\skip} can be used to insert rests and spaces, and
3540 @code{\property} may be used to change various settings.
3546 Each step can only be present in a chord once. The following
3547 simply produces the augmented chord, since @code{5+} is interpreted
3550 @lilypond[verbatim,fragment]
3551 \chords { c:5.5-.5+ }
3554 In chord mode, dashes and carets are used to indicate chord additions
3555 and subtractions, so articulation scripts cannot be entered.
3558 @node Printing chord names
3559 @subsection Printing chord names
3561 @cindex printing chord names
3565 For displaying printed chord names, use the @internalsref{ChordNames}
3566 context. The chords may be entered either using the notation
3567 described above, or directly using @code{<<} and @code{>>}.
3569 @lilypond[verbatim,singleline]
3571 \chords {a1 b c} <<d' f' g'>> <<e' g' b'>>
3575 \context ChordNames \scheme
3576 \context Staff \scheme
3581 You can make the chord changes stand out by setting
3582 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3583 display chord names when there is a change in the chords scheme and at
3584 the start of a new line.
3588 c1:m c:m \break c:m c:m d
3592 \context ChordNames {
3593 \property ChordNames.chordChanges = ##t
3595 \context Staff \transpose c c' \scheme
3597 \paper{linewidth= 9.\cm}
3601 The default chord name layout is a system for Jazz music, proposed by
3602 Klaus Ignatzek (See @ref{Literature}).
3604 The Ignatzek chord name formatting can be tuned in a number of ways
3605 through the following properties:
3608 @cindex chordNameExceptions
3609 @item chordNameExceptions
3610 This is a list that contains the chords that have special formatting.
3612 @inputfileref{input/regression,chord-name-exceptions.ly}.
3613 @cindex exceptions, chord names.
3616 @cindex majorSevenSymbol
3617 @item majorSevenSymbol
3618 This property contains the markup object used for the 7th step, when
3619 it is major. Predefined options are @code{whiteTriangleMarkup} and
3620 @code{blackTriangleMarkup}. See
3621 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3623 @cindex chordNameSeparator
3624 @item chordNameSeparator
3625 Different parts of a chord name are normally separated by a
3626 slash. By setting @code{chordNameSeparator}, you can specify other
3628 @lilypond[fragment,verbatim]
3629 \context ChordNames \chords {
3631 \property ChordNames.chordNameSeparator
3636 @cindex chordRootNamer
3637 @item chordRootNamer
3638 The root of a chord is usually printed as a letter with an optional
3639 alteration. The transformation from pitch to letter is done by this
3640 function. Special note names (for example, the German ``H'' for a
3641 B-chord) can be produced by storing a new function in this property.
3643 @cindex chordNoteNamer
3644 @item chordNoteNamer
3645 The default is to print single notes (as for instance the bass note)
3646 using the @code{chordRootNamer}. However, by setting this function to a non-null
3647 value you can specify a different function. I.e. you could use letters
3648 in lower case for the base note.
3654 @inputfileref{input/regression,chord-name-major7.ly},
3655 @inputfileref{input/regression,chord-name-exceptions.ly},
3656 @inputfileref{input/test,chord-names-german.ly},
3657 @file{scm/chords-ignatzek.scm}, @file{scm/chord-entry.scm}
3662 Chord names are determined solely from the list of pitches. Chord
3663 inversions are not identified, and neither are added bass notes. This
3664 may result in strange chord names when chords are entered with the
3665 @code{<< .. >>} syntax.
3671 @section Writing parts
3673 Orchestral music involves some special notation, both in the full
3674 score and the individual parts. This section explains how to tackle
3675 some common problems in orchestral music.
3682 * Instrument names::
3684 * Multi measure rests::
3685 * Automatic part combining::
3687 * Sound output for transposing instruments::
3691 @node Rehearsal marks
3692 @subsection Rehearsal marks
3693 @cindex Rehearsal marks
3695 @cindex @code{\mark}
3697 To print a rehearsal mark, use the @code{\mark} command.
3698 @lilypond[fragment,verbatim]
3708 The mark is incremented automatically if you use @code{\mark
3709 \default}. The value to use is stored in the property
3710 @code{rehearsalMark} is used and automatically incremented.
3712 The @code{\mark} command can also be used to put signs like coda,
3713 segno and fermatas on a barline. Use @code{\markup} to
3714 to access the appropriate symbol.
3716 @lilypond[fragment,verbatim,relative=1]
3717 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
3721 In this case, during line breaks,
3722 marks must also be printed at the end of the line, and not at the
3723 beginning. Use the following to force that behavior
3725 \property Score.RehearsalMark \override
3726 #'break-visibility = #begin-of-line-invisible
3729 See @inputfileref{input/test,boxed-molecule.ly}. for putting boxes
3735 @cindex barlines, putting symbols on
3739 @internalsref{MarkEvent}, @internalsref{RehearsalMark},
3740 @inputfileref{input/test,boxed-molecule.ly}.
3744 @subsection Bar numbers
3748 @cindex measure numbers
3749 @cindex currentBarNumber
3751 Bar numbers are printed by default at the start of the line. The
3752 number itself is stored in the
3753 @code{currentBarNumber} property,
3754 which is normally updated automatically for every measure.
3756 Bar numbers can be typeset at regular intervals instead of at the
3757 beginning of each line. This is illustrated in the following example,
3758 whose source is available as
3759 @inputfileref{input/test,bar-number-every-fifth.ly}
3761 @lilypondfile[notexidoc]{bar-number-every-fifth.ly}
3763 The start of that numbering can also be reset, as demonstrated in
3764 @inputfileref{input/test,bar-number-every-five-reset.ly}.
3766 @lilypondfile[notexidoc]{bar-number-every-five-reset.ly}
3771 @internalsref{BarNumber}.
3772 @inputfileref{input/test,bar-number-every-five-reset.ly}.
3773 @inputfileref{input/test,bar-number-every-fifth.ly}
3777 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
3778 there is one at the top. To solve this, You have to twiddle with the
3779 @internalsref{padding} property of @internalsref{BarNumber} if your
3780 score starts with a @internalsref{StaffGroup}.
3782 @node Instrument names
3783 @subsection Instrument names
3785 In an orchestral score, instrument names are printed left of the
3788 This can be achieved by setting @internalsref{Staff}.@code{instrument}
3789 and @internalsref{Staff}.@code{instr}. This will print a string before
3790 the start of the staff. For the first start, @code{instrument} is
3791 used, for the next ones @code{instr} is used.
3793 @lilypond[verbatim,singleline]
3794 \property Staff.instrument = "ploink " { c''4 }
3797 You can also use markup texts to construct more complicated instrument
3800 @lilypond[fragment,verbatim,singleline]
3801 \notes \context Staff = treble {
3802 \property Staff.instrument = \markup {
3803 \column << "Clarinetti"
3805 \smaller \musicglyph #"accidentals--1"
3816 @internalsref{InstrumentName}
3820 When you put a name on a grand staff or piano staff the width of the
3821 brace is not taken into account. You must add extra spaces to the end of
3822 the name to avoid a collision.
3825 @subsection Transpose
3827 @cindex transposition of pitches
3828 @cindex @code{\transpose}
3830 A music expression can be transposed with @code{\transpose}. The syntax
3833 \transpose @var{from} @var{to} @var{musicexpr}
3836 This means that @var{musicexpr} is transposed by the interval
3837 between @var{from} and @var{to}.
3839 @code{\transpose} distinguishes between enharmonic pitches: both
3840 @code{\transpose c cis} or @code{\transpose c des} will transpose up
3841 half a tone. The first version will print sharps and the second
3842 version will print flats.
3844 @lilypond[singleline, verbatim]
3845 mus =\notes { \key d \major cis d fis g }
3846 \score { \notes \context Staff {
3849 \transpose c g' \mus
3850 \transpose c f' \mus
3856 @internalsref{TransposedMusic}, @internalsref{UntransposableMusic}.
3860 If you want to use both @code{\transpose} and @code{\relative}, then
3861 you must put @code{\transpose} outside of @code{\relative}, since
3862 @code{\relative} will have no effect music that appears inside a
3868 @node Multi measure rests
3869 @subsection Multi measure rests
3870 @cindex Multi measure rests
3874 Multi measure rests are entered using `@code{R}'. It is specifically
3875 meant for full bar rests and for entering parts: the rest can expand to
3876 fill a score with rests, or it can be printed as a single multimeasure
3877 rest. This expansion is controlled by the property
3878 @code{Score.skipBars}. If this is set to true, Lily will not expand
3879 empty measures, and the appropriate number is added automatically.
3881 @lilypond[fragment,verbatim]
3882 \time 4/4 r1 | R1 | R1*2
3883 \property Score.skipBars = ##t R1*17 R1*4
3886 The @code{1} in @code{R1} is similar to the duration notation used for
3887 notes. Hence, for time signatures other than 4/4, you must enter other
3888 durations. This can be done with augmentation dots or fractions:
3890 @lilypond[fragment,verbatim]
3891 \property Score.skipBars = ##t
3899 A @code{R} spanning a single measure is printed as a whole rest
3900 centered in the measure (or a breve when the measure lasts longer than
3901 two whole notes), regardless of the time signature.
3905 @cindex text on multi-measure rest
3906 @cindex script on multi-measure rest
3907 @cindex fermata on multi-measure rest
3909 Texts can be added to multi-measure rests by using the
3910 @var{note}-@code{markup} syntax. In this case, the number is
3911 replaced. If you need both texts and the number, you must add the
3912 number by hand. A variable (@code{\fermataMarkup}) is provided for
3916 @lilypond[verbatim,fragment]
3918 R2._\markup { "Ad lib" }
3923 @cindex whole rests for a full measure
3927 @internalsref{MultiMeasureRestEvent},
3928 @internalsref{MultiMeasureTextEvent},
3929 @internalsref{MultiMeasureRestMusicGroup},
3930 @internalsref{MultiMeasureRest}.
3932 The graphical object @internalsref{MultiMeasureRestNumber} is for the
3933 default number, and @internalsref{MultiMeasureRestText} for user
3938 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
3939 over multi-measure rests.
3941 @cindex condensing rests
3943 There is no way to automatically condense multiple rests into a single
3944 multimeasure rest. Multi measure rests do not take part in rest
3947 Be careful when entering multimeasure rests followed by whole notes,
3951 will enter two notes lasting four measures each. When @code{skipBars}
3952 is set, then the result will look OK6, but the bar numbering will be
3955 @node Automatic part combining
3956 @subsection Automatic part combining
3957 @cindex automatic part combining
3958 @cindex part combiner
3961 Automatic part combining is used to merge two parts of music onto a
3962 staff. It is aimed at typesetting orchestral scores. When the two
3963 parts are identical for a period of time, only one is shown. In
3964 places where the two parts differ, they are typeset as separate
3965 voices, and stem directions are set automatically. Also, solo and
3966 @emph{a due} parts are identified and can be marked.
3970 The syntax for part combining is
3973 \partcombine @var{context} @var{musicexpr1} @var{musicexpr2}
3975 where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
3976 combined into one context of type @var{context}. The music expressions
3977 must be interpreted by contexts whose names should start with @code{one}
3980 The following example demonstrates the basic functionality of the part
3981 combiner: putting parts on one staff, and setting stem directions and
3984 @lilypond[verbatim,singleline,fragment]
3986 \context Voice=one \partcombine Voice
3987 \context Thread=one \relative c'' {
3990 \context Thread=two \relative c'' {
3996 The first @code{g} appears only once, although it was
3997 specified twice (once in each part). Stem, slur and tie directions are
3998 set automatically, depending whether there is a solo or unisono. The
3999 first part (with context called @code{one}) always gets up stems, and
4000 `solo', while the second (called @code{two}) always gets down stems and
4003 If you just want the merging parts, and not the textual markings, you
4004 may set the property @var{soloADue} to false.
4006 @lilypond[verbatim,singleline,fragment]
4008 \property Staff.soloADue = ##f
4009 \context Voice=one \partcombine Voice
4010 \context Thread=one \relative c'' {
4013 \context Thread=two \relative c'' {
4021 @internalsref{PartCombineMusic},
4022 @internalsref{Thread_devnull_engraver},
4023 @internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}.
4027 The syntax for naming contexts in inconsistent with the syntax for
4030 In @code{soloADue} mode, when the two voices play the same notes on and
4031 off, the part combiner may typeset @code{a2} more than once in a
4034 @lilypond[fragment,singleline]
4036 \context Voice=one \partcombine Voice
4037 \context Thread=one \relative c'' {
4040 \context Thread=two \relative c'' {
4046 The part combiner is slated to be rewritten [TODO: explain why] .
4048 @cindex @code{Thread_devnull_engraver}
4049 @cindex @code{Voice_engraver}
4050 @cindex @code{A2_engraver}
4052 @node Frenched scores
4053 @subsection Frenched scores
4055 In orchestral scores, staff lines that only have rests are usually removed.
4056 This saves some space. This style is called `French Score'.
4060 This is supported through the @code{RemoveEmptyStaff}. This staff is
4061 removed when it turns out empty (or containing multimeasure rests)
4062 after the line-breaking process.
4064 For @internalsref{Lyrics}, @internalsref{LyricsVoice},
4065 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4066 switched on by default. For normal staffs, it is available as a
4067 specialized @internalsref{Staff} context, with the name variable
4068 @code{\RemoveEmptyStaffContext}. Observe how the second staff in this
4069 example disappears in the second line.
4073 \notes \relative c' <
4074 \context Staff = SA { e4 f g a \break c1 }
4075 \context Staff = SB { c4 d e f \break R1 }
4079 \translator { \RemoveEmptyStaffContext }
4085 @node Sound output for transposing instruments
4086 @subsection Sound output for transposing instruments
4088 When you want to make a MIDI file from a score containing transposed
4089 and untransposed instruments, you have to instruct LilyPond the pitch
4090 offset (in semitones) for the transposed instruments. This is done
4091 using the @code{transposing} property. It does not affect printed
4094 @cindex @code{transposing}
4097 \property Staff.instrument = #"Cl. in B-flat"
4098 \property Staff.transposing = #-2
4102 @node Ancient notation
4103 @section Ancient notation
4105 @cindex Vaticana, Editio
4106 @cindex Medicaea, Editio
4111 @c [TODO: write introduction on ancient notation]
4114 * Ancient note heads::
4123 @node Ancient note heads
4124 @subsection Ancient note heads
4126 To get a longa note head, you have to use mensural note heads. This
4127 is accomplished by setting the @code{style} property of the
4128 NoteHead object to @code{mensural}. There is also a note head style
4129 @code{baroque} which gives mensural note heads for @code{\longa} and
4130 @code{\breve} but standard note heads for shorter notes.
4132 @lilypond[fragment,singleline,verbatim]
4133 \property Voice.NoteHead \set #'style = #'mensural
4138 @subsection Ancient clefs
4140 LilyPond supports a variety of clefs, many of them ancient.
4142 For modern clefs, see section @ref{Clef}. For the percussion clef, see
4143 section @ref{Percussion staves}. For the @code{TAB} clef, see section
4146 The following table shows all ancient clefs that are supported via the
4147 @code{\clef} command. Some of the clefs use the same glyph, but
4148 differ only with respect to the line they are printed on. In such
4149 cases, a trailing number in the name is used to enumerate these clefs.
4150 Still, you can manually force a clef glyph to be typeset on an
4151 arbitrary line, as described in section @ref{Clef}. The note printed
4152 to the right side of each clef in the example column denotes the
4153 @code{c'} with respect to that clef.
4155 @multitable @columnfractions .3 .3 .3 .1
4159 @b{Description} @tab
4160 @b{Supported Clefs} @tab
4164 @code{clefs-neo_mensural_c} @tab
4165 modern style mensural C clef @tab
4166 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4167 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4168 @lilypond[relative 0, notime]
4169 \property Staff.TimeSignature \set #'transparent = ##t
4170 \clef "neo_mensural_c2" c
4174 @code{clefs-petrucci_c1}
4175 @code{clefs-petrucci_c2}
4176 @code{clefs-petrucci_c3}
4177 @code{clefs-petrucci_c4}
4178 @code{clefs-petrucci_c5}
4181 petrucci style mensural C clefs, for use on different stafflines
4182 (the examples shows the 2nd staffline C clef).
4192 @lilypond[relative 0, notime]
4193 \property Staff.TimeSignature \set #'transparent = ##t
4194 \clef "petrucci_c2" c
4198 @code{clefs-petrucci_f} @tab
4199 petrucci style mensural F clef @tab
4200 @code{petrucci_f} @tab
4201 @lilypond[relative 0, notime]
4202 \property Staff.TimeSignature \set #'transparent = ##t
4203 \clef "petrucci_f" c
4207 @code{clefs-petrucci_g} @tab
4208 petrucci style mensural G clef @tab
4209 @code{petrucci_g} @tab
4210 @lilypond[relative 0, notime]
4211 \property Staff.TimeSignature \set #'transparent = ##t
4212 \clef "petrucci_g" c
4216 @code{clefs-mensural_c'} @tab
4217 historic style mensural C clef @tab
4218 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4219 @code{mensural_c4} @tab
4220 @lilypond[relative 0, notime]
4221 \property Staff.TimeSignature \set #'transparent = ##t
4222 \clef "mensural_c2" c
4226 @code{clefs-mensural_f} @tab
4227 historic style mensural F clef @tab
4228 @code{mensural_f} @tab
4229 @lilypond[relative 0, notime]
4230 \property Staff.TimeSignature \set #'transparent = ##t
4231 \clef "mensural_f" c
4235 @code{clefs-mensural_g} @tab
4236 historic style mensural G clef @tab
4237 @code{mensural_g} @tab
4238 @lilypond[relative 0, notime]
4239 \property Staff.TimeSignature \set #'transparent = ##t
4240 \clef "mensural_g" c
4244 @code{clefs-vaticana_do} @tab
4245 Editio Vaticana style do clef @tab
4246 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4247 @lilypond[relative 0, notime]
4249 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4250 \property Staff.TimeSignature \set #'transparent = ##t
4251 \clef "vaticana_do2" c
4255 @code{clefs-vaticana_fa} @tab
4256 Editio Vaticana style fa clef @tab
4257 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4258 @lilypond[relative 0, notime]
4260 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4261 \property Staff.TimeSignature \set #'transparent = ##t
4262 \clef "vaticana_fa2" c
4266 @code{clefs-medicaea_do} @tab
4267 Editio Medicaea style do clef @tab
4268 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4269 @lilypond[relative 0, notime]
4271 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4272 \property Staff.TimeSignature \set #'transparent = ##t
4273 \clef "medicaea_do2" c
4277 @code{clefs-medicaea_fa} @tab
4278 Editio Medicaea style fa clef @tab
4279 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4280 @lilypond[relative 0, notime]
4282 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4283 \property Staff.TimeSignature \set #'transparent = ##t
4284 \clef "medicaea_fa2" c
4288 @code{clefs-hufnagel_do} @tab
4289 historic style hufnagel do clef @tab
4290 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
4291 @lilypond[relative 0, notime]
4293 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4294 \property Staff.TimeSignature \set #'transparent = ##t
4295 \clef "hufnagel_do2" c
4299 @code{clefs-hufnagel_fa} @tab
4300 historic style hufnagel fa clef @tab
4301 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
4302 @lilypond[relative 0, notime]
4304 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4305 \property Staff.TimeSignature \set #'transparent = ##t
4306 \clef "hufnagel_fa2" c
4310 @code{clefs-hufnagel_do_fa} @tab
4311 historic style hufnagel combined do/fa clef @tab
4312 @code{hufnagel_do_fa} @tab
4313 @lilypond[relative 0, notime]
4314 \property Staff.TimeSignature \set #'transparent = ##t
4315 \clef "hufnagel_do_fa" c
4320 @c --- This should go somewhere else: ---
4321 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
4324 @c @code{percussion}
4326 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
4328 @c @item modern style tab clef (glyph: @code{clefs-tab})
4333 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
4335 @emph{Modern style} means ``as is typeset in contemporary editions of
4336 transcribed mensural music''.
4338 @emph{Petrucci style} means ``inspired by printings published by the
4339 famous engraver Petrucci (1466-1539)''.
4341 @emph{Historic style} means ``as was typeset or written in historic
4342 editions (other than those of Petrucci)''.
4344 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
4346 Petrucci used C clefs with differently balanced left-side vertical
4347 beams, depending on which staffline it is printed.
4351 @subsection Custodes
4356 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
4357 symbol that appears at the end of a staff. It anticipates the pitch
4358 of the first note(s) of the following line and thus helps the player
4359 or singer to manage line breaks during performance, thus enhancing
4360 readability of a score.
4362 Custodes were frequently used in music notation until the 17th
4363 century. Nowadays, they have survived only in a few particular forms
4364 of musical notation such as contemporary editions of Gregorian chant
4365 like the @emph{editio vaticana}. There are different custos glyphs
4366 used in different flavours of notational style.
4368 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
4369 @internalsref{Staff} context when declaring the @code{\paper} block,
4370 as shown in the following example.
4376 \consists Custos_engraver
4377 Custos \override #'style = #'mensural
4382 The result looks like this:
4388 \property Staff.Custos \set #'style = #'mensural
4395 \consists Custos_engraver
4402 The custos glyph is selected by the @code{style} property. The styles
4403 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
4404 @code{mensural}. They are demonstrated in the following fragment:
4414 { " " \musicglyph #"custodes-vaticana-u0" }
4418 { " " \musicglyph #"custodes-medicaea-u0" }
4422 { " " \musicglyph #"custodes-hufnagel-u0" }
4426 { " " \musicglyph #"custodes-mensural-u0" }
4435 \remove "Bar_number_engraver"
4439 \remove "Clef_engraver"
4440 \remove "Key_engraver"
4441 \remove "Time_signature_engraver"
4442 \remove "Staff_symbol_engraver"
4443 minimumVerticalExtent = ##f
4449 If the boolean property @code{adjust-if-on-staffline} is set to
4450 @code{#t} (which it is by default), lily typesets slightly different
4451 variants of the custos glyph, depending on whether the custos, is
4452 typeset on or between stafflines. The glyph will
4453 optically fit well into the staff, with the appendage on the right of
4454 the custos always ending at the same vertical position between two
4455 stafflines regardless of the pitch. If you set
4456 @code{adjust-if-on-staffline} to @code{#f}, then
4457 a compromise between both forms is used.
4459 Just like stems can be attached to noteheads in two directions
4460 @emph{up} and @emph{down}, each custos glyph is available with its
4461 appendage pointing either up or down. If the pitch of a custos is
4462 above a selectable position, the appendage will point downwards; if
4463 the pitch is below this position, the appendage will point upwards.
4464 Use property @code{neutral-position} to select this position. By
4465 default, it is set to @code{0}, such that the neutral position is the
4466 center of the staff. Use property @code{neutral-direction} to control
4467 what happens if a custos is typeset on the neutral position itself.
4468 By default, this property is set to @code{-1}, such that the appendage
4469 will point downwards. If set to @code{1}, the appendage will point
4470 upwards. Other values such as @code{0} are reserved for future
4471 extensions and should not be used.
4476 @internalsref{Custos}, @inputfileref{input/test,custos-style.ly} and
4477 @inputfileref{input/regression,custos.ly}.
4481 @subsection Divisiones
4487 A @emph{divisio} (plural: @emph{divisiones}; latin word for
4488 `division') is a staff context symbol that is used to structure
4489 Gregorian music into phrases and sections. The musical meaning of
4490 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
4491 can be characterized as short, medium and long pause, somewhat like
4492 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
4493 a chant, but is also frequently used within a single
4494 antiphonal/responsorial chant to mark the end of each section.
4498 To use divisiones, include the file @code{gregorian-init.ly}. It
4499 contains definitions that you can apply by just inserting
4500 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
4501 and @code{\finalis} at proper places in the input. Some editions use
4502 @emph{virgula} or @emph{caesura} instead of divisio minima.
4503 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
4507 @lilypondfile[notexidoc]{divisiones.ly}
4511 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
4512 @inputfileref{input/test,divisiones.ly}, @ref{Breath marks}.
4515 @subsection Ligatures
4519 @c TODO: Should double check if I recalled things correctly when I wrote
4520 @c down the following paragraph by heart.
4522 In musical terminology, a ligature is a coherent graphical symbol that
4523 represents at least two different notes. Ligatures originally appeared
4524 in the manuscripts of Gregorian chant notation roughly since the 9th
4525 century as an allusion to the accent symbols of greek lyric poetry to
4526 denote ascending or descending sequences of notes. Both, the shape and
4527 the exact meaning of ligatures changed tremendously during the following
4528 centuries: In early notation, ligatures where used for monophonic tunes
4529 (Gregorian chant) and very soon denoted also the way of performance in
4530 the sense of articulation. With upcoming multiphony, the need for a
4531 metric system arised, since multiple voices of a piece have to be
4532 synchronized some way. New notation systems were invented that used
4533 the manifold shapes of ligatures to now denote rhythmical patterns
4534 (e.g. black mensural notation, mannered notation, ars nova). With the
4535 invention of the metric system of the white mensural notation, the need
4536 for ligatures to denote such patterns disappeared. Nevertheless,
4537 ligatures were still in use in the mensural system for a couple of
4538 decades until they finally disappeared during the late 16th / early 17th
4539 century. Still, ligatures have survived in contemporary editions of
4540 Gregorian chant such as the Editio Vaticana from 1905/08.
4544 Syntactically, ligatures are simply enclosed by @code{\[} and
4545 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
4546 additional input syntax specific for this particular type of ligature.
4547 By default, the @internalsref{LigatureBracket} engraver just puts a
4548 square bracket above the ligature.
4550 @lilypond[singleline,verbatim]
4552 \notes \transpose c c' {
4560 To select a specific style of ligatures, a proper ligature engraver
4561 has to be added to the @internalsref{Voice} context, as explained in
4562 the following subsections. Currently, only white mensural ligatures
4563 are supported with certain limitations. Support for Editio Vaticana
4564 will be added in the future.
4567 * White mensural ligatures::
4568 * Gregorian square neumes ligatures::
4571 @node White mensural ligatures
4572 @subsubsection White mensural ligatures
4574 @cindex Mensural ligatures
4575 @cindex White mensural ligatures
4577 There is limited support for white mensural ligatures. The
4578 implementation is still experimental; it currently may output strange
4579 warnings or even crash in some cases or produce weird results on more
4580 complex ligatures. To engrave white mensural ligatures, in the paper
4581 block the @internalsref{Mensural_ligature_engraver} has to be put into
4582 the @internalsref{Voice} context, and remove the
4583 @internalsref{Ligature_bracket_engraver}:
4589 \remove Ligature_bracket_engraver
4590 \consists Mensural_ligature_engraver
4595 There is no additional input language to describe the shape of a
4596 white mensural ligature. The shape is rather determined solely from
4597 the pitch and duration of the enclosed notes. While this approach may
4598 take a new user a while to get accustomed, it has the great advantage
4599 that the full musical information of the ligature is known internally.
4600 This is not only required for correct MIDI output, but also allows for
4601 automatic transcription of the ligatures.
4606 \property Score.timing = ##f
4607 \property Score.defaultBarType = "empty"
4608 \property Voice.NoteHead \set #'style = #'neo_mensural
4609 \property Staff.TimeSignature \set #'style = #'neo_mensural
4611 \[ g\longa c\breve a\breve f\breve d'\longa \]
4613 \[ e1 f1 a\breve g\longa \]
4615 @lilypond[singleline]
4617 \notes \transpose c c' {
4618 \property Score.timing = ##f
4619 \property Score.defaultBarType = "empty"
4620 \property Voice.NoteHead \set #'style = #'neo_mensural
4621 \property Staff.TimeSignature \set #'style = #'neo_mensural
4623 \[ g\longa c\breve a\breve f\breve d'\longa \]
4625 \[ e1 f1 a\breve g\longa \]
4630 \remove Ligature_bracket_engraver
4631 \consists Mensural_ligature_engraver
4637 Without replacing @internalsref{Ligature_bracket_engraver} with
4638 @internalsref{Mensural_ligature_engraver}, the same music transcribes
4641 @lilypond[singleline]
4643 \notes \transpose c c' {
4644 \property Score.timing = ##f
4645 \property Score.defaultBarType = "empty"
4646 \property Voice.NoteHead \set #'style = #'neo_mensural
4647 \property Staff.TimeSignature \set #'style = #'neo_mensural
4649 \[ g\longa c\breve a\breve f\breve d'\longa \]
4651 \[ e1 f1 a\breve g\longa \]
4656 @node Gregorian square neumes ligatures
4657 @subsubsection Gregorian square neumes ligatures
4659 @cindex Square neumes ligatures
4660 @cindex Gregorian square neumes ligatures
4662 Gregorian square neumes notation (following the style of the Editio
4663 Vaticana) is under heavy development, but not yet really usable for
4664 production purposes. Core ligatures can already be typeset, but
4665 essential issues for serious typesetting are still under development,
4666 such as (among others) horizontal alignment of multiple ligatures,
4667 lyrics alignment and proper accidentals handling. Still, this section
4668 gives a sneak preview of what Gregorian chant may look like once it
4671 The following table contains the extended neumes table of the 2nd
4672 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
4673 1983 by the monks of Solesmes.
4675 @multitable @columnfractions .4 .2 .2 .2
4678 @b{Neuma aut@*Neumarum Elementa} @tab
4679 @b{Figurae@*Rectae} @tab
4680 @b{Figurae@*Liquescentes Auctae} @tab
4681 @b{Figurae@*Liquescentes Deminutae}
4683 @c TODO: \paper block is identical in all of the below examples.
4684 @c Therefore, it should somehow be included rather than duplicated all
4687 @c why not make identifiers in ly/engraver-init.ly? --hwn
4692 @lilypond[noindent, 26pt, nofragment, linewidth=1.5cm]
4693 \include "gregorian-init.ly"
4695 \notes \transpose c c' {
4698 \noBreak s^\markup {"a"} \noBreak
4700 % Punctum Inclinatum
4702 \noBreak s^\markup {"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
4730 @lilypond[noindent, 26pt, nofragment, linewidth=2.5cm]
4731 \include "gregorian-init.ly"
4733 \notes \transpose c c' {
4734 % Punctum Auctum Ascendens
4735 \[ \auctum \ascendens b \]
4736 \noBreak s^\markup {"c"} \noBreak
4738 % Punctum Auctum Descendens
4739 \[ \auctum \descendens b \]
4740 \noBreak s^\markup {"d"} \noBreak
4742 % Punctum Inclinatum Auctum
4743 \[ \inclinatum \auctum b \]
4744 \noBreak s^\markup {"e"}
4750 \remove "Bar_number_engraver"
4754 \remove "Clef_engraver"
4755 \remove "Key_engraver"
4756 \remove "Staff_symbol_engraver"
4757 \remove "Time_signature_engraver"
4758 \remove "Bar_engraver"
4759 minimumVerticalExtent = ##f
4763 \remove Ligature_bracket_engraver
4764 \consists Vaticana_ligature_engraver
4765 NoteHead \set #'style = #'vaticana_punctum
4766 Stem \set #'transparent = ##t
4772 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
4773 \include "gregorian-init.ly"
4775 \notes \transpose c c' {
4776 % Punctum Inclinatum Parvum
4777 \[ \inclinatum \deminutum b \]
4778 \noBreak s^\markup {"f"}
4784 \remove "Bar_number_engraver"
4788 \remove "Clef_engraver"
4789 \remove "Key_engraver"
4790 \remove "Staff_symbol_engraver"
4791 \remove "Time_signature_engraver"
4792 \remove "Bar_engraver"
4793 minimumVerticalExtent = ##f
4797 \remove Ligature_bracket_engraver
4798 \consists Vaticana_ligature_engraver
4799 NoteHead \set #'style = #'vaticana_punctum
4800 Stem \set #'transparent = ##t
4809 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
4810 \include "gregorian-init.ly"
4812 \notes \transpose c c' {
4815 \noBreak s^\markup {"g"}
4821 \remove "Bar_number_engraver"
4825 \remove "Clef_engraver"
4826 \remove "Key_engraver"
4827 \remove "Staff_symbol_engraver"
4828 \remove "Time_signature_engraver"
4829 \remove "Bar_engraver"
4830 minimumVerticalExtent = ##f
4834 \remove Ligature_bracket_engraver
4835 \consists Vaticana_ligature_engraver
4836 NoteHead \set #'style = #'vaticana_punctum
4837 Stem \set #'transparent = ##t
4846 @code{3. Apostropha vel Stropha}
4848 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
4849 \include "gregorian-init.ly"
4851 \notes \transpose c c' {
4854 \noBreak s^\markup {"h"}
4860 \remove "Bar_number_engraver"
4864 \remove "Clef_engraver"
4865 \remove "Key_engraver"
4866 \remove "Staff_symbol_engraver"
4867 \remove "Time_signature_engraver"
4868 \remove "Bar_engraver"
4869 minimumVerticalExtent = ##f
4873 \remove Ligature_bracket_engraver
4874 \consists Vaticana_ligature_engraver
4875 NoteHead \set #'style = #'vaticana_punctum
4876 Stem \set #'transparent = ##t
4882 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
4883 \include "gregorian-init.ly"
4885 \notes \transpose c c' {
4887 \[ \stropha \auctum b \]
4888 \noBreak s^\markup {"i"}
4894 \remove "Bar_number_engraver"
4898 \remove "Clef_engraver"
4899 \remove "Key_engraver"
4900 \remove "Staff_symbol_engraver"
4901 \remove "Time_signature_engraver"
4902 \remove "Bar_engraver"
4903 minimumVerticalExtent = ##f
4907 \remove Ligature_bracket_engraver
4908 \consists Vaticana_ligature_engraver
4909 NoteHead \set #'style = #'vaticana_punctum
4910 Stem \set #'transparent = ##t
4920 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
4921 \include "gregorian-init.ly"
4923 \notes \transpose c c' {
4926 \noBreak s^\markup {"j"}
4932 \remove "Bar_number_engraver"
4936 \remove "Clef_engraver"
4937 \remove "Key_engraver"
4938 \remove "Staff_symbol_engraver"
4939 \remove "Time_signature_engraver"
4940 \remove "Bar_engraver"
4941 minimumVerticalExtent = ##f
4945 \remove Ligature_bracket_engraver
4946 \consists Vaticana_ligature_engraver
4947 NoteHead \set #'style = #'vaticana_punctum
4948 Stem \set #'transparent = ##t
4957 @code{5. Clivis vel Flexa}
4959 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
4960 \include "gregorian-init.ly"
4962 \notes \transpose c c' {
4971 \remove "Bar_number_engraver"
4975 \remove "Clef_engraver"
4976 \remove "Key_engraver"
4977 \remove "Staff_symbol_engraver"
4978 \remove "Time_signature_engraver"
4979 \remove "Bar_engraver"
4980 minimumVerticalExtent = ##f
4984 \remove Ligature_bracket_engraver
4985 \consists Vaticana_ligature_engraver
4986 NoteHead \set #'style = #'vaticana_punctum
4987 Stem \set #'transparent = ##t
4993 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
4994 \include "gregorian-init.ly"
4996 \notes \transpose c c' {
4997 % Clivis Aucta Descendens
4998 \[ b \flexa \auctum \descendens g \]
4999 \noBreak s^\markup {"l"} \noBreak
5001 % Clivis Aucta Ascendens
5002 \[ b \flexa \auctum \ascendens g \]
5003 \noBreak s^\markup {"m"}
5009 \remove "Bar_number_engraver"
5013 \remove "Clef_engraver"
5014 \remove "Key_engraver"
5015 \remove "Staff_symbol_engraver"
5016 \remove "Time_signature_engraver"
5017 \remove "Bar_engraver"
5018 minimumVerticalExtent = ##f
5022 \remove Ligature_bracket_engraver
5023 \consists Vaticana_ligature_engraver
5024 NoteHead \set #'style = #'vaticana_punctum
5025 Stem \set #'transparent = ##t
5031 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5032 \include "gregorian-init.ly"
5034 \notes \transpose c c' {
5036 \[ b \flexa \deminutum g \]
5043 \remove "Bar_number_engraver"
5047 \remove "Clef_engraver"
5048 \remove "Key_engraver"
5049 \remove "Staff_symbol_engraver"
5050 \remove "Time_signature_engraver"
5051 \remove "Bar_engraver"
5052 minimumVerticalExtent = ##f
5056 \remove Ligature_bracket_engraver
5057 \consists Vaticana_ligature_engraver
5058 NoteHead \set #'style = #'vaticana_punctum
5059 Stem \set #'transparent = ##t
5066 @code{6. Podatus vel Pes}
5068 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5069 \include "gregorian-init.ly"
5071 \notes \transpose c c' {
5080 \remove "Bar_number_engraver"
5084 \remove "Clef_engraver"
5085 \remove "Key_engraver"
5086 \remove "Staff_symbol_engraver"
5087 \remove "Time_signature_engraver"
5088 \remove "Bar_engraver"
5089 minimumVerticalExtent = ##f
5093 \remove Ligature_bracket_engraver
5094 \consists Vaticana_ligature_engraver
5095 NoteHead \set #'style = #'vaticana_punctum
5096 Stem \set #'transparent = ##t
5102 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5103 \include "gregorian-init.ly"
5105 \notes \transpose c c' {
5106 % Pes Auctus Descendens
5107 \[ g \pes \auctum \descendens b \]
5108 \noBreak s^\markup {"p"} \noBreak
5110 % Pes Auctus Ascendens
5111 \[ g \pes \auctum \ascendens b \]
5112 \noBreak s^\markup {"q"}
5118 \remove "Bar_number_engraver"
5122 \remove "Clef_engraver"
5123 \remove "Key_engraver"
5124 \remove "Staff_symbol_engraver"
5125 \remove "Time_signature_engraver"
5126 \remove "Bar_engraver"
5127 minimumVerticalExtent = ##f
5131 \remove Ligature_bracket_engraver
5132 \consists Vaticana_ligature_engraver
5133 NoteHead \set #'style = #'vaticana_punctum
5134 Stem \set #'transparent = ##t
5140 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5141 \include "gregorian-init.ly"
5143 \notes \transpose c c' {
5145 \[ g \pes \deminutum b \]
5152 \remove "Bar_number_engraver"
5156 \remove "Clef_engraver"
5157 \remove "Key_engraver"
5158 \remove "Staff_symbol_engraver"
5159 \remove "Time_signature_engraver"
5160 \remove "Bar_engraver"
5161 minimumVerticalExtent = ##f
5165 \remove Ligature_bracket_engraver
5166 \consists Vaticana_ligature_engraver
5167 NoteHead \set #'style = #'vaticana_punctum
5168 Stem \set #'transparent = ##t
5175 @code{7. Pes Quassus}
5177 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5178 \include "gregorian-init.ly"
5180 \notes \transpose c c' {
5182 \[ \oriscus g \pes \virga b \]
5189 \remove "Bar_number_engraver"
5193 \remove "Clef_engraver"
5194 \remove "Key_engraver"
5195 \remove "Staff_symbol_engraver"
5196 \remove "Time_signature_engraver"
5197 \remove "Bar_engraver"
5198 minimumVerticalExtent = ##f
5202 \remove Ligature_bracket_engraver
5203 \consists Vaticana_ligature_engraver
5204 NoteHead \set #'style = #'vaticana_punctum
5205 Stem \set #'transparent = ##t
5211 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5212 \include "gregorian-init.ly"
5214 \notes \transpose c c' {
5215 % Pes Quassus Auctus Descendens
5216 \[ \oriscus g \pes \auctum \descendens b \]
5223 \remove "Bar_number_engraver"
5227 \remove "Clef_engraver"
5228 \remove "Key_engraver"
5229 \remove "Staff_symbol_engraver"
5230 \remove "Time_signature_engraver"
5231 \remove "Bar_engraver"
5232 minimumVerticalExtent = ##f
5236 \remove Ligature_bracket_engraver
5237 \consists Vaticana_ligature_engraver
5238 NoteHead \set #'style = #'vaticana_punctum
5239 Stem \set #'transparent = ##t
5247 @code{8. Quilisma Pes}
5249 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5250 \include "gregorian-init.ly"
5252 \notes \transpose c c' {
5254 \[ \quilisma g \pes b \]
5261 \remove "Bar_number_engraver"
5265 \remove "Clef_engraver"
5266 \remove "Key_engraver"
5267 \remove "Staff_symbol_engraver"
5268 \remove "Time_signature_engraver"
5269 \remove "Bar_engraver"
5270 minimumVerticalExtent = ##f
5274 \remove Ligature_bracket_engraver
5275 \consists Vaticana_ligature_engraver
5276 NoteHead \set #'style = #'vaticana_punctum
5277 Stem \set #'transparent = ##t
5283 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5284 \include "gregorian-init.ly"
5286 \notes \transpose c c' {
5287 % Quilisma Pes Auctus Descendens
5288 \[ \quilisma g \pes \auctum \descendens b \]
5295 \remove "Bar_number_engraver"
5299 \remove "Clef_engraver"
5300 \remove "Key_engraver"
5301 \remove "Staff_symbol_engraver"
5302 \remove "Time_signature_engraver"
5303 \remove "Bar_engraver"
5304 minimumVerticalExtent = ##f
5308 \remove Ligature_bracket_engraver
5309 \consists Vaticana_ligature_engraver
5310 NoteHead \set #'style = #'vaticana_punctum
5311 Stem \set #'transparent = ##t
5319 @code{9. Podatus Initio Debilis}
5321 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5322 \include "gregorian-init.ly"
5324 \notes \transpose c c' {
5325 % Pes Initio Debilis
5326 \[ \deminutum g \pes b \]
5333 \remove "Bar_number_engraver"
5337 \remove "Clef_engraver"
5338 \remove "Key_engraver"
5339 \remove "Staff_symbol_engraver"
5340 \remove "Time_signature_engraver"
5341 \remove "Bar_engraver"
5342 minimumVerticalExtent = ##f
5346 \remove Ligature_bracket_engraver
5347 \consists Vaticana_ligature_engraver
5348 NoteHead \set #'style = #'vaticana_punctum
5349 Stem \set #'transparent = ##t
5355 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5356 \include "gregorian-init.ly"
5358 \notes \transpose c c' {
5359 % Pes Auctus Descendens Initio Debilis
5360 \[ \deminutum g \pes \auctum \descendens b \]
5367 \remove "Bar_number_engraver"
5371 \remove "Clef_engraver"
5372 \remove "Key_engraver"
5373 \remove "Staff_symbol_engraver"
5374 \remove "Time_signature_engraver"
5375 \remove "Bar_engraver"
5376 minimumVerticalExtent = ##f
5380 \remove Ligature_bracket_engraver
5381 \consists Vaticana_ligature_engraver
5382 NoteHead \set #'style = #'vaticana_punctum
5383 Stem \set #'transparent = ##t
5393 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5394 \include "gregorian-init.ly"
5396 \notes \transpose c c' {
5398 \[ a \pes b \flexa g \]
5405 \remove "Bar_number_engraver"
5409 \remove "Clef_engraver"
5410 \remove "Key_engraver"
5411 \remove "Staff_symbol_engraver"
5412 \remove "Time_signature_engraver"
5413 \remove "Bar_engraver"
5414 minimumVerticalExtent = ##f
5418 \remove Ligature_bracket_engraver
5419 \consists Vaticana_ligature_engraver
5420 NoteHead \set #'style = #'vaticana_punctum
5421 Stem \set #'transparent = ##t
5427 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5428 \include "gregorian-init.ly"
5430 \notes \transpose c c' {
5431 % Torculus Auctus Descendens
5432 \[ a \pes b \flexa \auctum \descendens g \]
5439 \remove "Bar_number_engraver"
5443 \remove "Clef_engraver"
5444 \remove "Key_engraver"
5445 \remove "Staff_symbol_engraver"
5446 \remove "Time_signature_engraver"
5447 \remove "Bar_engraver"
5448 minimumVerticalExtent = ##f
5452 \remove Ligature_bracket_engraver
5453 \consists Vaticana_ligature_engraver
5454 NoteHead \set #'style = #'vaticana_punctum
5455 Stem \set #'transparent = ##t
5461 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5462 \include "gregorian-init.ly"
5464 \notes \transpose c c' {
5465 % Torculus Deminutus
5466 \[ a \pes b \flexa \deminutum g \]
5473 \remove "Bar_number_engraver"
5477 \remove "Clef_engraver"
5478 \remove "Key_engraver"
5479 \remove "Staff_symbol_engraver"
5480 \remove "Time_signature_engraver"
5481 \remove "Bar_engraver"
5482 minimumVerticalExtent = ##f
5486 \remove Ligature_bracket_engraver
5487 \consists Vaticana_ligature_engraver
5488 NoteHead \set #'style = #'vaticana_punctum
5489 Stem \set #'transparent = ##t
5496 @code{11. Torculus Initio Debilis}
5498 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5499 \include "gregorian-init.ly"
5501 \notes \transpose c c' {
5502 % Torculus Initio Debilis
5503 \[ \deminutum a \pes b \flexa g \]
5510 \remove "Bar_number_engraver"
5514 \remove "Clef_engraver"
5515 \remove "Key_engraver"
5516 \remove "Staff_symbol_engraver"
5517 \remove "Time_signature_engraver"
5518 \remove "Bar_engraver"
5519 minimumVerticalExtent = ##f
5523 \remove Ligature_bracket_engraver
5524 \consists Vaticana_ligature_engraver
5525 NoteHead \set #'style = #'vaticana_punctum
5526 Stem \set #'transparent = ##t
5532 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5533 \include "gregorian-init.ly"
5535 \notes \transpose c c' {
5536 % Torculus Auctus Descendens Initio Debilis
5537 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
5544 \remove "Bar_number_engraver"
5548 \remove "Clef_engraver"
5549 \remove "Key_engraver"
5550 \remove "Staff_symbol_engraver"
5551 \remove "Time_signature_engraver"
5552 \remove "Bar_engraver"
5553 minimumVerticalExtent = ##f
5557 \remove Ligature_bracket_engraver
5558 \consists Vaticana_ligature_engraver
5559 NoteHead \set #'style = #'vaticana_punctum
5560 Stem \set #'transparent = ##t
5566 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5567 \include "gregorian-init.ly"
5569 \notes \transpose c c' {
5570 % Torculus Deminutus Initio Debilis
5571 \[ \deminutum a \pes b \flexa \deminutum g \]
5578 \remove "Bar_number_engraver"
5582 \remove "Clef_engraver"
5583 \remove "Key_engraver"
5584 \remove "Staff_symbol_engraver"
5585 \remove "Time_signature_engraver"
5586 \remove "Bar_engraver"
5587 minimumVerticalExtent = ##f
5591 \remove Ligature_bracket_engraver
5592 \consists Vaticana_ligature_engraver
5593 NoteHead \set #'style = #'vaticana_punctum
5594 Stem \set #'transparent = ##t
5601 @code{12. Porrectus}
5603 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5604 \include "gregorian-init.ly"
5606 \notes \transpose c c' {
5608 \[ a \flexa g \pes b \]
5615 \remove "Bar_number_engraver"
5619 \remove "Clef_engraver"
5620 \remove "Key_engraver"
5621 \remove "Staff_symbol_engraver"
5622 \remove "Time_signature_engraver"
5623 \remove "Bar_engraver"
5624 minimumVerticalExtent = ##f
5628 \remove Ligature_bracket_engraver
5629 \consists Vaticana_ligature_engraver
5630 NoteHead \set #'style = #'vaticana_punctum
5631 Stem \set #'transparent = ##t
5637 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5638 \include "gregorian-init.ly"
5640 \notes \transpose c c' {
5641 % Porrectus Auctus Descendens
5642 \[ a \flexa g \pes \auctum \descendens b \]
5649 \remove "Bar_number_engraver"
5653 \remove "Clef_engraver"
5654 \remove "Key_engraver"
5655 \remove "Staff_symbol_engraver"
5656 \remove "Time_signature_engraver"
5657 \remove "Bar_engraver"
5658 minimumVerticalExtent = ##f
5662 \remove Ligature_bracket_engraver
5663 \consists Vaticana_ligature_engraver
5664 NoteHead \set #'style = #'vaticana_punctum
5665 Stem \set #'transparent = ##t
5671 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5672 \include "gregorian-init.ly"
5674 \notes \transpose c c' {
5675 % Porrectus Deminutus
5676 \[ a \flexa g \pes \deminutum b \]
5683 \remove "Bar_number_engraver"
5687 \remove "Clef_engraver"
5688 \remove "Key_engraver"
5689 \remove "Staff_symbol_engraver"
5690 \remove "Time_signature_engraver"
5691 \remove "Bar_engraver"
5692 minimumVerticalExtent = ##f
5696 \remove Ligature_bracket_engraver
5697 \consists Vaticana_ligature_engraver
5698 NoteHead \set #'style = #'vaticana_punctum
5699 Stem \set #'transparent = ##t
5708 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5709 \include "gregorian-init.ly"
5711 \notes \transpose c c' {
5713 \[ \virga b \inclinatum a \inclinatum g \]
5720 \remove "Bar_number_engraver"
5724 \remove "Clef_engraver"
5725 \remove "Key_engraver"
5726 \remove "Staff_symbol_engraver"
5727 \remove "Time_signature_engraver"
5728 \remove "Bar_engraver"
5729 minimumVerticalExtent = ##f
5733 \remove Ligature_bracket_engraver
5734 \consists Vaticana_ligature_engraver
5735 NoteHead \set #'style = #'vaticana_punctum
5736 Stem \set #'transparent = ##t
5742 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5743 \include "gregorian-init.ly"
5745 \notes \transpose c c' {
5747 \[ \virga b \inclinatum a \inclinatum \auctum g \]
5754 \remove "Bar_number_engraver"
5758 \remove "Clef_engraver"
5759 \remove "Key_engraver"
5760 \remove "Staff_symbol_engraver"
5761 \remove "Time_signature_engraver"
5762 \remove "Bar_engraver"
5763 minimumVerticalExtent = ##f
5767 \remove Ligature_bracket_engraver
5768 \consists Vaticana_ligature_engraver
5769 NoteHead \set #'style = #'vaticana_punctum
5770 Stem \set #'transparent = ##t
5776 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5777 \include "gregorian-init.ly"
5779 \notes \transpose c c' {
5780 % Climacus Deminutus
5781 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
5788 \remove "Bar_number_engraver"
5792 \remove "Clef_engraver"
5793 \remove "Key_engraver"
5794 \remove "Staff_symbol_engraver"
5795 \remove "Time_signature_engraver"
5796 \remove "Bar_engraver"
5797 minimumVerticalExtent = ##f
5801 \remove Ligature_bracket_engraver
5802 \consists Vaticana_ligature_engraver
5803 NoteHead \set #'style = #'vaticana_punctum
5804 Stem \set #'transparent = ##t
5811 @code{14. Scandicus}
5813 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5814 \include "gregorian-init.ly"
5816 \notes \transpose c c' {
5818 \[ g \pes a \virga b \]
5825 \remove "Bar_number_engraver"
5829 \remove "Clef_engraver"
5830 \remove "Key_engraver"
5831 \remove "Staff_symbol_engraver"
5832 \remove "Time_signature_engraver"
5833 \remove "Bar_engraver"
5834 minimumVerticalExtent = ##f
5838 \remove Ligature_bracket_engraver
5839 \consists Vaticana_ligature_engraver
5840 NoteHead \set #'style = #'vaticana_punctum
5841 Stem \set #'transparent = ##t
5847 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5848 \include "gregorian-init.ly"
5850 \notes \transpose c c' {
5851 % Scandicus Auctus Descendens
5852 \[ g \pes a \pes \auctum \descendens b \]
5859 \remove "Bar_number_engraver"
5863 \remove "Clef_engraver"
5864 \remove "Key_engraver"
5865 \remove "Staff_symbol_engraver"
5866 \remove "Time_signature_engraver"
5867 \remove "Bar_engraver"
5868 minimumVerticalExtent = ##f
5872 \remove Ligature_bracket_engraver
5873 \consists Vaticana_ligature_engraver
5874 NoteHead \set #'style = #'vaticana_punctum
5875 Stem \set #'transparent = ##t
5881 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5882 \include "gregorian-init.ly"
5884 \notes \transpose c c' {
5885 % Scandicus Deminutus
5886 \[ g \pes a \pes \deminutum b \]
5893 \remove "Bar_number_engraver"
5897 \remove "Clef_engraver"
5898 \remove "Key_engraver"
5899 \remove "Staff_symbol_engraver"
5900 \remove "Time_signature_engraver"
5901 \remove "Bar_engraver"
5902 minimumVerticalExtent = ##f
5906 \remove Ligature_bracket_engraver
5907 \consists Vaticana_ligature_engraver
5908 NoteHead \set #'style = #'vaticana_punctum
5909 Stem \set #'transparent = ##t
5918 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5919 \include "gregorian-init.ly"
5921 \notes \transpose c c' {
5923 \[ g \oriscus a \pes \virga b \]
5930 \remove "Bar_number_engraver"
5934 \remove "Clef_engraver"
5935 \remove "Key_engraver"
5936 \remove "Staff_symbol_engraver"
5937 \remove "Time_signature_engraver"
5938 \remove "Bar_engraver"
5939 minimumVerticalExtent = ##f
5943 \remove Ligature_bracket_engraver
5944 \consists Vaticana_ligature_engraver
5945 NoteHead \set #'style = #'vaticana_punctum
5946 Stem \set #'transparent = ##t
5952 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5953 \include "gregorian-init.ly"
5955 \notes \transpose c c' {
5956 % Salicus Auctus Descendens
5957 \[ g \oriscus a \pes \auctum \descendens b \]
5964 \remove "Bar_number_engraver"
5968 \remove "Clef_engraver"
5969 \remove "Key_engraver"
5970 \remove "Staff_symbol_engraver"
5971 \remove "Time_signature_engraver"
5972 \remove "Bar_engraver"
5973 minimumVerticalExtent = ##f
5977 \remove Ligature_bracket_engraver
5978 \consists Vaticana_ligature_engraver
5979 NoteHead \set #'style = #'vaticana_punctum
5980 Stem \set #'transparent = ##t
5990 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5991 \include "gregorian-init.ly"
5993 \notes \transpose c c' {
5995 \[ \stropha b \stropha b \stropha a \]
6002 \remove "Bar_number_engraver"
6006 \remove "Clef_engraver"
6007 \remove "Key_engraver"
6008 \remove "Staff_symbol_engraver"
6009 \remove "Time_signature_engraver"
6010 \remove "Bar_engraver"
6011 minimumVerticalExtent = ##f
6015 \remove Ligature_bracket_engraver
6016 \consists Vaticana_ligature_engraver
6017 NoteHead \set #'style = #'vaticana_punctum
6018 Stem \set #'transparent = ##t
6029 Unlike most other neumes notation systems, the input language for
6030 neumes does not necessarily reflect directly the typographical
6031 appearance, but is designed to solely focuse on musical meaning. For
6032 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6033 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6034 a torculus with a curved flexa shape and only a single Punctum head.
6035 There is no command to explicitly typeset the curved flexa shape; the
6036 decision of when to typeset a curved flexa shape is purely taken from
6037 the musical input. The idea of this approach is to separate the
6038 musical aspects of the input from the notation style of the output.
6039 This way, the same input can be reused to typeset the same music in a
6040 different style of Gregorian chant notation such as Hufnagel (also
6041 known as German gothic neumes) or Medicaea (kind of a very simple
6042 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6043 engraver and Medicaea ligature engraver will have been implemented, it
6044 will be as simple as replacing the ligature engraver in the
6045 VoiceContext to get the desired notation style from the same input.
6047 The following table shows the code fragments that produce the
6048 ligatures in the above neumes table. The letter in the first column
6049 in each line of the below table indicates to which ligature in the
6050 above table it refers. The second column gives the name of the
6051 ligature. The third column shows the code fragment that produces this
6052 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6054 @multitable @columnfractions .1 .4 .5
6068 Punctum Inclinatum @tab
6069 @code{\[ \inclinatum b \]}
6073 Punctum Auctum Ascendens @tab
6074 @code{\[ \auctum \ascendens b \]}
6078 Punctum Auctum Descendens @tab
6079 @code{\[ \auctum \descendens b \]}
6083 Punctum Inclinatum Auctum @tab
6084 @code{\[ \inclinatum \auctum b \]}
6088 Punctum Inclinatum Parvum @tab
6089 @code{\[ \inclinatum \deminutum b \]}
6094 @code{\[ \virga b \]}
6099 @code{\[ \stropha b \]}
6104 @code{\[ \stropha \auctum b \]}
6109 @code{\[ \oriscus b \]}
6113 Clivis vel Flexa @tab
6114 @code{\[ b \flexa g \]}
6118 Clivis Aucta Descendens @tab
6119 @code{\[ b \flexa \auctum \descendens g \]}
6123 Clivis Aucta Ascendens @tab
6124 @code{\[ b \flexa \auctum \ascendens g \]}
6129 @code{\[ b \flexa \deminutum g \]}
6133 Podatus vel Pes @tab
6134 @code{\[ g \pes b \]}
6138 Pes Auctus Descendens @tab
6139 @code{\[ g \pes \auctum \descendens b \]}
6143 Pes Auctus Ascendens @tab
6144 @code{\[ g \pes \auctum \ascendens b \]}
6149 @code{\[ g \pes \deminutum b \]}
6154 @code{\[ \oriscus g \pes \virga b \]}
6158 Pes Quassus Auctus Descendens @tab
6159 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6164 @code{\[ \quilisma g \pes b \]}
6168 Quilisma Pes Auctus Descendens @tab
6169 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6173 Pes Initio Debilis @tab
6174 @code{\[ \deminutum g \pes b \]}
6178 Pes Auctus Descendens Initio Debilis @tab
6179 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6184 @code{\[ a \pes b \flexa g \]}
6188 Torculus Auctus Descendens @tab
6189 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6193 Torculus Deminutus @tab
6194 @code{\[ a \pes b \flexa \deminutum g \]}
6198 Torculus Initio Debilis @tab
6199 @code{\[ \deminutum a \pes b \flexa g \]}
6203 Torculus Auctus Descendens Initio Debilis @tab
6204 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6208 Torculus Deminutus Initio Debilis @tab
6209 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6214 @code{\[ a \flexa g \pes b \]}
6218 Porrectus Auctus Descendens @tab
6219 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6223 Porrectus Deminutus @tab
6224 @code{\[ a \flexa g \pes \deminutum b \]}
6229 @code{\[ \virga b \inclinatum a \inclinatum g \]}
6233 Climacus Auctus @tab
6234 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
6238 Climacus Deminutus @tab
6239 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
6244 @code{\[ g \pes a \virga b \]}
6248 Scandicus Auctus Descendens @tab
6249 @code{\[ g \pes a \pes \auctum \descendens b \]}
6253 Scandicus Deminutus @tab
6254 @code{\[ g \pes a \pes \deminutum b \]}
6259 @code{\[ g \oriscus a \pes \virga b \]}
6263 Salicus Auctus Descendens @tab
6264 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
6269 @code{\[ \stropha b \stropha b \stropha a \]}
6275 Use special heads for lower/upper head of Pes only when heads are
6278 Scandicus Deminutus: Punctum Auctum Ascendens overlaps with
6279 Semivocalis head; this looks awful.
6281 Trigonus: apply equal spacing, regardless of pitch.
6284 @subsection Figured bass
6286 @cindex Basso continuo
6288 @c TODO: musicological blurb about FB
6292 LilyPond has limited support for figured bass:
6294 @lilypond[verbatim,fragment]
6296 \context Voice \notes { \clef bass dis4 c d ais}
6297 \context FiguredBass
6299 < 6 >4 < 7 >8 < 6+ [_!] >
6305 The support for figured bass consists of two parts: there is an input
6306 mode, introduced by @code{\figures}, where you can enter bass figures
6307 as numbers, and there is a context called @internalsref{FiguredBass}
6308 that takes care of making @internalsref{BassFigure} objects.
6310 In figures input mode, a group of bass figures is delimited by
6311 @code{<} and @code{>}. The duration is entered after the @code{>}.
6316 \context FiguredBass
6320 Accidentals are added to the numbers if you alterate them by
6321 appending @code{-}, @code{!} and @code{+}.
6327 \context FiguredBass
6328 \figures { <4- 6+ 7!> }
6331 Spaces or dashes may be inserted by using @code{_}. Brackets are
6332 introduced with @code{[} and @code{]}.
6338 \context FiguredBass
6339 \figures { < [4 6] 8 [_ 12]> }
6342 Although the support for figured bass may superficially resemble chord
6343 support, it works much simpler. The @code{\figures} mode simply
6344 stores the numbers , and @internalsref{FiguredBass} context prints
6345 them as entered. There is no conversion to pitches, and no
6346 realizations of the bass are played in the MIDI file.
6348 Internally, the code produces markup texts. You can use any of the
6349 markup text properties to override formatting. For example, the
6350 vertical spacing of the figures may be set with @code{baseline-skip}.
6354 @internalsref{BassFigureEvent} music, @internalsref{BassFigure} grob,
6355 @internalsref{FiguredBass} context
6359 Slash notation for alterations is not supported.
6362 @node Contemporary notation
6363 @section Contemporary notation
6365 In the 20th century, composers have greatly expanded the musical
6366 vocabulary. With this expansion, many innovations in musical notation
6367 have been tried. For a comprehensive overview, refer to @cite{Stone
6368 1980} (see @ref{Literature}). In general, the use of new, innovative
6369 notation makes a piece harder to understand and perform and its use
6370 should therefore be avoided if possible. For this reason, support for
6371 contemporary notation in LilyPond is limited.
6380 @subsection Clusters
6384 In musical terminology, a @emph{cluster} denotes a range of
6385 simultaneously sounding pitches that may change over time. The set of
6386 available pitches to apply usually depends on the accoustic source.
6387 Thus, in piano music, a cluster typically consists of a continous range
6388 of the semitones as provided by the piano's fixed set of a chromatic
6389 scale. In choral music, each singer of the choir typically may sing an
6390 arbitrary pitch within the cluster's range that is not bound to any
6391 diatonic, chromatic or other scale. In electronic music, a cluster
6392 (theoretically) may even cover a continuous range of pitches, thus
6393 resulting in coloured noise, such as pink noise.
6395 Clusters can be denoted in the context of ordinary staff notation by
6396 engraving simple geometrical shapes that replace ordinary notation of
6397 notes. Ordinary notes as musical events specify starting time and
6398 duration of pitches; however, the duration of a note is expressed by the
6399 shape of the note head rather than by the horizontal graphical extent of
6400 the note symbol. In contrast, the shape of a cluster geometrically
6401 describes the development of a range of pitches (vertical extent) over
6402 time (horizontal extent). Still, the geometrical shape of a cluster
6403 covers the area in wich any single pitch contained in the cluster would
6404 be notated as an ordinary note. From this point of view, it is
6405 reasonable to specify a cluster as the envelope of a set of notes.
6409 A cluster is engraved as the envelope of a set of notes. The starting
6410 note is marked with @code{\startCluster}, and the ending note with
6411 @code{\stopCluster}, e.g.,
6419 The following example (from
6420 @inputfileref{input/regression,cluster.ly}) shows what the result
6423 @lilypondfile[notexidoc]{cluster.ly}
6425 By default, @internalsref{Cluster_engraver} is in the
6426 @internalsref{Voice} context. This allows putting ordinary notes and
6427 clusters together in the same staff, even simultaneously. In such a
6428 case no attempt is made to automatically avoid collisions between
6429 ordinary notes and clusters.
6433 @internalsref{Cluster}, @inputfileref{input/regression,cluster.ly},
6434 @internalsref{Cluster_engraver}, @internalsref{ClusterEvent}.
6438 When a cluster is active, note heads must be switched off manually using
6441 Music expressions like @code{< @{ g8 e8 @} a4 >} are not printed
6442 accurately. Use @code{<<g a>>8 <<e a>>8} instead.
6447 @subsection Fermatas
6453 Contemporary music notation frequently uses special fermata symbols to
6454 indicate fermatas of differing lengths.
6458 The following are supported
6460 @lilypond[singleline]
6483 \context Lyrics \lyrics {
6484 "shortfermata" "fermata" "longfermata" "verylongfermata"
6489 See @ref{Articulations} for general instructions how to apply scripts
6490 such as fermatas to a @code{\notes@{@}} block.
6493 @section Tuning output
6495 There are situations where default layout decisions are not
6496 sufficient. In this section we discuss ways to override these
6499 Formatting is internally done by manipulating so called objects (graphic
6500 objects). Each object carries with it a set of properties (object
6501 properties) specific to that object. For example, a stem object has
6502 properties that specify its direction, length and thickness.
6504 The most direct way of tuning the output is by altering the values of
6505 these properties. There are two ways of doing that: first, you can
6506 temporarily change the definition of one type of object, thus
6507 affecting a whole set of objects. Second, you can select one specific
6508 object, and set a object property in that object.
6518 @node Tuning objects
6519 @subsection Tuning objects
6521 @cindex object description
6523 The definition of an object is actually a list of default object
6524 properties. For example, the definition of the Stem object (available
6525 in @file{scm/grob-description.scm}), includes the following definitions for
6530 (beamed-lengths . (0.0 2.5 2.0 1.5))
6531 (Y-extent-callback . ,Stem::height)
6536 By adding variables on top of these existing definitions, the system
6537 defaults is overriden, and the appearance of a graphical objects is
6543 Changing a variable for only one object is commonly achieved with
6547 \once \property @var{context}.@var{grobname}
6548 \override @var{symbol} = @var{value}
6550 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
6551 and @var{grobname} is a string and @var{value} is a Scheme expression.
6552 This command applies a setting only during one moment in the score.
6554 In the following example, only one @internalsref{Stem} object is
6555 changed from its original setting:
6557 @lilypond[verbatim, fragment, relative=1]
6559 \once \property Voice.Stem \set #'thickness = #4
6563 @cindex @code{\once}
6565 For changing more objects, the same command, without @code{\once} can
6568 \property @var{context}.@var{grobname} \override @var{symbol} = @var{value}
6570 This command adds @code{@var{symbol} = @var{value}} to the definition
6571 of @var{grobname} in the context @var{context}, and this definition
6572 stays in place until it is removed.
6574 An existing definition may be removed by the following command
6577 \property @var{context}.@var{grobname} \revert @var{symbol}
6580 All @code{\override} and @code{\revert} commands should be balanced.
6581 The @code{\set} shorthand, performs a revert followed by an override,
6582 and is often more convenient to use
6585 \property @var{context}.@var{grobname} \set @var{symbol} = @var{value}
6589 @lilypond[verbatim,quote]
6590 c'4 \property Voice.Stem \override #'thickness = #4.0
6592 c'4 \property Voice.Stem \revert #'thickness
6596 The following example gives exactly the same result as the previous
6597 one (assuming the system default for stem thickness is 1.3).
6599 @lilypond[verbatim,quote]
6600 c'4 \property Voice.Stem \set #'thickness = #4.0
6602 c'4 \property Voice.Stem \set #'thickness = #1.3
6606 Reverting a setting which was not set in the first place has no
6607 effect. However, if the setting was set as a system default, this may
6608 remove the default value, and this may give surprising results,
6609 including crashes. In other words, @code{\override} and
6610 @code{\revert} must be carefully balanced.
6612 These are examples of correct nesting of @code{\override}, @code{\set},
6615 A clumsy but correct form:
6617 \override \revert \override \revert \override \revert
6620 Shorter version of the same:
6622 \override \set \set \revert
6625 A short form, using only @code{\set}. This requires you to know the
6628 \set \set \set \set @var{to default value}
6631 If there is no default (i.e. by default, the object property is unset),
6634 \set \set \set \revert
6637 For the digirati, the object description is an Scheme association
6638 list. Since a Scheme list is a singly linked list, we can treat it as
6639 a stack, and @code{\override} and @code{\revert} are push and pop
6640 operations. The association list is stored in a normal context
6643 \property Voice.NoteHead = #'()
6645 will effectively erase @internalsref{NoteHead}s from the current
6646 @internalsref{Voice}. However, this mechanism is not guaranteed to
6647 work, and may cause crashes or other anomalous behavior.
6651 @internalsref{OverrideProperty}, @internalsref{RevertProperty},
6652 @internalsref{PropertySet}, @internalsref{backend properties},
6653 @internalsref{All Graphical Objects}.
6658 The backend is not very strict in type-checking object properties.
6659 Cyclic references in @var{value} cause hangs and/or crashes.
6660 Similarly, reverting properties that are system defaults may also lead
6665 @subsection Applyoutput
6667 The most versatile way of tuning object is @code{\applyoutput}. Its
6670 \applyoutput @var{proc}
6672 where @var{proc} is a Scheme function, taking four arguments.
6674 When interpreted, the function @var{proc} is called for every grob found
6675 in the context, with the following arguments:
6677 @item the grob itself
6678 @item the context where the grob was created
6679 @item the context where @code{\applyoutput} is processed.
6682 In addition, the cause of the grob, i.e. the music expression or object
6683 that was responsible for creating the object, is in the object property
6684 @code{cause}. For example, for a note head, this is a
6685 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
6686 this is a @internalsref{NoteHead} object.
6689 @node Outputproperty
6690 @subsection Outputproperty
6692 @cindex \outputproperty
6694 Another way of tuning objects is the more arcane @code{\outputproperty}
6695 feature. The syntax is as follows:
6697 \outputproperty @var{predicate} @var{symbol} = @var{value}
6699 Here @code{predicate} is a Scheme function taking an object argument, and
6700 returning a boolean. This statement is processed by the
6701 @code{Output_property_engraver}. It instructs the engraver to feed all
6702 objects that it sees to @var{predicate}. Whenever the predicate returns
6703 true, the object property @var{symbol} will be set to @var{value}.
6705 You will need to combine this statement with @code{\context} to select
6706 the appropriate context to apply this to.
6707 @inputfileref{input/regression,output-property.ly} shows an example of
6708 the use of @code{\outputproperty}.
6712 If possible, avoid this feature: the semantics are not very clean, and
6713 the syntax and semantics are up for rewrite.
6716 @node Font selection
6717 @subsection Font selection
6719 The most common thing to change about the appearance of fonts is
6720 their size. The font size of any context can be easily
6721 changed by setting the @code{fontSize} property for that context:
6723 @lilypond[fragment,relative=1,verbatim,quote]
6724 c4 c4 \property Voice.fontSize = #-1
6727 This command will set @code{font-relative-size} (see below),
6728 and does not change the size of variable symbols, such as
6729 beams or slurs. You can use this command to get smaller symbol for
6730 cue notes, but that involves some more subtleties. An elaborate
6731 example of those is in @inputfileref{input/test,cue-notes.ly}.
6733 @cindex magnification
6735 The size of the font may be scaled with the object property
6736 @code{font-magnification}. For example, @code{2.0} blows up all
6737 letters by a factor 2 in both directions.
6746 The font used for printing a object can be selected by setting
6747 @code{font-name}, e.g.
6749 \property Staff.TimeSignature
6750 \set #'font-name = #"cmr17"
6752 You may use any font which is available to @TeX{}, such as foreign
6753 fonts or fonts that do not belong to the Computer Modern font family.
6755 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
6756 can also be adjusted with a more fine-grained mechanism. By setting
6757 the object properties described below, you can select a different font.
6758 All three mechanisms work for every object that supports
6759 @code{font-interface}.
6763 A symbol indicating the general class of the typeface. Supported are
6764 @code{roman} (Computer Modern), @code{braces} (for piano staff
6765 braces), @code{music} (the standard music font, including ancient
6766 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
6769 A symbol indicating the shape of the font, there are typically several
6770 font shapes available for each font family. Choices are @code{italic},
6771 @code{caps} and @code{upright}
6774 A symbol indicating the series of the font. There are typically several
6775 font series for each font family and shape. Choices are @code{medium}
6778 @item font-relative-size
6779 A number indicating the size relative the standard size. For example,
6780 with 20pt staff height, relative size -1 corresponds to 16pt staff
6781 height, and relative size +1 corresponds to 23 pt staff height.
6783 There are small differences in design between fonts designed for
6784 different sizes, hence @code{font-relative-size} is preferred over
6785 @code{font-magnification} for changing font sizes.
6788 @item font-design-size
6789 A number indicating the design size of the font.
6791 This is a feature of the Computer Modern Font: each point size has a
6792 slightly different design. Smaller design sizes are relatively wider,
6793 which enhances readability.
6796 For any of these properties, the value @code{*} (i.e. the symbol
6797 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
6798 to override default setting, which are always present. For example:
6800 \property Lyrics.LyricText \override #'font-series = #'bold
6801 \property Lyrics.LyricText \override #'font-family = #'typewriter
6802 \property Lyrics.LyricText \override #'font-shape = #'*
6805 @cindex @code{font-style}
6811 Relative size is not linked to any real size.
6813 There is no style sheet provided for other fonts besides the @TeX{}
6814 family, and the style sheet cannot be modified easily.
6816 @cindex font selection
6817 @cindex font magnification
6818 @cindex @code{font-interface}
6822 @subsection Text markup
6827 @cindex typeset text
6829 LilyPond has an internal mechanism to typeset texts. You can access it
6830 with the keyword @code{\markup}. Within markup mode, you can enter texts
6831 similar to lyrics: simply enter them, surrounded by spaces.
6834 @lilypond[verbatim,fragment,relative=1]
6835 c1^\markup { hello }
6836 c1_\markup { hi there }
6837 c1^\markup { hi \bold there, is \italic anyone home? }
6840 @cindex font switching
6842 The line of the example demonstrates font switching commands. The
6843 command only apply to the first following word; enclose a set of texts
6844 with braces to apply a command to more words.
6846 \markup @{ \bold @{ hi there @} @}
6848 For clarity, you can also do this for single arguments, e.g.
6850 \markup @{ is \italic @{ anyone @} home @}
6853 @cindex font size, texts
6855 The following size commands set abolute sizes
6871 You can also make letter larger or smaller relative to their neighbors,
6872 with the commands @code{\larger} and @code{\smaller}.
6876 @cindex font style, for texts
6882 The following font change commands are defined:
6885 This changes to the font used for dynamic signs. This font does not
6886 contain all characters of the alphabet, so when producing ``piu f'',
6887 the ``piu'' should be done in a different font.
6891 This changes to the font used for time signatures. It only contains
6892 numbers and a few punctuation marks.
6894 Changes @code{font-shape} to @code{italic}
6896 Changes @code{font-series} to @code{bold}
6899 @cindex raising text
6900 @cindex lowering text
6902 @cindex translating text
6907 Raising and lowering texts can be done with @code{\super} and
6910 @lilypond[verbatim,fragment,relative=1]
6911 c1^\markup { E "=" mc \super "2" }
6916 If you want to give an explicit amount for lowering or raising, use
6917 @code{\raise}. This command takes a Scheme valued first argument, and
6918 a markup object as second argument
6920 @lilypond[verbatim,fragment,relative=1,quote]
6921 c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}
6923 The argument to @code{\raise} is the vertical displacement amount,
6924 measured in (global) staff spaces.
6926 Other commands taking single arguments include
6929 @item \bracket, \hbracket
6930 Bracket the argument markup with normal and horizontal brackets
6935 This is converted to a musical symbol, e.g. @code{\musicglyph
6936 #"accidentals-0"} will select the natural sign from the music font.
6937 See @ref{The Feta font} for a complete listing of the possible glyphs.
6939 This produces a single character, e.g. @code{\char #65} produces the
6942 @item \hspace #@var{amount}
6944 This produces a invisible object taking horizontal space.
6946 \markup @{ A \hspace #2.0 B @}
6948 will put extra space between A and B, on top of the space that is
6949 normally inserted before elements on a line.
6951 @item \fontsize #@var{size}
6953 This sets the relative font size, eg.
6955 A \fontsize #2 @{ B C @} D
6959 This will enlarge the B and the C by two steps.
6960 @item \translate #(cons @var{x} @var{y})
6962 This translates an object. Its first argument is a cons of numbers
6964 A \translate #(cons 2 -3) @{ B C @} D
6966 This moves `B C' 2 spaces to the right, and 3 down.
6968 @item \magnify #@var{mag}
6970 This sets the font magnification for the its argument. In the following
6971 example, the middle A will be 10% larger.
6973 A \magnify #1.1 @{ A @} A
6977 @item \override #(@var{key} . @var{value})
6979 This overrides a formatting property for its argument. The argument
6980 should be a key/value pair, e.g.
6982 m \override #'(font-family . math) m m
6986 In markup mode you can compose expressions, similar to mathematical
6987 expressions, XML documents and music expressions. The braces group
6988 notes into horizontal lines. Other types of lists also exist: you can
6989 stack expressions grouped with @code{<<}, and @code{>>} vertically with
6990 the command @code{\column}. Similarly, @code{\center} aligns texts by
6993 @lilypond[verbatim,fragment,relative=1]
6994 c1^\markup { \column << a bbbb c >> }
6995 c1^\markup { \center << a bbbb c >> }
6996 c1^\markup { \line << a b c >> }
6999 The markup mechanism is extensible. Refer to
7000 @file{scm/new-markup.scm} for more information on extending the markup
7007 @internalsref{Markup functions}, @file{scm/new-markup.scm}
7014 Text layout is ultimately done by @TeX{}, which does kerning of
7015 letters. LilyPond does not account for kerning, so texts will be
7016 spaced slightly too wide.
7018 Syntax errors for markup mode are confusing.
7022 @section Global layout
7024 The global layout determined by three factors: the page layout, the
7025 line breaks and the spacing. These all influence each other. The
7026 choice of spacing determines how densely each system of music is set,
7027 which influences where line breaks breaks are chosen, and thus
7028 ultimately how many pages a piece of music takes. In this section, the
7029 algorithm for spacing music is explained, and how spacing can be
7032 Globally spoken, this procedure happens in three steps: first,
7033 flexible distances (``springs'') are chosen, based on durations. All
7034 possible line breaking combination are tried, and the one with the
7035 best results---a layout that has uniform density and requires as
7036 little stretching or cramping as possible---is chosen. When the score
7037 is processed by @TeX{}, each page is filled with systems, and page breaks
7038 are chosen whenever the page gets full.
7043 * Vertical spacing::
7044 * Horizontal spacing::
7051 @node Vertical spacing
7052 @subsection Vertical spacing
7054 @cindex vertical spacing
7055 @cindex distance between staves
7056 @cindex staff distance
7057 @cindex between staves, distance
7058 @cindex staffs per page
7061 The height of each system is determined automatically by lilypond, to
7062 keep systems from bumping into each other, some minimum distances are
7063 set. By changing these, you can put staves closer together, and thus
7064 put more systems onto one page.
7066 Normally staves are stacked vertically. To make
7067 staves maintain a distance, their vertical size is padded. This is
7068 done with the property @code{minimumVerticalExtent}. It takes a pair
7069 of numbers, so if you want to make it smaller from its, then you could
7072 \property Staff.minimumVerticalExtent = #'(-4 . 4)
7074 This sets the vertical size of the current staff to 4 staff-space on
7075 either side of the center staff line. The argument of
7076 @code{minimumVerticalExtent} is interpreted as an interval, where the
7077 center line is the 0, so the first number is generally negative. The
7078 staff can be made larger at the bottom by setting it to @code{(-6
7081 The piano staves are handled a little differently: to make cross-staff
7082 beaming work correctly, it necessary that the distance between staves
7083 is fixed beforehand. This is also done with a
7084 @internalsref{VerticalAlignment} object, created in
7085 @internalsref{PianoStaff}. In this object the distance between the
7086 staves is fixed by setting @code{forced-distance}. If you want to
7087 override this, use a @code{\translator} block as follows:
7091 VerticalAlignment \override #'forced-distance = #9
7094 This would bring the staves together at a distance of 9 staff spaces,
7095 measured from the center line of each staff.
7099 Vertical aligment of staves is handled by the
7100 @internalsref{VerticalAlignment} object.
7104 @node Horizontal spacing
7105 @subsection Horizontal Spacing
7107 The spacing engine translates differences in durations into
7108 stretchable distances (``springs'') of differing lengths. Longer
7109 durations get more space, shorter durations get less. The shortest
7110 durations get a fixed amount of space (which is controlled by
7111 @code{shortest-duration-space} in the @internalsref{SpacingSpanner}
7112 object). The longer the duration, the more space it gets: doubling a
7113 duration adds a fixed amount (this amount is controlled by
7114 @code{spacing-increment}) of space to the note.
7116 For example, the following piece contains lots of half, quarter and
7117 8th notes, the eighth note is followed by 1 note head width (NHW).
7118 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
7119 @lilypond[fragment, verbatim, relative=1] c2 c4. c8 c4. c8 c4. c8 c8
7123 Normally, @code{shortest-duration-space} is set to 1.2, which is the
7124 width of a note head, and @code{shortest-duration-space} is set to
7125 2.0, meaning that the shortest note gets 2 NHW (2 times
7126 @code{shortest-duration-space}) of space. For normal notes, this space
7127 is always counted from the left edge of the symbol, so the shortest
7128 notes are generally followed by one NHW of space.
7130 If one would follow the above procedure exactly, then adding a single
7131 32th note to a score that uses 8th and 16th notes, would widen up the
7132 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
7133 thus adding 2 noteheads of space to every note. To prevent this, the
7134 shortest duration for spacing is not the shortest note in the score,
7135 but the most commonly found shortest note. Notes that are even
7136 shorter this are followed by a space that is proportonial to their
7137 duration relative to the common shortest note. So if we were to add
7138 only a few 16th notes to the example above, they would be followed by
7141 @lilypond[fragment, verbatim, relative=2]
7142 c2 c4. c8 c4. c16-[ c-] c4. c8 c8 c8 c4 c4 c4
7145 The most common shortest duration is determined as follows: in every
7146 measure, the shortest duration is determined. The most common short
7147 duration, is taken as the basis for the spacing, with the stipulation
7148 that this shortest duration should always be equal to or shorter than
7149 1/8th note. The shortest duration is printed when you run lilypond
7150 with @code{--verbose}. These durations may also be customized. If you
7151 set the @code{common-shortest-duration} in
7152 @internalsref{SpacingSpanner}, then this sets the base duration for
7153 spacing. The maximum duration for this base (normally 1/8th), is set
7154 through @code{base-shortest-duration}.
7156 @cindex @code{common-shortest-duration}
7157 @cindex @code{base-shortest-duration}
7158 @cindex @code{stem-spacing-correction}
7159 @cindex @code{spacing}
7161 In the introduction it was explained that stem directions influence
7162 spacing. This is controlled with @code{stem-spacing-correction}
7163 property in @internalsref{NoteSpacing}, which are generated for every
7164 @internalsref{Voice} context. The @code{StaffSpacing} object
7165 (generated at @internalsref{Staff} context) contains the same property
7166 for controlling the stem/barline spacing. The following example
7167 shows these corrections, once with default settings, and once with
7168 exaggerated corrections.
7174 \property Staff.NoteSpacing \override #'stem-spacing-correction
7176 \property Staff.StaffSpacing \override #'stem-spacing-correction
7181 \paper { raggedright = ##t } }
7184 @cindex SpacingSpanner, overriding properties
7186 Properties of the @internalsref{SpacingSpanner} must be overriden
7187 from the @code{\paper} block, since the @internalsref{SpacingSpanner}
7188 is created before any @code{\property} statements are interpreted.
7190 \paper @{ \translator @{
7192 SpacingSpanner \override #'spacing-increment = #3.0
7199 @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
7200 @internalsref{StaffSpacing}, @internalsref{SeparationItem},
7201 @internalsref{SeparatingGroupSpanner}.
7205 Spacing is determined on a score wide basis. If you have a score that
7206 changes its character (measured in durations) halfway during the
7207 score, the part containing the longer durations will be spaced too
7210 There is no convenient mechanism to manually override spacing.
7215 @subsection Font size
7216 @cindex font size, setting
7217 @cindex staff size, setting
7218 @cindex @code{paper} file
7220 The Feta font provides musical symbols at seven different sizes.
7221 These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
7222 26 point. The point size of a font is the height of the corresponding
7223 staff (excluding line thicknesses).
7225 Definitions for these sizes are the files @file{paperSZ.ly}, where
7226 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
7227 of these files, the variables @code{paperEleven},
7228 @code{paperThirteen}, @code{paperSixteen},
7229 @code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
7230 are defined respectively. The default @code{\paper} block is also
7231 set. These files should be imported at toplevel, i.e.
7233 \include "paper26.ly"
7237 The font definitions are generated using a Scheme function. For more
7238 details, see the file @file{scm/font.scm}.
7243 @subsection Line breaking
7246 @cindex breaking lines
7248 Line breaks are normally computed automatically. They are chosen such
7249 that lines look neither cramped nor loose, and that consecutive lines
7250 have similar density.
7252 Occasionally you might want to override the automatic breaks; you can
7253 do this by specifying @code{\break}. This will force a line break at
7254 this point. Line breaks can only occur at places where there are bar
7255 lines. If you want to have a line break where there is no bar line,
7256 you can force an invisible bar line by entering @code{\bar
7257 ""}. Similarly, @code{\noBreak} forbids a line break at a
7261 @cindex regular line breaks
7262 @cindex four bar music.
7264 If you want linebreaks at regular intervals, you can use the following:
7266 < \repeat unfold 7 @{ s1 * 4 \break @}
7267 @emph{the real music}
7270 This makes the following 28 measures (assuming 4/4 time) be broken every
7275 @internalsref{BreakEvent}
7279 @subsection Page layout
7282 @cindex breaking pages
7284 @cindex @code{indent}
7285 @cindex @code{linewidth}
7287 The most basic settings influencing the spacing are @code{indent} and
7288 @code{linewidth}. They are set in the @code{\paper} block. They
7289 control the indentation of the first line of music, and the lengths of
7292 If @code{raggedright} is set to true in the @code{\paper}
7293 block, then the lines are justified at their natural length. This
7294 useful for short fragments, and for checking how tight the natural
7298 @cindex vertical spacing
7300 The page layout process happens outside the LilyPond formatting
7301 engine: variables controlling page layout are passed to the output,
7302 and are further interpreted by @code{ly2dvi}. @code{ly2dvi} responds
7303 to the following variables in the @code{\paper} block. The variable
7304 @code{textheight} sets the total height of the music on each page.
7305 The spacing between systems is controlled with @code{interscoreline},
7306 its default is 16pt. The distance between the score lines will
7307 stretch in order to fill the full page @code{interscorelinefill} is
7308 set to a positive number. In that case @code{interscoreline}
7309 specifies the minimum spacing.
7311 @cindex @code{textheight}
7312 @cindex @code{interscoreline}
7313 @cindex @code{interscorelinefill}
7315 If the variable @code{lastpagefill} is defined,
7316 @c fixme: this should only be done if lastpagefill == #t
7317 systems are evenly distributed vertically on the last page. This
7318 might produce ugly results in case there are not enough systems on the
7319 last page. The @command{lilypond-book} command ignores
7320 @code{lastpagefill}. See @ref{lilypond-book manual} for more
7323 @cindex @code{lastpagefill}
7325 Page breaks are normally computed by @TeX{}, so they are not under
7326 direct control of LilyPond. However, you can insert a commands into
7327 the @file{.tex} output to instruct @TeX{} where to break pages. This
7328 is done by setting the @code{between-systems-strings} on the
7329 @internalsref{NonMusicalPaperColumn} where the system is broken.
7330 An example is shown in @inputfileref{input/regression,between-systems.ly}.
7334 @cindex @code{papersize}
7336 To change the paper size, you must first set the
7337 @code{papersize} paper variable variable. Set it to
7338 the strings @code{a4}, @code{letter}, or @code{legal}. After this
7339 specification, you must set the font as described above. If you want
7340 the default font, then use the 20 point font.
7343 \paper@{ papersize = "a4" @}
7344 \include "paper16.ly"
7347 The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
7348 will set the paper variables @code{hsize} and @code{vsize} (used by
7349 Lilypond and @code{ly2dvi})
7354 @ref{Invoking ly2dvi},
7355 @inputfileref{input/regression,between-systems.ly},
7356 @internalsref{NonMusicalPaperColumn}.
7360 There is no concept of page breaking, which makes it difficult to
7361 choose sensible page breaks in multi-page pieces.
7370 Entered music can also be converted to MIDI output. The performance
7371 is good enough for proof-hearing the music for errors.
7373 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
7374 crescendi and decrescendi translate into MIDI volume levels. Dynamic
7375 marks translate to a fixed fraction of the available MIDI volume
7376 range, crescendi and decrescendi make the volume vary linearly between
7377 their two extremities. The fractions be adjusted by
7378 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
7379 For each type of MIDI instrument, a volume range can be defined. This
7380 gives you basic equalizer control, which can enhance the quality of
7381 the MIDI output remarkably. The equalizer can be controlled by
7382 setting @code{instrumentEqualizer}.
7386 Many musically interesting effects, such as swing, articulation,
7387 slurring, etc., are not translated to MIDI.
7392 * MIDI instrument names::
7397 @subsection MIDI block
7401 The MIDI block is analogous to the paper block, but it is somewhat
7402 simpler. The @code{\midi} block can contain:
7406 @item a @code{\tempo} definition
7407 @item context definitions
7410 Assignments in the @code{\midi} block are not allowed.
7414 @cindex context definition
7416 Context definitions follow precisely the same syntax as within the
7417 \paper block. Translation modules for sound are called performers.
7418 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
7421 @node MIDI instrument names
7422 @subsection MIDI instrument names
7424 @cindex instrument names
7425 @cindex @code{Staff.midiInstrument}
7426 @cindex @code{Staff.instrument}
7428 The MIDI instrument name is set by the @code{Staff.midiInstrument}
7429 property or, if that property is not set, the @code{Staff.instrument}
7430 property. The instrument name should be chosen from the list in
7431 @ref{MIDI instruments}.
7435 If the selected string does not exactly match, then LilyPond uses the
7436 default (Grand Piano). It is not possible to select an instrument by