lilypond-1.3.66
[lilypond.git] / ly / params.ly
blob0fb31179fd59be3cfc93408006e37fc6a340f880
1 % params.ly
2 % generic paper parameters
4 %{
6 TODO:
8 * cleanup
9 * use elt properties, iso. paper variables.
14 paperfile = \papersize + ".ly";
15 % paperfile = "a4.ly";
16 \include \paperfile;
17 \include "paper.ly";
19 staffspace = \staffheight / 4.0;
20 stafflinethickness = \staffspace / 10.0;
22 % deprecated
23 interline = \staffspace;
26 % urg, need grace_ versions of these too?
27 beam_thickness = 0.52 * (\staffspace - \stafflinethickness);
31 interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0;
32 interbeam4 = (3.0 * \staffspace - \beam_thickness) / 3.0;
35 The space taken by a note is determined by the formula
37 SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
39 where TIME is the amount of time a note occupies. The value of C is
40 chosen such that the smallest space within a measure is
41 arithmetic_basicspace:
43 C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
45 The smallest space is the one following the shortest note in the
46 measure, or the space following a hypothetical 1/8 note. Typically
47 arithmetic_basicspace is set to a value so that the shortest note
48 takes about two noteheads of space (ie, is followed by a notehead of
49 space):
51 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
53 { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) }
54 { assuming: SHORTEST <= 1/8 }
56 = arithmetic_multiplier *
57 ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
59 = arithmetic_multiplier * arithmetic_basicspace
61 { choose: arithmetic_multiplier = 1.0*quartwidth (why?)}
63 = quartwidth * arithmetic_basicspace
65 =>
67 arithmetic_basicspace = 2/1 = 2
69 If you want to space your music wider, use something like:
71 arithmetic_basicspace = 4.;
74 % We use 0.9*\quartwidth, because 1.0 seems to wide.
75 % We don't adjust arithmetic_basicspace accordingly (why not?)
76 arithmetic_multiplier = 0.9 * \quartwidth ;
77 arithmetic_basicspace = 2.0;
81 % UGH; junk these!
84 % catch suspect beam slopes, set slope to zero if
85 % outer stem is lengthened more than
86 beam_lengthened = 0.2 * \staffspace;
87 % and slope is running away steeper than
88 beam_steep_slope = 0.2 / 1.0;
93 Slur parameters.
95 See Documentation/programmer/fonts.doc
97 % Height-limit (h_inf) = factor * staff_space
98 slur_height_limit_factor = 2.0;
99 slur_ratio = 1.0 / 3.0;
101 slur_thickness = 1.2 * \stafflinethickness;
103 slur_force_blowfit = 0.5;
104 slur_beautiful = 0.5;
108 Horizontal space between centre of notehead and slur.
110 % OSU: suggested gap = ss / 5;
111 slur_x_gap = \staffspace / 5.0;
112 slur_y_gap = 0.25 * \staffspace;
113 slur_y_free = 0.75 * \staffspace;
114 slur_x_minimum = 1.5 * \staffspace;
117 % The constants that define the valid areas for the middle control points
118 % Used in de_uglyfy. Bit empirical.
119 bezier_control1 = 1.5;
120 bezier_control2 = 0.8;
121 bezier_control3 = -2.0;
123 % URG: the magic constants for area asymmetry
124 bezier_pct_c0 = -0.2;
125 bezier_pct_c3 = 0.000006;
126 bezier_pct_out_max = 0.8;
127 bezier_pct_in_max = 1.2;
128 bezier_area_steps = 1.0;
132 Tie parameters
135 tie_height_limit_factor = \slur_height_limit_factor;
136 tie_ratio = \slur_ratio;
137 tie_thickness = \slur_thickness;
139 tie_x_minimum = \staffspace + \slur_x_minimum;
140 % OSU: tie gap == slur gap
141 tie_x_gap = \slur_x_gap;
142 tie_y_gap = 0.25 * \staffspace;
143 % length of a tie that's a staffspace high
144 tie_staffspace_length = 4.0 * \staffspace;
146 tie_staffline_clearance = 2.0 *\tie_thickness;
151 % ugh
152 notewidth = (\quartwidth + \wholewidth) / 2.0;
154 gourlay_energybound = 100000.;
156 Maximum number of measures per line to try when using Gourlay
157 method.
159 gourlay_maxmeasures = 10.;
161 % vertical space between lines.
162 line_kern = \staffspace;
164 volta_thick = 1.6*\stafflinethickness;
165 volta_spanner_height = 2.0 *\staffspace;
167 % relative thickness of thin lines 1.6 : 1 : 0.8
168 stemthickness = 0.8*\stafflinethickness;
169 rulethickness = \stafflinethickness;
172 extender_height = 0.8*\stafflinethickness;
175 % Multi-measure rests
176 multi_measure_rest_x_minimum = 2.5*\staffheight;
177 multi_measure_rest_padding = 2.0 *\staffspace;
178 multi_measure_rest_expand_limit = 10.0;
180 % chop off this much when next to pp / ff sign.
181 crescendo_shorten = 4.0 * \staffspace;
182 crescendo_thickness = \stafflinethickness;
183 crescendo_height = 0.666 * \staffspace;
184 crescendo_dash_thickness = 1.2*\stafflinethickness;
185 crescendo_dash = 4.0*\staffspace;
187 % in internote.
190 % unit for note collision resolving
191 collision_note_width = \notewidth; %ugh.
193 % optical correction amount.
194 stemSpacingCorrection = 0.5*\staffspace;
198 relative strength of space following breakable columns (eg. prefatory matter)
200 breakable_column_space_strength = 2.0;
202 % space after inline clefs and such get this much stretched
203 decrease_nonmus_spacing_factor = 1.0 ;
206 space before musical columns (eg. taken by accidentals) get this much
207 stretched when they follow a musical column, in absence of grace notes.
209 0.0 means no extra space (accidentals are ignored)
211 musical_to_musical_left_spacing_factor = 0.4;
214 stretch space this much if there are grace notes before the column
216 before_grace_spacing_factor = 1.2;
219 If columns do not have spacing information set, set it to this much
221 loose_column_distance = 2.0 * \staffspace;
224 Relative cost of compressing (vs. stretching). Increasing this
225 will cause scores to be set looser
229 compression_energy_factor = 0.6;
231 % if stem is on middle line, choose this direction.
232 stem_default_neutral_direction = 1.0;
234 % in staffspace
235 articulation_script_padding_default = 1.0;
238 \include "engraver.ly";