From: Han-Wen Nienhuys Date: Tue, 23 Sep 2003 00:10:00 +0000 (+0000) Subject: * input/regression/beam-quanting-32nd.ly (texidoc): new file X-Git-Tag: release/1.9.9~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e9e496f3e8ef7aee1957c0d5da3da31c21a14890;p=lilypond.git * input/regression/beam-quanting-32nd.ly (texidoc): new file * lily/beam-quanting.cc: tune down SECONDARY_BEAM_DEMERIT, so stem length is more important than forbidden quants. --- diff --git a/ChangeLog b/ChangeLog index 0dd266e20c..8fe434f119 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-09-23 Han-Wen Nienhuys + + * input/regression/beam-quanting-32nd.ly (texidoc): new file + + * lily/beam-quanting.cc: tune down SECONDARY_BEAM_DEMERIT, so stem + length is more important than forbidden quants. + 2003-09-23 Heikki Junes * buildscripts/lilypond.words: order words in search order, diff --git a/input/regression/beam-quanting-32nd.ly b/input/regression/beam-quanting-32nd.ly new file mode 100644 index 0000000000..a73c3a4f8d --- /dev/null +++ b/input/regression/beam-quanting-32nd.ly @@ -0,0 +1,31 @@ + +\header { + +texidoc = "Stem lengths take precedence over beam quants: `forbidden' + quants are only avoided for 32nd beams when they are outside of + the staff. However, that leads to very long stems, which is even + worse." + +} + +\version "1.9.9" + +\score { + \notes \relative c''{ +\time 3/8 +a'16[ b] g[ b] +a32[ b] g[ b] +g16[ a] f[ a] +g32[ a] f[ a] +f16[ g] e[ g] +f32[ g] e[ g] +e16[ f] d[ f] +e32[ f] d[ f] +d16[ e] c[ e] +d32[ e] c[ e] +c16[ d] b[ d] +c32[ d] b[ d] +a'32[ a] g[ g] f[ f] e[ e] d[ d] c[ c] +} +\paper { } +} diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index c7dc984887..5993ade1fa 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -20,8 +20,8 @@ #include "group-interface.hh" #include "align-interface.hh" -const int INTER_QUANT_PENALTY = 1000; -const int SECONDARY_BEAM_DEMERIT = 15; +const int INTER_QUANT_PENALTY = 1000; +const int SECONDARY_BEAM_DEMERIT = 5; const int STEM_LENGTH_DEMERIT_FACTOR = 5; // possibly ridiculous, but too short stems just won't do @@ -222,7 +222,6 @@ Beam::quanting (SCM smob) beam_count, ldir, rdir); } - // ; /* silly gdb thinks best_idx is inside for loop. */ for (int i = qscores.size (); i--;) if (qscores[i].demerits < reasonable_score) { @@ -234,7 +233,6 @@ Beam::quanting (SCM smob) qscores[i].yl, qscores[i].yr); } - // ; /* silly gdb thinks best_idx is inside for loop. */ int best_idx = best_quant_score_idx (qscores); me->set_grob_property ("positions", gh_cons (gh_double2scm (qscores[best_idx].yl), @@ -341,6 +339,12 @@ my_modf (Real x) return x - floor (x); } + +/* + TODO: The fixed value SECONDARY_BEAM_DEMERIT is probably flawed: + because for 32nd and 64th beams the forbidden quants are relatively + more important than stem lengths. +*/ Real Beam::score_forbidden_quants (Real yl, Real yr, Real radius,