]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam-quanting.cc
*** empty log message ***
[lilypond.git] / lily / beam-quanting.cc
index e20393afd54d3ad475a2b96293299169dc6dcf9a..96dfe50c72bcd459b160bc0f9fdfc926450a8932 100644 (file)
@@ -3,7 +3,7 @@
   
   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>
   
 */
@@ -257,7 +257,7 @@ Beam::score_stem_lengths (Link_array<Grob>stems,
                          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);
   
@@ -271,16 +271,16 @@ Beam::score_stem_lengths (Link_array<Grob>stems,
       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. */
@@ -373,8 +373,8 @@ Beam::score_forbidden_quants (Real yl, Real yr,
       /*
        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
        */