]> git.donarmstrong.com Git - lilypond.git/blob - ly/params.ly
354779e019bfd033dc4046b1db2a87f3094e0db8
[lilypond.git] / ly / params.ly
1 % params.ly
2 % generic paper parameters
3
4 paperfile = \papersize + ".ly";
5 % paperfile = "a4.ly";
6 \include \paperfile;
7 \include "paper.ly";
8
9 interline = \staffheight / 4.0;
10
11
12 % thickness of stafflines
13 staffline = \interline / 10.0;
14
15 % urg, need grace_ versions of these too?
16 beam_thickness = 0.52 * (\interline - \staffline);
17 interbeam = (2.0 * \interline + \staffline - \beam_thickness) / 2.0;
18 interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0;
19
20 % stems and beams
21 %
22 % poor man's array size
23 stem_max = 3.0;
24
25 %{ Specify length of stems for notes in the staff
26 that don't have beams. 
27  Measured in staff positions.
28 %}
29 stem_length0 = 7.;
30 stem_length1 = 5.;
31 stem_length2 = 4.;
32 stem_length3 = 3.;
33
34 %{
35 The space taken by a note is determined by the formula 
36
37 arithmetic_multiplier * ( c + log2 (time) ))
38
39 where code(time) is the amount of time a note occupies.  The value
40 of code(c) is chosen such that the smallest space within a measure is
41 arithmetic_basicspace.  The smallest space is the one following the
42 shortest note in the measure.  Typically arithmetic_basicspace is set
43 to the width of a quarter note head.
44 %}
45 arithmetic_basicspace = 2.;
46 arithmetic_multiplier = 0.9 * \quartwidth ;
47
48
49
50 % urg.
51 % if only these ugly arrays were scm,
52 % we could override them in the Grace context
53 grace_factor = 0.8;
54 grace_stem_length0 = \stem_length0 * \grace_factor;
55 grace_stem_length1 = \stem_length1 * \grace_factor;
56 grace_stem_length2 = \stem_length2 * \grace_factor;
57 grace_stem_length3 = \stem_length3 * \grace_factor;
58
59 % only used for beams
60 minimum_stem_length0 = 0.0 ; % not used
61 minimum_stem_length1 = 3. ;
62 minimum_stem_length2 = 2.5;
63 minimum_stem_length3 = 2.0;
64
65 grace_minimum_stem_length0 = 0.0 ; % not used
66 grace_minimum_stem_length1 = \minimum_stem_length1 * \grace_factor;
67 grace_minimum_stem_length2 = \minimum_stem_length2 * \grace_factor;
68 grace_minimum_stem_length3 = \minimum_stem_length3 * \grace_factor;
69
70 %{
71   stems in unnatural (forced) direction should be shortened,
72   according to [Roush & Gourlay].  Their suggestion to knock off
73   a whole staffspace seems a bit drastical: we'll do half.
74 %}
75
76 forced_stem_shorten0 = 1.0;
77 forced_stem_shorten1 = \forced_stem_shorten0;
78 forced_stem_shorten2 = \forced_stem_shorten1;
79 forced_stem_shorten3 = \forced_stem_shorten2;
80
81 % don't shorten grace stems, always up
82 grace_forced_stem_shorten0 = 0.;
83 grace_forced_stem_shorten1 = \grace_forced_stem_shorten0;
84 grace_forced_stem_shorten2 = \grace_forced_stem_shorten1;
85 grace_forced_stem_shorten3 = \grace_forced_stem_shorten2;
86
87 % there are several ways to calculate the direction of a beam
88
89 % * MAJORITY : number count of up or down notes
90 % * MEAN     : mean centre distance of all notes
91 % * MEDIAN   : mean centre distance weighted per note
92 %
93 % enum Dir_algorithm { DOWN=-1, UP=1, MAJORITY=2, MEAN, MEDIAN };
94 %
95 DOWN = -1.0;
96 UP = 1.0;
97 MAJORITY = 2.0;
98 MEAN = 3.0;
99 MEDIAN = 4.0;
100
101 %{
102 dit(code(beam_dir_algorithm)) Specify algorithm for determining
103 whether beams go up or down.  It is real valued.  If set to 2.0 then
104 majority selection is used.  If set to 3.0, then mean selection is
105 used based on the mean center distance.  If set to 4.0 then median
106 selection is used, based on the median center distance.
107 %}
108
109 % [Ross]: majority
110 beam_dir_algorithm = \MAJORITY;
111
112 % catch suspect beam slopes, set slope to zero if
113 % outer stem is lengthened more than
114 beam_lengthened = 0.2 * \interline;
115 % and slope is running away steeper than
116 beam_steep_slope = 0.2 / 1.0;
117
118 %{
119 dit(code(slur_x_gap)) Horizontal space between note and slur.  Set to
120 code(\interline / 5) by default.  
121
122 %}
123 % OSU: suggested gap = ss / 5;
124 slur_x_gap = \interline / 5.0;
125 slur_y_gap = 0.25 * \interline;
126 slur_y_free = 0.75 * \interline;
127 slur_x_minimum = 1.5 * \interline;
128
129 %{
130 Like beams, slurs often aren't as steep as the notes they encompass.
131 This sets the amount of damping.
132 %}
133 % slope damping: keep dy/dx < slur_slope_damping
134 slur_slope_damping = 0.3;
135 slur_interstaff_slope_damping = 0.6;
136 % height damping: keep h/dx < slur_height_damping
137 slur_height_damping = 0.4;
138 slur_interstaff_height_damping = 0.5;
139 % snap to stem if slur ends closer to stem than
140 slur_snap_to_stem = 1.75 * \interline;
141 slur_interstaff_snap_to_stem = 2.5 * \interline;
142 % maximum dy change allowed by snapping
143 slur_snap_max_slope_change = 0.5;
144 slur_interstaff_snap_max_slope_change = 0.5;
145
146
147
148 tie_x_minimum = \interline + \slur_x_minimum;
149 % OSU: tie gap == slur gap
150 tie_x_gap = \slur_x_gap;
151 tie_y_gap = 0.25 * \interline;
152 % length of a tie that's a staffspace high
153 tie_staffspace_length = 4.0 * \interline;
154
155 % ugh: rename to bow (in bezier.cc and fonts.doc too...)
156 % slur_thickness = 1.8 * \staffline;
157 slur_thickness = 1.4 * \staffline;
158
159 %{
160  Specifies the maximum height of slurs.
161 %}
162 slur_height_limit = \staffheight;
163
164
165 %{
166 Specifes the ratio of slur hight to slur width
167 to aim for.  Default value is 0.3. 
168 %}
169
170 % slur_ratio = 0.3;
171 % try bit flatter slurs
172 slur_ratio = 0.25;
173 slur_clip_ratio = 1.2;
174 slur_clip_height = 3.0 * \staffheight;
175 slur_clip_angle = 100.0;
176 slur_rc_factor = 2.4;
177
178 % ugh
179 notewidth = (\quartwidth + \wholewidth) / 2.0;
180
181 % ugh
182 rulethickness = \staffline;
183
184 gourlay_energybound = 100000.;
185 %{
186 Maximum number of measures per line to try when using Gourlay
187 method. Decreasing this greatly reduces computation time.  
188 %}
189 gourlay_maxmeasures = 10.;
190
191 %{
192 Gourlay is a better, TeX like algorithm for breaking lines.  Wordwrap is faster, but leaves
193 really                      spaced                out                lines at the end
194 %}
195
196 Gourlay = 1.0;
197 Wordwrap = 0.0;
198
199 castingalgorithm = \Gourlay;
200
201 %{ Ross. page 151 lists these values, but we think that thick lines
202 and kernings are too thick.
203
204 bar_kern = 0.5 * \interline;
205 bar_thinkern = 0.75 * \interline;
206 barthick_thick = 0.5* \interline;
207 barthick_score = 0.13333* \interline;
208 barthick_thin = 0.1*\interline;
209
210 %}
211
212 bar_kern = 3.0 * \staffline;
213 bar_thinkern = 3.0 * \staffline;
214 barthick_thick = 6.0* \staffline;
215 barthick_thin = 1.6*\staffline;
216 barthick_score = 1.6*\staffline;
217
218 tuplet_spanner_gap = 2.0 * \interline;
219 tuplet_thick = 1.0*\staffline;
220 volta_thick = 1.6*\staffline;
221 volta_spanner_height = 2.0 *\interline;
222
223 % relative thickness of thin lines  1.6 : 1 : 0.8
224 stemthickness = 0.8*\staffline;
225 rulethickness = \staffline;
226
227
228 extender_height = 0.8*\staffline;
229
230 hyphen_thickness = 0.05*\font_normal;
231 hyphen_height = 0.2*\font_normal;
232 hyphen_minimum_length = 0.25*\font_normal;
233
234 % Multi-measure rests
235 mmrest_x_minimum = 1.4*\staffheight;
236
237
238 % chop off this much when next to pp / ff sign.
239 crescendo_shorten = 4.0 * \interline;
240 crescendo_thickness   = \staffline;
241
242 % in internote.
243 restcollision_minimum_dist = 3.0;
244 restcollision_minimum_beamdist = 1.5;
245
246 % deprecated!
247 postBreakPadding = 0.0;
248
249 % optical correction amount.
250 stemSpacingCorrection = 0.5*\interline;
251
252
253 %{
254  relative strength of space following breakable columns (eg. prefatory matter)
255  %}
256 breakable_column_space_strength = 2.0; 
257
258 % space after inline clefs and such get this much stretched
259 decrease_nonmus_spacing_factor = 1.0 ;
260
261 %{
262  space before musical columns (eg. taken by accidentals) get this much
263  stretched when they follow a musical column, in absence of grace notes.
264
265  0.0 means no extra space (accidentals are ignored)
266 %}
267 musical_to_musical_left_spacing_factor = 0.4;
268
269 %{
270  stretch space this much if there are grace notes before the column
271 %}
272 before_grace_spacing_factor = 1.2;
273
274 %{
275 If columns do not have spacing information set, set it to this much
276 %}
277 loose_column_distance = 2.0 * \interline;
278
279 % if stem is on middle line, choose this direction.
280 stem_default_neutral_direction = 1.0;
281
282 % in interline
283 articulation_script_padding_default = 1.0;
284
285 % 1.0 -> faster.
286 simple_spacing_solver = 1.0;
287 \include "engraver.ly";
288
289
290