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