]> git.donarmstrong.com Git - lilypond.git/commitdiff
(calc_stem_info): Take multiplicity into account
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 30 May 2002 17:02:53 +0000 (17:02 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 30 May 2002 17:02:53 +0000 (17:02 +0000)
for shortest_y too.

ChangeLog
lily/beam.cc
lily/stem.cc

index 97960c0c58c4d6c273c5c4d42f111da4eb0b722d..f6ca3cb0b95c3c4744d8cb66fcd588446e256c27 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-05-30  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * lily/stem.cc (calc_stem_info): Take multiplicity into account
+       for shortest_y too.
+
        * input/bugs/melisma-tie-rest.ly: New file.
 
 2002-05-30  Han-Wen  <hanwen@cs.uu.nl>
index 47e156a3a92b754dc2d706a3653873981ab4b020..026340b2fe9cafbcedb43c49c7190a2a37622d94 100644 (file)
@@ -588,7 +588,9 @@ Beam::score_stem_lengths (Link_array<Grob>stems,
       Stem_info info = stem_infos[i];
       Direction d = info.dir_;
 
-      demerit_score += pen * ( 0 >? (info.dir_ *(info.shortest_y_ - current_y)));
+      demerit_score += pen
+       * ( 0 >? (info.dir_ * (info.shortest_y_ - current_y)));
+      
       demerit_score += STEM_LENGTH_DEMERIT_FACTOR
        * shrink_extra_weight (d * current_y  - info.dir_ * info.ideal_y_);
     }
index 2d7ef7a81c9a9999c817b29a2476343bf226329b..b2ffe3e86eb27b2084cc14319d1dcafe41cc5f50 100644 (file)
@@ -797,13 +797,11 @@ Stem::calc_stem_info (Grob*me)
     a.push (gh_scm2double (ly_car (q)));
 
   Real stem_length =  a[multiplicity <? (a.size () - 1)] * staff_space;
-  Real shortest_y = ideal_y; 
 
   if (multiplicity)
-    {
-      ideal_y += thick + (multiplicity - 1) * interbeam_f;
-    }
+    ideal_y += thick + (multiplicity - 1) * interbeam_f;
 
+  Real shortest_y = ideal_y; 
 
   ideal_y += stem_length;
   shortest_y += minimum_length;
@@ -847,7 +845,6 @@ Stem::calc_stem_info (Grob*me)
   ideal_y += interstaff_f;
   shortest_y += interstaff_f;
 
-
   ideal_y *= mydir;
   shortest_y *= mydir;