]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/beam.cc (least_squares): Add comment.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Aug 2002 18:48:54 +0000 (18:48 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 13 Aug 2002 18:48:54 +0000 (18:48 +0000)
* input/regression/beam-center-slope.ly: Update.

ChangeLog
input/regression/beam-center-slope.ly
lily/beam.cc

index cea48543e587da05ac320c67f979d9cc66b912ce..5e7b28a31e293285e7d07ce4da224326b164a845 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,13 @@
 2002-08-13  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * lily/beam.cc (least_squares): Add comment.
+
+       * input/regression/beam-center-slope.ly: Update.
+
        * lily/beam-quanting.cc (score_stem_lengths): Revert oops.
 
        * input/template/melody-chords.ly: New file.
 
-       * lily/beam.cc (least_squares): Fix asymmetry and scary float
-       comparison.
-
        * lily/stem.cc (calc_stem_info): Move, document, clean up and fix
        up-to-stem feature.
 
index a472c9d794d1b38f127f6d9f77d739aa19be1208..ab963774fc4a21ac2ab1dc27cb245b04bb20d673 100644 (file)
@@ -1,13 +1,38 @@
-\version "1.5.68"
 \header{
-  texidoc="Simple beams on middle line should be allowed to have a slope."
+
+    texidoc="Simple beams on middle staffline be allowed to be
+    slightly sloped.  Beams reaching beyond middle line can have
+    bigger slope."
+
 }
+
 \score{
     \notes\relative c'{
-       [b8 c] [c b]
-       [b''8 a] [a b]
+       %%\property Staff.Stem \set #'beamed-lengths = #'(3.50)
+       %% [c8 d]
+       %% [d c]
+       %% r2
+       %% \property Staff.Stem \set #'beamed-lengths = #'(3.26)
+
+        [a8^"small slope" b]
+        [b a]
+
+       [c'' b]
+       [b c]
+       
+       [c,, d]
+       [d c]
+       
+       [a'' g]
+       [g a]
+
+       [c,,^"bigger slope" e]
+       [e c]
+       
+       [a'' f]
+       [f a]
     }
     \paper{
        linewidth = 0.0
     }
-}
\ No newline at end of file
+}
index 63700ab1634cc9387e5aae9af70eeb8ef3a14706..5f19968e65f345140df834d6acbd2dda5989aab3 100644 (file)
@@ -819,13 +819,14 @@ Beam::least_squares (SCM smob)
       Interval chord (Stem::chord_start_y (first_visible_stem (me)),
                      Stem::chord_start_y (last_visible_stem (me)));
 
-      /* Make simple beam on middle line have small tilt.
-
-         Ideally, this should be handled by a scoring rule, but that's
-        complicated because we take stem-info.ideal for determining
-        beam slopes. */
-      if ((abs (ideal[LEFT]) < 0.5 || abs (ideal[RIGHT]) < 0.5)
-         && chord.delta () && count == 2)
+      /* Simple beams (2 stems) on middle line should be allowed to be
+        slightly sloped.
+        
+        However, if both stems reach middle line,
+        ideal[LEFT] == ideal[RIGHT] and ideal.delta () == 0.
+
+        For that case, we apply artificial slope */
+      if (!ideal[LEFT] && chord.delta () && count == 2)
        {
          /* FIXME. -> UP */
          Direction d = (Direction) (sign (chord.delta ()) * UP);