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