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