source file of the GNU LilyPond music typesetter
- (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
bool knee,
Real yl, Real yr)
{
- Real limit_pen = STEM_LENGTH_LIMIT_PENALTY;
+ Real limit_penalty = STEM_LENGTH_LIMIT_PENALTY;
Drul_array<Real> score (0, 0);
Drul_array<int> count (0, 0);
Real dx = xr-xl;
Real beam_y = yr *(x - xl)/dx + yl * ( xr - x)/dx;
Real current_y = beam_y + base_stem_ys[i];
- Real length_pen = STEM_LENGTH_LIMIT_PENALTY;
+ Real length_pen = STEM_LENGTH_DEMERIT_FACTOR;
Stem_info info = stem_infos[i];
Direction d = info.dir_;
- score[d] += limit_pen * (0 >? (d * (info.shortest_y_ - current_y)));
+ score[d] += limit_penalty * (0 >? (d * (info.shortest_y_ - current_y)));
Real ideal_diff = d * (current_y - info.ideal_y_);
Real ideal_score = shrink_extra_weight (ideal_diff, 1.5);
-
+
/* We introduce a power, to make the scoring strictly
convex. Otherwise a symmetric knee beam (up/down/up/down)
does not have an optimum in the middle. */
/*
Can't we simply compute the distance between the nearest
staffline and the secondary beam? That would get rid of the
- silly case analysis here (which is probably not when we have
- different beam-thicknesses.)
+ silly case analysis here (which is probably not valid when we
+ have different beam-thicknesses.)
--hwn
*/