]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/tex/regression-test.tely
f0fc7f15ad111be9cb87b21751727380dbc1fa1f
[lilypond.git] / Documentation / tex / regression-test.tely
1 \input texinfo @c -*-texinfo-*-   vim:tw=72
2 @setfilename regression-test.info
3 @settitle LilyPond Regression test
4
5 @c fool ls-latex
6 @ignore
7 @author Han-Wen Nienhuys and Jan Nieuwenhuizen
8 @title LilyPond Regression test
9 @end ignore
10
11 @node Top, , , 
12
13 This document tries give an brief overview of LilyPond features.  When
14 the text correspond with the shown notation, we consider LilyPond
15 Officially BugFree (tm).  This document is intended for finding bugs,
16 and documenting bugfixes.
17
18 @section Notes and rests
19
20 Rests.  Note that the dot of 8th, 16th and 32nd rests rest should be
21 next to the top of the rest.  All rests except the whole rest are
22 centered on the middle staff line.  
23
24 @mudelafile{rest.fly}
25
26 Note head shapes are settable.  The stem endings should be adjusted
27 per note head.  If you want different note head styles on one stem,
28 you must create a special context called Thread.
29
30 @mudelafile{noteheadstyle.ly}
31
32 Noteheads can have dots, and ---although this is bad style in duple
33 meters--- rests can too.  Augmentation dots should never be printed on
34 a staff line, but rather be shifted vertically. They should go up, but
35 in case of multiple parts, the down stems have down shifted dots.
36 (Wanske p. 186) In case of chords, all dots should be in a column.
37 The dots go along as rests are shifted to avoid collisions.
38
39 @mudelafile{dots.fly}
40
41 Multiple measure rests do not collide with barlines and clefs.  They
42 are not expanded when you set \verb+Score.SkipBars+.  Although the
43 multi-measure-rest is a Spanner, minimum distances are set to keep it
44 colliding from barlines. 
45
46 @mudelafile{multi-measure-rest.ly}
47
48 @section Stems
49
50 Stem tremolos (official naming?) or rolls are tremolo signs that look
51 like beam segments crossing stems.  If the stem is in a beam, the
52 tremolo must be parallel to the beam.  If the stem is invisible
53 (eg. on a whole note), the tremolo must be centered on the note.
54
55 @mudelafile{stem-tremolo.ly}
56
57 Chord tremolos look like beams, but are a kind of repeat symbol.
58 To avoid confusion, chord tremolo beams do not reach the stems, but 
59 leave a gap.  Chord tremolo beams on half notes are not ambiguous,
60 as half notes cannot appear in a regular beam, and should reach the 
61 stems.
62   
63 @mudelafile{chord-tremolo.sly}
64
65 Beams, stems and noteheads often have communication troubles, since
66 the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
67 point) are mixed.
68
69 Stems, beams, ties and slurs should behave similarly, when placed
70 on the middle staff line. Of course stem-direction is down for high
71 notes, and up for low notes.
72
73 @mudelafile{stem-direction.sly}
74
75 Similarly, if \verb+stem_default_neutral_direction+ is set to \verb+-1+.
76
77 @mudelafile{stem-direction-down.ly}
78
79 @section Scripts
80
81 The staccato dot (and all scripts with follow-into-staff set), must
82 not be on staff lines.
83
84 @mudelafile{staccato-pos.sly}
85
86 @section Grace notes
87
88 Grace notes are typeset as an encapsulated piece of music. You can
89 have beams, notes, chords, stems etc. within a \verb|\grace| section.
90 Slurs that start within a grace section, but aren't ended are attached
91 to the next normal note.  Grace notes have zero duration.  If there
92 are tuplets, the grace notes won't be under the brace.  Grace notes
93 can have accidentals, but they are (currently) spaced at a fixed
94 distance.  Grace notes (of course) come before the accidentals of the
95 main note.  Grace notes can also be positioned after the main note.
96
97 @mudelafile{grace.ly}
98
99
100 @section Beams, slurs and other spanners
101
102 Beaming is generated automatically. Beams may cross bar lines. In that
103 case, line breaks are forbidden.  Yet clef and key signatures are
104 hidden just as with breakable bar lines.
105
106 @mudelafile{beaming.ly}
107
108 Beams should behave reasonably well, even under extreme circumstances.
109 Stems may be short, but noteheads should never touch the beam.
110
111 @mudelafile{beam-extreme.ly}
112
113 Beams should always reach the middle staff line, the second beam
114 counting from the note head side, should never be lower than the
115 second staff line.  This does not hold for grace note beams.
116
117 @mudelafile{beam-position.sly}
118
119 Slurs should look nice and symmetric.  The curvature may increase
120 only to avoid noteheads, and as little as possible.
121
122 @mudelafile{slur-symmetry.ly}
123 @mudelafile{slur-symmetry-1.ly}
124
125 Ties are strictly horizontal.  They are placed in between note heads.
126 The horizontal middle should not overlap with a staffline.
127
128 @mudelafile{tie.ly}
129
130 Beams can be typeset over fixed distance aligned staffs, beam
131 beautification doesn't really work, but knees do. Beams should be
132 behave well, wherever the switching point is.
133
134 @mudelafile{beam-interstaff.ly}
135
136 The same goes for slurs. They behave decently when broken across
137 linebreak.
138
139 @mudelafile{slur-interstaff.ly}
140
141 Tuplets are indicated by a bracket with a number.  There should be no
142 bracket if there is one beam that matches  the length of the tuplet.
143 The bracket does not interfere with the stafflines, and the number is
144 centered in the gap in the bracket.
145
146 @mudelafile{tup.ly}
147
148 @section Repeats
149
150 LilyPond has three modes for repeats: folded, unfolded and
151 semi-unfolded.  Unfolded repeats are fully written out. Semi unfolded
152 repeats have the body written and all alternatives sequentially.
153 Folded repeats have the body written and all alternatives
154 simultaneously.  If the number of alternatives is larger than the
155 repeat count, the excess alternatives are ignored.  If the number of
156 alternatives is smaller, the first alternative is multiplied to get to
157 the number of repeats.
158
159 Unfolded behavior:
160
161 @mudelafile{repeat-unfold.ly}
162
163 Semi (un)folded behavior.  Voltas can start on non-barline moments.
164 If they don't barlines should still be shown.
165
166 @mudelafile{repeat-semifold.ly}
167
168 Folded.  This doesn't make sense without alternatives, but it works.
169
170 @mudelafile{repeat-fold.ly}
171
172 @section Lyrics
173
174 Lyrics can be set to a melody automatically.  Excess lyrics will be
175 dumped.  Lyrics will not be set over rests.  You can have melismata
176 either by setting a property melismaBusy, or by setting
177 automaticMelismas (which will set melismas during slurs and ties).  If
178 you want a different order than first Music, then Lyrics, you must
179 precook a chord of staffs/lyrics and label those.  Of course
180 @code{\rhythm} ignores any other rhythms in the piece.  Hyphens and
181 extenders do not assume anything about lyric lengths, so they continue
182 to work.
183
184 @mudelafile{lyric-combine.ly}
185
186 @section Multiple notes
187
188 Rests should not collide with beams, stems and noteheads.  Rests may
189 be under beams.  Rests should be move by integral number of spaces
190 inside the staff, and by half spaces outside.  Notice that the half
191 and whole rests just outside the staff get ledger lines in different
192 cases.
193
194 @mudelafile{rest-collision.ly}
195
196 Normal collisions. We have support for polyphony, where the
197 middle voices are horizontally shifted.
198
199 @mudelafile{collisions.ly}
200
201 The number of stafflines of a staff can be set with the property
202 numberOfStaffLines.  Ledger lines both on note heads and rests are
203 adjusted.  Barlines also are adjusted.
204
205
206 @mudelafile{number-staff-lines.fly}
207
208 @section Spacing
209
210 In a limited number of cases, LilyPond corrects for optical spacing
211 effects.  In this example, space for opposite pointed stems is adjusted
212
213 @mudelafile{stem-spacing.sly}
214
215 If there are accidentals in the music, we add space, but the space
216 between note and accidentals is less than between the notes with the
217 same value.  Clef changes also get extra space, but not as much as
218 barlines.
219
220
221 Even if a line is very tightly spaced, there will still be room
222 between prefatory matter and the following notes.  The space after the
223 prefatory is very rigid.  In contrast, the space before the barline
224 must stretch like the space within the measure.
225
226 Tight:
227
228 @mudelafile{spacing-tight.ly}
229
230 Natural:
231
232 @mudelafile{spacing-natural.ly}
233
234 Loose:
235
236 @mudelafile{spacing-loose.ly}
237
238
239 @section Global stuff
240
241 Markings that are attached to (invisible) barlines are 
242 delicate: the are attached to the rest of the score without the score
243 knowing it.  Consequently, they fall over  often.
244
245 @mudelafile{bar-scripts.ly}
246
247 Staff margins are also markings attached to barlines.  They should be
248 left of the staff, and be centered vertically wrt the staff.  They may
249 be on normal staffs, but also on compound staffs, like the PianoStaff
250
251 @mudelafile{staff-margin.ly}
252
253 Breathing signs, also used for phrasing, do normally not influence
254 global spacing -- only if space gets tight, notes are shifted to make
255 room for the breathing sign. Breathing signs break beams running
256 through their voice. In the following example, the notes in the first
257 two measures all have the same distance from each other:
258
259 @mudelafile{breathing-sign.ly}
260
261 Fonts are  available in a default set of sizes: 11, 13, 16, 20, 23 and
262 26pt staffheight.  Sizes of the text fonts and symbol fonts are made
263 to match the staff dimensions.    
264
265 @mudelafile[nofly]{size11.ly}
266
267 @mudelafile[nofly]{size13.ly}
268
269 @mudelafile[nofly]{size16.ly}
270
271 @mudelafile[nofly]{size20.ly}
272
273 @mudelafile[nofly]{size23.ly}
274
275 @mudelafile[nofly]{size26.ly}
276
277
278 @section Clefs and Time Signatures
279
280 The transparent clef should not occupy any space and with style
281 @code{fullSizeChanges}, the changing clef should be typeset in full
282 size. For octaviated clefs, the ``8'' should appear closely above or
283 below the clef respectively.  The ``8'' is processed in a convoluted
284 way, so this is fragile as well.
285
286 @mudelafile{clefs.ly}
287
288 @ignore
289 @c the input file is too long and does not test for specific bugs
290 By default, time signatures are written with two numbers. With style
291 ``C'', 4/4 and 2/2 are written with their corresponding symbols and
292 with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
293 9/8 are typeset with symbols, all other signatures retain the default
294 layout. The style ``1'', gives single number signatures for all
295 signatures. 
296 %
297 \mu delafile{time.fly}
298 @end ignore
299
300 @bye