]> git.donarmstrong.com Git - lilypond.git/blob - ly/params.ly
release: 1.1.54
[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_x_minimum = 3.0 * \interline;
91
92 % slope damping: keep dy/dx < slur_slope_damping
93 slur_slope_damping = 0.6;
94
95 % dy_slur := dy_music * factor
96 slur_slope_follow_music_factor = 0.8;
97
98 tie_x_minimum = \slur_x_minimum;
99 tie_x_gap = \slur_x_gap;
100 tie_slope_damping = 0.8;
101
102 % ugh: rename to bow (in bezier.cc and fonts.doc too...)
103 % slur_thickness = 1.8 * \staffline;
104 slur_thickness = 1.4 * \staffline;
105 slur_height_limit = \staffheight;
106
107 % slur_ratio = 0.3;
108 % try bit flatter slurs
109 slur_ratio = 0.25;
110 slur_clip_ratio = 1.2;
111 slur_clip_height = 3.0 * \staffheight;
112 slur_clip_angle = 100.0;
113 slur_rc_factor = 2.4;
114
115 % ugh
116 notewidth = (\quartwidth + \wholewidth) / 2.0;
117
118 % ugh
119 rulethickness = \staffline;
120
121 gourlay_energybound = 100000.;
122 %{
123 The following bounds the number of measures
124 on a line.  Decreasing it greatly reduces computation time
125 %}
126 gourlay_maxmeasures = 10.;
127 castingalgorithm = \Gourlay;
128
129 %{ Ross. page 151 lists these values, but we think that thick lines
130 and kernings are too thick.
131
132 bar_kern = 0.5 * \interline;
133 bar_thinkern = 0.75 * \interline;
134 barthick_thick = 0.5* \interline;
135 barthick_score = 0.13333* \interline;
136 barthick_thin = 0.1*\interline;
137
138 %}
139
140 bar_kern = 3.0 * \staffline;
141 bar_thinkern = 3.0 * \staffline;
142 barthick_thick = 6.0* \staffline;
143 barthick_thin = 1.6*\staffline;
144 barthick_score = 1.6*\staffline;
145
146 tuplet_spanner_gap = 2.0 * \interline;
147 tuplet_thick = 1.0*\staffline;
148 volta_thick = 1.6*\staffline;
149 volta_spanner_height = 2.0 *\interline;
150
151 % relative thickness of thin lines  1.6 : 1 : 0.8
152 stemthickness = 0.8*\staffline;
153 rulethickness = \staffline;
154
155
156 extender_height = 0.8*\staffline;
157
158 hyphen_thickness = 0.05*\font_normal;
159 hyphen_height = 0.2*\font_normal;
160 hyphen_minimum_length = 0.25*\font_normal;
161
162 % Multi-measure rests
163 mmrest_x_minimum = 2.0*\staffheight;
164
165
166 % chop off this much when next to pp / ff sign.
167 crescendo_shorten = 4.0 * \interline;
168
169 % in internote.
170 restcollision_minimum_dist = 3.0;
171 restcollision_minimum_beamdist = 1.5;
172
173 % deprecated!
174 postBreakPadding = 0.0;
175
176 % optical correction amount.
177 stemSpacingCorrection = 0.5*\interline;
178
179
180
181
182
183 \include "engraver.ly";
184
185
186