From d839df710d13e71cbdd9afdde04e9a5f45f68954 Mon Sep 17 00:00:00 2001 From: Carl Sorensen Date: Mon, 6 Apr 2009 18:37:43 -0600 Subject: [PATCH] Add details to beam interface description. --- lily/beam-quanting.cc | 4 ---- lily/beam.cc | 36 +++++++++++++++++++++++++++++++++++- lily/include/beam.hh | 1 - scm/define-grobs.scm | 14 ++++++++++++-- 4 files changed, 47 insertions(+), 8 deletions(-) diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index ed13214502..48272ae10f 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -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); diff --git a/lily/beam.cc b/lily/beam.cc index 83d82e3cca..c1b0856911 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -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 " diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 89a11a263b..3abccea544 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -20,7 +20,6 @@ */ struct Beam_quant_parameters { - Real INTER_QUANT_PENALTY; Real SECONDARY_BEAM_DEMERIT; Real STEM_LENGTH_DEMERIT_FACTOR; Real REGION_SIZE; diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index dae6bdc8a8..97f36809b8 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -327,8 +327,18 @@ (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) -- 2.39.5