2 \documentclass{article}
4 \title{LilyPond feature test}
5 \author{Han-Wen Nienhuys}
9 This document tries give an brief overview of LilyPond features. When
10 the text correspond with the shown notation, we consider LilyPond
11 Officially BugFree (tm).
13 \section{Notes and rests}
15 Rests. Note that the dot of 8th, 16th and 32nd rests rest should be
16 next to the top of the rest. All rests except the whole rest are
17 centered on the middle staff line.
21 Note head shapes are settable. The stem endings should be adjusted
22 per note head. If you want different note head styles on one stem,
23 you must create a special context called Thread.
25 \mudelafile{noteheadstyle.ly}
27 Noteheads can have dots, and ---although this is bad style--- rests
28 can too. Augmentation dots should never be printed on a staff line,
29 but rather be shifted: down stem notes shift dots down, up stem up.
30 In case of chords, all dots should be in a column. The dots go along
31 as rests are shifted to avoid collisions.
35 Multiple measure rests do not collide with barlines and clefs. They
36 are not expanded when you set \verb+Score.SkipBars+. Although the
37 multi-measure-rest is a Spanner, minimum distances are set to keep it
38 colliding from barlines.
40 \mudelafile{multi-measure-rest.ly}
44 Stem tremolos (official naming?) or rolls are tremolo signs that look
45 like beam segments crossing stems. If the stem is in a beam, the
46 tremolo must be parallel to the beam. If the stem is invisible
47 (eg. on a whole note), the tremolo must be centered on the note.
49 \mudelafile{stem-tremolo.ly}
51 Beams, stems and noteheads often have communication troubles, since
52 the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
57 Grace notes are typeset as an encapsulated piece of music. You can
58 have beams, notes, chords, stems etc. within a \verb|\grace| section.
59 Slurs that start within a grace section, but aren't ended are attached
60 to the next normal note. Grace notes have zero duration. If there
61 are tuplets, the grace notes won't be under the brace. Grace notes
62 can have accidentals, but they are (currently) spaced at a fixed
63 distance. Grace notes (of course) come before the accidentals of the
64 main note. Grace notes can also be positioned after the main note.
69 \section{Beams, slurs and other spanners}
71 Beaming is generated automatically. Beams may cross bar lines. In that
72 case, line breaks are forbidden. Yet clef and key signatures are
73 hidden just as with breakable bar lines.
75 \mudelafile{beaming.ly}
77 %Beams should not interfere with various items on the staff (amongst
80 % \mud elafile{beam-repeat.ly}
82 Beams should behave reasonably well, even under extreme circumstances.
83 Stems may be short, but noteheads should never touch the beam.
85 \mudelafile{beam-extreme.ly}
87 Slurs should look nice and symmetric. The curvature may increase
88 only to avoid noteheads, and as little as possible.
90 \mudelafile{slur-symmetry.ly}
91 \mudelafile{slur-symmetry-1.ly}
93 Ties are strictly horizontal. They are placed in between note heads.
94 The horizontal middle should not overlap with a staffline.
98 Beams can be typeset over fixed distance aligned staffs, beam
99 beautification doesn't really work, but knees do. Beams should be
100 behave well, wherever the switching point is.
102 \mudelafile{beam-interstaff.ly}
104 The same goes for slurs. They behave decently when broken across
107 \mudelafile{slur-interstaff.ly}
109 Tuplets are indicated by a bracket with a number. There should be no
110 bracket if there is one beam that matches the length of the tuplet.
111 The bracket does not interfere with the stafflines, and the number is
112 centered in the gap in the bracket.
118 LilyPond has three modes for repeats: folded, unfolded and
119 semi-unfolded. Unfolded repeats are fully written out. Semi unfolded
120 repeats have the body written and all alternatives sequentially.
121 Folded repeats have the body written and all alternatives
122 simultaneously. If the number of alternatives is larger than the
123 repeat count, the excess alternatives are ignored. If the number of
124 alternatives is smaller, the first alternative is multiplied to get to
125 the number of repeats.
129 \mudelafile{repeat-unfold.ly}
131 Semi (un)folded behavior. Voltas can start on non-barline moments.
132 If they don't barlines should still be shown.
134 \mudelafile{repeat-semifold.ly}
136 Folded. This doesn't make sense without alternatives, but it works.
138 \mudelafile{repeat-fold.ly}
140 \section{Multiple notes}
142 Rests should not collide with beams, stems and noteheads. Rests may
143 be under beams. Rests should be move by integral number of spaces
144 inside the staff, and by half spaces outside. Notice that the half
145 and whole rests just outside the staff get ledger lines in different
148 \mudelafile{rest-collision.ly}
150 Normal collisions. We have support for four voice polyphony, where the
151 middle voices are horizontally shifted in a limited number of cases.
153 \mudelafile{collisions.ly}
155 The number of stafflines of a staff can be set with the property
156 numberOfStaffLines. Ledger lines both on note heads and rests are
157 adjusted. Barlines also are adjusted.
160 \mudelafile{number-staff-lines.fly}
164 In a limited number of cases, LilyPond corrects for optical spacing
165 effects. In this example, space for opposite pointed stems is adjusted
167 \mudelafile{stem-spacing.sly}
169 \section{Global stuff}
171 Markings that are attached to (invisible) barlines are
172 delicate: the are attached to the rest of the score without the score
173 knowing it. Consequently, they fall over often.
175 \mudelafile{bar-scripts.ly}
177 Staff margins are also markings attached to barlines. They should be
178 left otf the staff, and be centered vertically wrt the staff. They
179 may be on normal staffs, but also on compound staffs, like the
182 \mudelafile{staff-margin.ly}
184 Breathing signs, also used for phrasing, do normally not influence
185 global spacing -- only if space gets tight, notes are shifted to make
186 room for the breathing sign. Breathing signs break beams running
187 through their voice. In the following example, the notes in the first
188 two measures all have the same distance from each other:
190 \mudelafile{breathing-sign.ly}
193 \section{Clefs and Time Signatures}
195 The transparent clef should not occupy any space and with style
196 \texttt{fullSizeChanges}, the changing clef should be typeset in full
197 size. For octaviated clefs, the ``8'' should appear closely above or
198 below the clef respectively. The ``8'' is processed in a rather
199 convoluted way, so this is fragile as well.
201 \mudelafile{clefs.ly}
203 By default, time signatures are written with two numbers. With style
204 ``C'', 4/4 and 2/2 are written with their corresponding symbols and
205 with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
206 9/8 are typeset with symbols, all other signatures retain the default
207 layout. The style ``1'', gives single number signatures for all
210 \mudelafile{time.fly}