lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removes closeness-factor from the Slur details list. (issue4825051)


From: mtsolo
Subject: Removes closeness-factor from the Slur details list. (issue4825051)
Date: Wed, 27 Jul 2011 11:09:21 +0000

Reviewers: ,

Message:
This passes regtests without any change in the visual output.

After wading through slur-configuration.cc, I would like to prune the
details list as much as possible so that subsequent wadings are easier
to understand for everyone.

In general, if the absence of a parameter does not change the regtests,
I think it should be scrubbed.  If people truly want a parameter to be
kept, then a regtest should be added showing how its presence is
essential.

Cheers,
MS

Description:
Removes closeness-factor from the Slur details list.

Please review this at http://codereview.appspot.com/4825051/

Affected files:
  M lily/include/slur-score-parameters.hh
  M lily/slur-configuration.cc
  M lily/slur-score-parameters.cc
  M lily/slur.cc
  M scm/layout-slur.scm


Index: lily/include/slur-score-parameters.hh
diff --git a/lily/include/slur-score-parameters.hh b/lily/include/slur-score-parameters.hh index 49d159b9390da0a2aebb9589e62d1947b1ea1bd2..5c50d6bfa0a05e1c9f4dc37adf38aabc13254ef6 100644
--- a/lily/include/slur-score-parameters.hh
+++ b/lily/include/slur-score-parameters.hh
@@ -28,7 +28,6 @@ struct Slur_score_parameters

   Real head_encompass_penalty_;
   Real stem_encompass_penalty_;
-  Real closeness_factor_;
   Real edge_attraction_factor_;
   Real same_slope_penalty_;
   Real steeper_slope_factor_;
Index: lily/slur-configuration.cc
diff --git a/lily/slur-configuration.cc b/lily/slur-configuration.cc
index e83856364db6dbb3a4f2e111915d5a55f44fafdf..2c4a920ee998a290c84260a8a7d7d541008db844 100644
--- a/lily/slur-configuration.cc
+++ b/lily/slur-configuration.cc
@@ -267,18 +267,6 @@ Slur_configuration::score_encompass (Slur_score_state const &state)

          demerit += stem_dem;
        }
-      else if (!edge)
-       {
-         Interval ext;
-         ext.add_point (state.encompass_infos_[j].stem_);
-         ext.add_point (state.encompass_infos_[j].head_);
-
-         // ?
-         demerit += -state.parameters_.closeness_factor_
-           * min (state.dir_
- * (y - (ext[state.dir_] + state.dir_ * state.parameters_.free_head_distance_)), 0.0)
-           / state.encompass_infos_.size ();
-       }
     }
   add_score (demerit, "encompass");

Index: lily/slur-score-parameters.cc
diff --git a/lily/slur-score-parameters.cc b/lily/slur-score-parameters.cc
index 1683aeea2feace61a84496e7247cecb57fd81e6d..a1f58c4dba5cb4179b7b54de0edf15d7be54c71d 100644
--- a/lily/slur-score-parameters.cc
+++ b/lily/slur-score-parameters.cc
@@ -44,8 +44,6 @@ Slur_score_parameters::fill (Grob *me)
     = get_detail (details, ly_symbol2scm ("head-encompass-penalty"));
   stem_encompass_penalty_
     = get_detail (details, ly_symbol2scm ("stem-encompass-penalty"));
-  closeness_factor_
-    = get_detail (details, ly_symbol2scm ("closeness-factor"));
   edge_attraction_factor_
     = get_detail (details, ly_symbol2scm ("edge-attraction-factor"));
   same_slope_penalty_
Index: lily/slur.cc
diff --git a/lily/slur.cc b/lily/slur.cc
index 433406c92a57d9471daab3524cf5c32091af7ebe..7de05c2ff3a07b3818a6a9cf312a0364cb4ea468 100644
--- a/lily/slur.cc
+++ b/lily/slur.cc
@@ -427,8 +427,6 @@ ADD_INTERFACE (Slur,
               "Demerit to apply when note heads collide with a slur.\n"
               "@item stem-encompass-penalty\n"
               "Demerit to apply when stems collide with a slur.\n"
-              "@item closeness-factor\n"
-              "Additional demerit used when scoring encompasses.\n"
               "@item edge-attraction-factor\n"
               "Factor used to calculate the demerit for distances"
               " between slur endpoints and their corresponding base"
Index: scm/layout-slur.scm
diff --git a/scm/layout-slur.scm b/scm/layout-slur.scm
index 8626e0114690e832872b4aaff9cf23ce797a5e30..0f9a98c6e9f847e850b8268f163e8a7e56c0e761 100644
--- a/scm/layout-slur.scm
+++ b/scm/layout-slur.scm
@@ -20,7 +20,6 @@
   '((region-size . 4)
     (head-encompass-penalty . 1000.0)
     (stem-encompass-penalty . 30.0)
-    (closeness-factor . 10)
     (edge-attraction-factor . 4)
     (same-slope-penalty . 20)
     (steeper-slope-factor . 50)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]