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