+interline = \staffheight / 4.0;
+
+
+% thickness of stafflines
+staffline = \interline / 10.0;
+
+beam_thickness = 0.52 * (\interline - \staffline);
+interbeam = (2.0 * \interline - \beam_thickness) / 2.0;
+interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0;
+
+% stems and beams
+%
+% poor man's array size
+stem_max = 3.0;
+%
+stem_length0 = 3.5*\interline;
+stem_length1 = 2.5 * \interline;
+stem_length2 = 2.0 * \interline;
+stem_length3 = 1.5 * \interline;
+
+% only used for beams
+minimum_stem_length0 = 0.0; % not used
+minimum_stem_length1 = 1.5 * \interline;
+minimum_stem_length2 = 1.25 * \interline;
+minimum_stem_length3 = 1.0 * \interline;
+
+% stems in unnatural (forced) direction should be shortened,
+% according to [Roush & Gourlay]. Their suggestion to knock off
+% a whole staffspace seems a bit drastical: we'll do half.
+%
+forced_stem_shorten0 = 0.5 * \interline;
+forced_stem_shorten1 = \forced_stem_shorten0;
+forced_stem_shorten2 = \forced_stem_shorten1;
+forced_stem_shorten3 = \forced_stem_shorten2;
+
+% there are several ways to calculate the direction of a beam
+%
+% * MAJORITY : number count of up or down notes
+% * MEAN : mean centre distance of all notes
+% * MEDIAN : mean centre distance weighted per note
+%
+% enum Dir_algorithm { DOWN=-1, UP=1, MAJORITY=2, MEAN, MEDIAN };
+%
+DOWN = -1.0;
+UP = 1.0;
+MAJORITY = 2.0;
+MEAN = 3.0;
+MEDIAN = 4.0;
+% [Ross]: majority
+beam_dir_algorithm = \MAJORITY;
+
+% catch suspect beam slopes, set slope to zero if
+% outer stem is lengthened more than
+beam_lengthened = 0.2 * \interline;
+% and slope is running away steeper than
+beam_steep_slope = 0.2 / 1.0;