-/*
- threshold to combat rounding errors.
- */
-const Real BEAM_EPS = 1e-3;
-
-// possibly ridiculous, but too short stems just won't do
-const int STEM_LENGTH_LIMIT_PENALTY = 5000;
-const int DAMPING_DIRECTION_PENALTY = 800;
-const int MUSICAL_DIRECTION_FACTOR = 400;
-const int IDEAL_SLOPE_FACTOR = 10;
-const Real ROUND_TO_ZERO_SLOPE = 0.02;
-const int ROUND_TO_ZERO_POINTS = 4;
+ if (scm_is_pair (entry))
+ return robust_scm2double (scm_cdr (entry), def);
+ return def;
+}
+
+void
+Beam_quant_parameters::fill (Grob *him)
+{
+ SCM details = him->get_property ("details");
+
+ /*
+ TODO: put in define-grobs.scm
+ */
+ INTER_QUANT_PENALTY = get_detail (details, ly_symbol2scm ("inter-quant-penalty"), 1000.0);
+ SECONDARY_BEAM_DEMERIT = get_detail (details, ly_symbol2scm ("secondary-beam-demerit"), 10.0);
+ STEM_LENGTH_DEMERIT_FACTOR = get_detail (details, ly_symbol2scm ("stem-length-demerit-factor"), 5);
+ REGION_SIZE = get_detail (details, ly_symbol2scm ("region-size"), 2);
+ BEAM_EPS = get_detail (details, ly_symbol2scm ("beam-eps"), 1e-3);
+ STEM_LENGTH_LIMIT_PENALTY = get_detail (details, ly_symbol2scm ("stem-length-limit-penalty"), 5000);
+ DAMPING_DIRECTION_PENALTY = get_detail (details, ly_symbol2scm ("damping-direction-penalty"), 800);
+ HINT_DIRECTION_PENALTY = get_detail (details, ly_symbol2scm ("hint-direction-penalty"), 20);
+ MUSICAL_DIRECTION_FACTOR = get_detail (details, ly_symbol2scm ("musical-direction-factor"), 400);
+ IDEAL_SLOPE_FACTOR = get_detail (details, ly_symbol2scm ("ideal-slope-factor"), 10);
+ ROUND_TO_ZERO_SLOPE = get_detail (details, ly_symbol2scm ("round-to-zero-slope"), 0.02);
+}