]> git.donarmstrong.com Git - lilypond.git/blob - ly/params.ly
0fb31179fd59be3cfc93408006e37fc6a340f880
[lilypond.git] / ly / params.ly
1 % params.ly
2 % generic paper parameters
3
4 %{
5
6 TODO:
7
8 * cleanup
9 * use elt properties, iso. paper variables.
10 %}
11
12
13
14 paperfile = \papersize + ".ly";
15 % paperfile = "a4.ly";
16 \include \paperfile;
17 \include "paper.ly";
18
19 staffspace = \staffheight / 4.0;
20 stafflinethickness = \staffspace / 10.0;
21
22 % deprecated
23 interline = \staffspace;
24
25
26 % urg, need grace_ versions of these too?
27 beam_thickness = 0.52 * (\staffspace - \stafflinethickness);
28
29
30
31 interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0;
32 interbeam4 = (3.0 * \staffspace - \beam_thickness) / 3.0;
33
34 %{
35 The space taken by a note is determined by the formula 
36
37    SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
38
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:
42
43   C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
44
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):
50
51    2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
52
53    { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) }
54    { assuming: SHORTEST <= 1/8 }
55
56                = arithmetic_multiplier *
57                ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
58
59                = arithmetic_multiplier * arithmetic_basicspace
60
61    { choose: arithmetic_multiplier = 1.0*quartwidth (why?)}
62
63                = quartwidth * arithmetic_basicspace
64
65    =>          
66
67    arithmetic_basicspace = 2/1 = 2
68
69 If you want to space your music wider, use something like:
70
71    arithmetic_basicspace = 4.;
72
73 %}
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;
78
79
80
81 % UGH; junk these!
82 %
83
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;
89
90
91
92 %{
93   Slur parameters.
94   
95   See Documentation/programmer/fonts.doc
96 %}
97 % Height-limit (h_inf) = factor * staff_space
98 slur_height_limit_factor = 2.0;
99 slur_ratio = 1.0 / 3.0;
100
101 slur_thickness = 1.2 * \stafflinethickness;
102
103 slur_force_blowfit = 0.5;
104 slur_beautiful = 0.5;
105
106
107 %{
108 Horizontal space between centre of notehead and slur.
109 %}
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;
115
116
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;
122
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;
129
130
131 %{
132   Tie parameters
133 %}
134
135 tie_height_limit_factor = \slur_height_limit_factor;
136 tie_ratio = \slur_ratio;
137 tie_thickness = \slur_thickness;
138
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;
145
146 tie_staffline_clearance = 2.0 *\tie_thickness;
147
148
149
150
151 % ugh
152 notewidth = (\quartwidth + \wholewidth) / 2.0;
153
154 gourlay_energybound = 100000.;
155 %{
156 Maximum number of measures per line to try when using Gourlay
157 method. 
158 %}
159 gourlay_maxmeasures = 10.;
160
161 % vertical space between lines.
162 line_kern = \staffspace;
163
164 volta_thick = 1.6*\stafflinethickness;
165 volta_spanner_height = 2.0 *\staffspace;
166
167 % relative thickness of thin lines  1.6 : 1 : 0.8
168 stemthickness = 0.8*\stafflinethickness;
169 rulethickness = \stafflinethickness;
170
171
172 extender_height = 0.8*\stafflinethickness;
173
174
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;
179
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;
186
187 % in internote.
188
189
190 % unit for note collision resolving
191 collision_note_width = \notewidth;      %ugh.
192
193 % optical correction amount.
194 stemSpacingCorrection = 0.5*\staffspace;
195
196
197 %{
198  relative strength of space following breakable columns (eg. prefatory matter)
199  %}
200 breakable_column_space_strength = 2.0; 
201
202 % space after inline clefs and such get this much stretched
203 decrease_nonmus_spacing_factor = 1.0 ;
204
205 %{
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.
208
209  0.0 means no extra space (accidentals are ignored)
210 %}
211 musical_to_musical_left_spacing_factor = 0.4;
212
213 %{
214  stretch space this much if there are grace notes before the column
215 %}
216 before_grace_spacing_factor = 1.2;
217
218 %{
219 If columns do not have spacing information set, set it to this much
220 %}
221 loose_column_distance = 2.0 * \staffspace;
222
223 %{
224 Relative cost of compressing (vs. stretching).  Increasing this
225 will cause scores to be set looser
226 .
227 %}
228
229 compression_energy_factor = 0.6;
230
231 % if stem is on middle line, choose this direction.
232 stem_default_neutral_direction = 1.0;
233
234 % in staffspace
235 articulation_script_padding_default = 1.0;
236
237
238 \include "engraver.ly";
239
240
241
242
243