]> git.donarmstrong.com Git - lilypond.git/blob - ly/params.ly
patch::: 1.3.87.jcn2
[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 = 1.0 ; 
136 tie_ratio = \slur_ratio;
137
138 % OSU: tie gap == slur gap
139 tie_x_gap = \slur_x_gap;
140
141 tie_staffline_clearance = 2.0 *\slur_thickness;
142
143
144 % ugh
145 notewidth = (\quartwidth + \wholewidth) / 2.0;
146
147 gourlay_energybound = 100000.;
148 %{
149 Maximum number of measures per line to try when using Gourlay
150 method. 
151 %}
152 gourlay_maxmeasures = 10.;
153
154 % vertical space between lines.
155 line_kern = \staffspace;
156
157 volta_thick = 1.6*\stafflinethickness;
158 volta_spanner_height = 2.0 *\staffspace;
159
160 % relative thickness of thin lines  1.6 : 1 : 0.8
161 stemthickness = 0.8*\stafflinethickness;
162 rulethickness = \stafflinethickness;
163
164
165 extender_height = 0.8*\stafflinethickness;
166
167
168 % Multi-measure rests
169 multi_measure_rest_x_minimum = 2.5*\staffheight;
170 multi_measure_rest_padding = 2.0 *\staffspace;
171 multi_measure_rest_expand_limit = 10.0;
172
173 % chop off this much when next to pp / ff sign.
174 crescendo_shorten = 4.0 * \staffspace;
175 crescendo_thickness   = \stafflinethickness;
176 crescendo_height = 0.666 * \staffspace;
177 crescendo_dash_thickness = 1.2*\stafflinethickness;
178 crescendo_dash = 4.0*\staffspace;
179
180 % in internote.
181
182
183 % unit for note collision resolving
184 collision_note_width = \notewidth;      %ugh.
185
186 % optical correction amount.
187 stemSpacingCorrection = 0.5*\staffspace;
188
189
190 %{
191  relative strength of space following breakable columns (eg. prefatory matter)
192  %}
193 breakable_column_space_strength = 2.0; 
194
195 % space after inline clefs and such get this much stretched
196 decrease_nonmus_spacing_factor = 1.0 ;
197
198 %{
199  space before musical columns (eg. taken by accidentals) get this much
200  stretched when they follow a musical column, in absence of grace notes.
201
202  0.0 means no extra space (accidentals are ignored)
203 %}
204 musical_to_musical_left_spacing_factor = 0.4;
205
206 %{
207  stretch space this much if there are grace notes before the column
208 %}
209 before_grace_spacing_factor = 1.2;
210
211 %{
212 If columns do not have spacing information set, set it to this much
213 %}
214 loose_column_distance = 2.0 * \staffspace;
215
216 %{
217 Relative cost of compressing (vs. stretching).  Increasing this
218 will cause scores to be set looser
219 .
220 %}
221
222 compression_energy_factor = 0.6;
223
224 % in staffspace
225 articulation_script_padding_default = 1.0;
226
227
228 \include "engraver.ly";
229
230
231
232
233