]> git.donarmstrong.com Git - lilypond.git/blob - ly/params.ly
b31166dcd7e5c26fb8b6f007bbe4de415ad34c1b
[lilypond.git] / ly / params.ly
1 % params.ly
2 % generic paper parameters
3
4
5 paperfile = \papersize + ".ly";
6 % paperfile = "a4.ly";
7 \include \paperfile;
8 \include "paper.ly";
9
10 staffspace = \staffheight / 4.0;
11 stafflinethickness = \staffspace / 10.0;
12
13 % deprecated
14 interline = \staffspace;
15
16
17 % urg, need grace_ versions of these too?
18 beam_thickness = 0.52 * (\staffspace - \stafflinethickness);
19
20
21
22 interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0;
23 interbeam4 = (3.0 * \staffspace - \beam_thickness) / 3.0;
24
25 %{
26 The space taken by a note is determined by the formula 
27
28    SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
29
30 where TIME is the amount of time a note occupies.  The value of C is
31 chosen such that the smallest space within a measure is
32 arithmetic_basicspace:
33
34   C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
35
36 The smallest space is the one following the shortest note in the
37 measure, or the space following a hypothetical 1/8 note.  Typically
38 arithmetic_basicspace is set to a value so that the shortest note
39 takes about two noteheads of space (ie, is followed by a notehead of
40 space):
41
42    2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
43
44    { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) }
45    { assuming: SHORTEST <= 1/8 }
46
47                = arithmetic_multiplier *
48                ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
49
50                = arithmetic_multiplier * arithmetic_basicspace
51
52    { choose: arithmetic_multiplier = 1.0*quartwidth (why?)}
53
54                = quartwidth * arithmetic_basicspace
55
56    =>          
57
58    arithmetic_basicspace = 2/1 = 2
59
60 If you want to space your music wider, use something like:
61
62    arithmetic_basicspace = 4.;
63
64 %}
65 % We use 0.9*\quartwidth, because 1.0 seems to wide.
66 % We don't adjust arithmetic_basicspace accordingly (why not?)
67 arithmetic_multiplier = 0.9 * \quartwidth ;
68 arithmetic_basicspace = 2.0;
69
70
71
72 % UGH; junk these!
73 %
74
75 % catch suspect beam slopes, set slope to zero if
76 % outer stem is lengthened more than
77 beam_lengthened = 0.2 * \staffspace;
78 % and slope is running away steeper than
79 beam_steep_slope = 0.2 / 1.0;
80
81
82
83 %{
84   Slur parameters.
85   
86   See Documentation/programmer/fonts.doc
87 %}
88 % Height-limit (h_inf) = factor * staff_space
89 slur_height_limit_factor = 2.0;
90 slur_ratio = 1.0 / 3.0;
91
92 slur_thickness = 1.2 * \stafflinethickness;
93
94 slur_force_blowfit = 0.5;
95 slur_beautiful = 0.5;
96
97
98 %{
99 Horizontal space between centre of notehead and slur.
100 %}
101 % OSU: suggested gap = ss / 5;
102 slur_x_gap = \staffspace / 5.0;
103 slur_y_gap = 0.25 * \staffspace;
104 slur_y_free = 0.75 * \staffspace;
105 slur_x_minimum = 1.5 * \staffspace;
106
107
108 % The constants that define the valid areas for the middle control points
109 % Used in de_uglyfy.  Bit empirical.
110 bezier_control1 = 1.5;
111 bezier_control2 = 0.8;
112 bezier_control3 = -2.0;
113
114 % URG: the magic constants for area asymmetry
115 bezier_pct_c0 = -0.2;
116 bezier_pct_c3 = 0.000006;
117 bezier_pct_out_max = 0.8;
118 bezier_pct_in_max = 1.2;
119 bezier_area_steps = 1.0;
120
121
122 %{
123   Tie parameters
124 %}
125
126 tie_height_limit_factor = \slur_height_limit_factor;
127 tie_ratio = \slur_ratio;
128 tie_thickness = \slur_thickness;
129
130 tie_x_minimum = \staffspace + \slur_x_minimum;
131 % OSU: tie gap == slur gap
132 tie_x_gap = \slur_x_gap;
133 tie_y_gap = 0.25 * \staffspace;
134 % length of a tie that's a staffspace high
135 tie_staffspace_length = 4.0 * \staffspace;
136
137 tie_staffline_clearance = 2.0 *\tie_thickness;
138
139
140
141
142 % ugh
143 notewidth = (\quartwidth + \wholewidth) / 2.0;
144
145 gourlay_energybound = 100000.;
146 %{
147 Maximum number of measures per line to try when using Gourlay
148 method. 
149 %}
150 gourlay_maxmeasures = 10.;
151
152
153 line_kern = \staffspace;
154
155 %{ Ross. page 151 lists these values, but we think that thick lines
156 and kernings are too thick.
157
158 bar_kern = 0.5 * \staffspace;
159 bar_thinkern = 0.75 * \staffspace;
160 barthick_thick = 0.5* \staffspace;
161 barthick_score = 0.13333* \staffspace;
162 barthick_thin = 0.1*\staffspace;
163
164 %}
165
166 bar_kern = 3.0 * \stafflinethickness;
167 bar_thinkern = 3.0 * \stafflinethickness;
168 barthick_thick = 6.0* \stafflinethickness;
169 barthick_thin = 1.6*\stafflinethickness;
170 barthick_score = 1.6*\stafflinethickness;
171
172 bracket_arch_thick = \staffspace / 4.0;
173 bracket_width = 2.0 * \staffspace;
174 bracket_thick = \staffspace / 4.0;
175 bracket_arch_height = 1.5 * \staffspace;
176 bracket_arch_width = \bracket_arch_height;
177 bracket_arch_angle = 50.0;
178
179 tuplet_spanner_gap = 2.0 * \staffspace;
180 tuplet_thick = 1.0*\stafflinethickness;
181 volta_thick = 1.6*\stafflinethickness;
182 volta_spanner_height = 2.0 *\staffspace;
183
184 % relative thickness of thin lines  1.6 : 1 : 0.8
185 stemthickness = 0.8*\stafflinethickness;
186 rulethickness = \stafflinethickness;
187
188
189 extender_height = 0.8*\stafflinethickness;
190
191 hyphen_thickness = 0.05*\font_normal;
192 hyphen_height = 0.2*\font_normal;
193 hyphen_minimum_length = 0.25*\font_normal;
194
195 % Multi-measure rests
196 multi_measure_rest_x_minimum = 2.5*\staffheight;
197 multi_measure_rest_padding = 2.0 *\staffspace;
198 multi_measure_rest_expand_limit = 10.0;
199
200 % chop off this much when next to pp / ff sign.
201 crescendo_shorten = 4.0 * \staffspace;
202 crescendo_thickness   = \stafflinethickness;
203 crescendo_height = 0.666 * \staffspace;
204 crescendo_dash_thickness = 1.2*\stafflinethickness;
205 crescendo_dash = 4.0*\staffspace;
206
207 % in internote.
208 restcollision_minimum_dist = 3.0;
209 restcollision_minimum_beamdist = 1.5;
210
211
212 % unit for note collision resolving
213 collision_note_width = \notewidth;      %ugh.
214
215 % deprecated!
216 postBreakPadding = 0.0;
217
218 % optical correction amount.
219 stemSpacingCorrection = 0.5*\staffspace;
220
221
222 %{
223  relative strength of space following breakable columns (eg. prefatory matter)
224  %}
225 breakable_column_space_strength = 2.0; 
226
227 % space after inline clefs and such get this much stretched
228 decrease_nonmus_spacing_factor = 1.0 ;
229
230 %{
231  space before musical columns (eg. taken by accidentals) get this much
232  stretched when they follow a musical column, in absence of grace notes.
233
234  0.0 means no extra space (accidentals are ignored)
235 %}
236 musical_to_musical_left_spacing_factor = 0.4;
237
238 %{
239  stretch space this much if there are grace notes before the column
240 %}
241 before_grace_spacing_factor = 1.2;
242
243 %{
244 If columns do not have spacing information set, set it to this much
245 %}
246 loose_column_distance = 2.0 * \staffspace;
247
248 %{
249 Relative cost of compressing (vs. stretching).  Increasing this
250 will cause scores to be set looser
251 .
252 %}
253
254 compression_energy_factor = 0.6;
255
256 % if stem is on middle line, choose this direction.
257 stem_default_neutral_direction = 1.0;
258
259 % in staffspace
260 articulation_script_padding_default = 1.0;
261
262 % Backward compatibility -- has no function; 
263 Gourlay = 0.0;
264 Wordwrap =0.0;
265
266 \include "engraver.ly";
267
268
269 #'margin-shape = #'()
270 #'Local_key_item::left-padding = #'0.2
271 #'Local_key_item::right-padding = #'0.4
272
273 #'staff-height = \staffheight;
274 #'beam-thickness = \beam_thickness;  %% UGR
275 #'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
276
277 #'Breathing_sign::visibility-lambda = #begin-of-line-invisible
278 #'Left_edge_item::visibility-lambda = #begin-of-line-visible