]> git.donarmstrong.com Git - lilypond.git/blob - ly/params.ly
release: 1.1.59
[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.8;
97 % height damping: keep h/dx < slur_height_damping
98 slur_height_damping = 0.6;
99 slur_interstaff_height_damping = 1.5;
100 % snap to stem if slur ends closer to stem than
101 slur_snap_to_stem = 1.5 * \interline;
102 slur_interstaff_snap_to_stem = 2.5 * \interline;
103
104
105 tie_x_minimum = \slur_x_minimum;
106 % OSU: tie gap == slur gap
107 tie_x_gap = \slur_x_gap;
108 tie_y_gap = 0.25 * \interline;
109 % length of a tie that's a staffspace high
110 tie_staffspace_length = 4.0 * \interline;
111
112 % ugh: rename to bow (in bezier.cc and fonts.doc too...)
113 % slur_thickness = 1.8 * \staffline;
114 slur_thickness = 1.4 * \staffline;
115 slur_height_limit = \staffheight;
116
117
118
119 % slur_ratio = 0.3;
120 % try bit flatter slurs
121 slur_ratio = 0.25;
122 slur_clip_ratio = 1.2;
123 slur_clip_height = 3.0 * \staffheight;
124 slur_clip_angle = 100.0;
125 slur_rc_factor = 2.4;
126
127 % ugh
128 notewidth = (\quartwidth + \wholewidth) / 2.0;
129
130 % ugh
131 rulethickness = \staffline;
132
133 gourlay_energybound = 100000.;
134 %{
135 The following bounds the number of measures
136 on a line.  Decreasing it greatly reduces computation time
137 %}
138 gourlay_maxmeasures = 10.;
139 castingalgorithm = \Gourlay;
140
141 %{ Ross. page 151 lists these values, but we think that thick lines
142 and kernings are too thick.
143
144 bar_kern = 0.5 * \interline;
145 bar_thinkern = 0.75 * \interline;
146 barthick_thick = 0.5* \interline;
147 barthick_score = 0.13333* \interline;
148 barthick_thin = 0.1*\interline;
149
150 %}
151
152 bar_kern = 3.0 * \staffline;
153 bar_thinkern = 3.0 * \staffline;
154 barthick_thick = 6.0* \staffline;
155 barthick_thin = 1.6*\staffline;
156 barthick_score = 1.6*\staffline;
157
158 tuplet_spanner_gap = 2.0 * \interline;
159 tuplet_thick = 1.0*\staffline;
160 volta_thick = 1.6*\staffline;
161 volta_spanner_height = 2.0 *\interline;
162
163 % relative thickness of thin lines  1.6 : 1 : 0.8
164 stemthickness = 0.8*\staffline;
165 rulethickness = \staffline;
166
167
168 extender_height = 0.8*\staffline;
169
170 hyphen_thickness = 0.05*\font_normal;
171 hyphen_height = 0.2*\font_normal;
172 hyphen_minimum_length = 0.25*\font_normal;
173
174 % Multi-measure rests
175 mmrest_x_minimum = 2.0*\staffheight;
176
177
178 % chop off this much when next to pp / ff sign.
179 crescendo_shorten = 4.0 * \interline;
180 crescendo_thickness   = \staffline;
181
182 % in internote.
183 restcollision_minimum_dist = 3.0;
184 restcollision_minimum_beamdist = 1.5;
185
186 % deprecated!
187 postBreakPadding = 0.0;
188
189 % optical correction amount.
190 stemSpacingCorrection = 0.5*\interline;
191
192
193 % relative strength of space following  tprefatory matter, and inline clefs.
194 non_musical_space_strength = 40.0; 
195
196
197
198
199
200 \include "engraver.ly";
201
202
203