]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/tex/lilypond-regtest.doc
6412e1827da53bd64388468ed4e31142d3499616
[lilypond.git] / Documentation / tex / lilypond-regtest.doc
1 % -*-LaTeX-*-
2 \documentclass{article}
3
4 \title{LilyPond feature test}
5 \author{Han-Wen Nienhuys}
6 \begin{document}
7 \maketitle
8
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).
12
13 \section{Notes and rests} 
14
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.  
18
19 \mudelafile{rest.fly}
20
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.
24
25 \mudelafile{noteheadstyle.ly}
26
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.
32
33 \mudelafile{dots.fly}
34
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. 
39
40 \mudelafile{multi-measure-rest.ly}
41
42 \section{Stems}
43
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.
48
49 \mudelafile{stem-tremolo.ly}
50
51 Beams, stems and noteheads often have communication troubles, since
52 the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
53 point) are mixed.
54
55 Stems, beams, ties and slurs should behave similarly, when placed
56 on the middle staff line.
57
58 \mudelafile{stem-direction.sly}
59
60 \section{Grace notes}
61
62 Grace notes are typeset as an encapsulated piece of music. You can
63 have beams, notes, chords, stems etc. within a \verb|\grace| section.
64 Slurs that start within a grace section, but aren't ended are attached
65 to the next normal note.  Grace notes have zero duration.  If there
66 are tuplets, the grace notes won't be under the brace.  Grace notes
67 can have accidentals, but they are (currently) spaced at a fixed
68 distance.  Grace notes (of course) come before the accidentals of the
69 main note.  Grace notes can also be positioned after the main note.
70
71 \mudelafile{grace.ly}
72
73
74 \section{Beams, slurs and other spanners}
75
76 Beaming is generated automatically. Beams may cross bar lines. In that
77 case, line breaks are forbidden.  Yet clef and key signatures are
78 hidden just as with breakable bar lines.
79
80 \mudelafile{beaming.ly}
81
82 %Beams should not interfere with various items on the staff (amongst
83 %others repeat signs)
84 %
85 % \mud elafile{beam-repeat.ly}
86
87 Beams should behave reasonably well, even under extreme circumstances.
88 Stems may be short, but noteheads should never touch the beam.
89
90 \mudelafile{beam-extreme.ly}
91
92 Beams should always reach the middle staff line, the second beam
93 counting from the note head side, should never be lower than the
94 second staff line.  This does not hold for grace note beams.
95
96 \mudelafile{beam-position.sly}
97
98 Slurs should look nice and symmetric.  The curvature may increase
99 only to avoid noteheads, and as little as possible.
100
101 \mudelafile{slur-symmetry.ly}
102 \mudelafile{slur-symmetry-1.ly}
103
104 Ties are strictly horizontal.  They are placed in between note heads.
105 The horizontal middle should not overlap with a staffline.
106
107 \mudelafile{tie.ly}
108
109 Beams can be typeset over fixed distance aligned staffs, beam
110 beautification doesn't really work, but knees do. Beams should be
111 behave well, wherever the switching point is.
112
113 \mudelafile{beam-interstaff.ly}
114
115 The same goes for slurs. They behave decently when broken across
116 linebreak.
117
118 \mudelafile{slur-interstaff.ly}
119
120 Tuplets are indicated by a bracket with a number.  There should be no
121 bracket if there is one beam that matches  the length of the tuplet.
122 The bracket does not interfere with the stafflines, and the number is
123 centered in the gap in the bracket.
124
125 \mudelafile{tup.ly}
126
127 \section{Repeats}
128
129 LilyPond has three modes for repeats: folded, unfolded and
130 semi-unfolded.  Unfolded repeats are fully written out. Semi unfolded
131 repeats have the body written and all alternatives sequentially.
132 Folded repeats have the body written and all alternatives
133 simultaneously.  If the number of alternatives is larger than the
134 repeat count, the excess alternatives are ignored.  If the number of
135 alternatives is smaller, the first alternative is multiplied to get to
136 the number of repeats.
137
138 Unfolded behavior:
139
140 \mudelafile{repeat-unfold.ly}
141
142 Semi (un)folded behavior.  Voltas can start on non-barline moments.
143 If they don't barlines should still be shown.
144
145 \mudelafile{repeat-semifold.ly}
146
147 Folded.  This doesn't make sense without alternatives, but it works.
148
149 \mudelafile{repeat-fold.ly}
150
151 \section{Multiple notes}
152
153 Rests should not collide with beams, stems and noteheads.  Rests may
154 be under beams.  Rests should be move by integral number of spaces
155 inside the staff, and by half spaces outside.  Notice that the half
156 and whole rests just outside the staff get ledger lines in different
157 cases.
158
159 \mudelafile{rest-collision.ly}
160
161 Normal collisions. We have support for four voice polyphony, where the
162 middle voices are horizontally shifted in a limited number of cases.
163
164 \mudelafile{collisions.ly}
165
166 The number of stafflines of a staff can be set with the property
167 numberOfStaffLines.  Ledger lines both on note heads and rests are
168 adjusted.  Barlines also are adjusted.
169
170
171 \mudelafile{number-staff-lines.fly}
172
173 \section{Spacing}
174
175 In a limited number of cases, LilyPond corrects for optical spacing
176 effects.  In this example, space for opposite pointed stems is adjusted
177
178 \mudelafile{stem-spacing.sly}
179
180 \section{Global stuff}
181
182 Markings that are attached to (invisible) barlines are 
183 delicate: the are attached to the rest of the score without the score
184 knowing it.  Consequently, they fall over  often.
185
186 \mudelafile{bar-scripts.ly}
187
188 Staff margins are also markings attached to barlines.  They should be
189 left otf the staff, and be centered vertically wrt the staff.  They
190 may be on normal staffs, but also on compound staffs, like the
191 PianoStaff
192
193 \mudelafile{staff-margin.ly}
194
195 Breathing signs, also used for phrasing, do normally not influence
196 global spacing -- only if space gets tight, notes are shifted to make
197 room for the breathing sign. Breathing signs break beams running
198 through their voice. In the following example, the notes in the first
199 two measures all have the same distance from each other:
200
201 \mudelafile{breathing-sign.ly}
202
203
204 \section{Clefs and Time Signatures}
205
206 The transparent clef should not occupy any space and with style
207 \texttt{fullSizeChanges}, the changing clef should be typeset in full
208 size. For octaviated clefs, the ``8'' should appear closely above or
209 below the clef respectively.  The ``8'' is processed in a rather
210 convoluted way, so this is fragile as well.
211
212 \mudelafile{clefs.ly}
213
214 By default, time signatures are written with two numbers. With style
215 ``C'', 4/4 and 2/2 are written with their corresponding symbols and
216 with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
217 9/8 are typeset with symbols, all other signatures retain the default
218 layout. The style ``1'', gives single number signatures for all
219 signatures. 
220
221 \mudelafile{time.fly}
222
223 \end{document}