+2003-09-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * 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 <hjunes@cc.hut.fi>
* buildscripts/lilypond.words: order words in search order,
--- /dev/null
+
+\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 { }
+}
#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
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)
{
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),
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,