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