]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add details to beam interface description.
authorCarl Sorensen <c_sorensen@byu.edu>
Tue, 7 Apr 2009 00:37:43 +0000 (18:37 -0600)
committerCarl Sorensen <c_sorensen@byu.edu>
Tue, 7 Apr 2009 02:26:34 +0000 (20:26 -0600)
lily/beam-quanting.cc
lily/beam.cc
lily/include/beam.hh
scm/define-grobs.scm

index ed1321450256aaa15a8a7345c7908e392a9dbb79..48272ae10fa0bc84dcc5761eeb5ca655fbb829e8 100644 (file)
@@ -37,10 +37,6 @@ Beam_quant_parameters::fill (Grob *him)
 {
   SCM details = him->get_property ("details");
 
-  /* 
-     TODO: The default values should be copied to 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);
index 83d82e3ccabb91e0725d06ef5053f92f184a2f80..c1b0856911bd90cb248ffc25ef8bda539bb166c1 100644 (file)
@@ -1555,7 +1555,41 @@ ADD_INTERFACE (Beam,
               "The @code{thickness} property is the weight of beams,"
               " measured in staffspace.  The @code{direction} property is"
               " not user-serviceable.  Use the @code{direction} property"
-              " of @code{Stem} instead.",
+              " of @code{Stem} instead.\n"
+               "\n"
+               "The following properties may be set in the @code{details}"
+               "list.\n"
+               "\n"
+               "@table @code\n"
+               "@item stem-length-demerit-factor\n"
+               "Demerit factor used for inappropriate stem lengths.\n"
+               "@item secondary-beam-demerit\n"
+               "Demerit used in quanting calculations for multiple"
+               "beams.\n"
+               "@item region-size\n"
+               "Size of region for checking quant scores.\n"
+               "@item beam-eps\n"
+               "Epsilon for beam quant code to check for presence"
+               "in gap.\n"
+               "@item stem-length-limit-penalty\n"
+               "Penalty for differences in stem lengths on a beam.\n"
+               "@item damping-direction-penalty\n"
+               "Demerit penalty applied when beam direction is different"
+               "from damping direction.\n"
+               "@item hint-direction-penalty\n"
+               "Demerit penalty applied when beam direction is different"
+               "from damping direction, but damping slope is"
+               "<= round-to-zero-slope.\n"
+               "@item musical-direction-factor\n"
+               "Demerit scaling factor for difference between"
+               "beam slope and music slope.\n"
+               "@item ideal-slope-factor\n"
+               "Demerit scaling factor for difference between"
+               "beam slope and damping slope.\n"
+               "@item round-to-zero-slope\n"
+               "Damping slope which is considered zero for purposes of"
+               "calculating direction penalties.\n"
+               "@end table\n",
               
               /* properties */
               "annotation "
index 89a11a263b8cc326b6fb180d33efdd9cbcf1e337..3abccea544df70a15b210f65550f928685914796 100644 (file)
@@ -20,7 +20,6 @@
 */
 struct Beam_quant_parameters
 {
-  Real INTER_QUANT_PENALTY;
   Real SECONDARY_BEAM_DEMERIT;
   Real STEM_LENGTH_DEMERIT_FACTOR;
   Real REGION_SIZE;
index dae6bdc8a870258a5314efc1253b8895d20d4dfb..97f36809b893f296b2c06bf05c0eb0890e5e163a 100644 (file)
        (stencil . ,ly:beam::print)
        (clip-edges . #t)
        (cross-staff . ,ly:beam::calc-cross-staff)
-
-       (details .  ((hint-direction-penalty . 20)))
+       (details 
+         .(
+           (secondary-beam-demerit . 10)
+           (stem-length-demerit-factor . 5)
+           (region-size . 2)
+           (beam-eps . 0.001)
+           (stem-length-limit-penalty . 5000)
+           (damping-direction-penalty . 800)
+           (hint-direction-penalty . 20)
+           (musical-direction-factor . 400)
+           (ideal-slope-factor . 10)
+           (round-to-zero-slope . 0.02)))
        ;; TODO: should be in SLT.
        (thickness . 0.48) ; in staff-space
        (neutral-direction . ,DOWN)