From 9e752ec70a160d6c3d7632036de75630438c4142 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 19 Feb 2006 18:04:21 +0000 Subject: [PATCH] * lily/tie-formatting-problem.cc (score_configuration): use sliding score for min-length. * lily/tie-formatting-problem.cc (set_chord_outline): put dots in outline too. (generate_configuration): for small ties, also look for collisions at Y + DIR*h + DELTA_Y. (get_variations): consider variation for dot positions too. --- ChangeLog | 3 +++ lily/include/tie-formatting-problem.hh | 2 +- lily/tie-formatting-problem.cc | 4 +++- lily/tie-helper.cc | 5 +++-- scm/define-grobs.scm | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 623838ef8e..a2b569dc8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-02-19 Han-Wen Nienhuys + * lily/tie-formatting-problem.cc (score_configuration): use + sliding score for min-length. + * Documentation/pictures/GNUmakefile (local-dist): loose the rule spaghetti for icons. diff --git a/lily/include/tie-formatting-problem.hh b/lily/include/tie-formatting-problem.hh index 50b6bcba93..8296f4dee1 100644 --- a/lily/include/tie-formatting-problem.hh +++ b/lily/include/tie-formatting-problem.hh @@ -28,7 +28,7 @@ struct Tie_details Real stem_gap_; Real between_length_limit_; Real wrong_direction_offset_penalty_; - Real length_penalty_factor_; + Real min_length_penalty_factor_; Real min_length_; Real tip_staff_line_clearance_; Real center_staff_line_clearance_; diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index 8d40e75f71..9e2252e3f7 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -435,7 +435,9 @@ Tie_formatting_problem::score_configuration (Tie_configuration const &conf) cons Real penalty = 0.0; Real length = conf.attachment_x_.length (); - penalty += peak_around (0.5 * details_.min_length_, details_.min_length_, length); + penalty += + details_.min_length_penalty_factor_ + * peak_around (0.33 * details_.min_length_, details_.min_length_, length); Real tip_pos = conf.position_ + conf.delta_y_ / 0.5 * details_.staff_space_; Real tip_y = tip_pos * details_.staff_space_ * 0.5; diff --git a/lily/tie-helper.cc b/lily/tie-helper.cc index 66afbc4229..00c8bea035 100644 --- a/lily/tie-helper.cc +++ b/lily/tie-helper.cc @@ -35,8 +35,9 @@ Tie_details::from_grob (Grob *me) wrong_direction_offset_penalty_ = get_real_detail("wrong-direction-offset-penalty", 10); - length_penalty_factor_ = get_real_detail("length-penalty-factor", 1.0); - min_length_ = get_real_detail("min-length", 0.333); + min_length_ = get_real_detail("min-length", 1.0); + min_length_penalty_factor_ = get_real_detail("min-length-penalty-factor", 1.0); + // in half-space center_staff_line_clearance_ = get_real_detail ("center-staff-line-clearance", 0.4); diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 527adae8c9..5435161434 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1668,6 +1668,7 @@ (stem-gap . 0.35) (height-limit . 1.0) (horizontal-distance-penalty-factor . 10) + (min-length-penalty-factor . 20) (tie-tie-collision-distance . 0.45) (tie-tie-collision-penalty . 25.0) (intra-space-threshold . 1.25) -- 2.39.2