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.
-\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
+}
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);