1 \input texinfo @c -*-texinfo-*- vim:tw=72
2 @setfilename regression-test.info
3 @settitle LilyPond Regression test
7 @author Han-Wen Nienhuys and Jan Nieuwenhuizen
8 @title LilyPond Regression test
15 This document tries give an brief overview of LilyPond features. When
16 the text correspond with the shown notation, we consider LilyPond
17 Officially BugFree (tm). This document is intended for finding bugs,
18 and documenting bugfixes.
20 @section Notes and rests
22 Rests. Note that the dot of 8th, 16th and 32nd rests rest should be
23 next to the top of the rest. All rests except the whole rest are
24 centered on the middle staff line.
28 Note head shapes are settable. The stem endings should be adjusted
29 per note head. If you want different note head styles on one stem,
30 you must create a special context called Thread.
32 @mudelafile{noteheadstyle.ly}
34 Noteheads can have dots, and ---although this is bad style in duple
35 meters--- rests can too. Augmentation dots should never be printed on
36 a staff line, but rather be shifted vertically. They should go up, but
37 in case of multiple parts, the down stems have down shifted dots.
38 (Wanske p. 186) In case of chords, all dots should be in a column.
39 The dots go along as rests are shifted to avoid collisions.
43 Multiple measure rests do not collide with barlines and clefs. They
44 are not expanded when you set @code{Score.skipBars}. Although the
45 multi-measure-rest is a Spanner, minimum distances are set to keep it
46 colliding from barlines.
48 @mudelafile{multi-measure-rest.ly}
50 If @code{Score.skipBars} is set,
51 the signs for four, two, and one measure rest are combined to
52 produce the graphical representation of rests for up to 10 bars.
53 The number of bars will be written above the sign.
55 @mudelafile{mm-rest2.ly}
57 A sharp sign after a double sharp sign, as well as a flat sign
58 after a double flat sign is automatically prepended with a
61 @mudelafile{double-single-acc.ly}
65 Stem tremolos (official naming?) or rolls are tremolo signs that look
66 like beam segments crossing stems. If the stem is in a beam, the
67 tremolo must be parallel to the beam. If the stem is invisible
68 (eg. on a whole note), the tremolo must be centered on the note.
70 @mudelafile{stem-tremolo.ly}
72 Chord tremolos look like beams, but are a kind of repeat symbol.
73 To avoid confusion, chord tremolo beams do not reach the stems, but
74 leave a gap. Chord tremolo beams on half notes are not ambiguous,
75 as half notes cannot appear in a regular beam, and should reach the
78 @mudelafile{chord-tremolo.sly}
80 Beams, stems and noteheads often have communication troubles, since
81 the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
84 Stems, beams, ties and slurs should behave similarly, when placed
85 on the middle staff line. Of course stem-direction is down for high
86 notes, and up for low notes.
88 @mudelafile{stem-direction.sly}
90 Similarly, if @code{stem_default_neutral_direction} is set to @code{-1}.
92 @mudelafile{stem-direction-down.ly}
96 The staccato dot (and all scripts with follow-into-staff set), must
97 not be on staff lines.
99 @mudelafile{staccato-pos.sly}
103 Grace notes are typeset as an encapsulated piece of music. You can
104 have beams, notes, chords, stems etc. within a @code{\grace} section.
105 Slurs that start within a grace section, but aren't ended are attached
106 to the next normal note. Grace notes have zero duration. If there
107 are tuplets, the grace notes won't be under the brace. Grace notes
108 can have accidentals, but they are (currently) spaced at a fixed
109 distance. Grace notes (of course) come before the accidentals of the
110 main note. Grace notes can also be positioned after the main note.
112 @mudelafile{grace.ly}
115 @section Beams, slurs and other spanners
117 Beaming is generated automatically. Beams may cross bar lines. In that
118 case, line breaks are forbidden. Yet clef and key signatures are
119 hidden just as with breakable bar lines.
121 @mudelafile{beaming.ly}
123 Beams should behave reasonably well, even under extreme circumstances.
124 Stems may be short, but noteheads should never touch the beam.
126 @mudelafile{beam-extreme.ly}
128 Beams should always reach the middle staff line, the second beam
129 counting from the note head side, should never be lower than the
130 second staff line. This does not hold for grace note beams.
132 @mudelafile{beam-position.sly}
134 Slurs should look nice and symmetric. The curvature may increase
135 only to avoid noteheads, and as little as possible.
137 @mudelafile{slur-symmetry.ly}
138 @mudelafile{slur-symmetry-1.ly}
140 Ties are strictly horizontal. They are placed in between note heads.
141 The horizontal middle should not overlap with a staffline.
145 When tieing notes with accidentals across a bar boundary, the accidental
146 must not be drawn on the note in the new bar. Instead, the next note of
147 the same pitch in this bar should always show the accidental (even if
148 it's natural). Slurring a accidentaled note to a natural one across bar
149 boundaries should be explicit.
151 Pitches can be verified by printing them with the @code{NoteNames} context.
153 @mudelafile{tie-accidental.ly}
155 Beams can be typeset over fixed distance aligned staffs, beam
156 beautification doesn't really work, but knees do. Beams should be
157 behave well, wherever the switching point is.
159 @mudelafile{beam-cross-staff.ly}
161 The same goes for slurs. They behave decently when broken across
164 @mudelafile{slur-cross-staff.ly}
166 Tuplets are indicated by a bracket with a number. There should be no
167 bracket if there is one beam that matches the length of the tuplet.
168 The bracket does not interfere with the stafflines, and the number is
169 centered in the gap in the bracket.
175 LilyPond has three modes for repeats: folded, unfolded and
176 semi-unfolded. Unfolded repeats are fully written out. Semi unfolded
177 repeats have the body written and all alternatives sequentially.
178 Folded repeats have the body written and all alternatives
179 simultaneously. If the number of alternatives is larger than the
180 repeat count, the excess alternatives are ignored. If the number of
181 alternatives is smaller, the first alternative is multiplied to get to
182 the number of repeats.
186 @mudelafile{repeat-unfold.ly}
188 Volta (Semi folded) behavior. Voltas can start on non-barline moments.
189 If they don't barlines should still be shown.
191 @mudelafile{repeat-volta.ly}
193 Folded. This doesn't make sense without alternatives, but it works.
195 @mudelafile{repeat-fold.ly}
199 Lyrics can be set to a melody automatically. Excess lyrics will be
200 dumped. Lyrics will not be set over rests. You can have melismata
201 either by setting a property melismaBusy, or by setting
202 automaticMelismas (which will set melismas during slurs and ties). If
203 you want a different order than first Music, then Lyrics, you must
204 precook a chord of staffs/lyrics and label those. Of course
205 @code{\rhythm} ignores any other rhythms in the piece. Hyphens and
206 extenders do not assume anything about lyric lengths, so they continue
209 @mudelafile{lyric-combine.ly}
211 @section Multiple notes
213 Rests should not collide with beams, stems and noteheads. Rests may
214 be under beams. Rests should be move by integral number of spaces
215 inside the staff, and by half spaces outside. Notice that the half
216 and whole rests just outside the staff get ledger lines in different
219 @mudelafile{rest-collision.ly}
221 Normal collisions. We have support for polyphony, where the
222 middle voices are horizontally shifted.
224 @mudelafile{collisions.ly}
226 The number of stafflines of a staff can be set with the property
227 numberOfStaffLines. Ledger lines both on note heads and rests are
228 adjusted. Barlines also are adjusted.
231 @mudelafile{number-staff-lines.fly}
235 In a limited number of cases, LilyPond corrects for optical spacing
236 effects. In this example, space for opposite pointed stems is adjusted
238 @mudelafile{stem-spacing.sly}
240 If there are accidentals in the music, we add space, but the space
241 between note and accidentals is less than between the notes with the
242 same value. Clef changes also get extra space, but not as much as
246 Even if a line is very tightly spaced, there will still be room
247 between prefatory matter and the following notes. The space after the
248 prefatory is very rigid. In contrast, the space before the barline
249 must stretch like the space within the measure.
253 @mudelafile{spacing-tight.ly}
257 @mudelafile{spacing-natural.ly}
261 @mudelafile{spacing-loose.ly}
263 Adding a @code{Bar_engraver} to the LyricsVoice context makes sure that
264 lyrics don't collide with barlines.
266 @mudelafile{lyrics-bar.ly}
268 @section Global stuff
270 Breaks can be encouraged and discouraged using @code{\break} and
271 @code{\nobreak}. They are abbrevs for @code{\penalty} commands.
273 @mudelafile{break.ly}
276 Markings that are attached to (invisible) barlines are
277 delicate: the are attached to the rest of the score without the score
278 knowing it. Consequently, they fall over often.
280 @mudelafile{bar-scripts.ly}
282 Staff margins are also markings attached to barlines. They should be
283 left of the staff, and be centered vertically wrt the staff. They may
284 be on normal staffs, but also on compound staffs, like the PianoStaff
286 @mudelafile{staff-margin.ly}
288 Breathing signs, also used for phrasing, do normally not influence
289 global spacing -- only if space gets tight, notes are shifted to make
290 room for the breathing sign. Breathing signs break beams running
291 through their voice. In the following example, the notes in the first
292 two measures all have the same distance from each other:
294 @mudelafile{breathing-sign.ly}
296 Fonts are available in a default set of sizes: 11, 13, 16, 20, 23 and
297 26pt staffheight. Sizes of the text fonts and symbol fonts are made
298 to match the staff dimensions.
300 @mudelafile[nofly]{size11.ly}
302 @mudelafile[nofly]{size13.ly}
304 @mudelafile[nofly]{size16.ly}
306 @mudelafile[nofly]{size20.ly}
308 @mudelafile[nofly]{size23.ly}
310 @mudelafile[nofly]{size26.ly}
313 @section Clefs and Time Signatures
315 The transparent clef should not occupy any space and with style
316 @code{fullSizeChanges}, the changing clef should be typeset in full
317 size. For octaviated clefs, the ``8'' should appear closely above or
318 below the clef respectively. The ``8'' is processed in a convoluted
319 way, so this is fragile as well.
321 @mudelafile{clefs.ly}
324 @c the input file is too long and does not test for specific bugs
325 By default, time signatures are written with two numbers. With style
326 ``C'', 4/4 and 2/2 are written with their corresponding symbols and
327 with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
328 9/8 are typeset with symbols, all other signatures retain the default
329 layout. The style ``1'', gives single number signatures for all
332 \mu delafile{time.fly}