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