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
15 * Easier music entry::
22 * Fingering instructions::
31 * Contemporary notation::
37 @c FIXME: Note entry vs Music entry at top level menu is confusing.
43 This chapter describes all the different types of notation supported
44 by LilyPond. It is intended as a reference for users that are already
45 somewhat familiar with using LilyPond.
51 * Chromatic alterations::
59 * Easy Notation note heads ::
67 A note is printed by specifying its pitch and then its duration:
68 @footnote{Notes constitute the most basic elements of LilyPond input,
69 but they do not form valid input on their own without a @code{\score}
70 block. However, for the sake of brevity and simplicity we will
71 generally omit @code{\score} blocks and @code{\paper} declarations in
74 @lilypond[fragment,verbatim]
83 @cindex Note specification
85 @cindex entering notes
87 The most common syntax for pitch entry is used in @code{\chords} and
88 @code{\notes} mode. In Note and Chord mode, pitches may be designated
89 by names. The notes are specified by the letters @code{a} through
90 @code{g}, while the octave is formed with notes ranging from @code{c}
91 to @code{b}. The pitch @code{c} is an octave below middle C and the
92 letters span the octave above that C:
94 @lilypond[fragment,verbatim]
96 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
99 @cindex note names, Dutch
101 A sharp is formed by adding @code{-is} to the end of a pitch name and
102 a flat is formed by adding @code{-es}. Double sharps and double flats
103 are obtained by adding @code{-isis} or @code{-eses}. These
104 names are the Dutch note names. In Dutch, @code{aes} is contracted to
105 @code{as} in Dutch, but both forms are accepted. Similarly, both
106 @code{es} and @code{ees} are accepted.
108 There are predefined sets of note names for various other languages.
109 To use them, include the language specific init file. For
110 example: @code{\include "english.ly"}. The available language files
111 and the note names they define are:
116 Note Names sharp flat
117 nederlands.ly c d e f g a bes b -is -es
118 english.ly c d e f g a bf b -s/-sharp -f/-flat
119 deutsch.ly c d e f g a b h -is -es
120 norsk.ly c d e f g a b h -iss/-is -ess/-es
121 svenska.ly c d e f g a b h -iss -ess
122 italiano.ly do re mi fa sol la sib si -d -b
123 catalan.ly do re mi fa sol la sib si -d/-s -b
124 espanol.ly do re mi fa sol la sib si -s -b
133 The optional octave specification takes the form of a series of
134 single quote (`@code{'}') characters or a series of comma
135 (`@code{,}') characters. Each @code{'} raises the pitch by one
136 octave; each @code{,} lowers the pitch by an octave:
138 @lilypond[fragment,verbatim,center]
139 c' c'' es' g' as' gisis' ais'
143 There is also a verbose syntax for pitch specification:
146 @cindex @code{\pitch}
148 \pitch @var{scmpitch}
152 where @var{scmpitch} is a Scheme object of the @code{Pitch} type.
156 Notes can be hidden and unhidden with the following commands:
158 @cindex @code{\hideNotes}
160 @cindex @code{\unHideNotes}
167 @internalsref{NoteEvent}, and @internalsref{NoteHead}.
169 @node Chromatic alterations
170 @subsection Chromatic alterations
172 Normally accidentals are printed automatically, but you may also
173 print them manually. A reminder accidental
174 @cindex reminder accidental
176 can be forced by adding an exclamation mark @code{!}
177 after the pitch. A cautionary accidental
178 @cindex cautionary accidental
179 @cindex parenthesized accidental
180 (an accidental within parentheses) can be obtained by adding the
181 question mark `@code{?}' after the pitch:
183 @lilypond[fragment,verbatim]
184 cis' cis' cis'! cis'?
188 The automatic production of accidentals can be tuned in many
189 ways. For more information, refer to @ref{Accidentals}.
194 A chord is formed by a enclosing a set of pitches in @code{<<} and
195 @code{>>}. A chord may be followed by a duration, and a set of
196 articulations, just like simple notes.
206 Rests are entered like notes, with the note name @code{r}:
208 @lilypond[singleline,verbatim]
212 Whole bar rests, centered in middle of the bar,
213 must be done with multi measure rests. They are discussed in
214 @ref{Multi measure rests}.
217 A rest's vertical position may be explicitly specified by entering a
218 note with the @code{\rest} keyword appended. This makes manual
219 formatting in polyphonic music easier. Rest collision testing will
220 leave these rests alone:
222 @lilypond[singleline,verbatim]
228 @internalsref{RestEvent}, and @internalsref{Rest}.
235 @cindex Invisible rest
238 An invisible rest (also called a `skip') can be entered like a note
239 with note name `@code{s}' or with @code{\skip @var{duration}}:
241 @lilypond[singleline,verbatim]
245 The @code{s} syntax is only available in Note mode and Chord mode. In
246 other situations, you should use the @code{\skip} command:
248 @lilypond[singleline,verbatim]
251 { \time 4/8 \skip 2 \time 4/4 }
252 \notes\relative c'' { a2 a1 }
257 The skip command is merely an empty musical placeholder. It does not
258 produce any output, not even transparent output.
262 @internalsref{SkipEvent}.
267 @subsection Durations
271 @cindex @code{\duration}
274 In Note, Chord, and Lyrics mode, durations are designated by numbers
275 and dots: durations are entered as their reciprocal values. For example,
276 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
277 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
278 longer than a whole you must use variables:
280 @c FIXME: what is an identifier? I do not think it's been introduced yet.
281 @c and if it has, I obviously skipped that part. - Graham
285 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
287 r1 r2 r4 r8 r16 r32 r64 r64
292 \notes \relative c'' {
294 a1 a2 a4 a8 a16 a32 a64 a64
296 r1 r2 r4 r8 r16 r32 r64 r64
301 \remove "Clef_engraver"
302 \remove "Staff_symbol_engraver"
303 \remove "Time_signature_engraver"
304 \consists "Pitch_squash_engraver"
311 If the duration is omitted then it is set to the previously entered
312 duration. The default for the first note is a quarter note. The duration
313 can be followed by dots (`@code{.}') in order to obtain dotted note
317 @lilypond[fragment,verbatim,center]
318 a' b' c''8 b' a'4 a'4. b'4.. c'8.
323 You can alter the length of duration by a fraction @var{N/M}
324 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
325 will not affect the appearance of the notes or rests produced.
326 In the following example, the first three notes take up exactly two
328 @lilypond[fragment,relative 2,verbatim]
330 a4*2/3 gis4*2/3 a4*2/3
334 Durations can also be produced using the verbose syntax
335 @code{\duration @var{Scheme object}}:
336 @lilypond[verbatim,fragment]
337 c'\duration #(ly:make-duration 4 1)
344 Dots are normally moved up to avoid staff lines, except in polyphonic
345 situations. The following commands may be used to force a particular
348 @cindex @code{\dotsUp}
350 @cindex @code{\dotsDown}
352 @cindex @code{\dotsBoth}
357 @internalsref{Dots}, and @internalsref{DotColumn}.
361 In dense chords, dots can overlap.
366 Whenever a note is found, a
367 @internalsref{Stem} object is created automatically. For whole notes
368 and rests, stem objects are also created, but in those cases, the stem
373 @cindex @code{\stemUp}
375 @cindex @code{\stemDown}
377 @cindex @code{\stemBoth}
388 A tie connects two adjacent note heads of the same pitch. The tie in
389 effect extends the length of a note. Ties should not be confused with
390 slurs, which indicate articulation, or phrasing slurs, which indicate
391 musical phrasing. A tie is entered using the tilde symbol `@code{~}':
393 @lilypond[fragment,verbatim,center]
394 e' ~ e' <<c' e' g'>> ~ <<c' e' g'>>
397 When a tie is applied to a chord, all note heads whose pitches match
398 are connected. When no note heads match, no ties will be created.
400 In its meaning a tie is just a way of extending a note duration, similar
401 to the augmentation dot; in the following example there are two ways of
402 notating exactly the same concept:
404 @lilypond[fragment, singleline,quote]
405 \time 3/4 c'2. c'2 ~ c'4
407 If you need to tie a lot of notes over bars, it may be easier to use automatic
408 note splitting (See @ref{Automatic note splitting}).
413 @cindex @code{\tieUp}
415 @cindex @code{\tieDown}
417 @cindex @code{\tieBoth}
419 @cindex @code{\tieDotted}
421 @cindex @code{\tieSolid}
426 @internalsref{TieEvent}, @internalsref{NewTieEvent},
427 @internalsref{Tie}, and @ref{Automatic note splitting}.
430 ties created for a chord, see @inputfileref{input/test,tie-sparse.ly}.
434 Tieing only a subset of the note heads of a pair of chords is not
435 supported in a simple way. It can be achieved by moving the
436 tie-engraver into the @internalsref{Thread} context and turning on and
437 off ties per @internalsref{Thread}.
439 Switching staves when a tie is active, will not produce a slanted tie.
441 Formatting of ties is a difficult subject. The results are often not
451 @cindex @code{\times}
453 Tuplets are made out of a music expression by multiplying all durations
456 @cindex @code{\times}
458 \times @var{fraction} @var{musicexpr}
461 The duration of @var{musicexpr} will be multiplied by the fraction.
462 In the sheet music, the fraction's denominator will be printed over
463 the notes, optionally with a bracket. The most common tuplet is the
464 triplet in which 3 notes have the length of 2, so the notes are 2/3
465 of their written length:
467 @lilypond[fragment,verbatim,center]
468 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
471 The property @code{tupletSpannerDuration} specifies how long each
472 bracket should last. With this, you can make lots of tuplets while
473 typing @code{\times} only once, saving lots of typing. In the next
474 example, there are two triplets shown, while @code{\times} was only
477 @lilypond[fragment, relative, singleline, verbatim]
478 \property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
479 \times 2/3 { c'8 c c c c c }
482 The format of the number is determined by the property
483 @code{tupletNumberFormatFunction}. The default prints only the
484 denominator, but if it is set to the Scheme function
485 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
489 @cindex @code{tupletNumberFormatFunction}
490 @cindex tuplet formatting
495 @cindex @code{\tupletUp}
497 @cindex @code{\tupletDown}
499 @cindex @code{\tupletBoth}
504 @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
508 Nested tuplets are not formatted automatically. In this case, outer
509 tuplet brackets should be moved manually.
511 @node Easy Notation note heads
512 @subsection Easy Notation note heads
514 @cindex easy notation
517 The `easy play' note head includes a note name inside the head. It is
518 used in music aimed at beginners:
520 @lilypond[singleline,verbatim,26pt]
522 \notes { c'2 e'4 f' | g'1 }
523 \paper { \translator { \EasyNotation } }
527 The @code{EasyNotation} variable overrides a @internalsref{Score} context.
528 You probably will want to print it with magnification or a
529 large font size to make it more readable. To print with
530 magnification, you must create a DVI file (with @file{ly2dvi}) and
531 then enlarge it with something like @file{dvips -x 2000 file.dvi}.
532 See the @code{dvips} documentation for more details. To print with a
533 larger font, see @ref{Font Size}.
539 If you view the result with Xdvi, then staff lines will show through
540 the letters. Printing the PostScript file obtained with ly2dvi does
541 produce the correct result.
544 @node Easier music entry
545 @section Easier music entry
548 When entering music it is easy to introduce errors. This section deals
549 with tricks and features of the input language that help when entering
550 music, and find and correct mistakes. Some features of the input
551 language ease entering music, but also have other applications. They
552 are not described in this section.
554 It is also possible to use external programs, for example GUI
555 interfaces, or MIDI transcription programs, to enter or edit
556 music. Refer to the website for more information. Finally, there are
557 tools make debugging easier, by linking the input file and the output
558 shown on screen. See @ref{Point and click} for more information.
565 * Skipping corrected music::
566 * Automatic note splitting ::
572 @node Relative octaves
573 @subsection Relative octaves
575 @cindex relative octave specification
577 Octaves are specified by adding @code{'} and @code{,} to pitch names.
578 When you copy existing music, it is easy to accidentally put a pitch
579 in the wrong octave and hard to find such an error. The relative
580 octave mode prevents these errors: a single error puts the rest of the
581 piece off by one octave:
583 @cindex @code{\relative}
585 \relative @var{startpitch} @var{musicexpr}
588 The octave of notes that appear in @var{musicexpr} are calculated as
589 follows: If no octave changing marks are used, the basic interval
590 between this and the last note is always taken to be a fourth or less
591 (; this distance is determined without regarding alterations: a
592 @code{fisis} following a @code{ceses} will be put above the
595 The octave changing marks @code{'} and @code{,} can be added to raise
596 or lower the pitch by an extra octave. Upon entering relative mode,
597 an absolute starting pitch must be specified that will act as the
598 predecessor of the first note of @var{musicexpr}.
600 Here is the relative mode shown in action:
601 @lilypond[fragment,singleline,verbatim,center]
607 Octave changing marks are used for intervals greater than a fourth:
608 @lilypond[fragment,verbatim,center]
613 If the preceding item is a chord, the first note of the chord is used
614 to determine the first note of the next chord:
616 @lilypond[fragment,verbatim,center]
623 @cindex @code{\notes}
625 The pitch after the @code{\relative} contains a note name. To parse
626 the pitch as a note name, you have to be in note mode, so there must
627 be a surrounding @code{\notes} keyword (which is not
630 The relative conversion will not affect @code{\transpose},
631 @code{\chords} or @code{\relative} sections in its argument. If you
632 want to use relative within transposed music, you must place an
633 additional @code{\relative} inside the @code{\transpose}.
636 @subsection Octave check
639 Octave checks make octave errors easier to correct.
645 This checks that @var{pitch} (without octave) yields @var{pitch} (with
646 octave) in \relative mode. If not, a warning is printed, and the
647 octave is corrected, for example, the first check is passed
648 successfully. The second check fails with an error message. The
649 octave is adjusted so the following notes are in the correct octave
660 The octave of a note following an octave check is determined with
661 respect to the note preceding it. In the next fragment, the last note
662 is a @code{a'}, above central C. Hence, the @code{\octave} check may
663 be deleted without changing the meaning of the piece.
665 @lilypond[verbatim,fragment]
676 @subsection Bar check
680 @cindex @code{barCheckSynchronize}
683 Bar checks help detect errors in the durations. A bar check is
684 entered using the bar symbol, `@code{|}'. Whenever it is encountered
685 during interpretation, it should fall on a measure boundary. If it
686 does not, a warning is printed. Depending on the value of
687 @code{barCheckSynchronize}, the beginning of the measure will be
690 In the next example, the second bar check will signal an error:
692 \time 3/4 c2 e4 | g2 |
697 @cindex skipTypesetting
699 Failed bar checks are caused by entering incorrect
700 durations. Incorrect durations often completely garble up the score,
701 especially if it is polyphonic, so you should start correcting the
702 score by scanning for failed bar checks and incorrect durations. To
703 speed up this process, you can use @code{skipTypesetting}, described
706 @node Skipping corrected music
707 @subsection Skipping corrected music
709 The property @code{Score.skipTypesetting} can be used to switch on and
710 off typesetting completely during the interpretation phase. When
711 typesetting is switched off, the music is processed much more quickly.
712 This can be used to skip over the parts of a score that have already
713 been checked for errors:
715 @lilypond[fragment,singleline,verbatim]
717 \property Score.skipTypesetting = ##t
719 \property Score.skipTypesetting = ##f
723 @node Automatic note splitting
724 @subsection Automatic note splitting
726 Long notes can be converted automatically to tied notes. This is done
727 by replacing the @internalsref{Note_heads_engraver} by the
728 @internalsref{Completion_heads_engraver}:
731 \paper @{ \translator @{
733 \remove "Note_heads_engraver"
734 \consists "Completion_heads_engraver"
738 which will make long notes tied in the following example:
741 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
748 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
750 \paper { \translator {
752 \remove "Note_heads_engraver"
753 \consists "Completion_heads_engraver"
758 This engraver splits all running notes at the bar line, and inserts
759 ties. One of its uses is to debug complex scores: if the measures are
760 not entirely filled, then the ties exactly show how much each measure
765 Not all durations (especially those containing tuplets) can be
766 represented exactly; the engraver will not insert tuplets.
772 @section Staff notation
774 This section describes music notation that occurs on staff level,
775 such as keys, clefs and time signatures.
777 @cindex Staff notation
791 @subsection Staff symbol
793 @cindex adjusting staff symbol
794 @cindex StaffSymbol, using \property
795 @cindex staff lines, setting number of
797 Notes, dynamic signs, etc. are grouped
798 with a set of horizontal lines, into a staff (plural `staves'). In our
799 system, these lines are drawn using a separate layout object called
802 This object is created whenever a @internalsref{Staff} context is
803 created. The appearance of the staff symbol cannot be changed by
804 using @code{\override} or @code{\set}. At the moment that
805 @code{\property Staff} is interpreted, a @internalsref{Staff} context
806 is made, and the @internalsref{StaffSymbol} is created before any
807 @code{\override} is effective. Properties can be changed in a
808 @code{\translator} definition, or by using @code{\outputproperty}.
812 If a staff is ended halfway a piece, the staff symbol may not end
813 exactly on the barline.
817 @subsection Key signature
818 @cindex Key signature
822 The key signature indicates the scale in which a piece is played. It
823 is denoted by a set of alterations (flats or sharps) at the start of
828 Setting or changing the key signature is done with the @code{\key}
831 @code{\key} @var{pitch} @var{type}
834 @cindex @code{\minor}
835 @cindex @code{\major}
836 @cindex @code{\minor}
837 @cindex @code{\ionian}
838 @cindex @code{\locrian}
839 @cindex @code{\aeolian}
840 @cindex @code{\mixolydian}
841 @cindex @code{\lydian}
842 @cindex @code{\phrygian}
843 @cindex @code{\dorian}
845 Here, @var{type} should be @code{\major} or @code{\minor} to get
846 @var{pitch}-major or @var{pitch}-minor, respectively.
847 The standard mode names @code{\ionian},
848 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
849 @code{\phrygian}, and @code{\dorian} are also defined.
851 This command sets the context property
852 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
853 can be specified by setting this property directly.
857 The ordering of a key cancellation is wrong when it is combined with
858 repeat bar lines. The cancellation is also printed after a line break.
862 @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
864 @cindex @code{keySignature}
871 The clef indicates which lines of the staff correspond to which
876 The clef can be set or changed with the @code{\clef} command:
877 @lilypond[fragment,verbatim]
878 \key f\major c''2 \clef alto g'2
881 Supported clef-names include:
882 @c Moved standard clefs to the top /MB
886 @item treble, violin, G, G2
899 G clef on 1st line, so-called French violin clef
904 @cindex mezzosoprano clef
907 @cindex baritone clef
910 @cindex varbaritone clef
919 By adding @code{_8} or @code{^8} to the clef name, the clef is
920 transposed one octave down or up, respectively. Argument @var{clefname}
921 must be enclosed in quotes when it contains underscores or digits. For
925 @cindex choral tenor clef
926 @lilypond[verbatim,fragment,relative]
930 This command is equivalent to setting @code{clefGlyph},
931 @code{clefPosition} (which controls the Y position of the clef),
932 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
933 when any of these properties are changed.
937 The object for this symbol is @internalsref{Clef}.
941 @node Ottava brackets
942 @subsection Ottava brackets
944 ``Ottava'' brackets introduce an extra transposition of an octave for
945 the staff. They are created by invoking the function
946 @code{set-octavation}:
952 @lilypond[verbatim,fragment]
961 Internally the @code{set-octavation} function sets the properties
962 @code{ottavation} (eg. to @code{"8va"}) and @code{centralCPosition}.
966 @internalsref{OttavaSpanner}.
970 @code{set-octavation} will get confused when clef changes happen
971 during an octavation bracket.
974 @subsection Time signature
975 @cindex Time signature
979 Time signature indicates the metrum of a piece: a regular pattern of
980 strong and weak beats. It is denoted by a fraction at the start of the
985 The time signature is set or changed by the @code{\time}
987 @lilypond[fragment,verbatim]
988 \time 2/4 c'2 \time 3/4 c'2.
991 The symbol that is printed can be customized with the @code{style}
992 property. Setting it to @code{#'()} uses fraction style for 4/4 and
993 2/2 time. There are many more options for its layout. See
994 @inputfileref{input/test,time.ly} for more examples.
997 This command sets the property @code{timeSignatureFraction},
998 @code{beatLength} and @code{measureLength} in the @code{Timing}
999 context, which is normally aliased to @internalsref{Score}. The
1000 property @code{measureLength} determines where bar lines should be
1001 inserted, and how automatic beams should be generated. Changing the
1002 value of @code{timeSignatureFraction} also causes the symbol to be
1005 More options are available through the Scheme function
1006 @code{set-time-signature}. In combination with the
1007 @internalsref{Measure_grouping_engraver}, it will create
1008 @internalsref{MeasureGrouping} signs. Such signs ease reading
1009 rhythmically complex modern music. In the following example, the 9/8
1010 measure is subdivided in 2, 2, 2 and 3. This is passed to
1011 @code{set-time-signature} as the third argument @code{(2 2 2 3)}:
1014 \score { \notes \relative c'' {
1015 #(set-time-signature 9 8 '(2 2 2 3))
1016 g8[ g] d[ d] g[ g] a8[( bes g]) |
1017 #(set-time-signature 5 8 '(3 2))
1022 \translator { \StaffContext
1023 \consists "Measure_grouping_engraver"
1029 @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1034 Automatic beaming does not use measure grouping specified with
1035 @code{set-time-signature}.
1037 @node Partial measures
1038 @subsection Partial measures
1041 @cindex partial measure
1042 @cindex measure, partial
1043 @cindex shorten measures
1044 @cindex @code{\partial}
1046 Partial measures, for example in upsteps, are entered using the
1047 @code{\partial} command:
1048 @lilypond[fragment,verbatim]
1049 \partial 16*5 c'16 c4 | a'2. ~ a'8. a'16 | g'1
1052 The syntax for this command is
1054 \partial @var{duration}
1056 This is internally translated into
1058 \property Timing.measurePosition = -@var{length of duration}
1061 The property @code{measurePosition} contains a rational number
1062 indicating how much of the measure has passed at this point.
1064 @node Unmetered music
1065 @subsection Unmetered music
1067 Bar lines and bar numbers are calculated automatically. For unmetered
1068 music (e.g. cadenzas), this is not desirable. By setting
1069 @code{Score.timing} to false, this automatic timing can be switched
1075 @cindex @code{\cadenzaOn}
1077 @cindex @code{\cadenzaOff}
1081 @subsection Bar lines
1085 @cindex measure lines
1089 Bar lines delimit measures, but are also used to indicate repeats.
1090 Normally, they are inserted automatically. Line breaks may only
1096 of barlines can be forced with the @code{\bar} command:
1097 @lilypond[relative=1,fragment,verbatim]
1101 The following bar types are available:
1102 @lilypond[fragment, relative, singleline, verbatim]
1114 In scores with many staves, a @code{\bar} command in one staff is
1115 automatically applied to all staves. The resulting bar lines are
1116 connected between different staves of a @internalsref{StaffGroup}:
1118 @lilypond[fragment, verbatim]
1119 < \context StaffGroup <
1123 \new Staff { \clef bass c4 g e g } >
1124 \new Staff { \clef bass c2 c2 } >
1128 The command @code{\bar @var{bartype}} is a short cut for doing
1129 @code{\property Score.whichBar = @var{bartype}} Whenever
1130 @code{whichBar} is set to a string, a bar line of that type is
1131 created. At the start of a measure it is set to
1132 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1133 to override default measure bars.
1135 Property @code{whichBar} can also be set directly, using @code{\property}
1136 or @code{\bar}. These settings take precedence over the automatic
1137 @code{whichBar} settings.
1140 @cindex repeatCommands
1141 @cindex defaultBarType
1143 You are encouraged to use @code{\repeat} for repetitions. See
1153 The bar line objects that are created at @internalsref{Staff} level
1154 are called @internalsref{BarLine}, the bar lines that span staves are
1155 @internalsref{SpanBar}s.
1157 @cindex bar lines at start of system
1158 @cindex start of system
1160 The barlines at the start of each system are
1161 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1162 @internalsref{SystemStartBracket}. They are spanner objects and
1163 typically must be tuned from a @code{\translator} block.
1170 The easiest way to enter fragments with more than one voice on a staff
1171 is to split chords using the separator @code{\\}. You can use it for
1172 small, short-lived voices or for single chords:
1174 @lilypond[verbatim,fragment]
1175 \context Staff \relative c'' {
1176 c4 < { f d e } \\ { b c2 } > c4 < g' \\ b, \\ f' \\ d >
1180 The separator causes @internalsref{Voice} contexts to be
1182 bear the names @code{"1"}, @code{"2"}, etc. In each of these
1183 contexts, vertical direction of slurs, stems, etc. is set
1186 This can also be done by instantiating @internalsref{Voice} contexts
1187 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1188 a stem directions and horizontal shift for each part:
1191 @lilypond[singleline, verbatim]
1193 \context Staff < \new Voice { \voiceOne cis2 b }
1194 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1195 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >
1198 Normally, note heads with a different number of dots are not merged, but
1199 when the object property @code{merge-differently-dotted} is set in
1200 the @internalsref{NoteCollision} object, they are merged:
1201 @lilypond[verbatim,fragment,singleline]
1202 \relative c'' \context Voice < {
1204 \property Staff.NoteCollision \override
1205 #'merge-differently-dotted = ##t
1207 } \\ { g8.[ f16] g8.[ f16] }
1211 Similarly, you can merge half note heads with eighth notes, by setting
1212 @code{merge-differently-headed}:
1213 @lilypond[fragment, relative=2,verbatim]
1216 \property Staff.NoteCollision
1217 \override #'merge-differently-headed = ##t
1218 c8 c4. } \\ { c2 c2 } >
1221 LilyPond also vertically shifts rests that are opposite of a stem:
1224 @lilypond[singleline,fragment,verbatim]
1225 \context Voice < c''4 \\ r4 >
1233 @cindex @code{\oneVoice}
1235 @cindex @code{\voiceOne}
1237 @cindex @code{\voiceTwo}
1239 @cindex @code{\voiceThree}
1241 @cindex @code{\voiceFour}
1244 The following commands specify in what chords of the current voice
1245 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1246 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1249 @cindex @code{\shiftOn}
1251 @cindex @code{\shiftOnn}
1253 @cindex @code{\shiftOnnn}
1255 @cindex @code{\shiftOff}
1262 The objects responsible for resolving collisions are
1263 @internalsref{NoteCollision} and @internalsref{RestCollision}. See
1264 also example files @inputfileref{input/regression,collision-dots.ly},
1265 @inputfileref{input/regression,collision-head-chords.ly},
1266 @inputfileref{input/regression,collision-heads.ly},
1267 @inputfileref{input/regression,collision-mesh.ly}, and
1268 @inputfileref{input/regression,collisions.ly}.
1273 Resolving collisions is a intricate subject, and only a few situations
1274 are handled. When LilyPond cannot cope, the @code{force-hshift}
1275 property of the @internalsref{NoteColumn} object and pitched rests can
1276 be used to override typesetting decisions.
1278 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1279 note, and a downstem half note, the 8th note gets the wrong offset.
1284 Beams are used to group short notes into chunks that are aligned with
1285 the metrum. They are inserted automatically in most cases:
1287 @lilypond[fragment,verbatim, relative=2]
1288 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1291 When these automatic decisions are not good enough, beaming can be
1292 entered explicitly. It is also possible to define beaming patterns
1293 that differ from the defaults.
1297 @internalsref{Beam}.
1300 @cindex Automatic beams
1301 @subsection Manual beams
1302 @cindex beams, manual
1306 In some cases it may be necessary to override the automatic beaming
1307 algorithm. For example, the auto beamer will not put beams over rests
1308 or bar lines. Such beams are specified by manually: the begin and end
1309 point are marked with @code{[} and @code{]}:
1311 @lilypond[fragment,relative,verbatim]
1313 r4 r8[ g' a r8] r8 g[ | a] r8
1317 @cindex @code{stemLeftBeamCount}
1319 Normally, beaming patterns within a beam are determined automatically.
1320 When this mechanism fouls up, the properties
1321 @code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
1322 be used to control the beam subdivision on a stem. If either property
1323 is set, its value will be used only once, and then it is erased.
1325 @lilypond[fragment,relative,verbatim]
1328 f8[ r16 \property Voice.stemLeftBeamCount = #1 f g a]
1331 @cindex @code{stemRightBeamCount}
1334 The property @code{subdivideBeams} can be set in order to subdivide
1335 all 16th or shorter beams at beat positions, as defined by the
1336 @code{beatLength} property . This accomplishes the same effect as
1337 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1338 but it take less typing:
1341 @lilypond[relative=1,verbatim,noindent]
1343 \property Voice.subdivideBeams = ##t
1345 \property Score.beatLength = #(ly:make-moment 1 8)
1348 @cindex subdivideBeams
1350 Kneed beams are inserted automatically, when a large gap is detected
1351 between the note heads. This behavior can be tuned through the object
1352 property @code{auto-knee-gap}.
1354 Normally, line breaks are forbidden when beams cross bar lines. This
1355 behavior can be changed by setting @code{allowBeamBreak}.
1357 @cindex @code{allowBeamBreak}
1358 @cindex beams and line breaks
1360 @cindex beams, kneed
1362 @cindex auto-knee-gap
1368 @cindex Frenched staves
1370 Automatically kneed beams cannot be used together with hidden staves.
1375 * Setting automatic beam behavior ::
1379 @no de Beam typography
1380 @sub section Beam typography
1382 One of the strong points of LilyPond is how beams are formatted. Beams
1383 are quantized, meaning that the left and right endpoints beams start
1384 exactly on staff lines. Without quantization, small wedges of white
1385 space appear between the beam and staff line, and this looks untidy.
1387 Beams are also slope-damped: melodies that go up or down should also
1388 have beams that go up or down, but the slope of the beams should be
1389 less than the slope of the notes themselves.
1391 Some beams should be horizontal. These are so-called concave beams.
1393 [TODO: some pictures.]
1397 @node Setting automatic beam behavior
1398 @subsection Setting automatic beam behavior
1400 @cindex @code{autoBeamSettings}
1401 @cindex @code{(end * * * *)}
1402 @cindex @code{(begin * * * *)}
1403 @cindex automatic beams, tuning
1404 @cindex tuning automatic beaming
1406 @c [TODO: use \applycontext]
1408 In normal time signatures, automatic beams can start on any note but can
1409 only end in a few positions within the measure: beams can end on a beat,
1410 or at durations specified by the properties in
1411 @code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
1412 are defined in @file{scm/auto-beam.scm}.
1414 The value of @code{autoBeamSettings} is changed using
1415 @code{\override} and restored with @code{\revert}:
1417 \property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
1418 \property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
1420 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
1421 whether the rule applies to begin or end-points. The quantity
1422 @var{P}/@var{Q} refers to the length of the beamed notes (and `@code{*
1423 *}' designates notes of any length), @var{N}/@var{M} refers to a time
1424 signature (wildcards, `@code{* *}' may be entered to designate all time
1427 For example, if automatic beams should end on every quarter note, use
1430 \property Voice.autoBeamSettings \override
1431 #'(end * * * *) = #(ly:make-moment 1 4)
1433 Since the duration of a quarter note is 1/4 of a whole note, it is
1434 entered as @code{(ly:make-moment 1 4)}.
1436 The same syntax can be used to specify beam starting points. In this
1437 example, automatic beams can only end on a dotted quarter note:
1439 \property Voice.autoBeamSettings \override
1440 #'(end * * * *) = #(ly:make-moment 3 8)
1442 In 4/4 time signature, this means that automatic beams could end only on
1443 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1444 3/8 has passed within the measure).
1446 Rules can also be restricted to specific time signatures. A rule that
1447 should only be applied in @var{N}/@var{M} time signature is formed by
1448 replacing the second asterisks by @var{N} and @var{M}. For example, a
1449 rule for 6/8 time exclusively looks like
1451 \property Voice.autoBeamSettings \override
1452 #'(begin * * 6 8) = ...
1455 If a rule should be to applied only to certain types of beams, use the
1456 first pair of asterisks. Beams are classified according to the
1457 shortest note they contain. For a beam ending rule that only applies
1458 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1461 If a score ends while an automatic beam has not been ended and is still
1462 accepting notes, this last beam will not be typeset at all.
1464 @cindex automatic beam generation
1466 @cindex @code{Voice.autoBeaming}
1469 For melodies that have lyrics, you may want to switch off
1470 automatic beaming. This is done by setting @code{Voice.autoBeaming} to
1475 @cindex @code{\autoBeamOff}
1476 @code{\autoBeamOff},
1477 @cindex @code{\autoBeamOn}
1483 The rules for ending a beam depend on the shortest note in a beam.
1484 So, while it is possible to have different ending rules for eight
1485 beams and sixteenth beams, a beam that contains both eight and
1486 sixteenth notes will use the rules for the sixteenth beam.
1488 In the example below, the autobeamer makes eight beams and sixteenth
1489 end at 3 eights; the third beam can only be corrected by specifying
1492 @lilypond[singleline,fragment,relative,noverbatim,quote]
1493 \property Voice.autoBeamSettings
1494 \override #'(end * * * *) = #(ly:make-moment 3 8)
1495 % rather show case where it goes wrong
1496 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1497 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1499 It is not possible to specify beaming parameters that act differently in
1500 different parts of a measure. This means that it is not possible to use
1501 automatic beaming in irregular meters such as @code{5/8}.
1504 @section Accidentals
1507 This section describes how to change the way that accidentals are
1508 inserted automatically before the running notes.
1512 * Using the predefined accidental variables::
1513 * Customized accidental rules::
1516 @node Using the predefined accidental variables
1517 @subsection Using the predefined accidental variables
1519 The constructs for describing the accidental typesetting rules are
1520 quite hairy, so non-experts should stick to the variables
1521 defined in @file{ly/property-init.ly}.
1522 @cindex @file{property-init.ly}
1524 The variables set properties in the ``@code{Current}'' context (see
1525 @ref{Context properties}). This means that the variables should
1526 normally be added right after the creation of the context in which the
1527 accidental typesetting described by the variable is to take
1528 effect. For example, if you want to use piano-accidentals in a piano
1529 staff then issue @code{\pianoAccidentals} first thing after the
1530 creation of the piano staff:
1533 \notes \relative c'' <
1534 \new Staff @{ cis4 d e2 @}
1535 \context GrandStaff <
1537 \new Staff @{ cis4 d e2 @}
1538 \new Staff @{ es2 c @}
1540 \new Staff @{ es2 c @}
1544 @lilypond[singleline]
1546 \notes \relative c'' <
1547 \new Staff { cis4 d e2 }
1548 \context GrandStaff <
1550 \new Staff { cis4 d e2 }
1551 \new Staff { es2 c }
1553 \new Staff { es2 c }
1558 minimumVerticalExtent = #'(-4.0 . 4.0)
1566 @item \defaultAccidentals
1567 @cindex @code{\defaultAccidentals}
1568 This is the default typesetting behaviour. It should correspond
1569 to 18th century common practice: Accidentals are
1570 remembered to the end of the measure in which they occur and
1571 only on their own octave.
1573 @item \voiceAccidentals
1574 @cindex @code{\voiceAccidentals}
1576 The normal behaviour is to
1577 remember the accidentals on Staff-level. This variable, however,
1578 typesets accidentals individually for each voice. Apart from that the
1579 rule is similar to @code{\defaultAccidentals}.
1581 This leads to some weird and often unwanted results
1582 because accidentals from one voice do not get cancelled in other
1584 @lilypond[singleline,relative,fragment,verbatim,quote]
1592 Hence you should only use @code{\voiceAccidentals} if the voices
1593 are to be read solely by individual musicians. If the staff is to be
1594 used by one musician (e.g. a conductor) then you use
1595 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1598 @item \modernAccidentals
1599 @cindex @code{\modernAccidentals}
1600 This rule corresponds to the common practice in the 20th
1602 The rule is more complex than @code{\defaultAccidentals}.
1603 You get all the same accidentals, but temporary
1604 accidentals also get cancelled in other octaves. Furthermore,
1605 in the same octave, they also get cancelled in the following measure:
1606 @lilypond[singleline,fragment,verbatim]
1608 cis' c'' cis'2 | c'' c'
1611 @item \modernCautionaries
1612 @cindex @code{\modernCautionaries}
1613 This rule is similar to @code{\modernAccidentals}, but the
1614 ``extra'' accidentals (the ones not typeset by
1615 @code{\defaultAccidentals}) are typeset as cautionary accidentals.
1616 They are printed in reduced size or with parentheses:
1617 @lilypond[singleline,fragment,verbatim]
1619 cis' c'' cis'2 | c'' c'
1622 @cindex @code{\modernVoiceAccidentals}
1623 @item \modernVoiceAccidentals
1624 is used for multivoice accidentals to be read both by musicians
1625 playing one voice and musicians playing all voices. Accidentals are
1626 typeset for each voice, but they @emph{are} cancelled across voices in
1627 the same @internalsref{Staff}.
1629 @cindex @code{\modernVoiceCautionaries}
1630 @item \modernVoiceCautionaries
1631 is the same as @code{\modernVoiceAccidentals}, but with the extra
1632 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1633 as cautionaries. Even though all accidentals typeset by
1634 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1635 some of them are typeset as cautionaries.
1637 @item \pianoAccidentals
1638 @cindex @code{\pianoAccidentals}
1639 20th century practice for piano notation. Very similar to
1640 @code{\modernAccidentals} but accidentals also get cancelled
1641 across the staves in the same @internalsref{GrandStaff} or
1642 @internalsref{PianoStaff}.
1644 @item \pianoCautionaries
1645 @cindex @code{\pianoCautionaries}
1646 As @code{\pianoAccidentals} but with the extra accidentals
1647 typeset as cautionaries.
1650 @cindex @code{\noResetKey}
1651 Same as @code{\defaultAccidentals} but with accidentals lasting
1652 ``forever'' and not only until the next measure:
1653 @lilypond[singleline,fragment,verbatim,relative]
1658 @item \forgetAccidentals
1659 @cindex @code{\forgetAccidentals}
1660 This is sort of the opposite of @code{\noResetKey}: Accidentals
1661 are not remembered at all---and hence all accidentals are
1662 typeset relative to the key signature, regardless of what was
1663 before in the music:
1664 @lilypond[singleline,fragment,verbatim,relative]
1666 \key d\major c4 c cis cis d d dis dis
1670 @node Customized accidental rules
1671 @subsection Customized accidental rules
1673 This section must be considered gurus-only, and hence it must be
1674 sufficient with a short description of the system and a reference to
1675 the internal documentation.
1677 The algorithm tries several different rules, and uses the rule
1678 that gives the highest number of accidentals. Each rule consists of
1681 In which context is the rule applied. For example, if
1682 @var{context} is @internalsref{Score} then all staves share
1683 accidentals, and if @var{context} is @internalsref{Staff} then all
1684 voices in the same staff share accidentals, but staves do not.
1686 Whether the accidental changes all octaves or only the current
1689 Over how many barlines the accidental lasts.
1690 If @var{lazyness} is @code{-1} then the accidental is forget
1691 immediately, and if @var{lazyness} is @code{#t} then the accidental
1694 @c [TODO: should use +infinity for this case?]
1700 @cindex @code{\defaultAccidentals}
1701 @code{\defaultAccidentals},
1702 @cindex @code{\voiceAccidentals}
1703 @code{\voiceAccidentals},
1704 @cindex @code{\modernAccidentals}
1705 @code{\modernAccidentals},
1706 @cindex @code{\modernCautionaries}
1707 @code{\modernCautionaries},
1708 @cindex @code{\modernVoiceAccidentals}
1709 @code{\modernVoiceAccidentals},
1710 @cindex @code{\modernVoiceCautionaries}
1711 @code{\modernVoiceCautionaries},
1712 @cindex @code{\pianoAccidentals}
1713 @code{\pianoAccidentals},
1714 @cindex @code{\pianoCautionaries}
1715 @code{\pianoCautionaries},
1716 @cindex @code{\noResetKey}
1718 @cindex @code{\forgetAccidentals}
1719 @code{\forgetAccidentals}.
1723 @internalsref{Accidental_engraver}, @internalsref{Accidental}, and
1724 @internalsref{AccidentalPlacement}.
1729 Currently the simultaneous notes are considered to be entered in
1730 sequential mode. This means that in a chord the accidentals are
1731 typeset as if the notes in the chord happened once at a time - in the
1732 order in which they appear in the input file.
1734 This is only a problem when there are simultaneous notes whose
1735 accidentals depend on each other. The problem only occurs when using
1736 non-default accidentals. In the default scheme, accidentals only
1737 depend on other accidentals with the same pitch on the same staff, so
1738 no conflicts possible.
1740 This example shows two examples of the same music giving different
1741 accidentals depending on the order in which the notes occur in the
1744 @lilypond[singleline,fragment,verbatim]
1745 \property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1746 cis'4 <<c'' c'>> r2 | cis'4 <<c' c''>> r2
1747 | <<cis' c''>> r | <<c'' cis'>> r |
1750 This problem can be solved by manually inserting @code{!} and @code{?}
1751 for the problematic notes.
1753 @node Expressive marks
1754 @section Expressive marks
1762 * Analysis brackets::
1769 A slur indicates that notes are to be played bound or @emph{legato}.
1773 They are entered using parentheses:
1774 @lilypond[fragment,verbatim,center]
1775 f'( g')( a') a'8[ b'(] a'4 g'2 f'4)
1776 <<c' e'>>2( <<b d'>>2)
1780 @c TODO: should explain that ^( and _( set directions
1781 @c should set attachments with ^ and _ ?
1783 Slurs avoid crossing stems, and are generally attached to note heads.
1784 However, in some situations with beams, slurs may be attached to stem
1785 ends. If you want to override this layout you can do this through the
1786 object property @code{attachment} of @internalsref{Slur} in
1787 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1788 the attachment type of the left and right end points:
1790 @lilypond[fragment,relative,verbatim]
1792 \property Voice.Stem \set #'length = #5.5
1794 \property Voice.Slur \set #'attachment = #'(stem . stem)
1798 If a slur would strike through a stem or beam, the slur will be moved
1799 away upward or downward. If this happens, attaching the slur to the
1800 stems might look better:
1802 @lilypond[fragment,relative,verbatim]
1805 \property Voice.Slur \set #'attachment = #'(stem . stem)
1812 @cindex @code{\slurUp}
1814 @cindex @code{\slurDown}
1816 @cindex @code{\slurBoth}
1818 @cindex @code{\slurDotted}
1820 @cindex @code{\slurSolid}
1825 @seeinternals{Slur}, and @internalsref{SlurEvent}.
1830 Producing nice slurs is a difficult problem, and LilyPond currently
1831 uses a simple, empiric method to produce slurs. In some cases, its
1835 @cindex Adjusting slurs
1837 @node Phrasing slurs
1838 @subsection Phrasing slurs
1840 @cindex phrasing slurs
1841 @cindex phrasing marks
1843 A phrasing slur (or phrasing mark) connects chords and is used to
1844 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1847 @lilypond[fragment,verbatim,center,relative]
1848 \time 6/4 c'\( d( e) f( e) d\)
1851 Typographically, the phrasing slur behaves almost exactly like a
1852 normal slur. However, they are treated as different objects. A
1853 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1854 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1855 @code{\phrasingSlurBoth}.
1857 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1858 will only affect normal slurs and not phrasing slurs.
1862 @cindex @code{\phrasingSlurUp}
1863 @code{\phrasingSlurUp},
1864 @cindex @code{\phrasingSlurDown}
1865 @code{\phrasingSlurDown},
1866 @cindex @code{\phrasingSlurBoth}
1867 @code{\phrasingSlurBoth},
1871 See also @internalsref{PhrasingSlur}, and
1872 @internalsref{PhrasingSlurEvent}.
1876 Phrasing slurs have the same limitations in their formatting as normal
1877 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1880 @subsection Breath marks
1882 Breath marks are entered using @code{\breathe}:
1885 @lilypond[fragment,relative,verbatim]
1889 The glyph of the breath mark can be tweaked by overriding the
1890 @code{text} property of the @code{BreathingSign} layout object with the name of
1891 any glyph of @ref{The Feta font}. For example,
1892 @lilypond[fragment,verbatim,relative]
1894 \property Voice.BreathingSign \override #'text = #"scripts-rvarcomma"
1901 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}, and
1902 @inputfileref{input/regression,breathing-sign.ly}.
1905 @node Metronome marks
1906 @subsection Metronome marks
1909 @cindex beats per minute
1910 @cindex metronome marking
1912 Metronome settings can be entered as follows:
1914 \tempo @var{duration} = @var{perminute}
1917 In the MIDI output, they are interpreted as a tempo change, and in the
1918 paper output, a metronome marking is printed:
1919 @cindex @code{\tempo}
1920 @lilypond[fragment,verbatim]
1926 @internalsref{MetronomeChangeEvent}.
1931 @subsection Text spanners
1932 @cindex Text spanners
1934 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1935 are written as texts, and extended over many measures with dotted
1936 lines. You can create such texts using text spanners: attach
1937 @code{\startTextSpan} and @code{\stopTextSpan} to the
1938 start and ending note of the spanner.
1940 The string to be printed, as well as the style, is set through object
1943 @lilypond[fragment,relative,verbatim]
1945 \property Voice.TextSpanner \set #'direction = #-1
1946 \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
1947 c2\startTextSpan b c\stopTextSpan a }
1953 @internalsref{TextSpanEvent},
1954 @internalsref{TextSpanner}, and
1955 @inputfileref{input/regression,text-spanner.ly}.
1958 @node Analysis brackets
1959 @subsection Analysis brackets
1961 @cindex phrasing brackets
1962 @cindex musicological analysis
1963 @cindex note grouping bracket
1965 Brackets are used in musical analysis to indicate structure in musical
1966 pieces. LilyPond supports a simple form of nested horizontal brackets.
1967 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1968 @internalsref{Staff} context. A bracket is started with
1969 @code{\startGroup} and closed with @code{\stopGroup}:
1971 @lilypond[singleline,verbatim]
1972 \score { \notes \relative c'' {
1973 c4\startGroup\startGroup
1976 c4\stopGroup\stopGroup
1978 \paper { \translator {
1979 \StaffContext \consists "Horizontal_bracket_engraver"
1985 @internalsref{HorizontalBracket}, @internalsref{NoteGroupingEvent}, and
1986 @inputfileref{input/regression,note-group-bracket.ly}.
1990 @section Articulations
1991 @cindex Articulations
1993 @cindex articulations
1997 A variety of symbols can appear above and below notes to indicate
1998 different characteristics of the performance. They are added to a note
1999 by adding a dash and the character signifying the
2000 articulation. They are demonstrated here:
2002 @lilypondfile[notexidoc]{script-abbreviations.ly}
2004 The meanings of these shorthands can be changed: see
2005 @file{ly/script-init.ly} for examples.
2008 The script is automatically placed, but if you need to force
2009 directions, you can use @code{_} to force them down, or @code{^} to
2011 @lilypond[fragment, verbatim]
2015 Other symbols can be added using the syntax
2016 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2017 can be forced up or down using @code{^} and @code{_},
2020 @lilypond[verbatim,fragment,relative 2]
2021 c\fermata c^\fermata c_\fermata
2028 @cindex staccatissimo
2037 @cindex organ pedal marks
2046 @cindex prallmordent
2050 @cindex thumb marking
2055 @lilypondfile[notexidoc]{script-chart.ly}
2060 @cindex @code{\scriptUp}
2062 @cindex @code{\scriptDown}
2064 @cindex @code{\scriptBoth}
2069 @internalsref{ScriptEvent}, and @internalsref{Script}.
2073 All of these note ornaments appear in the printed output but have no
2074 effect on the MIDI rendering of the music.
2077 @node Fingering instructions
2078 @section Fingering instructions
2082 Fingering instructions can be entered using
2084 @var{note}-@var{digit}
2086 For finger changes, use markup texts:
2088 @lilypond[verbatim, singleline, fragment]
2089 c'4-1 c'4-2 c'4-3 c'4-4
2090 c'^\markup { \fontsize #-3 \number "2-3" }
2093 @cindex finger change
2098 You can use the thumb-script to indicate that a note should be
2099 played with your thumb (used in cello music):
2101 @lilypond[verbatim, singleline, fragment]
2102 <<a' a''-3>>8(_\thumb[ <<b' b''-3>>)_\thumb
2103 <<c'' c'''-3>>(_\thumb <<d'' d'''-3>>)_\thumb]
2106 Fingerings for chords can also be added to individual notes
2107 of the chord by adding them after the pitches:
2108 @lilypond[verbatim,singleline,fragment,relative=1]
2109 << c-1 e-2 g-3 b-5 >> 4
2112 Setting @code{fingerHorizontalDirection} will put the fingerings next
2115 @lilypond[verbatim,singleline,fragment,relative=1]
2116 \property Voice.fingerHorizontalDirection = #LEFT
2117 << c-1 es-2 g-4 bes-5 >> 4
2118 \property Voice.fingerHorizontalDirection = #RIGHT
2119 << c-1 es-2 g-4 bes-5 >> 4
2124 @internalsref{FingerEvent}, and @internalsref{Fingering}.
2135 @subsection Text scripts
2136 @cindex Text scripts
2138 It is possible to place arbitrary strings of text or markup text (see
2139 @ref{Text markup}) above or below notes by using a string:
2140 @code{c^"text"}. By default, these indications do not influence the
2141 note spacing, but by using the command @code{\fatText}, the widths
2142 will be taken into account:
2144 @lilypond[fragment,singleline,verbatim] \relative c' {
2145 c4^"longtext" \fatText c4_"longlongtext" c4 }
2148 It is possible to use @TeX{} commands in the strings, but this should
2149 be avoided because the exact dimensions of the string can then no
2155 @internalsref{TextScriptEvent}, @internalsref{TextScript}, and
2161 @subsection Grace notes
2164 @c should have blurb about accaciatura / appogiatura
2166 @cindex @code{\grace}
2170 Grace notes are ornaments that are written out. The most common ones
2171 are accacciatura, which should be played as very short. It is denoted
2172 by a slurred small note with a slashed stem. The appoggiatura is a
2173 grace note that takes a fixed fraction of the main note, is and
2174 denoted as a slurred note in small print without a slash.
2175 They are entered with the commands @code{\accacciatura} and
2176 @code{\appoggiatura}, as demonstrated in the following example:
2179 @cindex appoggiatura
2180 @cindex accacciatura
2182 @lilypond[relative=2,verbatim,fragment]
2183 b4 \accacciatura d8 c4 \appoggiatura e8 d4
2184 \accacciatura { g16 f } e4
2187 Both are special forms of the @code{\grace} command. By prefixing this
2188 keyword to a music expression, a new one is formed, which will be
2189 printed in a smaller font and takes up no logical time in a measure.
2190 @lilypond[relative=2,verbatim,fragment]
2191 c4 \grace c16 c4 \grace {
2194 Unlike @code{\accacciatura} and @code{\appoggiatura}, the
2195 @code{\grace} command does not start a slur.
2197 Internally, timing for grace notes is done using a second, `grace'
2198 time. Every point in time consists of two rational numbers: one
2199 denotes the logical time, one denotes the grace timing. The above
2200 example is shown here with timing tuples:
2202 @lilypond[singleline]
2205 c4 \grace c16 c4 \grace {
2208 \new Lyrics \lyrics {
2211 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2212 \markup { (\fraction 1 4 , 0 ) } 4
2214 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2215 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2217 \markup { ( \fraction 2 4 , 0 ) }
2222 The placement of grace notes is synchronized between different staves.
2223 In the following example, there are two sixteenth graces notes for
2224 every eighth grace note:
2226 @lilypond[relative=2,verbatim,fragment]
2227 < \new Staff { e4 \grace { c16[ d e f] } e4 }
2228 \new Staff { c'4 \grace { g8[ b] } c4 } >
2233 If you want to end a note with a grace note, then the standard trick
2234 is to put the grace notes before a phantom ``space note'', e.g.
2235 @lilypond[fragment,verbatim, relative=2]
2238 { s2 \grace { c16[ d] } } >
2244 By adjusting the duration of the skip note (here it is a half-note),
2245 the space between the main-note and the grace is adjusted.
2248 A @code{\grace} section will introduce special typesetting settings,
2249 for example, to produce smaller type, and set directions. Hence, when
2250 introducing layout tweaks, they should be inside the grace section,
2252 @lilypond[fragment,verbatim,relative 2]
2255 \property Voice.Stem \override #'direction = #-1
2257 \property Voice.Stem \revert #'direction
2262 The overrides should also be reverted inside the grace section.
2264 If the layout of grace sections must be changed throughout the music,
2265 then this can be accomplished through the function
2266 @code{add-grace-property}. The following example
2267 undefines the Stem direction grace section, so stems do not always
2272 #(add-grace-property "Voice" Stem direction '())
2278 Another option is to change the variables @code{startGraceMusic},
2279 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2280 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2281 @code{stopAppoggiaturaMstuic}. More information is in the file
2282 @file{ly/grace-init.ly}
2287 @internalsref{GraceMusic}.
2291 Grace notes cannot be used in the smallest size (@file{paper11.ly}).
2293 A score that starts with an @code{\grace} section needs an explicit
2294 @code{\context Voice} declaration, otherwise the main note and grace
2295 note end up on different staves.
2297 Grace note synchronization can also lead to surprises. Staff notation,
2298 such as key signatures, barlines, etc. are also synchronized. Take
2299 care when you mix staves with grace notes and staves without, for example,
2301 @lilypond[relative=2,verbatim,fragment]
2302 < \new Staff { e4 \bar "|:" \grace c16 d4 }
2303 \new Staff { c4 \bar "|:" d4 } >
2306 Grace sections should only be used within sequential music
2307 expressions. Nesting or juxtaposing grace sections is not supported,
2308 and might produce crashes or other errors.
2310 Overriding settings cannot be done in separate styles for appoggiatura
2315 @subsection Glissando
2318 @cindex @code{\glissando}
2320 A glissando is a smooth change in pitch. It is denoted by a line or a
2321 wavy line between two notes.
2325 A glissando line can be requested by attaching a @code{\glissando} to
2328 @lilypond[fragment,relative,verbatim]
2334 @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2339 Additional texts (such as @emph{gliss.}) is not supported.
2343 @subsection Dynamics
2356 @cindex @code{\ffff}
2366 Absolute dynamic marks are specified using an variable after a
2367 note: @code{c4\ff}. The available dynamic marks are @code{\ppp},
2368 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2369 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2370 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2372 @lilypond[verbatim,singleline,fragment,relative]
2373 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2379 @cindex @code{\decr}
2380 @cindex @code{\rced}
2387 A crescendo mark is started with @code{\<} and terminated with
2388 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2389 with @code{\!}. Because these marks are bound to notes, if you must
2390 use spacer notes if multiple marks during one note are needed:
2392 @lilypond[fragment,verbatim,center,quote]
2393 c''\< c''\! d''\decr e''\rced
2394 < f''1 { s4 s4\< s4\! \> s4\! } >
2396 This may give rise to very short hairpins. Use @code{minimum-length}
2397 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2401 \property Staff.Hairpin \override #'minimum-length = #5
2404 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2405 is an example how to do it:
2407 @lilypond[fragment,relative=2,verbatim]
2408 c4 \cresc c4 c c c \endcresc c4
2414 You can also supply your own texts:
2415 @lilypond[fragment,relative,verbatim]
2417 \property Voice.crescendoText = \markup { \italic "cresc. poco" }
2418 \property Voice.crescendoSpanner = #'dashed-line
2428 @cindex @code{\dynamicUp}
2430 @cindex @code{\dynamicDown}
2431 @code{\dynamicDown},
2432 @cindex @code{\dynamicBoth}
2433 @code{\dynamicBoth}.
2435 @cindex direction, of dynamics
2439 @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2440 @internalsref{AbsoluteDynamicEvent}.
2442 Dynamics are objects of @internalsref{DynamicText} and
2443 @internalsref{Hairpin}. Vertical positioning of these symbols is
2444 handled by the @internalsref{DynamicLineSpanner} object.
2446 If you want to adjust padding or vertical direction of the dynamics, you
2447 must set properties for the @internalsref{DynamicLineSpanner} object.
2455 @cindex @code{\repeat}
2458 Repetition is a central concept in music, and multiple notations exist
2459 for repetitions. In LilyPond, most of these notations can be captured
2460 in a uniform syntax. One of the advantages is, all these repetitions
2461 can be rendered in MIDI accurately.
2463 The following types of repetition are supported:
2467 Repeated music is fully written (played) out. Useful for MIDI
2468 output, and entering repetitive music.
2471 This is the normal notation: Repeats are not written out, but
2472 alternative endings (voltas) are printed, left to right.
2476 Alternative endings are written stacked. This has limited use but may be
2477 used to typeset two lines of lyrics in songs with repeats, see
2478 @inputfileref{input,star-spangled-banner.ly}.
2485 Make beat or measure repeats. These look like percent signs.
2491 * Repeats and MIDI::
2492 * Manual repeat commands::
2494 * Tremolo subdivisions::
2499 @subsection Repeat syntax
2503 LilyPond has one syntactic construct for specifying different types of
2504 repeats. The syntax is
2507 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2510 If you have alternative endings, you may add
2511 @cindex @code{\alternative}
2513 \alternative @code{@{} @var{alternative1}
2515 @var{alternative3} @dots{} @code{@}}
2517 where each @var{alternative} is a music expression. If you do not
2518 give enough alternatives for all of the repeats, then the first
2519 alternative is assumed to be played more than once.
2521 Normal notation repeats are used like this:
2522 @lilypond[fragment,verbatim]
2524 \repeat volta 2 { c'4 d' e' f' }
2525 \repeat volta 2 { f' e' d' c' }
2528 With alternative endings:
2529 @lilypond[fragment,verbatim]
2531 \repeat volta 2 {c'4 d' e' f'}
2532 \alternative { {d'2 d'} {f' f} }
2536 @lilypond[fragment,verbatim]
2540 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2541 \alternative { { g4 g g } { a | a a a a | b2. } }
2548 If you do a nested repeat like
2557 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2558 belongs. This ambiguity is resolved by always having the
2559 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2560 it is advisable to use braces in such situations.
2563 @node Repeats and MIDI
2564 @subsection Repeats and MIDI
2566 @cindex expanding repeats
2568 For instructions on how to unfold repeats for MIDI output, see the
2569 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2574 Timing information is not remembered at the start of an alternative,
2575 so after a repeat timing information must be reset by hand, for
2576 example by setting @code{Score.measurePosition} or entering
2577 @code{\partial}. Similarly, slurs or ties are also not repeated.
2580 @node Manual repeat commands
2581 @subsection Manual repeat commands
2583 @cindex @code{repeatCommands}
2585 The property @code{repeatCommands} can be used to control the layout of
2586 repeats. Its value is a Scheme list of repeat commands, where each repeat
2590 @item the symbol @code{start-repeat},
2591 which prints a @code{|:} bar line,
2592 @item the symbol @code{end-repeat},
2593 which prints a @code{:|} bar line,
2594 @item the list @code{(volta @var{text})},
2595 which prints a volta bracket saying @var{text}: The text can be specified as
2596 a text string or as a markup text, see @ref{Text markup}. Do not
2597 forget to change the font, as the default number font does not contain
2598 alphabetic characters. Or,
2599 @item the list @code{(volta #f)}, which
2600 stops a running volta bracket:
2603 @lilypond[verbatim, fragment]
2605 \property Score.repeatCommands = #'((volta "93") end-repeat)
2607 \property Score.repeatCommands = #'((volta #f))
2614 @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2615 @internalsref{VoltaRepeatedMusic},
2616 @internalsref{UnfoldedRepeatedMusic}, and
2617 @internalsref{FoldedRepeatedMusic}.
2619 @node Tremolo repeats
2620 @subsection Tremolo repeats
2621 @cindex tremolo beams
2623 To place tremolo marks between notes, use @code{\repeat} with tremolo
2625 @lilypond[verbatim,center,singleline]
2627 \context Voice \notes\relative c' {
2628 \repeat "tremolo" 8 { c16 d16 }
2629 \repeat "tremolo" 4 { c16 d16 }
2630 \repeat "tremolo" 2 { c16 d16 }
2631 \repeat "tremolo" 4 c16
2638 Tremolo beams are @internalsref{Beam} objects. Single stem tremolos
2639 are @internalsref{StemTremolo}s. The music expression is
2640 @internalsref{TremoloEvent}.
2645 The single stem tremolo must be entered without @code{@{} and
2648 @node Tremolo subdivisions
2649 @subsection Tremolo subdivisions
2650 @cindex tremolo marks
2651 @cindex @code{tremoloFlags}
2653 Tremolo marks can be printed on a single note by adding
2654 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2655 A @var{length} value of 8 gives one line across the note stem. If the
2656 length is omitted, then then the last value (stored in
2657 @code{Voice.tremoloFlags}) is used:
2659 @lilypond[verbatim,fragment,center]
2660 c'2:8 c':32 | c': c': |
2663 @c [TODO : stok is te kort bij 32en]
2667 Tremolos in this style do not carry over into the MIDI output.
2670 @node Measure repeats
2671 @subsection Measure repeats
2673 @cindex percent repeats
2674 @cindex measure repeats
2676 In the @code{percent} style, a note pattern can be repeated. It is
2677 printed once, and then the pattern is replaced with a special sign.
2678 Patterns of a one and two measures are replaced by percent-like signs,
2679 patterns that divide the measure length are replaced by slashes:
2681 @lilypond[verbatim,singleline]
2682 \context Voice { \repeat "percent" 4 { c'4 }
2683 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2689 @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2690 @internalsref{PercentRepeatedMusic}, and
2691 @internalsref{DoublePercentRepeat}.
2695 @node Rhythmic music
2696 @section Rhythmic music
2698 Sometimes you might want to show only the rhythm of a melody. This
2699 can be done with the rhythmic staff. All pitches of notes on such a
2700 staff are squashed, and the staff itself has a single line:
2702 @lilypond[fragment,relative,verbatim]
2703 \context RhythmicStaff {
2705 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2710 * Percussion staves::
2711 * Percussion MIDI output::
2714 @node Percussion staves
2715 @subsection Percussion staves
2719 A percussion part for more than one instrument typically uses a
2720 multiline staff where each position in the staff refers to one piece
2725 Percussion staves are typeset with help of a set of Scheme
2726 functions. The system is based on the general MIDI drum-pitches.
2727 Include @file{drumpitch-init.ly} to use drum pitches. This file
2728 defines the pitches from the Scheme variable @code{drum-pitch-names},
2729 the definition of which can be read in @file{scm/drums.scm}. Each
2730 piece of percussion has a full name and an abbreviated name, and either
2731 the full name or the abbreviation may be used in input files.
2733 To typeset the music on a staff apply the function @code{drums->paper}
2734 to the percussion music. This function takes a list of percussion
2735 instrument names, notehead scripts and staff positions (that is:
2736 pitches relative to the C-clef) and transforms the input
2737 music by moving the pitch, changing the notehead and (optionally)
2740 @lilypond[singleline,verbatim,quote]
2741 \include "drumpitch-init.ly"
2742 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2743 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2745 \apply #(drums->paper 'drums) \context Staff <
2747 \new Voice { \voiceOne \up }
2748 \new Voice { \voiceTwo \down }
2753 In the above example the music was transformed using the list @code{'drums}.
2754 Currently the following lists are defined in @file{scm/drums.scm}:
2757 to typeset a typical drum kit on a five-line staff:
2760 \include "drumpitch-init.ly"
2761 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2762 bd sn ss tomh tommh tomml toml tomfh tomfl }
2763 mus = \notes { cymc cyms cymr hh hhc hho hhho hhp cb hc
2764 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2767 \apply #(drums->paper 'drums) \context Staff <
2771 \context Lyrics \nam
2774 linewidth = 100.0\mm
2777 \remove Bar_engraver
2778 \remove Time_signature_engraver
2779 minimumVerticalExtent = #'(-4.0 . 5.0)
2783 \remove Stem_engraver
2789 The drum scheme supports six different toms. When there fewer toms, simply
2790 select the toms that produce the desired result, i.e. to get toms on
2791 the three middle lines you use @code{tommh}, @code{tomml} and
2794 Because general MIDI does not contain rimshots the sidestick is used
2795 for this purpose instead.
2797 to typeset timbales on a two line staff:
2799 @lilypond[singleline]
2800 \include "drumpitch-init.ly"
2801 nam = \lyrics { timh ssh timl ssl cb }
2802 mus = \notes { timh ssh timl ssl cb s16 }
2805 \apply #(drums->paper 'timbales) \context Staff <
2809 \context Lyrics \nam
2814 \remove Bar_engraver
2815 \remove Time_signature_engraver
2816 StaffSymbol \override #'line-count = #2
2817 StaffSymbol \override #'staff-space = #2
2818 minimumVerticalExtent = #'(-3.0 . 4.0)
2822 \remove Stem_engraver
2829 to typeset congas on a two line staff:
2831 @lilypond[singleline]
2832 \include "drumpitch-init.ly"
2833 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2834 mus = \notes { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2837 \apply #(drums->paper 'congas) \context Staff <
2841 \context Lyrics \nam
2846 \remove Bar_engraver
2847 \remove Time_signature_engraver
2848 StaffSymbol \override #'line-count = #2
2849 StaffSymbol \override #'staff-space = #2
2850 minimumVerticalExtent = #'(-3.0 . 4.0)
2854 \remove Stem_engraver
2860 to typeset bongos on a two line staff:
2862 @lilypond[singleline]
2863 \include "drumpitch-init.ly"
2864 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2865 mus = \notes { boh boho bohm ssh bol bolo bolm ssl s16 }
2868 \apply #(drums->paper 'bongos) \context Staff <
2872 \context Lyrics \nam
2877 \remove Bar_engraver
2878 \remove Time_signature_engraver
2879 StaffSymbol \override #'line-count = #2
2880 StaffSymbol \override #'staff-space = #2
2881 minimumVerticalExtent = #'(-3.0 . 4.0)
2885 \remove Stem_engraver
2891 to typeset all kinds of simple percussion on one line staves:
2892 @lilypond[singleline]
2893 \include "drumpitch-init.ly"
2894 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2895 mus = \notes { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2898 \apply #(drums->paper 'percussion) \context Staff <
2902 \context Lyrics \nam
2907 \remove Bar_engraver
2908 \remove Time_signature_engraver
2909 StaffSymbol \override #'line-count = #1
2910 minimumVerticalExtent = #'(-2.0 . 3.0)
2914 \remove Stem_engraver
2921 If you do not like any of the predefined lists you can define your own
2922 list at the top of your file:
2924 @lilypond[singleline, verbatim]
2925 #(set-drum-kit 'mydrums `(
2926 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2927 (snare default #f ,(ly:make-pitch 0 1 0))
2928 (hihat cross #f ,(ly:make-pitch 0 5 0))
2929 (pedalhihat xcircle "stopped" ,(ly:make-pitch 0 5 0))
2930 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2932 \include "drumpitch-init.ly"
2933 up = \notes { hh8 hh hh hh hhp4 hhp }
2934 down = \notes { bd4 sn bd toml8 toml }
2936 \apply #(drums->paper 'mydrums) \context Staff <
2938 \new Voice { \voiceOne \up }
2939 \new Voice { \voiceTwo \down }
2944 To use a modified existing list, one can prepend modifications to the
2948 #(set-drum-kit 'mydrums (append `(
2949 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2950 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2951 ) (get-drum-kit 'drums)))
2954 You can easily combine percussion notation with pitched notation.
2955 Indeed, the file @file{drumpitch-init.ly} replaces the normal pitch
2956 names, so you will have to reinclude @file{nederlands.ly} after the
2957 drum-pattern-definitions to enter normal notes:
2959 @lilypond[singleline,verbatim]
2960 \include "drumpitch-init.ly"
2961 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2962 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2963 \include "nederlands.ly"
2964 bass = \notes \transpose c c,, { a4. e8 r e g e }
2967 \apply #(drums->paper 'drums) \new Staff <
2969 \new Voice { \voiceOne \up }
2970 \new Voice { \voiceTwo \down }
2972 \new Staff { \clef "F_8" \bass }
2977 @node Percussion MIDI output
2978 @subsection Percussion MIDI output
2980 In order to produce correct MIDI output you need to produce two score
2981 blocks---one for the paper and one for the MIDI output. To use the
2982 percussion channel you set the property @code{instrument} to
2983 @code{'drums}. Because the drum-pitches themselves are similar to the
2984 general MIDI pitches all you have to do is to insert the voices with
2985 none of the scheme functions to get the correct MIDI output:
2989 \apply #(drums->paper 'mydrums) \context Staff <
2998 \property Staff.instrument = #'drums
3007 This scheme is a temporary implementation.
3011 @section Piano music
3013 Piano staves are two normal staves coupled with a brace. The staves
3014 are largely independent, but sometimes voices can cross between the
3015 two staves. The same notation is also used for harps and other key
3016 instruments. The @internalsref{PianoStaff} is especially built to
3017 handle this cross-staffing behavior. In this section we discuss the
3018 @internalsref{PianoStaff} and some other pianistic peculiarities.
3022 * Automatic staff changes::
3023 * Manual staff switches::
3026 * Staff switch lines::
3031 There is no support for putting chords across staves. You can get
3032 this result by increasing the length of the stem in the lower stave so
3033 it reaches the stem in the upper stave, or vice versa. An example is
3034 included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
3036 Dynamics are not centered, but kludges do exist. See
3037 @inputfileref{input/template,piano-dynamics.ly}.
3039 @cindex cross staff stem
3040 @cindex stem, cross staff
3043 @c fixme: should have hyperlinks as well.
3049 @node Automatic staff changes
3050 @subsection Automatic staff changes
3051 @cindex Automatic staff changes
3053 Voices can switch automatically between the top and the bottom
3054 staff. The syntax for this is
3056 \autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
3058 The two staffs of the piano staff must be named @code{up} and
3061 The autochanger switches on basis of pitch (central C is the turning
3062 point), and it looks ahead skipping over rests to switch in
3063 advance. Here is a practical example:
3065 @lilypond[verbatim,singleline,quote]
3066 \score { \notes \context PianoStaff <
3067 \context Staff = "up" {
3068 \autochange Staff \context Voice = VA < \relative c' {
3069 g4 a b c d r4 a g } > }
3070 \context Staff = "down" {
3077 In this example, spacer rests are used to prevent the bottom staff from
3078 terminating too soon.
3083 @internalsref{AutoChangeMusic}.
3087 The staff switches often do not end up in optimal places. For high
3088 quality output staff switches should be specified manually.
3092 @node Manual staff switches
3093 @subsection Manual staff switches
3095 @cindex manual staff switches
3096 @cindex staff switch, manual
3098 Voices can be switched between staves manually, using the following command:
3100 \translator Staff = @var{staffname} @var{music}
3104 The string @var{staffname} is the name of the staff. It switches the
3105 current voice from its current staff to the Staff called
3106 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3114 Pianos have pedals that alter the way sound are produced. Generally, a
3115 piano has three pedals, sustain, una corda, and sostenuto.
3119 Piano pedal instruction can be expressed by attaching
3120 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3121 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3124 @lilypond[fragment,verbatim]
3125 c'4\sustainDown c'4\sustainUp
3128 What is printed can be modified by setting @code{pedal@var{X}Strings},
3129 where @var{X} is one of the pedal types: @code{Sustain},
3130 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3131 documentation of @internalsref{SustainPedal} for more information.
3133 Pedals can also be indicated by a sequence of brackets, by setting the
3134 @code{pedalSustainStyle} property to @code{bracket} objects:
3136 @lilypond[fragment,verbatim]
3137 \property Staff.pedalSustainStyle = #'bracket
3138 c''4\sustainDown d''4 e''4
3139 a'4\sustainUp\sustainDown
3140 f'4 g'4 a'4\sustainUp
3143 A third style of pedal notation is a mixture of text and brackets,
3144 obtained by setting @code{pedal-type} to @code{mixed}:
3146 @lilypond[fragment,verbatim]
3147 \property Staff.pedalSustainStyle = #'mixed
3148 c''4\sustainDown d''4 e''4
3149 c'4\sustainUp\sustainDown
3150 f'4 g'4 a'4\sustainUp
3153 The default `*Ped' style for sustain and damper pedals corresponds to
3154 @code{\pedal-type = #'text}. However, @code{mixed} is the default style
3155 for a sostenuto pedal:
3157 @lilypond[fragment,verbatim]
3158 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3161 For fine-tuning of the appearance of a pedal bracket, the properties
3162 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3163 @code{PianoPedalBracket} objects (, see the detailed documentation of
3164 @internalsref{PianoPedalBracket},) can be modified. For example, the bracket
3165 may be extended to the end of the note head:
3167 @lilypond[fragment,verbatim]
3168 \property Staff.PianoPedalBracket \override
3169 #'shorten-pair = #'(0 . -1.0)
3170 c''4\sostenutoDown d''4 e''4 c'4
3171 f'4 g'4 a'4\sostenutoUp
3175 @subsection Arpeggio
3178 @cindex broken arpeggio
3179 @cindex @code{\arpeggio}
3181 You can specify an arpeggio sign on a chord by attaching an
3182 @code{\arpeggio} to a chord:
3185 @lilypond[fragment,relative,verbatim]
3186 <<c e g c>>\arpeggio
3189 When an arpeggio crosses staves, you attach an arpeggio to the chords
3190 in both staves, and set
3191 @internalsref{PianoStaff}.@code{connectArpeggios}:
3193 @lilypond[fragment,relative,verbatim]
3194 \context PianoStaff <
3195 \property PianoStaff.connectArpeggios = ##t
3196 \new Staff { <<c' e g c>>\arpeggio }
3197 \new Staff { \clef bass <<c,, e g>>\arpeggio }
3201 The direction of the arpeggio is sometimes denoted by adding an
3202 arrowhead to the wiggly line. This can be typeset by setting
3203 @code{arpeggio-direction}:
3205 @lilypond[fragment,relative,verbatim]
3207 \property Voice.Arpeggio \set #'arpeggio-direction = #1
3208 <<c e g c>>\arpeggio
3209 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
3210 <<c e g c>>\arpeggio
3214 A square bracket on the left indicates that the player should not
3215 arpeggiate the chord. To draw these brackets, set the
3216 @code{molecule-callback} property of @code{Arpeggio} or
3217 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3218 @code{\arpeggio} statements within the chords as before:
3220 @lilypond[fragment,relative,verbatim]
3221 \property PianoStaff.Arpeggio \override
3222 #'molecule-callback = \arpeggioBracket
3223 <<c' e g c>>\arpeggio
3228 @cindex @code{\arpeggioBracket}
3229 @code{\arpeggioBracket},
3230 @cindex @code{\arpeggio}
3235 @internalsref{ArpeggioEvent} expression lead to
3236 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3237 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3241 It is not possible to mix connected arpeggios and unconnected
3242 arpeggios in one @internalsref{PianoStaff} at the same time.
3244 @node Staff switch lines
3245 @subsection Staff switch lines
3248 @cindex follow voice
3249 @cindex staff switching
3252 @cindex @code{followVoice}
3254 Whenever a voice switches to another staff a line connecting the notes
3255 can be printed automatically. This is enabled if the property
3256 @code{PianoStaff.followVoice} is set to true:
3258 @lilypond[fragment,relative,verbatim]
3259 \context PianoStaff <
3260 \property PianoStaff.followVoice = ##t
3261 \context Staff \context Voice {
3263 \translator Staff=two
3266 \context Staff=two { \clef bass \skip 1*2 }
3270 The associated object is @internalsref{VoiceFollower}.
3274 @cindex @code{\showStaffSwitch}
3275 @code{\showStaffSwitch},
3276 @cindex @code{\hideStaffSwitch}
3277 @code{\hideStaffSwitch}.
3281 @section Vocal music
3283 This section discusses how to enter and print lyrics.
3287 * The Lyrics context::
3292 @node Entering lyrics
3293 @subsection Entering lyrics
3297 @cindex @code{\lyrics}
3300 Lyrics are entered in a special input mode. This mode is is introduced
3301 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3302 punctuation and accents without any hassle. Syllables are entered like
3303 notes, but with pitches replaced by text. For example,
3305 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3308 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3309 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3310 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3311 any 8-bit character with ASCII code over 127, or a two-character
3312 combination of a backslash followed by one of @code{`}, @code{'},
3313 @code{"}, or @code{^}.
3315 Subsequent characters of a word can be any character that is not a digit
3316 and not white space. One important consequence of this is that a word
3317 can end with @code{@}}. The following example is usually a bug. The
3318 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3320 \lyrics @{ twinkle@}
3323 @cindex @code{\property}, in @code{\lyrics}
3324 Similarly, a period following a alphabetic sequence, is included in the
3325 resulting string. As a consequence, spaces must be inserted around
3326 @code{\property} commands:
3328 \property Lyrics . LyricText \set #'font-shape = #'italic
3332 @cindex spaces, in lyrics
3333 @cindex quotes, in lyrics
3335 Any @code{_} character which appears in an unquoted word is converted
3336 to a space. This provides a mechanism for introducing spaces into words
3337 without using quotes. Quoted words can also be used in Lyrics mode to
3338 specify words that cannot be written with the above rules:
3341 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3345 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3350 These will be attached to the end of the first syllable.
3352 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3353 as a separate word between syllables. The hyphen will have variable
3354 length depending on the space between the syllables and it will be
3355 centered between the syllables.
3360 When a lyric is sung over many notes (this is called a melisma), this is
3361 indicated with a horizontal line centered between a syllable and the
3362 next one. Such a line is called an extender line, and it is entered as
3367 @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3368 @internalsref{ExtenderEvent}.
3372 The definition of lyrics mode is too complex.
3374 @node The Lyrics context
3375 @subsection The Lyrics context
3377 Lyrics are printed by interpreting them in @internalsref{Lyrics} context:
3379 \context Lyrics \lyrics @dots{}
3382 @cindex automatic syllable durations
3383 @cindex @code{\addlyrics}
3384 @cindex lyrics and melodies
3386 This will place the lyrics according to the durations that were
3387 entered. The lyrics can also be aligned under a given melody
3388 automatically. In this case, it is no longer necessary to enter the
3389 correct duration for each syllable. This is achieved by combining the
3390 melody and the lyrics with the @code{\addlyrics} expression:
3394 \context Lyrics @dots{}
3397 @cindex staff order, with @code{\addlyrics}
3399 Normally, this will put the lyrics below the staff. For different or
3400 more complex orderings, the best way is to setup the hierarchy of
3401 staves and lyrics first, e.g.
3403 \context ChoirStaff \notes <
3404 \new Lyrics @{ s1 @}
3406 \new Lyrics @{ s1 @}
3410 and then combine the appropriate melodies and lyric lines:
3413 \new Staff @emph{the music}
3414 \new Lyrics @emph{the lyrics}
3417 putting both together, you would get
3419 \context ChoirStaff \notes <
3427 @cindex choral score
3429 A complete example of a SATB score setup is in the file
3430 @inputfileref{input/template,satb.ly}.
3434 @internalsref{LyricCombineMusic}, @internalsref{Lyrics}, and
3435 @inputfileref{input/template,satb.ly}.
3439 @code{\addlyrics} is not automatic enough: melismata are not detected
3440 automatically, and melismata are not stopped when they hit a rest. A
3441 melisma on the last note in a melody is not printed.
3445 @subsection More stanzas
3448 @cindex phrasing, in lyrics
3450 When multiple stanzas are printed underneath each other, the vertical
3451 groups of syllables should be aligned around punctuation. This can be
3452 done automatically when corresponding lyric lines and melodies are
3455 To this end, give the @internalsref{Voice} context an identity:
3457 \context Voice = duet @{
3462 Then set the @internalsref{LyricsVoice} contexts to names starting with
3463 that identity followed by a dash. In the preceding example, the
3464 @internalsref{Voice} identity is @code{duet}, so the identities of the
3465 @internalsref{LyricsVoice}s are marked @code{duet-1} and @code{duet-2}:
3467 \context LyricsVoice = "duet-1" @{
3468 Hi, my name is bert. @}
3469 \context LyricsVoice = "duet-2" @{
3470 Ooooo, ch\'e -- ri, je t'aime. @}
3472 The convention for naming @internalsref{LyricsVoice} and
3473 @internalsref{Voice} must also be used to get melismata correct in
3474 conjunction with rests.
3476 The complete example is shown here:
3477 @lilypond[singleline,verbatim]
3480 \notes \relative c'' \context Voice = duet { \time 3/4
3482 \lyrics \context Lyrics <
3483 \context LyricsVoice = "duet-1" {
3484 \property LyricsVoice . stanza = "Bert"
3485 Hi, my name is bert. }
3486 \context LyricsVoice = "duet-2" {
3487 \property LyricsVoice . stanza = "Ernie"
3488 Ooooo, ch\'e -- ri, je t'aime. }
3493 Stanza numbers, or the names of the singers can be added by setting
3494 @code{LyricsVoice.Stanza} (for the first system) and
3495 @code{LyricsVoice.stz} for the following systems. Notice how dots are
3496 surrounded with spaces in @code{\lyrics} mode:
3499 \property LyricsVoice . stanza = "Bert"
3501 \property LyricsVoice . stanza = "Ernie"
3504 To make empty spaces in lyrics, use @code{\skip}.
3512 Input for lyrics introduces a syntactical ambiguity:
3519 is interpreted as assigning a string identifier @code{\foo} such that
3520 it contains @code{"bar"}. However, it could also be interpreted as
3521 making or a music identifier @code{\foo} containing the syllable
3522 `bar'. The force the latter interpretation, use
3532 The term @emph{ambitus} denotes a range of pitches for a given voice in
3533 a part of music. It also may denote the pitch range that a musical
3534 instrument is capable of playing. Most musical instruments have their
3535 ambitus standardized (or at least there is agreement upon the minimal
3536 ambitus of a particular type of instrument), such that a composer or
3537 arranger of a piece of music can easily meet the ambitus constraints of
3538 the targeted instrument. However, the ambitus of the human voice
3539 depends on individual physiological state, including education and
3540 training of the voice. Therefore, a singer potentially has to check for
3541 each piece of music if the ambitus of that piece meets his individual
3542 capabilities. This is why the ambitus of a piece may be of particular
3543 value to vocal performers.
3545 The ambitus is typically notated on a per-voice basis at the very
3546 beginning of a piece, e.g. nearby the initial clef or time signature of
3547 each staff. The range is graphically specified by two noteheads, that
3548 represent the minimum and maximum pitch. Some publishers use a textual
3549 notation: they put the range in words in front of the corresponding
3550 staff. LilyPond currently only supports the graphical ambitus notation.
3552 To apply, add the @internalsref{Ambitus_engraver} to the
3553 @internalsref{Voice} context, i.e.
3556 \paper @{ \translator @{
3558 \consists Ambitus_engraver
3564 @lilypond[singleline]
3565 upper = \notes \relative c {
3568 as'' c e2 bes f cis d4 e f2 g
3570 lower = \notes \relative c {
3573 e'4 b g a c es fis a cis b a g f e d2
3576 \context ChoirStaff {
3578 \new Staff { \upper }
3579 \new Staff { \lower }
3585 \consists Ambitus_engraver
3594 @internalsref{Ambitus}, and @inputfileref{input/regression,ambitus.ly}.
3599 Tablature notation is used for notating music for plucked string
3600 instruments. It notates pitches not by using note heads, but by
3601 indicating on which string and fret a note must be played. LilyPond
3602 offers limited support for tablature.
3605 * Tablatures basic::
3606 * Non-guitar tablatures::
3609 @node Tablatures basic
3610 @subsection Tablatures basic
3611 @cindex Tablatures basic
3613 The string number associated to a note is given as a backslash
3614 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3615 string. By default, string 1 is the highest one, and the tuning
3616 defaults to the standard guitar tuning (with 6 strings). The notes
3617 are printed as tablature, by using @internalsref{TabStaff} and
3618 @internalsref{TabVoice} contexts:
3620 @lilypond[fragment,verbatim]
3621 \notes \context TabStaff {
3627 When no string is specified, the first string that does not give a
3628 fret number less than @code{minimumFret} is selected. The default
3629 value for @code{minimumFret} is 0:
3633 e8 fis gis a b cis' dis' e'
3634 \property TabStaff.minimumFret = #8
3635 e8 fis gis a b cis' dis' e'
3640 e8 fis gis a b cis' dis' e'
3641 \property TabStaff.minimumFret = #8
3642 e8 fis gis a b cis' dis' e'
3645 \context StaffGroup <
3646 \context Staff { \clef "G_8" \frag }
3647 \context TabStaff { \frag }
3654 @internalsref{TabStaff}, @internalsref{TabVoice}, and
3655 @internalsref{StringNumberEvent}.
3659 Chords are not handled in a special way, and hence the automatic
3660 string selector may easily select the same string to two notes in a
3664 @node Non-guitar tablatures
3665 @subsection Non-guitar tablatures
3666 @cindex Non-guitar tablatures
3668 You can change the number of strings, by setting the number of lines
3669 in the @internalsref{TabStaff} (the @code{line-count} property of
3670 @internalsref{TabStaff} can only be changed using
3671 @code{\outputproperty}, for more information, see @ref{Tuning
3674 You can change the tuning of the strings. A string tuning is given as
3675 a Scheme list with one integer number for each string, the number
3676 being the pitch (measured in semitones relative to central C) of an
3677 open string. The numbers specified for @code{stringTuning} are the
3678 numbers of semitones to subtract or add, starting the specified pitch
3679 by default middle C, in string order. Thus, the notes are e, a, d, and
3682 @lilypond[fragment,verbatim]
3685 \outputproperty #(make-type-checker 'staff-symbol-interface)
3687 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3690 a,4 c' a e' e c' a e'
3695 It is possible to change the Scheme function to format the tablature
3696 note text. The default is @code{fret-number-tablature-format}, which
3697 uses the fret number. For instruments that do not use this notation,
3698 you can create a special tablature formatting function. This function
3699 takes three argument: string number, string tuning and note pitch.
3703 Most of the guitar special effects such as bend have not been
3709 @section Chord names
3712 LilyPond has support for both printing chord names. Chords may be
3713 entered in musical chord notation, i.e. @code{<< .. >>}, but they can
3714 also be entered by name. Internally, the chords are represented as a
3715 set of pitches, so they can be transposed:
3718 @lilypond[verbatim,singleline]
3719 twoWays = \notes \transpose c c' {
3729 < \context ChordNames \twoWays
3730 \context Voice \twoWays > }
3733 This example also shows that the chord printing routines do not try to
3734 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3740 * Printing chord names::
3745 @subsection Chords mode
3748 Chord mode is a mode where you can input sets of pitches using common
3749 names. It is introduced by the keyword @code{\chords}.
3750 In chords mode, a chord is entered by the root, which is entered
3751 like a common pitch:
3752 @lilypond[fragment,verbatim,quote, relative=1]
3753 \chords { es4. d8 c2 }
3758 Other chords may be entered by suffixing a colon, and introducing a
3759 modifier, and optionally, a number:
3761 @lilypond[fragment,verbatim,quote]
3762 \chords { e1:m e1:7 e1:m7 }
3764 The first number following the root is taken to be the `type' of the
3765 chord, thirds are added to the root until it reaches the specified
3767 @lilypond[fragment,verbatim]
3768 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3771 @cindex root of chord
3772 @cindex additions, in chords
3773 @cindex removals, in chords
3775 More complex chords may also be constructed adding separate steps
3776 to a chord. Additions are added after the number following
3777 the colon, and are separated by dots:
3779 @lilypond[verbatim,fragment,quote]
3780 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3782 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3784 @lilypond[verbatim,fragment,quote]
3785 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3787 Removals are specified similarly, and are introduced by a caret. They
3788 must come after the additions:
3789 @lilypond[verbatim,fragment]
3790 \chords { c^3 c:7^5 c:9^3.5 }
3793 Modifiers can be used to change pitches. The following modifiers are
3797 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3799 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3802 is the augmented chord. This modifier raises the 5th step.
3804 is the major 7th chord. This modifier raises the 7th step if present.
3806 is the suspended 4th or 2nd. This modifier removes the 3rd
3807 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3810 Modifiers can be mixed with additions:
3811 @lilypond[verbatim,fragment]
3812 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3815 @cindex modifiers, in chords.
3822 Since an unaltered 11 does not sound good when combined with an
3823 unaltered 13, the 11 is removed in this case (, unless it is added
3825 @lilypond[fragment,verbatim]
3826 \chords { c:13 c:13.11 c:m13 }
3831 An inversion (putting one pitch of the chord on the bottom), as well
3832 as bass notes, can be specified by appending
3833 @code{/}@var{pitch} to the chord:
3834 @lilypond[fragment,verbatim,center]
3835 \chords { c1 c/g c/f }
3839 A bass note can be added instead of transposed out of the chord,
3840 by using @code{/+}@var{pitch}.
3842 @lilypond[fragment,verbatim,center]
3843 \chords { c1 c/+g c/+f }
3846 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3847 of the commands continue to work, for example, @code{r} and
3848 @code{\skip} can be used to insert rests and spaces, and
3849 @code{\property} may be used to change various settings.
3855 Each step can only be present in a chord once. The following
3856 simply produces the augmented chord, since @code{5+} is interpreted
3859 @lilypond[verbatim,fragment]
3860 \chords { c:5.5-.5+ }
3864 @node Printing chord names
3865 @subsection Printing chord names
3867 @cindex printing chord names
3871 For displaying printed chord names, use the @internalsref{ChordNames} context.
3872 The chords may be entered either using the notation
3873 described above, or directly using @code{<<} and @code{>>}:
3875 @lilypond[verbatim,singleline]
3877 \chords {a1 b c} <<d' f' a'>> <<e' g' b'>>
3881 \context ChordNames \scheme
3882 \context Staff \scheme
3887 You can make the chord changes stand out by setting
3888 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3889 display chord names when there is a change in the chords scheme and at
3890 the start of a new line:
3892 @lilypond[verbatim, linewidth=9cm]
3894 c1:m c:m \break c:m c:m d
3898 \context ChordNames {
3899 \property ChordNames.chordChanges = ##t
3901 \context Staff \transpose c c' \scheme
3906 The default chord name layout is a system for Jazz music, proposed by
3907 Klaus Ignatzek (see @ref{Literature}). It can be tuned through the
3908 following properties:
3911 @cindex chordNameExceptions
3912 @item chordNameExceptions
3913 This is a list that contains the chords that have special formatting.
3915 @inputfileref{input/regression,chord-name-exceptions.ly}.
3916 @cindex exceptions, chord names.
3919 @cindex majorSevenSymbol
3920 @item majorSevenSymbol
3921 This property contains the markup object used for the 7th step, when
3922 it is major. Predefined options are @code{whiteTriangleMarkup} and
3923 @code{blackTriangleMarkup}. See
3924 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3926 @cindex chordNameSeparator
3927 @item chordNameSeparator
3928 Different parts of a chord name are normally separated by a
3929 slash. By setting @code{chordNameSeparator}, you can specify other
3931 @lilypond[fragment,verbatim]
3932 \context ChordNames \chords {
3934 \property ChordNames.chordNameSeparator
3935 = \markup { \typewriter "|" }
3939 @cindex chordRootNamer
3940 @item chordRootNamer
3941 The root of a chord is usually printed as a letter with an optional
3942 alteration. The transformation from pitch to letter is done by this
3943 function. Special note names (for example, the German ``H'' for a
3944 B-chord) can be produced by storing a new function in this property.
3946 @cindex chordNoteNamer
3947 @item chordNoteNamer
3948 The default is to print single pitch, e.g. the bass note, using the
3949 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
3950 to a specialized function to change this behavior. For example, the
3951 base can be printed in lower case.
3956 There are also two other chord name schemes implemented: an alternate
3957 Jazz chord notation, and a systematic scheme called Banter chords. The
3958 alternate jazz notation is also shown on the chart in @ref{Chord name
3959 chart}. Turning on these styles is described in the input file
3960 @inputfileref{input/test/,chord-names-jazz.ly}.
3964 @cindex chords, jazz
3969 @cindex @code{\germanChords}
3970 @code{\germanChords},
3971 @cindex @code{\semiGermanChords}
3972 @code{\semiGermanChords}.
3979 @inputfileref{input/regression,chord-name-major7.ly},
3980 @inputfileref{input/regression,chord-name-exceptions.ly},
3981 @inputfileref{input/test,chord-names-jazz.ly},
3982 @inputfileref{input/test,chord-names-german.ly},
3983 @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
3988 Chord names are determined solely from the list of pitches. Chord
3989 inversions are not identified, and neither are added bass notes. This
3990 may result in strange chord names when chords are entered with the
3991 @code{<< .. >>} syntax.
3996 @node Orchestral music
3997 @section Orchestral music
3999 @cindex Writing parts
4001 Orchestral music involves some special notation, both in the full
4002 score and the individual parts. This section explains how to tackle
4003 some common problems in orchestral music.
4008 * Multiple staff contexts::
4011 * Instrument names::
4013 * Multi measure rests::
4014 * Automatic part combining::
4016 * Sound output for transposing instruments::
4019 @node Multiple staff contexts
4020 @subsection Multiple staff contexts
4022 Polyphonic scores consist of many staves. These staves can be
4023 constructed in three different ways:
4025 @item The group is started with a brace at the left. This is done with the
4026 @internalsref{GrandStaff} context.
4027 @item The group is started with a bracket. This is done with the
4028 @internalsref{StaffGroup} context
4029 @item The group is started with a vertical line. This is the default
4033 @cindex Staff, multiple
4034 @cindex bracket, vertical
4035 @cindex brace, vertical
4042 @node Rehearsal marks
4043 @subsection Rehearsal marks
4044 @cindex Rehearsal marks
4046 @cindex @code{\mark}
4048 To print a rehearsal mark, use the @code{\mark} command:
4049 @lilypond[fragment,verbatim]
4059 The mark is incremented automatically if you use @code{\mark
4060 \default}. The value to use is stored in the property
4061 @code{rehearsalMark} is used and automatically incremented.
4063 The @code{\mark} command can also be used to put signs like coda,
4064 segno and fermatas on a barline. Use @code{\markup} to
4065 to access the appropriate symbol:
4067 @lilypond[fragment,verbatim,relative=1]
4068 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4072 In this case, during line breaks,
4073 marks must also be printed at the end of the line, and not at the
4074 beginning. Use the following to force that behavior:
4076 \property Score.RehearsalMark \override
4077 #'break-visibility = #begin-of-line-invisible
4080 See @inputfileref{input/test,boxed-molecule.ly} for putting boxes
4086 @cindex barlines, putting symbols on
4090 @internalsref{MarkEvent}, @internalsref{RehearsalMark}, and
4091 @inputfileref{input/test,boxed-molecule.ly}.
4095 @subsection Bar numbers
4099 @cindex measure numbers
4100 @cindex currentBarNumber
4102 Bar numbers are printed by default at the start of the line. The
4103 number itself is stored in the
4104 @code{currentBarNumber} property,
4105 which is normally updated automatically for every measure.
4107 Bar numbers can be typeset at regular intervals instead of at the
4108 beginning of each line. This is illustrated in the following example,
4109 whose source is available as
4110 @inputfileref{input/test,bar-number-regular-interval.ly}:
4112 @lilypondfile[notexidoc]{bar-number-regular-interval.ly}
4117 @internalsref{BarNumber},
4118 @inputfileref{input/test,bar-number-every-five-reset.ly}, and
4119 @inputfileref{input/test,bar-number-regular-interval.ly}.
4123 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4124 there is one at the top. To solve this, the
4125 @code{padding} property of @internalsref{BarNumber} can be
4126 used to position the number correctly.
4128 @node Instrument names
4129 @subsection Instrument names
4131 In an orchestral score, instrument names are printed left side of the
4134 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4135 and @internalsref{Staff}.@code{instr}. This will print a string before
4136 the start of the staff. For the first start, @code{instrument} is
4137 used, for the next ones @code{instr} is used:
4139 @lilypond[verbatim,singleline]
4140 \property Staff.instrument = "ploink " { c''4 }
4143 You can also use markup texts to construct more complicated instrument
4146 @lilypond[fragment,verbatim,singleline]
4148 \property Staff.instrument = \markup {
4149 \column << "Clarinetti"
4151 \smaller \musicglyph #"accidentals--1"
4162 @internalsref{InstrumentName}.
4166 When you put a name on a grand staff or piano staff the width of the
4167 brace is not taken into account. You must add extra spaces to the end of
4168 the name to avoid a collision.
4171 @subsection Transpose
4173 @cindex transposition of pitches
4174 @cindex @code{\transpose}
4176 A music expression can be transposed with @code{\transpose}. The syntax
4179 \transpose @var{from} @var{to} @var{musicexpr}
4182 This means that @var{musicexpr} is transposed by the interval
4183 between @var{from} and @var{to}.
4185 @code{\transpose} distinguishes between enharmonic pitches: both
4186 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4187 half a tone. The first version will print sharps and the second
4188 version will print flats:
4190 @lilypond[singleline, verbatim]
4191 mus =\notes { \key d \major cis d fis g }
4192 \score { \notes \context Staff {
4195 \transpose c g' \mus
4196 \transpose c f' \mus
4202 @internalsref{TransposedMusic}, and @internalsref{UntransposableMusic}.
4206 If you want to use both @code{\transpose} and @code{\relative}, then
4207 you must put @code{\transpose} outside of @code{\relative}, since
4208 @code{\relative} will have no effect music that appears inside a
4214 @node Multi measure rests
4215 @subsection Multi measure rests
4216 @cindex multi measure rests
4217 @cindex Rests, multi measure
4221 Multi measure rests are entered using `@code{R}'. It is specifically
4222 meant for full bar rests and for entering parts: the rest can expand to
4223 fill a score with rests, or it can be printed as a single multimeasure
4224 rest. This expansion is controlled by the property
4225 @code{Score.skipBars}. If this is set to true, Lily will not expand
4226 empty measures, and the appropriate number is added automatically:
4228 @lilypond[fragment,verbatim]
4229 \time 4/4 r1 | R1 | R1*2
4230 \property Score.skipBars = ##t R1*17 R1*4
4233 The @code{1} in @code{R1} is similar to the duration notation used for
4234 notes. Hence, for time signatures other than 4/4, you must enter other
4235 durations. This can be done with augmentation dots or fractions:
4237 @lilypond[fragment,verbatim]
4238 \property Score.skipBars = ##t
4246 An @code{R} spanning a single measure is printed as either a whole rest
4247 or a breve, centered in the measure regardless of the time signature.
4249 @cindex text on multi-measure rest
4250 @cindex script on multi-measure rest
4251 @cindex fermata on multi-measure rest
4253 Texts can be added to multi-measure rests by using the
4254 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4255 replaced. If you need both texts and the number, you must add the
4256 number by hand. A variable (@code{\fermataMarkup}) is provided for
4260 @lilypond[verbatim,fragment]
4262 R2._\markup { "Ad lib" }
4267 @cindex whole rests for a full measure
4271 @internalsref{MultiMeasureRestEvent},
4272 @internalsref{MultiMeasureTextEvent},
4273 @internalsref{MultiMeasureRestMusicGroup}, and
4274 @internalsref{MultiMeasureRest}.
4276 The layout object @internalsref{MultiMeasureRestNumber} is for the
4277 default number, and @internalsref{MultiMeasureRestText} for user
4282 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4283 over multi-measure rests.
4285 @cindex condensing rests
4287 There is no way to automatically condense multiple rests into a single
4288 multimeasure rest. Multi measure rests do not take part in rest
4291 Be careful when entering multimeasure rests followed by whole notes,
4295 will enter two notes lasting four measures each. When @code{skipBars}
4296 is set, then the result will look OK, but the bar numbering will be
4299 @node Automatic part combining
4300 @subsection Automatic part combining
4301 @cindex automatic part combining
4302 @cindex part combiner
4305 Automatic part combining is used to merge two parts of music onto a
4306 staff. It is aimed at typesetting orchestral scores. When the two
4307 parts are identical for a period of time, only one is shown. In
4308 places where the two parts differ, they are typeset as separate
4309 voices, and stem directions are set automatically. Also, solo and
4310 @emph{a due} parts are identified and can be marked.
4314 The syntax for part combining is
4317 \partcombine @var{context} @var{musicexpr1} @var{musicexpr2}
4319 where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
4320 combined into one context of type @var{context}. The music expressions
4321 must be interpreted by contexts whose names should start with @code{one}
4324 The following example demonstrates the basic functionality of the part
4325 combiner: putting parts on one staff, and setting stem directions and
4328 @lilypond[verbatim,singleline,fragment]
4330 \context Voice=one \partcombine Voice
4331 \context Thread=one \relative c'' {
4334 \context Thread=two \relative c'' {
4340 The first @code{g} appears only once, although it was
4341 specified twice (once in each part). Stem, slur and tie directions are
4342 set automatically, depending whether there is a solo or unisono. The
4343 first part (with context called @code{one}) always gets up stems, and
4344 `solo', while the second (called @code{two}) always gets down stems and
4347 If you just want the merging parts, and not the textual markings, you
4348 may set the property @var{soloADue} to false:
4350 @lilypond[verbatim,singleline,fragment]
4352 \property Staff.soloADue = ##f
4353 \context Voice=one \partcombine Voice
4354 \context Thread=one \relative c'' {
4357 \context Thread=two \relative c'' {
4365 @internalsref{PartCombineMusic},
4366 @internalsref{Thread_devnull_engraver}, and
4367 @internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}.
4371 The syntax for naming contexts in inconsistent with the syntax for
4374 In @code{soloADue} mode, when the two voices play the same notes on and
4375 off, the part combiner may typeset @code{a2} more than once in a
4378 @lilypond[fragment,singleline]
4380 \context Voice=one \partcombine Voice
4381 \context Thread=one \relative c'' {
4384 \context Thread=two \relative c'' {
4390 The part combiner is slated to be rewritten [TODO: explain why].
4392 @cindex @code{Thread_devnull_engraver}
4393 @cindex @code{Voice_engraver}
4394 @cindex @code{A2_engraver}
4397 @subsection Hiding staves
4399 @cindex Frenched scores
4400 @cindex Hiding staves
4402 In orchestral scores, staff lines that only have rests are usually
4403 removed. This saves some space. This style is called `French Score'.
4404 For @internalsref{Lyrics}, @internalsref{LyricsVoice},
4405 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4406 switched on by default. When these line of these contexts turn out
4407 empty after the line-breaking process, they are removed.
4409 For normal staves, a specialized @internalsref{Staff} context is
4410 available, which does the same: staves containing nothing (or only
4411 multi measure rests) are removed. The context definition is stored in
4412 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4413 in this example disappears in the second line:
4418 \notes \relative c' <
4419 \new Staff { e4 f g a \break c1 }
4420 \new Staff { c4 d e f \break R1 }
4424 \translator { \RemoveEmptyStaffContext }
4430 @node Sound output for transposing instruments
4431 @subsection Sound output for transposing instruments
4433 When you want to make a MIDI file from a score containing transposed
4434 and untransposed instruments, you have to instruct LilyPond the pitch
4435 offset (in semitones) for the transposed instruments. This is done
4436 using the @code{transposing} property. It does not affect printed
4439 @cindex @code{transposing}
4442 \property Staff.instrument = #"Cl. in B-flat"
4443 \property Staff.transposing = #-2
4447 @node Ancient notation
4448 @section Ancient notation
4450 @cindex Vaticana, Editio
4451 @cindex Medicaea, Editio
4456 @c [TODO: write more comprehensive introduction on ancient notation]
4458 Support for ancient notation is still under heavy development.
4459 Regardless of all of the current limitations (see the bugs section
4460 below for details), it currently includes features for mensural
4461 notation and Gregorian Chant notation. There is also limited support
4462 for figured bass notation.
4464 Many graphical objects provide a @code{style} property, see
4465 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4466 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4467 signatures}. By manipulating such a grob property, the typographical
4468 appearance of the affected graphical objects can be accomodated for a
4469 specific notation flavour without need for introducing any new
4473 Other aspects of ancient notation can not that easily be expressed as
4474 in terms of just changing a style property of a graphical object.
4475 Therefore, some notational concepts are introduced specifically for
4476 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4477 @ref{Ligatures}, and @ref{Figured bass}.
4481 * Ancient note heads::
4482 * Ancient accidentals::
4486 * Ancient time signatures::
4491 * Vaticana style contexts::
4494 If this all is way too much of documentation for you, and you just
4495 want to dive into typesetting without worrying too much about the
4496 details on how to customize a context, then you may have a look at the
4497 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4498 set up predefined style-specific voice and staff contexts, and
4499 directly go ahead with the note entry.
4503 Ligatures need special spacing that has not yet been implemented. As
4504 a result, there is too much space between ligatures most of the time,
4505 and line breaking often is unsatisfactory. Also, lyrics do not
4506 correctly align with ligatures.
4508 Accidentals must not be printed within a ligature, but instead need to
4509 be collected and printed in front of it.
4511 Augmentum dots within ligatures are currently not handled correctly.
4514 @node Ancient note heads
4515 @subsection Ancient note heads
4521 For ancient notation, a note head style other than the @code{default}
4522 style may be chosen. This is accomplished by setting the @code{style}
4523 property of the NoteHead object to the desired value (@code{baroque},
4524 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4525 differs from the @code{default} style only in using a square shape for
4526 @code{\breve} note heads. The @code{neo_mensural} style differs from
4527 the @code{baroque} style in that it uses rhomboidal heads for whole
4528 notes and all smaller durations. Stems are centered on the note
4529 heads. This style is in particular useful when transcribing mensural
4530 music, e.g. for the incipit. The @code{mensural} style finally
4531 produces note heads that mimick the look of note heads in historic
4532 printings of the 16th century.
4534 The following example demonstrates the @code{neo_mensural} style:
4536 @lilypond[fragment,singleline,verbatim]
4537 \property Voice.NoteHead \set #'style = #'neo_mensural
4538 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4541 When typesetting a piece in Gregorian Chant notation, a Gregorian
4542 ligature engraver will automatically select the proper note heads,
4543 such there is no need to explicitly set the note head style. Still,
4544 the note head style can be set e.g. to @code{vaticana_punctum} to
4545 produce punctum neumes. Similarly, a mensural ligature engraver is
4546 used to automatically assemble mensural ligatures. See
4547 @ref{Ligatures} for how ligature engravers work.
4551 @inputfileref{input/regression,note-head-style.ly} gives an overview
4552 over all available note head styles.
4554 @ref{Percussion staves} use note head styles of their own that are
4555 frequently used in contemporary music notation.
4557 @node Ancient accidentals
4558 @subsection Ancient accidentals
4564 Use the @code{style} property of grob @internalsref{Accidental} to
4565 select ancient accidentals. Currently supported styles are
4566 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4568 @lilypond[singleline,26pt]
4576 { " " \musicglyph #"accidentals-vaticana-1"
4577 " " \musicglyph #"accidentals-vaticana0" }
4581 { " " \musicglyph #"accidentals-medicaea-1" }
4585 { " " \musicglyph #"accidentals-hufnagel-1" }
4589 { " " \musicglyph #"accidentals-mensural-1"
4590 " " \musicglyph #"accidentals-mensural1" }
4599 \remove "Bar_number_engraver"
4603 \remove "Clef_engraver"
4604 \remove "Key_engraver"
4605 \remove "Time_signature_engraver"
4606 \remove "Staff_symbol_engraver"
4607 minimumVerticalExtent = ##f
4613 As shown, not all accidentals are supported by each style. When
4614 trying to access an unsupported accidental, LilyPond will switch to a
4615 different style, as demonstrated in
4616 @inputfileref{input/test,ancient-accidentals.ly}.
4618 Similarly to local accidentals, the style of the key signature can be
4619 controlled by the @code{style} property of the
4620 @internalsref{KeySignature} grob.
4624 @ref{Pitches}, @ref{Chromatic alterations} and @ref{Accidentals} give
4625 a general introduction into the use of accidentals. @ref{Key
4626 signature} gives a general introduction into the use of key
4631 @subsection Ancient rests
4637 Use the @code{style} property of grob @internalsref{Rest} to select
4638 ancient accidentals. Currently supported styles are @code{classical},
4639 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4640 from the @code{default} style only in that the quarter rest looks like
4641 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4642 well for e.g. the incipit of a transcribed mensural piece of music.
4643 The @code{mensural} style finally mimicks the appearance of rests as
4644 in historic prints of the 16th century.
4646 The following example demonstrates the @code{neo_mensural} style:
4648 @lilypond[fragment,singleline,verbatim]
4649 \property Voice.Rest \set #'style = #'neo_mensural
4650 r\longa r\breve r1 r2 r4 r8 r16
4653 There are no 32th and 64th rests specifically for the mensural or
4654 neo-mensural style. Instead, the rests from the default style will be
4655 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4658 There are no rests in Gregorian Chant notation; instead, it uses
4663 @ref{Rests} gives a general introduction into the use of rests.
4667 @subsection Ancient clefs
4673 LilyPond supports a variety of clefs, many of them ancient.
4675 The following table shows all ancient clefs that are supported via the
4676 @code{\clef} command. Some of the clefs use the same glyph, but
4677 differ only with respect to the line they are printed on. In such
4678 cases, a trailing number in the name is used to enumerate these clefs.
4679 Still, you can manually force a clef glyph to be typeset on an
4680 arbitrary line, as described in @ref{Clef}. The note printed to the
4681 right side of each clef in the example column denotes the @code{c'}
4682 with respect to that clef.
4684 @multitable @columnfractions .3 .3 .3 .1
4688 @b{Description} @tab
4689 @b{Supported Clefs} @tab
4693 @code{clefs-neo_mensural_c} @tab
4694 modern style mensural C clef @tab
4695 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4696 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4697 @lilypond[relative 0, notime]
4698 \property Staff.TimeSignature \set #'transparent = ##t
4699 \clef "neo_mensural_c2" c
4703 @code{clefs-petrucci_c1}
4704 @code{clefs-petrucci_c2}
4705 @code{clefs-petrucci_c3}
4706 @code{clefs-petrucci_c4}
4707 @code{clefs-petrucci_c5}
4710 petrucci style mensural C clefs, for use on different stafflines
4711 (the examples shows the 2nd staffline C clef).
4721 @lilypond[relative 0, notime]
4722 \property Staff.TimeSignature \set #'transparent = ##t
4723 \clef "petrucci_c2" c
4727 @code{clefs-petrucci_f} @tab
4728 petrucci style mensural F clef @tab
4729 @code{petrucci_f} @tab
4730 @lilypond[relative 0, notime]
4731 \property Staff.TimeSignature \set #'transparent = ##t
4732 \clef "petrucci_f" c
4736 @code{clefs-petrucci_g} @tab
4737 petrucci style mensural G clef @tab
4738 @code{petrucci_g} @tab
4739 @lilypond[relative 0, notime]
4740 \property Staff.TimeSignature \set #'transparent = ##t
4741 \clef "petrucci_g" c
4745 @code{clefs-mensural_c} @tab
4746 historic style mensural C clef @tab
4747 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4748 @code{mensural_c4} @tab
4749 @lilypond[relative 0, notime]
4750 \property Staff.TimeSignature \set #'transparent = ##t
4751 \clef "mensural_c2" c
4755 @code{clefs-mensural_f} @tab
4756 historic style mensural F clef @tab
4757 @code{mensural_f} @tab
4758 @lilypond[relative 0, notime]
4759 \property Staff.TimeSignature \set #'transparent = ##t
4760 \clef "mensural_f" c
4764 @code{clefs-mensural_g} @tab
4765 historic style mensural G clef @tab
4766 @code{mensural_g} @tab
4767 @lilypond[relative 0, notime]
4768 \property Staff.TimeSignature \set #'transparent = ##t
4769 \clef "mensural_g" c
4773 @code{clefs-vaticana_do} @tab
4774 Editio Vaticana style do clef @tab
4775 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4776 @lilypond[relative 0, notime]
4778 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4779 \property Staff.TimeSignature \set #'transparent = ##t
4780 \clef "vaticana_do2" c
4784 @code{clefs-vaticana_fa} @tab
4785 Editio Vaticana style fa clef @tab
4786 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4787 @lilypond[relative 0, notime]
4789 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4790 \property Staff.TimeSignature \set #'transparent = ##t
4791 \clef "vaticana_fa2" c
4795 @code{clefs-medicaea_do} @tab
4796 Editio Medicaea style do clef @tab
4797 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4798 @lilypond[relative 0, notime]
4800 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4801 \property Staff.TimeSignature \set #'transparent = ##t
4802 \clef "medicaea_do2" c
4806 @code{clefs-medicaea_fa} @tab
4807 Editio Medicaea style fa clef @tab
4808 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4809 @lilypond[relative 0, notime]
4811 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4812 \property Staff.TimeSignature \set #'transparent = ##t
4813 \clef "medicaea_fa2" c
4817 @code{clefs-hufnagel_do} @tab
4818 historic style hufnagel do clef @tab
4819 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
4820 @lilypond[relative 0, notime]
4822 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4823 \property Staff.TimeSignature \set #'transparent = ##t
4824 \clef "hufnagel_do2" c
4828 @code{clefs-hufnagel_fa} @tab
4829 historic style hufnagel fa clef @tab
4830 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
4831 @lilypond[relative 0, notime]
4833 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4834 \property Staff.TimeSignature \set #'transparent = ##t
4835 \clef "hufnagel_fa2" c
4839 @code{clefs-hufnagel_do_fa} @tab
4840 historic style hufnagel combined do/fa clef @tab
4841 @code{hufnagel_do_fa} @tab
4842 @lilypond[relative 0, notime]
4843 \property Staff.TimeSignature \set #'transparent = ##t
4844 \clef "hufnagel_do_fa" c
4849 @c --- This should go somewhere else: ---
4850 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
4853 @c @code{percussion}
4855 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
4857 @c @item modern style tab clef (glyph: @code{clefs-tab})
4862 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
4864 @emph{Modern style} means ``as is typeset in contemporary editions of
4865 transcribed mensural music''.
4867 @emph{Petrucci style} means ``inspired by printings published by the
4868 famous engraver Petrucci (1466-1539)''.
4870 @emph{Historic style} means ``as was typeset or written in historic
4871 editions (other than those of Petrucci)''.
4873 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
4875 Petrucci used C clefs with differently balanced left-side vertical
4876 beams, depending on which staffline it is printed.
4880 For modern clefs, see @ref{Clef}. For the percussion clef, see
4881 @ref{Percussion staves}. For the @code{TAB} clef, see
4886 @subsection Ancient flags
4892 Use the @code{flag-style} property of grob @internalsref{Stem} to
4893 select ancient flags. Besides the @code{default} flag style,
4894 currently only @code{mensural} style is supported:
4896 @lilypond[fragment,singleline,verbatim]
4897 \property Voice.Stem \set #'flag-style = #'mensural
4898 \property Voice.Stem \set #'thickness = #1.0
4899 \property Voice.NoteHead \set #'style = #'mensural
4901 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
4902 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
4905 Note that the innermost flare of each mensural flag always is
4906 vertically aligned with a staff line. If you do not like this
4907 behaviour, you can set the @code{adjust-if-on-staffline} property of
4908 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
4909 of the end of each flare is different between notes on staff lines and
4910 notes between staff lines:
4912 @lilypond[fragment,singleline]
4913 \property Voice.Stem \set #'flag-style = #'mensural
4914 \property Voice.Stem \set #'thickness = #1.0
4915 \property Voice.Stem \set #'adjust-if-on-staffline = ##f
4916 \property Voice.NoteHead \set #'style = #'mensural
4918 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
4919 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
4922 There is no particular flag style for neo-mensural notation. Hence,
4923 when typesetting e.g. the incipit of a transcibed piece of mensural
4924 music, the default flag style should be used. There are no flags in
4925 Gregorian Chant notation.
4928 @node Ancient time signatures
4929 @subsection Ancient time signatures
4931 @cindex time signatures
4935 There is limited support for mensural time signatures. Currently, the
4936 glyphs are hard-wired to particular time fractions. In other words,
4937 to get a particular mensural signature glyph with the @code{\time n/m}
4938 command, @code{n} and @code{m} have to be chosen according to the
4944 \property Score.timing = ##f
4945 \property Score.barAlways = ##t
4946 s_\markup { "$\\backslash$time 4/4" }
4947 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/4" }
4949 s_\markup { "$\\backslash$time 2/2" }
4950 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/2" }
4952 s_\markup { "$\\backslash$time 6/4" }
4953 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/4" }
4955 s_\markup { "$\\backslash$time 6/8" }
4956 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/8" }
4958 s_\markup { "$\\backslash$time 3/2" }
4959 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/2" }
4961 s_\markup { "$\\backslash$time 3/4" }
4962 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/4" }
4964 s_\markup { "$\\backslash$time 9/4" }
4965 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/4" }
4967 s_\markup { "$\\backslash$time 9/8" }
4968 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/8" }
4970 s_\markup { "$\\backslash$time 4/8" }
4971 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/8" }
4973 s_\markup { "$\\backslash$time 2/4" }
4974 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/4" }
4982 \remove Staff_symbol_engraver
4983 \remove Clef_engraver
4984 \remove Time_signature_engraver
4990 Use the @code{style} property of grob @internalsref{TimeSignature} to
4991 select ancient time signatures. Currently supported styles are
4992 @code{neo_mensural} and @code{mensural}. The above table uses the
4993 @code{neo_mensural} style. This style is appropriate e.g. for the
4994 incipit of transcriptions of mensural pieces. The @code{mensural}
4995 style mimicks the look of historical printings of the 16th century.
4997 @inputfileref{input/test,time.ly} gives an overview over all available
4998 ancient and modern styles.
5002 @ref{Time signature} gives a general introduction into the use of time
5007 Mensural signature glyphs are currently mapped to time fractions in a
5008 hard-wired way. This mapping is sensible, but still arbitrary: given
5009 a mensural time signature, the time fraction represents a modern meter
5010 that usually will be a good choice when transcribing a mensural piece
5011 of music. For a particular piece of mensural music, however, the
5012 mapping may be unsatisfactory. In particular, the mapping assumes a
5013 fixed transcription of durations (e.g. brevis = half note in 2/2,
5014 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5015 are currently not at all accessible through the @code{\time} command.
5017 Mensural time signatures are supported typographically, but not yet
5018 musically. The internal representation of durations is currently
5019 based on a purely binary system; a ternary division such as 1 brevis =
5020 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5021 prolatione maiori) is not correctly handled: event times in ternary
5022 modes will be badly computed, resulting e.g. in horizontally
5023 misaligned note heads, and bar checks are likely to erroneously fail.
5025 The syntax and semantics of the @code{\time} command for mensural
5026 music is subject to change.
5029 @subsection Custodes
5034 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5035 symbol that appears at the end of a staff. It anticipates the pitch
5036 of the first note(s) of the following line and thus helps the player
5037 or singer to manage line breaks during performance, thus enhancing
5038 readability of a score.
5040 Custodes were frequently used in music notation until the 17th
5041 century. Nowadays, they have survived only in a few particular forms
5042 of musical notation such as contemporary editions of Gregorian chant
5043 like the @emph{editio vaticana}. There are different custos glyphs
5044 used in different flavours of notational style.
5048 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5049 @internalsref{Staff} context when declaring the @code{\paper} block,
5050 as shown in the following example:
5056 \consists Custos_engraver
5057 Custos \override #'style = #'mensural
5062 The result looks like this:
5068 \property Staff.Custos \set #'style = #'mensural
5075 \consists Custos_engraver
5082 The custos glyph is selected by the @code{style} property. The styles
5083 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5084 @code{mensural}. They are demonstrated in the following fragment:
5094 { " " \musicglyph #"custodes-vaticana-u0" }
5098 { " " \musicglyph #"custodes-medicaea-u0" }
5102 { " " \musicglyph #"custodes-hufnagel-u0" }
5106 { " " \musicglyph #"custodes-mensural-u0" }
5115 \remove "Bar_number_engraver"
5119 \remove "Clef_engraver"
5120 \remove "Key_engraver"
5121 \remove "Time_signature_engraver"
5122 \remove "Staff_symbol_engraver"
5123 minimumVerticalExtent = ##f
5129 If the boolean property @code{adjust-if-on-staffline} is set to
5130 @code{#t} (which it is by default), lily typesets slightly different
5131 variants of the custos glyph, depending on whether the custos, is
5132 typeset on or between stafflines. The glyph will
5133 optically fit well into the staff, with the appendage on the right of
5134 the custos always ending at the same vertical position between two
5135 stafflines regardless of the pitch. If you set
5136 @code{adjust-if-on-staffline} to @code{#f}, then
5137 a compromise between both forms is used.
5139 Just like stems can be attached to noteheads in two directions
5140 @emph{up} and @emph{down}, each custos glyph is available with its
5141 appendage pointing either up or down. If the pitch of a custos is
5142 above a selectable position, the appendage will point downwards; if
5143 the pitch is below this position, the appendage will point upwards.
5144 Use property @code{neutral-position} to select this position. By
5145 default, it is set to @code{0}, such that the neutral position is the
5146 center of the staff. Use property @code{neutral-direction} to control
5147 what happens if a custos is typeset on the neutral position itself.
5148 By default, this property is set to @code{-1}, such that the appendage
5149 will point downwards. If set to @code{1}, the appendage will point
5150 upwards. Other values such as @code{0} are reserved for future
5151 extensions and should not be used.
5155 @internalsref{Custos} and @inputfileref{input/regression,custos.ly}.
5159 @subsection Divisiones
5165 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5166 `division') is a staff context symbol that is used to structure
5167 Gregorian music into phrases and sections. The musical meaning of
5168 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5169 can be characterized as short, medium and long pause, somewhat like
5170 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5171 a chant, but is also frequently used within a single
5172 antiphonal/responsorial chant to mark the end of each section.
5176 To use divisiones, include the file @code{gregorian-init.ly}. It
5177 contains definitions that you can apply by just inserting
5178 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5179 and @code{\finalis} at proper places in the input. Some editions use
5180 @emph{virgula} or @emph{caesura} instead of divisio minima.
5181 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5184 @lilypondfile[notexidoc]{divisiones.ly}
5188 @cindex @code{\virgula}
5190 @cindex @code{\caesura}
5192 @cindex @code{\divisioMinima}
5193 @code{\divisioMinima},
5194 @cindex @code{\divisioMaior}
5195 @code{\divisioMaior},
5196 @cindex @code{\divisioMaxima}
5197 @code{\divisioMaxima},
5198 @cindex @code{\finalis}
5203 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
5204 @inputfileref{input/test,divisiones.ly}, and @ref{Breath marks}.
5207 @subsection Ligatures
5211 @c TODO: Should double check if I recalled things correctly when I wrote
5212 @c down the following paragraph by heart.
5214 In musical terminology, a ligature is a coherent graphical symbol that
5215 represents at least two distinct notes. Ligatures originally appeared
5216 in the manuscripts of Gregorian chant notation roughly since the 9th
5217 century as an allusion to the accent symbols of greek lyric poetry to
5218 denote ascending or descending sequences of notes. Both, the shape
5219 and the exact meaning of ligatures changed tremendously during the
5220 following centuries: In early notation, ligatures were used for
5221 monophonic tunes (Gregorian chant) and very soon denoted also the way
5222 of performance in the sense of articulation. With upcoming
5223 multiphony, the need for a metric system arised, since multiple voices
5224 of a piece have to be synchronized some way. New notation systems
5225 were invented that used the manifold shapes of ligatures to now denote
5226 rhythmical patterns (e.g. black mensural notation, mannered notation,
5227 ars nova). With the invention of the metric system of the white
5228 mensural notation, the need for ligatures to denote such patterns
5229 disappeared. Nevertheless, ligatures were still in use in the
5230 mensural system for a couple of decades until they finally disappeared
5231 during the late 16th / early 17th century. Still, ligatures have
5232 survived in contemporary editions of Gregorian chant such as the
5233 Editio Vaticana from 1905/08.
5237 Syntactically, ligatures are simply enclosed by @code{\[} and
5238 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5239 additional input syntax specific for this particular type of ligature.
5240 By default, the @internalsref{LigatureBracket} engraver just puts a
5241 square bracket above the ligature:
5243 @lilypond[singleline,verbatim]
5245 \notes \transpose c c' {
5253 To select a specific style of ligatures, a proper ligature engraver
5254 has to be added to the @internalsref{Voice} context, as explained in
5255 the following subsections. Currently, only white mensural ligatures
5256 are supported with certain limitations. Support for Editio Vaticana
5257 will be added in the future.
5260 * White mensural ligatures::
5261 * Gregorian square neumes ligatures::
5264 @node White mensural ligatures
5265 @subsubsection White mensural ligatures
5267 @cindex Mensural ligatures
5268 @cindex White mensural ligatures
5270 There is limited support for white mensural ligatures. The
5271 implementation is still experimental; it currently may output strange
5272 warnings or even crash in some cases or produce weird results on more
5277 To engrave white mensural ligatures, in the paper block the
5278 @internalsref{Mensural_ligature_engraver} has to be put into the
5279 @internalsref{Voice} context, and remove the
5280 @internalsref{Ligature_bracket_engraver}:
5286 \remove Ligature_bracket_engraver
5287 \consists Mensural_ligature_engraver
5292 There is no additional input language to describe the shape of a
5293 white mensural ligature. The shape is rather determined solely from
5294 the pitch and duration of the enclosed notes. While this approach may
5295 take a new user a while to get accustomed, it has the great advantage
5296 that the full musical information of the ligature is known internally.
5297 This is not only required for correct MIDI output, but also allows for
5298 automatic transcription of the ligatures.
5303 \property Score.timing = ##f
5304 \property Score.defaultBarType = "empty"
5305 \property Voice.NoteHead \set #'style = #'neo_mensural
5306 \property Staff.TimeSignature \set #'style = #'neo_mensural
5308 \[ g\longa c\breve a\breve f\breve d'\longa \]
5310 \[ e1 f1 a\breve g\longa \]
5312 @lilypond[singleline]
5314 \notes \transpose c c' {
5315 \property Score.timing = ##f
5316 \property Score.defaultBarType = "empty"
5317 \property Voice.NoteHead \set #'style = #'neo_mensural
5318 \property Staff.TimeSignature \set #'style = #'neo_mensural
5320 \[ g\longa c\breve a\breve f\breve d'\longa \]
5322 \[ e1 f1 a\breve g\longa \]
5327 \remove Ligature_bracket_engraver
5328 \consists Mensural_ligature_engraver
5334 Without replacing @internalsref{Ligature_bracket_engraver} with
5335 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5338 @lilypond[singleline]
5340 \notes \transpose c c' {
5341 \property Score.timing = ##f
5342 \property Score.defaultBarType = "empty"
5343 \property Voice.NoteHead \set #'style = #'neo_mensural
5344 \property Staff.TimeSignature \set #'style = #'neo_mensural
5346 \[ g\longa c\breve a\breve f\breve d'\longa \]
5348 \[ e1 f1 a\breve g\longa \]
5354 @node Gregorian square neumes ligatures
5355 @subsubsection Gregorian square neumes ligatures
5357 @cindex Square neumes ligatures
5358 @cindex Gregorian square neumes ligatures
5360 Gregorian square neumes notation (following the style of the Editio
5361 Vaticana) is under heavy development, but not yet really usable for
5362 production purposes. Core ligatures can already be typeset, but
5363 essential issues for serious typesetting are still under development,
5364 such as (among others) horizontal alignment of multiple ligatures,
5365 lyrics alignment and proper accidentals handling. Still, this section
5366 gives a sneak preview of what Gregorian chant may look like once it
5369 The following table contains the extended neumes table of the 2nd
5370 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5371 1983 by the monks of Solesmes.
5373 @multitable @columnfractions .4 .2 .2 .2
5376 @b{Neuma aut@*Neumarum Elementa} @tab
5377 @b{Figurae@*Rectae} @tab
5378 @b{Figurae@*Liquescentes Auctae} @tab
5379 @b{Figurae@*Liquescentes Deminutae}
5381 @c TODO: \paper block is identical in all of the below examples.
5382 @c Therefore, it should somehow be included rather than duplicated all
5385 @c why not make identifiers in ly/engraver-init.ly? --hwn
5387 @c Because it's just used to typeset plain notes without
5388 @c a staff for demonstration purposes rather than something
5389 @c special of Gregorian chant notation. --jr
5394 @lilypond[noindent, 26pt, nofragment, linewidth=1.5cm]
5395 \include "gregorian-init.ly"
5397 \notes \transpose c c' {
5400 \noBreak s^\markup {"a"} \noBreak
5402 % Punctum Inclinatum
5404 \noBreak s^\markup {"b"}
5410 \remove "Bar_number_engraver"
5414 \remove "Clef_engraver"
5415 \remove "Key_engraver"
5416 StaffSymbol \set #'transparent = ##t
5417 \remove "Time_signature_engraver"
5418 \remove "Bar_engraver"
5419 minimumVerticalExtent = ##f
5423 \remove Ligature_bracket_engraver
5424 \consists Vaticana_ligature_engraver
5425 NoteHead \set #'style = #'vaticana_punctum
5426 Stem \set #'transparent = ##t
5432 @lilypond[noindent, 26pt, nofragment, linewidth=2.5cm]
5433 \include "gregorian-init.ly"
5435 \notes \transpose c c' {
5436 % Punctum Auctum Ascendens
5437 \[ \auctum \ascendens b \]
5438 \noBreak s^\markup {"c"} \noBreak
5440 % Punctum Auctum Descendens
5441 \[ \auctum \descendens b \]
5442 \noBreak s^\markup {"d"} \noBreak
5444 % Punctum Inclinatum Auctum
5445 \[ \inclinatum \auctum b \]
5446 \noBreak s^\markup {"e"}
5452 \remove "Bar_number_engraver"
5456 \remove "Clef_engraver"
5457 \remove "Key_engraver"
5458 StaffSymbol \set #'transparent = ##t
5459 \remove "Time_signature_engraver"
5460 \remove "Bar_engraver"
5461 minimumVerticalExtent = ##f
5465 \remove Ligature_bracket_engraver
5466 \consists Vaticana_ligature_engraver
5467 NoteHead \set #'style = #'vaticana_punctum
5468 Stem \set #'transparent = ##t
5474 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5475 \include "gregorian-init.ly"
5477 \notes \transpose c c' {
5478 % Punctum Inclinatum Parvum
5479 \[ \inclinatum \deminutum b \]
5480 \noBreak s^\markup {"f"}
5486 \remove "Bar_number_engraver"
5490 \remove "Clef_engraver"
5491 \remove "Key_engraver"
5492 StaffSymbol \set #'transparent = ##t
5493 \remove "Time_signature_engraver"
5494 \remove "Bar_engraver"
5495 minimumVerticalExtent = ##f
5499 \remove Ligature_bracket_engraver
5500 \consists Vaticana_ligature_engraver
5501 NoteHead \set #'style = #'vaticana_punctum
5502 Stem \set #'transparent = ##t
5511 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5512 \include "gregorian-init.ly"
5514 \notes \transpose c c' {
5517 \noBreak s^\markup {"g"}
5523 \remove "Bar_number_engraver"
5527 \remove "Clef_engraver"
5528 \remove "Key_engraver"
5529 StaffSymbol \set #'transparent = ##t
5530 \remove "Time_signature_engraver"
5531 \remove "Bar_engraver"
5532 minimumVerticalExtent = ##f
5536 \remove Ligature_bracket_engraver
5537 \consists Vaticana_ligature_engraver
5538 NoteHead \set #'style = #'vaticana_punctum
5539 Stem \set #'transparent = ##t
5548 @code{3. Apostropha vel Stropha}
5550 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5551 \include "gregorian-init.ly"
5553 \notes \transpose c c' {
5556 \noBreak s^\markup {"h"}
5562 \remove "Bar_number_engraver"
5566 \remove "Clef_engraver"
5567 \remove "Key_engraver"
5568 StaffSymbol \set #'transparent = ##t
5569 \remove "Time_signature_engraver"
5570 \remove "Bar_engraver"
5571 minimumVerticalExtent = ##f
5575 \remove Ligature_bracket_engraver
5576 \consists Vaticana_ligature_engraver
5577 NoteHead \set #'style = #'vaticana_punctum
5578 Stem \set #'transparent = ##t
5584 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5585 \include "gregorian-init.ly"
5587 \notes \transpose c c' {
5589 \[ \stropha \auctum b \]
5590 \noBreak s^\markup {"i"}
5596 \remove "Bar_number_engraver"
5600 \remove "Clef_engraver"
5601 \remove "Key_engraver"
5602 StaffSymbol \set #'transparent = ##t
5603 \remove "Time_signature_engraver"
5604 \remove "Bar_engraver"
5605 minimumVerticalExtent = ##f
5609 \remove Ligature_bracket_engraver
5610 \consists Vaticana_ligature_engraver
5611 NoteHead \set #'style = #'vaticana_punctum
5612 Stem \set #'transparent = ##t
5622 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5623 \include "gregorian-init.ly"
5625 \notes \transpose c c' {
5628 \noBreak s^\markup {"j"}
5634 \remove "Bar_number_engraver"
5638 \remove "Clef_engraver"
5639 \remove "Key_engraver"
5640 StaffSymbol \set #'transparent = ##t
5641 \remove "Time_signature_engraver"
5642 \remove "Bar_engraver"
5643 minimumVerticalExtent = ##f
5647 \remove Ligature_bracket_engraver
5648 \consists Vaticana_ligature_engraver
5649 NoteHead \set #'style = #'vaticana_punctum
5650 Stem \set #'transparent = ##t
5659 @code{5. Clivis vel Flexa}
5661 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5662 \include "gregorian-init.ly"
5664 \notes \transpose c c' {
5673 \remove "Bar_number_engraver"
5677 \remove "Clef_engraver"
5678 \remove "Key_engraver"
5679 StaffSymbol \set #'transparent = ##t
5680 \remove "Time_signature_engraver"
5681 \remove "Bar_engraver"
5682 minimumVerticalExtent = ##f
5686 \remove Ligature_bracket_engraver
5687 \consists Vaticana_ligature_engraver
5688 NoteHead \set #'style = #'vaticana_punctum
5689 Stem \set #'transparent = ##t
5695 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5696 \include "gregorian-init.ly"
5698 \notes \transpose c c' {
5699 % Clivis Aucta Descendens
5700 \[ b \flexa \auctum \descendens g \]
5701 \noBreak s^\markup {"l"} \noBreak
5703 % Clivis Aucta Ascendens
5704 \[ b \flexa \auctum \ascendens g \]
5705 \noBreak s^\markup {"m"}
5711 \remove "Bar_number_engraver"
5715 \remove "Clef_engraver"
5716 \remove "Key_engraver"
5717 StaffSymbol \set #'transparent = ##t
5718 \remove "Time_signature_engraver"
5719 \remove "Bar_engraver"
5720 minimumVerticalExtent = ##f
5724 \remove Ligature_bracket_engraver
5725 \consists Vaticana_ligature_engraver
5726 NoteHead \set #'style = #'vaticana_punctum
5727 Stem \set #'transparent = ##t
5733 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5734 \include "gregorian-init.ly"
5736 \notes \transpose c c' {
5738 \[ b \flexa \deminutum g \]
5745 \remove "Bar_number_engraver"
5749 \remove "Clef_engraver"
5750 \remove "Key_engraver"
5751 StaffSymbol \set #'transparent = ##t
5752 \remove "Time_signature_engraver"
5753 \remove "Bar_engraver"
5754 minimumVerticalExtent = ##f
5758 \remove Ligature_bracket_engraver
5759 \consists Vaticana_ligature_engraver
5760 NoteHead \set #'style = #'vaticana_punctum
5761 Stem \set #'transparent = ##t
5768 @code{6. Podatus vel Pes}
5770 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5771 \include "gregorian-init.ly"
5773 \notes \transpose c c' {
5782 \remove "Bar_number_engraver"
5786 \remove "Clef_engraver"
5787 \remove "Key_engraver"
5788 StaffSymbol \set #'transparent = ##t
5789 \remove "Time_signature_engraver"
5790 \remove "Bar_engraver"
5791 minimumVerticalExtent = ##f
5795 \remove Ligature_bracket_engraver
5796 \consists Vaticana_ligature_engraver
5797 NoteHead \set #'style = #'vaticana_punctum
5798 Stem \set #'transparent = ##t
5804 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5805 \include "gregorian-init.ly"
5807 \notes \transpose c c' {
5808 % Pes Auctus Descendens
5809 \[ g \pes \auctum \descendens b \]
5810 \noBreak s^\markup {"p"} \noBreak
5812 % Pes Auctus Ascendens
5813 \[ g \pes \auctum \ascendens b \]
5814 \noBreak s^\markup {"q"}
5820 \remove "Bar_number_engraver"
5824 \remove "Clef_engraver"
5825 \remove "Key_engraver"
5826 StaffSymbol \set #'transparent = ##t
5827 \remove "Time_signature_engraver"
5828 \remove "Bar_engraver"
5829 minimumVerticalExtent = ##f
5833 \remove Ligature_bracket_engraver
5834 \consists Vaticana_ligature_engraver
5835 NoteHead \set #'style = #'vaticana_punctum
5836 Stem \set #'transparent = ##t
5842 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5843 \include "gregorian-init.ly"
5845 \notes \transpose c c' {
5847 \[ g \pes \deminutum b \]
5854 \remove "Bar_number_engraver"
5858 \remove "Clef_engraver"
5859 \remove "Key_engraver"
5860 StaffSymbol \set #'transparent = ##t
5861 \remove "Time_signature_engraver"
5862 \remove "Bar_engraver"
5863 minimumVerticalExtent = ##f
5867 \remove Ligature_bracket_engraver
5868 \consists Vaticana_ligature_engraver
5869 NoteHead \set #'style = #'vaticana_punctum
5870 Stem \set #'transparent = ##t
5877 @code{7. Pes Quassus}
5879 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5880 \include "gregorian-init.ly"
5882 \notes \transpose c c' {
5884 \[ \oriscus g \pes \virga b \]
5891 \remove "Bar_number_engraver"
5895 \remove "Clef_engraver"
5896 \remove "Key_engraver"
5897 StaffSymbol \set #'transparent = ##t
5898 \remove "Time_signature_engraver"
5899 \remove "Bar_engraver"
5900 minimumVerticalExtent = ##f
5904 \remove Ligature_bracket_engraver
5905 \consists Vaticana_ligature_engraver
5906 NoteHead \set #'style = #'vaticana_punctum
5907 Stem \set #'transparent = ##t
5913 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5914 \include "gregorian-init.ly"
5916 \notes \transpose c c' {
5917 % Pes Quassus Auctus Descendens
5918 \[ \oriscus g \pes \auctum \descendens b \]
5925 \remove "Bar_number_engraver"
5929 \remove "Clef_engraver"
5930 \remove "Key_engraver"
5931 StaffSymbol \set #'transparent = ##t
5932 \remove "Time_signature_engraver"
5933 \remove "Bar_engraver"
5934 minimumVerticalExtent = ##f
5938 \remove Ligature_bracket_engraver
5939 \consists Vaticana_ligature_engraver
5940 NoteHead \set #'style = #'vaticana_punctum
5941 Stem \set #'transparent = ##t
5949 @code{8. Quilisma Pes}
5951 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5952 \include "gregorian-init.ly"
5954 \notes \transpose c c' {
5956 \[ \quilisma g \pes b \]
5963 \remove "Bar_number_engraver"
5967 \remove "Clef_engraver"
5968 \remove "Key_engraver"
5969 StaffSymbol \set #'transparent = ##t
5970 \remove "Time_signature_engraver"
5971 \remove "Bar_engraver"
5972 minimumVerticalExtent = ##f
5976 \remove Ligature_bracket_engraver
5977 \consists Vaticana_ligature_engraver
5978 NoteHead \set #'style = #'vaticana_punctum
5979 Stem \set #'transparent = ##t
5985 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5986 \include "gregorian-init.ly"
5988 \notes \transpose c c' {
5989 % Quilisma Pes Auctus Descendens
5990 \[ \quilisma g \pes \auctum \descendens b \]
5997 \remove "Bar_number_engraver"
6001 \remove "Clef_engraver"
6002 \remove "Key_engraver"
6003 StaffSymbol \set #'transparent = ##t
6004 \remove "Time_signature_engraver"
6005 \remove "Bar_engraver"
6006 minimumVerticalExtent = ##f
6010 \remove Ligature_bracket_engraver
6011 \consists Vaticana_ligature_engraver
6012 NoteHead \set #'style = #'vaticana_punctum
6013 Stem \set #'transparent = ##t
6021 @code{9. Podatus Initio Debilis}
6023 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6024 \include "gregorian-init.ly"
6026 \notes \transpose c c' {
6027 % Pes Initio Debilis
6028 \[ \deminutum g \pes b \]
6035 \remove "Bar_number_engraver"
6039 \remove "Clef_engraver"
6040 \remove "Key_engraver"
6041 StaffSymbol \set #'transparent = ##t
6042 \remove "Time_signature_engraver"
6043 \remove "Bar_engraver"
6044 minimumVerticalExtent = ##f
6048 \remove Ligature_bracket_engraver
6049 \consists Vaticana_ligature_engraver
6050 NoteHead \set #'style = #'vaticana_punctum
6051 Stem \set #'transparent = ##t
6057 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6058 \include "gregorian-init.ly"
6060 \notes \transpose c c' {
6061 % Pes Auctus Descendens Initio Debilis
6062 \[ \deminutum g \pes \auctum \descendens b \]
6069 \remove "Bar_number_engraver"
6073 \remove "Clef_engraver"
6074 \remove "Key_engraver"
6075 StaffSymbol \set #'transparent = ##t
6076 \remove "Time_signature_engraver"
6077 \remove "Bar_engraver"
6078 minimumVerticalExtent = ##f
6082 \remove Ligature_bracket_engraver
6083 \consists Vaticana_ligature_engraver
6084 NoteHead \set #'style = #'vaticana_punctum
6085 Stem \set #'transparent = ##t
6095 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6096 \include "gregorian-init.ly"
6098 \notes \transpose c c' {
6100 \[ a \pes b \flexa g \]
6107 \remove "Bar_number_engraver"
6111 \remove "Clef_engraver"
6112 \remove "Key_engraver"
6113 StaffSymbol \set #'transparent = ##t
6114 \remove "Time_signature_engraver"
6115 \remove "Bar_engraver"
6116 minimumVerticalExtent = ##f
6120 \remove Ligature_bracket_engraver
6121 \consists Vaticana_ligature_engraver
6122 NoteHead \set #'style = #'vaticana_punctum
6123 Stem \set #'transparent = ##t
6129 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6130 \include "gregorian-init.ly"
6132 \notes \transpose c c' {
6133 % Torculus Auctus Descendens
6134 \[ a \pes b \flexa \auctum \descendens g \]
6141 \remove "Bar_number_engraver"
6145 \remove "Clef_engraver"
6146 \remove "Key_engraver"
6147 StaffSymbol \set #'transparent = ##t
6148 \remove "Time_signature_engraver"
6149 \remove "Bar_engraver"
6150 minimumVerticalExtent = ##f
6154 \remove Ligature_bracket_engraver
6155 \consists Vaticana_ligature_engraver
6156 NoteHead \set #'style = #'vaticana_punctum
6157 Stem \set #'transparent = ##t
6163 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6164 \include "gregorian-init.ly"
6166 \notes \transpose c c' {
6167 % Torculus Deminutus
6168 \[ a \pes b \flexa \deminutum g \]
6175 \remove "Bar_number_engraver"
6179 \remove "Clef_engraver"
6180 \remove "Key_engraver"
6181 StaffSymbol \set #'transparent = ##t
6182 \remove "Time_signature_engraver"
6183 \remove "Bar_engraver"
6184 minimumVerticalExtent = ##f
6188 \remove Ligature_bracket_engraver
6189 \consists Vaticana_ligature_engraver
6190 NoteHead \set #'style = #'vaticana_punctum
6191 Stem \set #'transparent = ##t
6198 @code{11. Torculus Initio Debilis}
6200 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6201 \include "gregorian-init.ly"
6203 \notes \transpose c c' {
6204 % Torculus Initio Debilis
6205 \[ \deminutum a \pes b \flexa g \]
6212 \remove "Bar_number_engraver"
6216 \remove "Clef_engraver"
6217 \remove "Key_engraver"
6218 StaffSymbol \set #'transparent = ##t
6219 \remove "Time_signature_engraver"
6220 \remove "Bar_engraver"
6221 minimumVerticalExtent = ##f
6225 \remove Ligature_bracket_engraver
6226 \consists Vaticana_ligature_engraver
6227 NoteHead \set #'style = #'vaticana_punctum
6228 Stem \set #'transparent = ##t
6234 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6235 \include "gregorian-init.ly"
6237 \notes \transpose c c' {
6238 % Torculus Auctus Descendens Initio Debilis
6239 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6246 \remove "Bar_number_engraver"
6250 \remove "Clef_engraver"
6251 \remove "Key_engraver"
6252 StaffSymbol \set #'transparent = ##t
6253 \remove "Time_signature_engraver"
6254 \remove "Bar_engraver"
6255 minimumVerticalExtent = ##f
6259 \remove Ligature_bracket_engraver
6260 \consists Vaticana_ligature_engraver
6261 NoteHead \set #'style = #'vaticana_punctum
6262 Stem \set #'transparent = ##t
6268 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6269 \include "gregorian-init.ly"
6271 \notes \transpose c c' {
6272 % Torculus Deminutus Initio Debilis
6273 \[ \deminutum a \pes b \flexa \deminutum g \]
6280 \remove "Bar_number_engraver"
6284 \remove "Clef_engraver"
6285 \remove "Key_engraver"
6286 StaffSymbol \set #'transparent = ##t
6287 \remove "Time_signature_engraver"
6288 \remove "Bar_engraver"
6289 minimumVerticalExtent = ##f
6293 \remove Ligature_bracket_engraver
6294 \consists Vaticana_ligature_engraver
6295 NoteHead \set #'style = #'vaticana_punctum
6296 Stem \set #'transparent = ##t
6303 @code{12. Porrectus}
6305 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6306 \include "gregorian-init.ly"
6308 \notes \transpose c c' {
6310 \[ a \flexa g \pes b \]
6317 \remove "Bar_number_engraver"
6321 \remove "Clef_engraver"
6322 \remove "Key_engraver"
6323 StaffSymbol \set #'transparent = ##t
6324 \remove "Time_signature_engraver"
6325 \remove "Bar_engraver"
6326 minimumVerticalExtent = ##f
6330 \remove Ligature_bracket_engraver
6331 \consists Vaticana_ligature_engraver
6332 NoteHead \set #'style = #'vaticana_punctum
6333 Stem \set #'transparent = ##t
6339 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6340 \include "gregorian-init.ly"
6342 \notes \transpose c c' {
6343 % Porrectus Auctus Descendens
6344 \[ a \flexa g \pes \auctum \descendens b \]
6351 \remove "Bar_number_engraver"
6355 \remove "Clef_engraver"
6356 \remove "Key_engraver"
6357 StaffSymbol \set #'transparent = ##t
6358 \remove "Time_signature_engraver"
6359 \remove "Bar_engraver"
6360 minimumVerticalExtent = ##f
6364 \remove Ligature_bracket_engraver
6365 \consists Vaticana_ligature_engraver
6366 NoteHead \set #'style = #'vaticana_punctum
6367 Stem \set #'transparent = ##t
6373 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6374 \include "gregorian-init.ly"
6376 \notes \transpose c c' {
6377 % Porrectus Deminutus
6378 \[ a \flexa g \pes \deminutum b \]
6385 \remove "Bar_number_engraver"
6389 \remove "Clef_engraver"
6390 \remove "Key_engraver"
6391 StaffSymbol \set #'transparent = ##t
6392 \remove "Time_signature_engraver"
6393 \remove "Bar_engraver"
6394 minimumVerticalExtent = ##f
6398 \remove Ligature_bracket_engraver
6399 \consists Vaticana_ligature_engraver
6400 NoteHead \set #'style = #'vaticana_punctum
6401 Stem \set #'transparent = ##t
6410 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6411 \include "gregorian-init.ly"
6413 \notes \transpose c c' {
6415 \[ \virga b \inclinatum a \inclinatum g \]
6422 \remove "Bar_number_engraver"
6426 \remove "Clef_engraver"
6427 \remove "Key_engraver"
6428 StaffSymbol \set #'transparent = ##t
6429 \remove "Time_signature_engraver"
6430 \remove "Bar_engraver"
6431 minimumVerticalExtent = ##f
6435 \remove Ligature_bracket_engraver
6436 \consists Vaticana_ligature_engraver
6437 NoteHead \set #'style = #'vaticana_punctum
6438 Stem \set #'transparent = ##t
6444 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6445 \include "gregorian-init.ly"
6447 \notes \transpose c c' {
6449 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6456 \remove "Bar_number_engraver"
6460 \remove "Clef_engraver"
6461 \remove "Key_engraver"
6462 StaffSymbol \set #'transparent = ##t
6463 \remove "Time_signature_engraver"
6464 \remove "Bar_engraver"
6465 minimumVerticalExtent = ##f
6469 \remove Ligature_bracket_engraver
6470 \consists Vaticana_ligature_engraver
6471 NoteHead \set #'style = #'vaticana_punctum
6472 Stem \set #'transparent = ##t
6478 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6479 \include "gregorian-init.ly"
6481 \notes \transpose c c' {
6482 % Climacus Deminutus
6483 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6490 \remove "Bar_number_engraver"
6494 \remove "Clef_engraver"
6495 \remove "Key_engraver"
6496 StaffSymbol \set #'transparent = ##t
6497 \remove "Time_signature_engraver"
6498 \remove "Bar_engraver"
6499 minimumVerticalExtent = ##f
6503 \remove Ligature_bracket_engraver
6504 \consists Vaticana_ligature_engraver
6505 NoteHead \set #'style = #'vaticana_punctum
6506 Stem \set #'transparent = ##t
6513 @code{14. Scandicus}
6515 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6516 \include "gregorian-init.ly"
6518 \notes \transpose c c' {
6520 \[ g \pes a \virga b \]
6527 \remove "Bar_number_engraver"
6531 \remove "Clef_engraver"
6532 \remove "Key_engraver"
6533 StaffSymbol \set #'transparent = ##t
6534 \remove "Time_signature_engraver"
6535 \remove "Bar_engraver"
6536 minimumVerticalExtent = ##f
6540 \remove Ligature_bracket_engraver
6541 \consists Vaticana_ligature_engraver
6542 NoteHead \set #'style = #'vaticana_punctum
6543 Stem \set #'transparent = ##t
6549 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6550 \include "gregorian-init.ly"
6552 \notes \transpose c c' {
6553 % Scandicus Auctus Descendens
6554 \[ g \pes a \pes \auctum \descendens b \]
6561 \remove "Bar_number_engraver"
6565 \remove "Clef_engraver"
6566 \remove "Key_engraver"
6567 StaffSymbol \set #'transparent = ##t
6568 \remove "Time_signature_engraver"
6569 \remove "Bar_engraver"
6570 minimumVerticalExtent = ##f
6574 \remove Ligature_bracket_engraver
6575 \consists Vaticana_ligature_engraver
6576 NoteHead \set #'style = #'vaticana_punctum
6577 Stem \set #'transparent = ##t
6583 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6584 \include "gregorian-init.ly"
6586 \notes \transpose c c' {
6587 % Scandicus Deminutus
6588 \[ g \pes a \pes \deminutum b \]
6595 \remove "Bar_number_engraver"
6599 \remove "Clef_engraver"
6600 \remove "Key_engraver"
6601 StaffSymbol \set #'transparent = ##t
6602 \remove "Time_signature_engraver"
6603 \remove "Bar_engraver"
6604 minimumVerticalExtent = ##f
6608 \remove Ligature_bracket_engraver
6609 \consists Vaticana_ligature_engraver
6610 NoteHead \set #'style = #'vaticana_punctum
6611 Stem \set #'transparent = ##t
6620 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6621 \include "gregorian-init.ly"
6623 \notes \transpose c c' {
6625 \[ g \oriscus a \pes \virga b \]
6632 \remove "Bar_number_engraver"
6636 \remove "Clef_engraver"
6637 \remove "Key_engraver"
6638 StaffSymbol \set #'transparent = ##t
6639 \remove "Time_signature_engraver"
6640 \remove "Bar_engraver"
6641 minimumVerticalExtent = ##f
6645 \remove Ligature_bracket_engraver
6646 \consists Vaticana_ligature_engraver
6647 NoteHead \set #'style = #'vaticana_punctum
6648 Stem \set #'transparent = ##t
6654 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6655 \include "gregorian-init.ly"
6657 \notes \transpose c c' {
6658 % Salicus Auctus Descendens
6659 \[ g \oriscus a \pes \auctum \descendens b \]
6666 \remove "Bar_number_engraver"
6670 \remove "Clef_engraver"
6671 \remove "Key_engraver"
6672 StaffSymbol \set #'transparent = ##t
6673 \remove "Time_signature_engraver"
6674 \remove "Bar_engraver"
6675 minimumVerticalExtent = ##f
6679 \remove Ligature_bracket_engraver
6680 \consists Vaticana_ligature_engraver
6681 NoteHead \set #'style = #'vaticana_punctum
6682 Stem \set #'transparent = ##t
6692 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6693 \include "gregorian-init.ly"
6695 \notes \transpose c c' {
6697 \[ \stropha b \stropha b \stropha a \]
6704 \remove "Bar_number_engraver"
6708 \remove "Clef_engraver"
6709 \remove "Key_engraver"
6710 StaffSymbol \set #'transparent = ##t
6711 \remove "Time_signature_engraver"
6712 \remove "Bar_engraver"
6713 minimumVerticalExtent = ##f
6717 \remove Ligature_bracket_engraver
6718 \consists Vaticana_ligature_engraver
6719 NoteHead \set #'style = #'vaticana_punctum
6720 Stem \set #'transparent = ##t
6732 Unlike most other neumes notation systems, the input language for
6733 neumes does not necessarily reflect directly the typographical
6734 appearance, but is designed to solely focuse on musical meaning. For
6735 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6736 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6737 a Porrectus with a curved flexa shape and only a single Punctum head.
6738 There is no command to explicitly typeset the curved flexa shape; the
6739 decision of when to typeset a curved flexa shape is purely taken from
6740 the musical input. The idea of this approach is to separate the
6741 musical aspects of the input from the notation style of the output.
6742 This way, the same input can be reused to typeset the same music in a
6743 different style of Gregorian chant notation such as Hufnagel (also
6744 known as German gothic neumes) or Medicaea (kind of a very simple
6745 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6746 engraver and Medicaea ligature engraver will have been implemented, it
6747 will be as simple as replacing the ligature engraver in the
6748 @internalsref{Voice} context to get the desired notation style from
6751 The following table shows the code fragments that produce the
6752 ligatures in the above neumes table. The letter in the first column
6753 in each line of the below table indicates to which ligature in the
6754 above table it refers. The second column gives the name of the
6755 ligature. The third column shows the code fragment that produces this
6756 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6758 @multitable @columnfractions .1 .4 .5
6772 Punctum Inclinatum @tab
6773 @code{\[ \inclinatum b \]}
6777 Punctum Auctum Ascendens @tab
6778 @code{\[ \auctum \ascendens b \]}
6782 Punctum Auctum Descendens @tab
6783 @code{\[ \auctum \descendens b \]}
6787 Punctum Inclinatum Auctum @tab
6788 @code{\[ \inclinatum \auctum b \]}
6792 Punctum Inclinatum Parvum @tab
6793 @code{\[ \inclinatum \deminutum b \]}
6798 @code{\[ \virga b \]}
6803 @code{\[ \stropha b \]}
6808 @code{\[ \stropha \auctum b \]}
6813 @code{\[ \oriscus b \]}
6817 Clivis vel Flexa @tab
6818 @code{\[ b \flexa g \]}
6822 Clivis Aucta Descendens @tab
6823 @code{\[ b \flexa \auctum \descendens g \]}
6827 Clivis Aucta Ascendens @tab
6828 @code{\[ b \flexa \auctum \ascendens g \]}
6833 @code{\[ b \flexa \deminutum g \]}
6837 Podatus vel Pes @tab
6838 @code{\[ g \pes b \]}
6842 Pes Auctus Descendens @tab
6843 @code{\[ g \pes \auctum \descendens b \]}
6847 Pes Auctus Ascendens @tab
6848 @code{\[ g \pes \auctum \ascendens b \]}
6853 @code{\[ g \pes \deminutum b \]}
6858 @code{\[ \oriscus g \pes \virga b \]}
6862 Pes Quassus Auctus Descendens @tab
6863 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6868 @code{\[ \quilisma g \pes b \]}
6872 Quilisma Pes Auctus Descendens @tab
6873 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6877 Pes Initio Debilis @tab
6878 @code{\[ \deminutum g \pes b \]}
6882 Pes Auctus Descendens Initio Debilis @tab
6883 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6888 @code{\[ a \pes b \flexa g \]}
6892 Torculus Auctus Descendens @tab
6893 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6897 Torculus Deminutus @tab
6898 @code{\[ a \pes b \flexa \deminutum g \]}
6902 Torculus Initio Debilis @tab
6903 @code{\[ \deminutum a \pes b \flexa g \]}
6907 Torculus Auctus Descendens Initio Debilis @tab
6908 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6912 Torculus Deminutus Initio Debilis @tab
6913 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6918 @code{\[ a \flexa g \pes b \]}
6922 Porrectus Auctus Descendens @tab
6923 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6927 Porrectus Deminutus @tab
6928 @code{\[ a \flexa g \pes \deminutum b \]}
6933 @code{\[ \virga b \inclinatum a \inclinatum g \]}
6937 Climacus Auctus @tab
6938 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
6942 Climacus Deminutus @tab
6943 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
6948 @code{\[ g \pes a \virga b \]}
6952 Scandicus Auctus Descendens @tab
6953 @code{\[ g \pes a \pes \auctum \descendens b \]}
6957 Scandicus Deminutus @tab
6958 @code{\[ g \pes a \pes \deminutum b \]}
6963 @code{\[ g \oriscus a \pes \virga b \]}
6967 Salicus Auctus Descendens @tab
6968 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
6973 @code{\[ \stropha b \stropha b \stropha a \]}
6979 The following head prefixes are supported:
6981 @cindex @code{\virga}
6983 @cindex @code{\stropha}
6985 @cindex @code{\inclinatum}
6987 @cindex @code{\auctum}
6989 @cindex @code{\descendens}
6991 @cindex @code{\ascendens}
6993 @cindex @code{\oriscus}
6995 @cindex @code{\quilisma}
6997 @cindex @code{\deminutum}
7000 Head prefixes can be accumulated, though restrictions apply. For
7001 example, either @code{\descendens} or @code{\ascendens} can be applied
7002 to a head, but not both to the same head.
7005 @cindex @code{\flexa}
7006 Two adjacent heads can be tied together with the @code{\pes} and
7007 @code{\flexa} infix commands for a rising and falling line of melody,
7012 Scandicus Deminutus: Punctum Auctum Ascendens overlaps with
7013 Semivocalis head; this looks awful.
7015 Trigonus: apply equal spacing, regardless of pitch.
7017 Flexa and similar figurae: the left appendix should be adjusted with
7018 respect to the position of this head (on staffline or on staffspace)
7019 and the vertical position of the subsequent head.
7022 @subsection Figured bass
7024 @cindex Basso continuo
7026 @c TODO: musicological blurb about FB
7030 LilyPond has limited support for figured bass:
7032 @lilypond[verbatim,fragment]
7034 \context Voice \notes { \clef bass dis4 c d ais}
7035 \context FiguredBass
7037 < 6 >4 < 7 >8 < 6+ [_!] >
7043 The support for figured bass consists of two parts: there is an input
7044 mode, introduced by @code{\figures}, where you can enter bass figures
7045 as numbers, and there is a context called @internalsref{FiguredBass} that
7046 takes care of making @internalsref{BassFigure} objects.
7048 In figures input mode, a group of bass figures is delimited by
7049 @code{<} and @code{>}. The duration is entered after the @code{>}:
7054 \context FiguredBass
7058 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7065 \context FiguredBass
7066 \figures { <4- 6+ 7!> }
7069 Spaces or dashes may be inserted by using @code{_}. Brackets are
7070 introduced with @code{[} and @code{]}:
7076 \context FiguredBass
7077 \figures { < [4 6] 8 [_! 12]> }
7080 Although the support for figured bass may superficially resemble chord
7081 support, it works much simpler. The @code{\figures} mode simply
7082 stores the numbers , and @internalsref{FiguredBass} context prints
7083 them as entered. There is no conversion to pitches, and no
7084 realizations of the bass are played in the MIDI file.
7086 Internally, the code produces markup texts. You can use any of the
7087 markup text properties to override formatting. For example, the
7088 vertical spacing of the figures may be set with @code{baseline-skip}.
7092 @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7093 and @internalsref{FiguredBass} context.
7097 Slash notation for alterations is not supported.
7100 @node Vaticana style contexts
7101 @subsection Vaticana style contexts
7103 @cindex VaticanaVoiceContext
7104 @cindex VaticanaStaffContext
7106 The predefined @code{VaticanaVoiceContext} and
7107 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7108 Gregorian Chant in the style of the Editio Vaticana. These contexts
7109 initialize all relevant context properties and grob properties to
7110 proper values. With these contexts, you can immediately go ahead
7111 entering the chant, as the following short excerpt demonstrates:
7113 @lilypond[raggedright,verbatim,noindent]
7114 \include "gregorian-init.ly"
7117 \context VaticanaVoice {
7118 \property Score.BarNumber \set #'transparent = ##t
7120 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7121 \[ f( \pes a c' c' \pes d') \] c' \divisioMinima \break
7122 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7125 \context Lyrics \lyrics {
7126 San- ctus, San- ctus, San- ctus
7131 @node Contemporary notation
7132 @section Contemporary notation
7134 In the 20th century, composers have greatly expanded the musical
7135 vocabulary. With this expansion, many innovations in musical notation
7136 have been tried. For a comprehensive overview, refer to @cite{Stone
7137 1980} (see @ref{Literature}). In general, the use of new, innovative
7138 notation makes a piece harder to understand and perform and its use
7139 should therefore be avoided if possible. For this reason, support for
7140 contemporary notation in LilyPond is limited.
7149 @subsection Clusters
7153 In musical terminology, a @emph{cluster} denotes a range of
7154 simultaneously sounding pitches that may change over time. The set of
7155 available pitches to apply usually depends on the accoustic source.
7156 Thus, in piano music, a cluster typically consists of a continous range
7157 of the semitones as provided by the piano's fixed set of a chromatic
7158 scale. In choral music, each singer of the choir typically may sing an
7159 arbitrary pitch within the cluster's range that is not bound to any
7160 diatonic, chromatic or other scale. In electronic music, a cluster
7161 (theoretically) may even cover a continuous range of pitches, thus
7162 resulting in coloured noise, such as pink noise.
7164 Clusters can be denoted in the context of ordinary staff notation by
7165 engraving simple geometrical shapes that replace ordinary notation of
7166 notes. Ordinary notes as musical events specify starting time and
7167 duration of pitches; however, the duration of a note is expressed by the
7168 shape of the note head rather than by the horizontal graphical extent of
7169 the note symbol. In contrast, the shape of a cluster geometrically
7170 describes the development of a range of pitches (vertical extent) over
7171 time (horizontal extent). Still, the geometrical shape of a cluster
7172 covers the area in wich any single pitch contained in the cluster would
7173 be notated as an ordinary note. From this point of view, it is
7174 reasonable to specify a cluster as the envelope of a set of notes.
7178 A cluster is engraved as the envelope of a set of
7179 cluster-notes. Cluster notes are created by applying the function
7180 @code{notes-to-clusters} to a sequence of chords, e.g.
7182 @lilypond[relative 1,verbatim]
7183 \apply #notes-to-clusters { <<c e >> <<b f'>> }
7186 The following example (from
7187 @inputfileref{input/regression,cluster.ly}) shows what the result
7190 @lilypondfile[notexidoc]{cluster.ly}
7192 By default, @internalsref{Cluster_spanner_engraver} is in the
7193 @internalsref{Voice} context. This allows putting ordinary notes and
7194 clusters together in the same staff, even simultaneously. In such a
7195 case no attempt is made to automatically avoid collisions between
7196 ordinary notes and clusters.
7200 @internalsref{ClusterSpanner}, @internalsref{ClusterSpannerBeacon},
7201 @inputfileref{input/regression,cluster.ly},
7202 @internalsref{Cluster_spanner_engraver}, and @internalsref{ClusterNoteEvent}.
7206 Music expressions like @code{< @{ g8 e8 @} a4 >} are not printed
7207 accurately. Use @code{<<g a>>8 <<e a>>8} instead.
7212 @subsection Fermatas
7218 Contemporary music notation frequently uses special fermata symbols to
7219 indicate fermatas of differing lengths.
7223 The following are supported
7225 @lilypond[singleline]
7227 < \addlyrics \notes {
7247 \context Lyrics \lyrics {
7248 "shortfermata" "fermata" "longfermata" "verylongfermata"
7253 See @ref{Articulations} for general instructions how to apply scripts
7254 such as fermatas to a @code{\notes@{@}} block.
7257 @section Tuning output
7259 There are situations where default layout decisions are not
7260 sufficient. In this section we discuss ways to override these
7263 Formatting is internally done by manipulating so called objects
7264 (graphic objects). Each object carries with it a set of properties
7265 (object or layout properties) specific to that object. For example, a
7266 stem object has properties that specify its direction, length and
7269 The most direct way of tuning the output is by altering the values of
7270 these properties. There are two ways of doing that: first, you can
7271 temporarily change the definition of one type of object, thus
7272 affecting a whole set of objects. Second, you can select one specific
7273 object, and set a layout property in that object.
7275 Do not confuse layout properties with translation
7276 properties. Translation properties always use a mixed caps style
7277 naming, and are manipulated using @code{\property}:
7279 \property Context.propertyName = @var{value}
7281 Layout properties are use Scheme style variable naming, i.e. lower
7282 case words separated with dashes. They are symbols, and should always
7283 be quoted using @code{#'}. For example, this could be an imaginary
7284 layout property name:
7286 #'layout-property-name
7291 * Constructing a tweak::
7300 @node Tuning objects
7301 @subsection Tuning objects
7303 @cindex object description
7305 The definition of an object is a list of default object
7306 properties. For example, the definition of the Stem object (available
7307 in @file{scm/define-grobs.scm}), includes the following definitions
7308 for @internalsref{Stem}:
7312 (beamed-lengths . (0.0 2.5 2.0 1.5))
7313 (Y-extent-callback . ,Stem::height)
7318 Adding variables on top of this existing definition overrides the
7319 system default, and alters the resulting appearance of the layout
7325 Changing a variable for only one object is commonly achieved with
7329 \once \property @var{context}.@var{objectname}
7330 \override @var{symbol} = @var{value}
7332 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7333 and @var{objectname} is a string and @var{value} is a Scheme expression.
7334 This command applies a setting only during one moment in the score.
7336 In the following example, only one @internalsref{Stem} object is
7337 changed from its original setting:
7339 @lilypond[verbatim, fragment, relative=1]
7341 \once \property Voice.Stem \set #'thickness = #4
7345 @cindex @code{\once}
7347 For changing more objects, the same command, without @code{\once} can
7350 \property @var{context}.@var{objectname} \override @var{symbol} = @var{value}
7352 This command adds @code{@var{symbol} = @var{value}} to the definition
7353 of @var{objectname} in the context @var{context}, and this definition
7354 stays in place until it is removed.
7356 An existing definition may be removed by the following command:
7359 \property @var{context}.@var{objectname} \revert @var{symbol}
7362 All @code{\override} and @code{\revert} commands should be balanced.
7363 The @code{\set} shorthand performs a revert followed by an override,
7364 and is often more convenient to use
7367 \property @var{context}.@var{objectname} \set @var{symbol} = @var{value}
7371 @lilypond[verbatim,quote]
7372 c'4 \property Voice.Stem \override #'thickness = #4.0
7374 c'4 \property Voice.Stem \revert #'thickness
7378 The following example gives exactly the same result as the previous
7379 one (assuming the system default for stem thickness is 1.3):
7381 @lilypond[verbatim,quote]
7382 c'4 \property Voice.Stem \set #'thickness = #4.0
7384 c'4 \property Voice.Stem \set #'thickness = #1.3
7388 Reverting a setting which was not set in the first place has no
7389 effect. However, if the setting was set as a system default, this may
7390 remove the default value, and this may give surprising results,
7391 including crashes. In other words, @code{\override} and
7392 @code{\revert} must be carefully balanced. The following are examples
7393 of correct nesting of @code{\override}, @code{\set}, @code{\revert}:
7397 a clumsy but correct form:
7399 \override \revert \override \revert \override \revert
7403 shorter version of the same:
7405 \override \set \set \revert
7409 a short form, using only @code{\set}. This requires you to know the
7412 \set \set \set \set @var{to default value}
7416 if there is no default (i.e. by default, the object property is unset),
7419 \set \set \set \revert
7423 For the digirati, the object description is an Scheme association
7424 list. Since a Scheme list is a singly linked list, we can treat it as
7425 a stack, and @code{\override} and @code{\revert} are push and pop
7426 operations. The association list is stored in a normal context
7429 \property Voice.NoteHead = #'()
7431 will effectively erase @internalsref{NoteHead}s from the current
7432 @internalsref{Voice}. However, this mechanism is not guaranteed to
7433 work, and may cause crashes or other anomalous behavior.
7437 @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7438 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7439 @internalsref{All-layout-objects}.
7444 The backend is not very strict in type-checking object properties.
7445 Cyclic references in @var{value} cause hangs and/or crashes.
7446 Similarly, reverting properties that are system defaults may also lead
7449 @node Constructing a tweak
7450 @subsection Constructing a tweak
7453 @cindex internal documentation
7454 @cindex finding graphical objects
7455 @cindex graphical object descriptions
7457 @cindex @code{\override}
7459 @cindex internal documentation
7463 Three pieces of information are required to use @code{\override} and
7464 @code{\set}: the name of the layout object, the context and the name
7465 of the property. We demonstrate how to glean this information from
7466 the notation manual and the generated documentation.
7468 The generated documentation is a set of HTML pages which should be
7469 included if you installed a binary distribution, typically in
7470 @file{/usr/share/doc/lilypond}. They are also available on the web:
7471 go to the @uref{http://lilypond.org,LilyPond website}, click
7472 ``Documentation'', and then ``Program reference'' on the side bar. It
7473 is advisable to bookmark either the local HTML files if possible. They
7474 will load faster than the ones on the web. If you use the version
7475 from the web, you must check whether the documentation matches the
7476 program version: the documentation is generated from the definitions
7477 that the program uses, and therefore it is strongly tied to the
7481 @c [TODO: revise for new site.]
7483 Suppose we want to move the fingering indication in the fragment below:
7485 @lilypond[relative=2,verbatim]
7491 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7492 instructions}), you will notice that there is written:
7497 @internalsref{FingerEvent} and @internalsref{Fingering}.
7501 In other words, the fingerings once entered, are internally stored as
7502 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7503 layout object is created for every @code{FingerEvent}.
7505 The Fingering object has a number of different functions, and each of
7506 those is captured in an interface, when we look up
7507 @internalsref{Fingering} in the generated documentation.
7511 The @code{Fingering} object has a fixed size
7512 (@internalsref{item-interface}), the symbol is a piece of text
7513 (@internalsref{text-interface}), whose font can be set
7514 (@internalsref{font-interface}). It is centered horizontally
7515 (@internalsref{self-alignment-interface}), it is placed next to other
7516 objects (@internalsref{side-position-interface}) vertically, and its
7517 placement is coordinated with other scripts
7518 (@internalsref{text-script-interface}). It also has the standard
7519 @internalsref{grob-interface} (grob stands for Graphical object)
7521 @cindex graphical object
7522 @cindex layout object
7523 @cindex object, layout
7524 with all the variables that come with
7525 it. Finally, it denotes a fingering instruction, so it has
7526 @internalsref{finger-interface}.
7528 For the vertical placement, we have to look under
7529 @code{side-position-interface}:
7531 @code{side-position-interface}
7533 Position a victim object (this one) next to other objects (the
7534 support). In this case, the direction signifies where to put the
7535 victim object relative to the support (left or right, up or down?)
7540 below this description, the variable @code{padding} is described as
7544 (dimension, in staff space)
7546 add this much extra space between objects that are next to each
7547 other. Default value: @code{0.6}
7551 By increasing the value of @code{padding}, we can move away the
7552 fingering. The following command inserts 3 staff spaces of white
7553 between the note and the fingering:
7555 \once \property Voice.Fingering \set #'padding = #3
7558 Inserting this command before the Fingering object is created,
7559 i.e. before @code{c2}, yields the following result:
7561 @lilypond[relative=2,fragment,verbatim]
7562 \once \property Voice.Fingering
7569 The context name @code{Voice} in the example above can be determined
7570 as follows. In the documentation for @internalsref{Fingering}, it says
7572 Fingering grobs are created by: @internalsref{Fingering_engraver}
7575 Clicking @code{Fingering_engraver} shows the documentation of
7576 the module responsible for interpreting the fingering instructions and
7577 translating them to a @code{Fingering} object. Such a module is called
7578 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7581 Fingering_engraver is part of contexts: Voice
7583 so tuning the settings for Fingering should be done with
7585 \property Voice.Fingering \set @dots{}
7588 Of course, the tweak may also done in a larger context than
7589 @code{Voice}, for example, @internalsref{Staff} or
7590 @internalsref{Score}.
7592 The internals document also contains alphabetical lists of
7593 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7594 @internalsref{Music-expressions}, so you can also find which objects to
7595 tweak by browsing the internals document.
7599 @subsection Applyoutput
7601 The most versatile way of tuning an object is @code{\applyoutput}. Its
7604 \applyoutput @var{proc}
7608 where @var{proc} is a Scheme function, taking four arguments.
7610 When interpreted, the function @var{proc} is called for every layout object found
7611 in the context, with the following arguments:
7613 @item the layout object itself,
7614 @item the context where the layout object was created, and
7615 @item the context where @code{\applyoutput} is processed.
7618 In addition, the cause of the layout object, i.e. the music
7619 expression or object that was responsible for creating it, is in the
7620 object property @code{cause}. For example, for a note head, this is a
7621 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7622 this is a @internalsref{NoteHead} object.
7625 @node Outputproperty
7626 @subsection Outputproperty
7628 @cindex @code{\outputproperty}
7630 Another way of tuning objects is the more arcane @code{\outputproperty}
7631 feature. The syntax is as follows:
7633 \outputproperty @var{predicate} @var{symbol} = @var{value}
7635 Here @code{predicate} is a Scheme function taking an object argument, and
7636 returning a boolean. This statement is processed by the
7637 @code{Output_property_engraver}. It instructs the engraver to feed all
7638 objects that it sees to @var{predicate}. Whenever the predicate returns
7639 true, the object property @var{symbol} will be set to @var{value}.
7641 You will need to combine this statement with @code{\context} to select
7642 the appropriate context to apply this to.
7643 @inputfileref{input/regression,output-property.ly} shows an example of
7644 the use of @code{\outputproperty}.
7648 This command is slated for removal. Please use the
7649 @code{\applyoutput} command, see @ref{Applyoutput}.
7652 @node Font selection
7653 @subsection Font selection
7655 The most common thing to change about the appearance of fonts is their
7656 size. The font size of any context can be easily changed by setting
7657 the @code{fontSize} property for that context. Its value is an
7658 integer: negative numbers make the font smaller, positive numbers
7659 larger. An example is given below:
7661 @lilypond[fragment,relative=1,verbatim,quote]
7662 c4 c4 \property Voice.fontSize = #-1
7665 This command will set @code{font-relative-size} (see below), and does
7666 not change the size of variable symbols, such as beams or slurs.
7669 One of the uses of @code{fontSize} is to get smaller symbol for cue
7670 notes. An elaborate example of those is in
7671 @inputfileref{input/test,cue-notes.ly}.
7673 @cindex magnification
7675 The size of the font may be scaled with the object property
7676 @code{font-magnification}. For example, @code{2.0} blows up all
7677 letters by a factor 2 in both directions.
7686 The font used for printing a object can be selected by setting
7687 @code{font-name}, e.g.
7689 \property Staff.TimeSignature
7690 \set #'font-name = #"cmr17"
7694 Any font can be used, as long as it is available to @TeX{}. Possible
7695 fonts include foreign fonts or fonts that do not belong to the
7696 Computer Modern font family.
7698 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7699 can also be adjusted with a more fine-grained mechanism. By setting
7700 the object properties described below, you can select a different font;
7701 all three mechanisms work for every object that supports
7702 @code{font-interface}:
7706 is a symbol indicating the general class of the typeface. Supported are
7707 @code{roman} (Computer Modern), @code{braces} (for piano staff
7708 braces), @code{music} (the standard music font, including ancient
7709 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7712 is a symbol indicating the shape of the font, there are typically several
7713 font shapes available for each font family. Choices are @code{italic},
7714 @code{caps} and @code{upright}.
7717 is a symbol indicating the series of the font. There are typically several
7718 font series for each font family and shape. Choices are @code{medium}
7721 @item font-relative-size
7722 is a number indicating the size relative the standard size. For example,
7723 with 20pt staff height, relative size -1 corresponds to 16pt staff
7724 height, and relative size +1 corresponds to 23 pt staff height.
7726 There are small differences in design between fonts designed for
7727 different sizes, hence @code{font-relative-size} is preferred over
7728 @code{font-magnification} for changing font sizes.
7731 @item font-design-size
7732 is a number indicating the design size of the font.
7734 This is a feature of the Computer Modern Font: each point size has a
7735 slightly different design. Smaller design sizes are relatively wider,
7736 which enhances readability.
7739 For any of these properties, the value @code{*} (i.e. the symbol
7740 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7741 to override default setting, which are always present. For example:
7743 \property Lyrics . LyricText \override #'font-series = #'bold
7744 \property Lyrics . LyricText \override #'font-family = #'typewriter
7745 \property Lyrics . LyricText \override #'font-shape = #'*
7748 @cindex @code{font-style}
7752 The following commands set @code{fontSize} for the current voice.
7754 @cindex @code{\tiny}
7756 @cindex @code{\small}
7758 @cindex @code{\normalsize}
7763 Relative size is not linked to any real size.
7765 There is no style sheet provided for other fonts besides the @TeX{}
7766 family, and the style sheet cannot be modified easily.
7768 @cindex font selection
7769 @cindex font magnification
7770 @cindex @code{font-interface}
7774 @subsection Text markup
7779 @cindex typeset text
7781 LilyPond has an internal mechanism to typeset texts. You can access it
7782 with the keyword @code{\markup}. Within markup mode, you can enter texts
7783 similar to lyrics: simply enter them, surrounded by spaces:
7786 @lilypond[verbatim,fragment,relative=1]
7787 c1^\markup { hello }
7788 c1_\markup { hi there }
7789 c1^\markup { hi \bold there, is \italic anyone home? }
7792 @cindex font switching
7794 The markup in the example demonstrates font switching commands. The
7795 command @code{\bold} and @code{\italic} only apply to the first
7796 following word; enclose a set of texts with braces to apply a command
7799 \markup @{ \bold @{ hi there @} @}
7803 For clarity, you can also do this for single arguments, e.g.
7805 \markup @{ is \italic @{ anyone @} home @}
7808 @cindex font size, texts
7810 The following size commands set absolute sizes:
7812 @cindex @code{\teeny}
7813 @cindex @code{\tiny}
7814 @cindex @code{\small}
7815 @cindex @code{\large}
7816 @cindex @code{\huge}
7826 You can also make letter larger or smaller relative to their neighbors,
7827 with the commands @code{\larger} and @code{\smaller}.
7831 @cindex font style, for texts
7832 @cindex @code{\bold}
7833 @cindex @code{\dynamic}
7834 @cindex @code{\number}
7835 @cindex @code{\italic}
7837 The following font change commands are defined:
7840 changes to the font used in dynamic signs. This font does not
7841 contain all characters of the alphabet, so when producing ``piu f'',
7842 the ``piu'' should be done in a different font.
7846 changes to the font used in time signatures. It only contains
7847 numbers and a few punctuation marks.
7849 changes @code{font-shape} to @code{italic}.
7851 changes @code{font-series} to @code{bold}.
7854 @cindex raising text
7855 @cindex lowering text
7857 @cindex translating text
7860 @cindex @code{\super}
7862 Raising and lowering texts can be done with @code{\super} and
7865 @lilypond[verbatim,fragment,relative=1]
7866 c1^\markup { E "=" mc \super "2" }
7869 @cindex @code{\raise}
7871 If you want to give an explicit amount for lowering or raising, use
7872 @code{\raise}. This command takes a Scheme valued first argument, and
7873 a markup object as second argument:
7875 @lilypond[verbatim,fragment,relative=1,quote]
7876 c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}
7878 The argument to @code{\raise} is the vertical displacement amount,
7879 measured in (global) staff spaces. @code{\raise} and @code{\super}
7880 raise objects in relation to their surrounding markups. They cannot be
7881 used to move a single text up or down, when it is above or below a
7882 note, since the mechanism that positions it next to the note cancels
7883 any vertical shift. For vertical positioning, use the @code{padding}
7884 and/or @code{extra-offset} properties.
7886 Other commands taking single arguments include
7889 @item \bracket, \hbracket
7890 Bracket the argument markup with normal and horizontal brackets
7894 @cindex @code{\musicglyph}
7895 This is converted to a musical symbol, e.g. @code{\musicglyph
7896 #"accidentals-0"} will select the natural sign from the music font.
7897 See @ref{The Feta font} for a complete listing of the possible glyphs.
7899 This produces a single character, e.g. @code{\char #65} produces the
7902 @item \note @var{log} @var{dots} @var{dir}
7903 @cindex @code{\note}
7905 This produces a note with a stem pointing in @var{dir} direction, with
7906 duration log @var{log} and @var{dots} augmentation dots. The duration
7907 log is the negative 2-logarithm of the duration denominator. For
7908 example, a quarter note has log 2, an eighth note 3 and a breve has
7911 @item \hspace #@var{amount}
7912 @cindex @code{\hspace}
7913 This produces a invisible object taking horizontal space.
7915 \markup @{ A \hspace #2.0 B @}
7917 will put extra space between A and B, on top of the space that is
7918 normally inserted before elements on a line.
7920 @item \fontsize #@var{size}
7921 @cindex @code{\fontsize}
7922 This sets the relative font size, eg.
7924 A \fontsize #2 @{ B C @} D
7928 This will enlarge the B and the C by two steps.
7929 @item \translate #(cons @var{x} @var{y})
7931 This translates an object. Its first argument is a cons of numbers
7933 A \translate #(cons 2 -3) @{ B C @} D
7935 This moves `B C' 2 spaces to the right, and 3 down.
7937 @item \magnify #@var{mag}
7938 @cindex @code{\magnify}
7939 This sets the font magnification for the its argument. In the following
7940 example, the middle A will be 10% larger:
7942 A \magnify #1.1 @{ A @} A
7946 @item \override #(@var{key} . @var{value})
7947 @cindex @code{\override}
7948 This overrides a formatting property for its argument. The argument
7949 should be a key/value pair, e.g.
7951 m \override #'(font-family . math) m m
7955 In markup mode you can compose expressions, similar to mathematical
7956 expressions, XML documents and music expressions. The braces group
7957 notes into horizontal lines. Other types of lists also exist: you can
7958 stack expressions grouped with @code{<<}, and @code{>>} vertically with
7959 the command @code{\column}. Similarly, @code{\center} aligns texts by
7962 @lilypond[verbatim,fragment,relative=1]
7963 c1^\markup { \column << a bbbb c >> }
7964 c1^\markup { \center << a bbbb c >> }
7965 c1^\markup { \line << a b c >> }
7968 The markup mechanism is extensible. Refer to
7969 @file{scm/new-markup.scm} for more information.
7975 @internalsref{Markup-functions}, and @file{scm/new-markup.scm}.
7982 Text layout is ultimately done by @TeX{}, which does kerning of
7983 letters. LilyPond does not account for kerning, so texts will be
7984 spaced slightly too wide.
7986 Syntax errors for markup mode are confusing.
7988 Markup texts cannot be used in the titling of the @code{\header}
7989 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
7996 @section Global layout
7998 The global layout determined by three factors: the page layout, the
7999 line breaks and the spacing. These all influence each other. The
8000 choice of spacing determines how densely each system of music is set,
8001 which influences where line breaks breaks are chosen, and thus
8002 ultimately how many pages a piece of music takes. In this section, the
8003 algorithm for spacing music is explained, and how spacing can be
8006 Globally spoken, this procedure happens in three steps: first,
8007 flexible distances (``springs'') are chosen, based on durations. All
8008 possible line breaking combination are tried, and the one with the
8009 best results---a layout that has uniform density and requires as
8010 little stretching or cramping as possible---is chosen. When the score
8011 is processed by @TeX{}, each page is filled with systems, and page breaks
8012 are chosen whenever the page gets full.
8017 * Vertical spacing::
8018 * Horizontal spacing::
8025 @node Vertical spacing
8026 @subsection Vertical spacing
8028 @cindex vertical spacing
8029 @cindex distance between staves
8030 @cindex staff distance
8031 @cindex between staves, distance
8032 @cindex staffs per page
8033 @cindex space between staves
8035 The height of each system is determined automatically by LilyPond, to
8036 keep systems from bumping into each other, some minimum distances are
8037 set. By changing these, you can put staves closer together, and thus
8038 put more systems onto one page.
8040 Normally staves are stacked vertically. To make
8041 staves maintain a distance, their vertical size is padded. This is
8042 done with the property @code{minimumVerticalExtent}. It takes a pair
8043 of numbers, so if you want to make it smaller from its, then you could
8046 \property Staff.minimumVerticalExtent = #'(-4 . 4)
8048 This sets the vertical size of the current staff to 4 staff-space on
8049 either side of the center staff line. The argument of
8050 @code{minimumVerticalExtent} is interpreted as an interval, where the
8051 center line is the 0, so the first number is generally negative. The
8052 staff can be made larger at the bottom by setting it to @code{(-6
8055 The piano staves are handled a little differently: to make cross-staff
8056 beaming work correctly, it is necessary that the distance between staves
8057 is fixed beforehand. This is also done with a
8058 @internalsref{VerticalAlignment} object, created in
8059 @internalsref{PianoStaff}. In this object the distance between the
8060 staves is fixed by setting @code{forced-distance}. If you want to
8061 override this, use a @code{\translator} block as follows:
8065 VerticalAlignment \override #'forced-distance = #9
8068 This would bring the staves together at a distance of 9 staff spaces,
8069 measured from the center line of each staff.
8073 Vertical alignment of staves is handled by the
8074 @internalsref{VerticalAlignment} object.
8078 @node Horizontal spacing
8079 @subsection Horizontal Spacing
8081 The spacing engine translates differences in durations into
8082 stretchable distances (``springs'') of differing lengths. Longer
8083 durations get more space, shorter durations get less. The shortest
8084 durations get a fixed amount of space (which is controlled by
8085 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8086 /The longer the duration, the more space it gets: doubling a
8087 duration adds a fixed amount (this amount is controlled by
8088 @code{spacing-increment}) of space to the note.
8090 For example, the following piece contains lots of half, quarter and
8091 8th notes, the eighth note is followed by 1 note head width (NHW).
8092 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8093 @lilypond[fragment, verbatim, relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8097 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8098 width of a note head, and @code{shortest-duration-space} is set to
8099 2.0, meaning that the shortest note gets 2 NHW (2 times
8100 @code{shortest-duration-space}) of space. For normal notes, this space
8101 is always counted from the left edge of the symbol, so the shortest
8102 notes are generally followed by one NHW of space.
8104 If one would follow the above procedure exactly, then adding a single
8105 32th note to a score that uses 8th and 16th notes, would widen up the
8106 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8107 thus adding 2 noteheads of space to every note. To prevent this, the
8108 shortest duration for spacing is not the shortest note in the score,
8109 but the most commonly found shortest note. Notes that are even
8110 shorter this are followed by a space that is proportonial to their
8111 duration relative to the common shortest note. So if we were to add
8112 only a few 16th notes to the example above, they would be followed by
8115 @lilypond[fragment, verbatim, relative=2]
8116 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8119 The most common shortest duration is determined as follows: in every
8120 measure, the shortest duration is determined. The most common short
8121 duration, is taken as the basis for the spacing, with the stipulation
8122 that this shortest duration should always be equal to or shorter than
8123 1/8th note. The shortest duration is printed when you run lilypond
8124 with @code{--verbose}. These durations may also be customized. If you
8125 set the @code{common-shortest-duration} in
8126 @internalsref{SpacingSpanner}, then this sets the base duration for
8127 spacing. The maximum duration for this base (normally 1/8th), is set
8128 through @code{base-shortest-duration}.
8130 @cindex @code{common-shortest-duration}
8131 @cindex @code{base-shortest-duration}
8132 @cindex @code{stem-spacing-correction}
8133 @cindex @code{spacing}
8135 In the introduction it was explained that stem directions influence
8136 spacing. This is controlled with @code{stem-spacing-correction}
8137 property in @internalsref{NoteSpacing}, which are generated for every
8138 @internalsref{Voice} context. The @code{StaffSpacing} object
8139 (generated at @internalsref{Staff} context) contains the same property
8140 for controlling the stem/barline spacing. The following example
8141 shows these corrections, once with default settings, and once with
8142 exaggerated corrections:
8148 \property Staff.NoteSpacing \override #'stem-spacing-correction
8150 \property Staff.StaffSpacing \override #'stem-spacing-correction
8155 \paper { raggedright = ##t } }
8158 @cindex SpacingSpanner, overriding properties
8160 Properties of the @internalsref{SpacingSpanner} must be overridden
8161 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8162 created before any @code{\property} statements are interpreted.
8164 \paper @{ \translator @{
8166 SpacingSpanner \override #'spacing-increment = #3.0
8173 @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8174 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8175 @internalsref{SeparatingGroupSpanner}.
8179 Spacing is determined on a score wide basis. If you have a score that
8180 changes its character (measured in durations) halfway during the
8181 score, the part containing the longer durations will be spaced too
8184 There is no convenient mechanism to manually override spacing.
8189 @subsection Font size
8190 @cindex font size, setting
8191 @cindex staff size, setting
8192 @cindex @code{paper} file
8194 The Feta font provides musical symbols at seven different sizes.
8195 These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
8196 26 point. The point size of a font is the height of the corresponding
8197 staff (excluding line thicknesses).
8199 Definitions for these sizes are the files @file{paperSZ.ly}, where
8200 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
8201 of these files, the variables @code{paperEleven},
8202 @code{paperThirteen}, @code{paperSixteen},
8203 @code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
8204 are defined respectively. The default @code{\paper} block is also
8205 set. These files should be imported at toplevel, i.e.
8207 \include "paper26.ly"
8211 The default font size settings for each staff heights are generated
8212 from the 20pt style sheet. For more details, see the file
8213 @file{scm/font.scm}.
8217 @subsection Line breaking
8220 @cindex breaking lines
8222 Line breaks are normally computed automatically. They are chosen such
8223 that lines look neither cramped nor loose, and that consecutive lines
8224 have similar density.
8226 Occasionally you might want to override the automatic breaks; you can
8227 do this by specifying @code{\break}. This will force a line break at
8228 this point. Line breaks can only occur at places where there are bar
8229 lines. If you want to have a line break where there is no bar line,
8230 you can force an invisible bar line by entering @code{\bar
8231 ""}. Similarly, @code{\noBreak} forbids a line break at a
8235 @cindex regular line breaks
8236 @cindex four bar music.
8238 For linebreaks at regular intervals use @code{\break} separated by
8239 skips and repeated with @code{\repeat}:
8241 < \repeat unfold 7 @{ s1 * 4 \break @}
8242 @emph{the real music}
8247 This makes the following 28 measures (assuming 4/4 time) be broken every
8252 @internalsref{BreakEvent}.
8256 @subsection Page layout
8259 @cindex breaking pages
8261 @cindex @code{indent}
8262 @cindex @code{linewidth}
8264 The most basic settings influencing the spacing are @code{indent} and
8265 @code{linewidth}. They are set in the @code{\paper} block. They
8266 control the indentation of the first line of music, and the lengths of
8269 If @code{raggedright} is set to true in the @code{\paper}
8270 block, then the lines are justified at their natural length. This
8271 useful for short fragments, and for checking how tight the natural
8275 @cindex vertical spacing
8277 The page layout process happens outside the LilyPond formatting
8278 engine: variables controlling page layout are passed to the output,
8279 and are further interpreted by @code{ly2dvi}. @code{ly2dvi} responds
8280 to the following variables in the @code{\paper} block. The variable
8281 @code{textheight} sets the total height of the music on each page.
8282 The spacing between systems is controlled with @code{interscoreline},
8283 its default is 16pt. The distance between the score lines will
8284 stretch in order to fill the full page @code{interscorelinefill} is
8285 set to a positive number. In that case @code{interscoreline}
8286 specifies the minimum spacing.
8288 @cindex @code{textheight}
8289 @cindex @code{interscoreline}
8290 @cindex @code{interscorelinefill}
8292 If the variable @code{lastpagefill} is defined,
8293 @c fixme: this should only be done if lastpagefill == #t
8294 systems are evenly distributed vertically on the last page. This
8295 might produce ugly results in case there are not enough systems on the
8296 last page. The @command{lilypond-book} command ignores
8297 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8300 @cindex @code{lastpagefill}
8302 Page breaks are normally computed by @TeX{}, so they are not under
8303 direct control of LilyPond. However, you can insert a commands into
8304 the @file{.tex} output to instruct @TeX{} where to break pages. This
8305 is done by setting the @code{between-systems-strings} on the
8306 @internalsref{NonMusicalPaperColumn} where the system is broken.
8307 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8308 The predefined command @code{\newpage} also does this.
8312 @cindex @code{papersize}
8314 To change the paper size, you must first set the @code{papersize} paper
8315 variable variable as in the example below. Set it to
8316 the strings @code{a4}, @code{letter}, or @code{legal}. After this
8317 specification, you must set the font as described above. If you want
8318 the default font, then use the 20 point font.
8321 \paper@{ papersize = "a4" @}
8322 \include "paper16.ly"
8325 The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
8326 will set the paper variables @code{hsize} and @code{vsize} (used by
8327 @code{lilypond} and @code{ly2dvi}).
8332 @cindex @code{\newpage}
8338 @ref{Invoking ly2dvi},
8339 @inputfileref{input/regression,between-systems.ly}, and
8340 @internalsref{NonMusicalPaperColumn}.
8344 LilyPond has no concept of page layout, which makes it difficult to
8345 reliably choose page breaks in longer pieces.
8354 Entered music can also be converted to MIDI output. The performance
8355 is good enough for proof-hearing the music for errors.
8357 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8358 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8359 marks translate to a fixed fraction of the available MIDI volume
8360 range, crescendi and decrescendi make the volume vary linearly between
8361 their two extremities. The fractions can be adjusted by
8362 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8363 For each type of MIDI instrument, a volume range can be defined. This
8364 gives a basic equalizer control, which can enhance the quality of
8365 the MIDI output remarkably. The equalizer can be controlled by
8366 setting @code{instrumentEqualizer}.
8370 Many musically interesting effects, such as swing, articulation,
8371 slurring, etc., are not translated to MIDI.
8376 * MIDI instrument names::
8381 @subsection MIDI block
8385 The MIDI block is analogous to the paper block, but it is somewhat
8386 simpler. The @code{\midi} block can contain:
8390 @item a @code{\tempo} definition, and
8391 @item context definitions.
8394 Assignments in the @code{\midi} block are not allowed.
8396 A number followed by a period is interpreted as a real number, so
8397 for setting the tempo for dotted notes, an extra space should be
8398 inserted, for example:
8401 \midi @{ \tempo 4 . = 120 @}
8405 @cindex context definition
8407 Context definitions follow precisely the same syntax as within the
8408 \paper block. Translation modules for sound are called performers.
8409 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8412 @node MIDI instrument names
8413 @subsection MIDI instrument names
8415 @cindex instrument names
8416 @cindex @code{Staff.midiInstrument}
8417 @cindex @code{Staff.instrument}
8419 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8420 property or, if that property is not set, the @code{Staff.instrument}
8421 property. The instrument name should be chosen from the list in
8422 @ref{MIDI instruments}.
8426 If the selected string does not exactly match, then LilyPond uses the
8427 default (Grand Piano). It is not possible to select an instrument by