]> git.donarmstrong.com Git - lilypond.git/blob - ly/params.ly
033f1c9a3ff1733f39a18773ee7cb4172739d5d4
[lilypond.git] / ly / params.ly
1 % params.ly
2 % generic paper parameters
3
4 paperfile = \papersize + ".ly";
5 % paperfile = "a4.ly";
6 \include \paperfile;
7 \include "paper.ly";
8
9 interline = \staffheight / 4.0;
10
11
12 % thickness of stafflines
13 staffline = \interline / 10.0;
14
15 % urg, need grace_ versions of these too?
16 beam_thickness = 0.52 * (\interline - \staffline);
17 interbeam = (2.0 * \interline + \staffline - \beam_thickness) / 2.0;
18 interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0;
19
20 % stems and beams
21 %
22 % poor man's array size
23 stem_max = 3.0;
24
25 % stem stuff measured in staff positions.
26 stem_length0 = 7.;
27 stem_length1 = 5.;
28 stem_length2 = 4.;
29 stem_length3 = 3.;
30
31 %
32 arithmetic_basicspace = 2.;
33 arithmetic_multiplier = 0.9 * \quartwidth ;
34
35
36
37 % urg.
38 % if only these ugly arrays were scm,
39 % we could override them in the Grace context
40 grace_factor = 0.8;
41 grace_stem_length0 = \stem_length0 * \grace_factor;
42 grace_stem_length1 = \stem_length1 * \grace_factor;
43 grace_stem_length2 = \stem_length2 * \grace_factor;
44 grace_stem_length3 = \stem_length3 * \grace_factor;
45
46 % only used for beams
47 minimum_stem_length0 = 0.0 ; % not used
48 minimum_stem_length1 = 3. ;
49 minimum_stem_length2 = 2.5;
50 minimum_stem_length3 = 2.0;
51
52 grace_minimum_stem_length0 = 0.0 ; % not used
53 grace_minimum_stem_length1 = \minimum_stem_length1 * \grace_factor;
54 grace_minimum_stem_length2 = \minimum_stem_length2 * \grace_factor;
55 grace_minimum_stem_length3 = \minimum_stem_length3 * \grace_factor;
56
57 % stems in unnatural (forced) direction should be shortened,
58 % according to [Roush & Gourlay].  Their suggestion to knock off
59 % a whole staffspace seems a bit drastical: we'll do half.
60 %
61 forced_stem_shorten0 = 1.0;
62 forced_stem_shorten1 = \forced_stem_shorten0;
63 forced_stem_shorten2 = \forced_stem_shorten1;
64 forced_stem_shorten3 = \forced_stem_shorten2;
65
66 % don't shorten grace stems, always up
67 grace_forced_stem_shorten0 = 0.;
68 grace_forced_stem_shorten1 = \grace_forced_stem_shorten0;
69 grace_forced_stem_shorten2 = \grace_forced_stem_shorten1;
70 grace_forced_stem_shorten3 = \grace_forced_stem_shorten2;
71
72 % there are several ways to calculate the direction of a beam
73
74 % * MAJORITY : number count of up or down notes
75 % * MEAN     : mean centre distance of all notes
76 % * MEDIAN   : mean centre distance weighted per note
77 %
78 % enum Dir_algorithm { DOWN=-1, UP=1, MAJORITY=2, MEAN, MEDIAN };
79 %
80 DOWN = -1.0;
81 UP = 1.0;
82 MAJORITY = 2.0;
83 MEAN = 3.0;
84 MEDIAN = 4.0;
85 % [Ross]: majority
86 beam_dir_algorithm = \MAJORITY;
87
88 % catch suspect beam slopes, set slope to zero if
89 % outer stem is lengthened more than
90 beam_lengthened = 0.2 * \interline;
91 % and slope is running away steeper than
92 beam_steep_slope = 0.2 / 1.0;
93
94 % OSU: suggested gap = ss / 5;
95 slur_x_gap = \interline / 5.0;
96 slur_y_gap = 0.25 * \interline;
97 slur_y_free = 0.75 * \interline;
98 slur_x_minimum = 3.0 * \interline;
99
100 % slope damping: keep dy/dx < slur_slope_damping
101 slur_slope_damping = 0.3;
102 slur_interstaff_slope_damping = 0.6;
103 % height damping: keep h/dx < slur_height_damping
104 slur_height_damping = 0.4;
105 slur_interstaff_height_damping = 0.5;
106 % snap to stem if slur ends closer to stem than
107 slur_snap_to_stem = 1.75 * \interline;
108 slur_interstaff_snap_to_stem = 2.5 * \interline;
109 % maximum dy change allowed by snapping
110 slur_snap_max_slope_change = 0.5;
111 slur_interstaff_snap_max_slope_change = 0.5;
112
113
114
115 tie_x_minimum = \slur_x_minimum;
116 % OSU: tie gap == slur gap
117 tie_x_gap = \slur_x_gap;
118 tie_y_gap = 0.25 * \interline;
119 % length of a tie that's a staffspace high
120 tie_staffspace_length = 4.0 * \interline;
121
122 % ugh: rename to bow (in bezier.cc and fonts.doc too...)
123 % slur_thickness = 1.8 * \staffline;
124 slur_thickness = 1.4 * \staffline;
125 slur_height_limit = \staffheight;
126
127
128
129 % slur_ratio = 0.3;
130 % try bit flatter slurs
131 slur_ratio = 0.25;
132 slur_clip_ratio = 1.2;
133 slur_clip_height = 3.0 * \staffheight;
134 slur_clip_angle = 100.0;
135 slur_rc_factor = 2.4;
136
137 % ugh
138 notewidth = (\quartwidth + \wholewidth) / 2.0;
139
140 % ugh
141 rulethickness = \staffline;
142
143 gourlay_energybound = 100000.;
144 %{
145 The following bounds the number of measures
146 on a line.  Decreasing it greatly reduces computation time
147 %}
148 gourlay_maxmeasures = 10.;
149 castingalgorithm = \Gourlay;
150
151 %{ Ross. page 151 lists these values, but we think that thick lines
152 and kernings are too thick.
153
154 bar_kern = 0.5 * \interline;
155 bar_thinkern = 0.75 * \interline;
156 barthick_thick = 0.5* \interline;
157 barthick_score = 0.13333* \interline;
158 barthick_thin = 0.1*\interline;
159
160 %}
161
162 bar_kern = 3.0 * \staffline;
163 bar_thinkern = 3.0 * \staffline;
164 barthick_thick = 6.0* \staffline;
165 barthick_thin = 1.6*\staffline;
166 barthick_score = 1.6*\staffline;
167
168 tuplet_spanner_gap = 2.0 * \interline;
169 tuplet_thick = 1.0*\staffline;
170 volta_thick = 1.6*\staffline;
171 volta_spanner_height = 2.0 *\interline;
172
173 % relative thickness of thin lines  1.6 : 1 : 0.8
174 stemthickness = 0.8*\staffline;
175 rulethickness = \staffline;
176
177
178 extender_height = 0.8*\staffline;
179
180 hyphen_thickness = 0.05*\font_normal;
181 hyphen_height = 0.2*\font_normal;
182 hyphen_minimum_length = 0.25*\font_normal;
183
184 % Multi-measure rests
185 mmrest_x_minimum = 2.0*\staffheight;
186
187
188 % chop off this much when next to pp / ff sign.
189 crescendo_shorten = 4.0 * \interline;
190 crescendo_thickness   = \staffline;
191
192 % in internote.
193 restcollision_minimum_dist = 3.0;
194 restcollision_minimum_beamdist = 1.5;
195
196 % deprecated!
197 postBreakPadding = 0.0;
198
199 % optical correction amount.
200 stemSpacingCorrection = 0.5*\interline;
201
202
203 % relative strength of space following  tprefatory matter, and inline clefs.
204 non_musical_space_strength = 8.0; 
205
206
207 %If columns do not have spacing information set, set it to this much
208 loose_column_distance = 2.0 * \interline;
209
210 % if stem is on middle line, choose this direction.
211 stem_default_neutral_direction = 1.0;
212
213 \include "engraver.ly";
214
215
216