]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/beam-quanting-32nd.ly (texidoc): new file
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Sep 2003 00:10:00 +0000 (00:10 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 23 Sep 2003 00:10:00 +0000 (00:10 +0000)
* lily/beam-quanting.cc: tune down SECONDARY_BEAM_DEMERIT, so stem
length is more important than forbidden quants.

ChangeLog
input/regression/beam-quanting-32nd.ly [new file with mode: 0644]
lily/beam-quanting.cc

index 0dd266e20c5a7f4b1b6aa43dc6b614d702289d37..8fe434f1195526489deae72913fc7efe177c1506 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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,
diff --git a/input/regression/beam-quanting-32nd.ly b/input/regression/beam-quanting-32nd.ly
new file mode 100644 (file)
index 0000000..a73c3a4
--- /dev/null
@@ -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 {  }
+}
index c7dc9848879c2f37e65f4529a1b576a0febe9fb6..5993ade1fab2e9887ac30445a6c735e74502bd51 100644 (file)
@@ -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,