From: Jan Nieuwenhuizen Date: Tue, 13 Aug 2002 15:50:22 +0000 (+0000) Subject: (score_stem_lengths): Revert oops. X-Git-Tag: release/1.5.73~11 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5cee1f33692a248c1e8439e6629003735c9c24c1;p=lilypond.git (score_stem_lengths): Revert oops. --- diff --git a/ChangeLog b/ChangeLog index 0b178a19e1..cea48543e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2002-08-13 Jan Nieuwenhuizen + * 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. diff --git a/input/test/super-sub.ly b/input/test/super-sub.ly index 3a8208095f..27e1ca0863 100644 --- a/input/test/super-sub.ly +++ b/input/test/super-sub.ly @@ -25,6 +25,8 @@ texidoc="Test super/sub, raise and overstrike." c^#'(columns "foe" ((extent . (0 . 0)) "o") "/") c^#'(columns "foo" (super "bar" (super "baz"))) c + %% Hmm c^#`(columns (lines "" ";" "") (lines "1" ((bold) "2") "3")) + c^#`(columns (lines "" ";" "") (lines "1" (columns (bold "2")) "3")) } } \ No newline at end of file diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index e20393afd5..a26b09c370 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -257,7 +257,7 @@ Beam::score_stem_lengths (Link_arraystems, bool knee, Real yl, Real yr) { - Real limit_pen = STEM_LENGTH_LIMIT_PENALTY; + Real limit_penalty = STEM_LENGTH_LIMIT_PENALTY; Drul_array score (0, 0); Drul_array count (0, 0); @@ -271,16 +271,16 @@ Beam::score_stem_lengths (Link_arraystems, 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. */