]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix triplet subdivision (issue 2386)
authorCarl <c_sorensen@byu.edu>
Sat, 10 Mar 2012 20:11:47 +0000 (13:11 -0700)
committerCarl <c_sorensen@byu.edu>
Wed, 14 Mar 2012 13:18:02 +0000 (07:18 -0600)
Add regression test

input/regression/beam-subdivide-tuplets.ly [new file with mode: 0644]
lily/beaming-pattern.cc

diff --git a/input/regression/beam-subdivide-tuplets.ly b/input/regression/beam-subdivide-tuplets.ly
new file mode 100644 (file)
index 0000000..afd8497
--- /dev/null
@@ -0,0 +1,20 @@
+\version "2.15.34"
+
+\header {
+  
+  doctitle = "Beam subdivide tuplets"
+
+  texidoc = "
+Tuplets that span more than one beat should be
+subdivided if subdivideBeams is #t.  In this example,
+the beams should be subdivided every 1/8.
+"
+
+}
+
+\relative c' {
+    \set tupletSpannerDuration = #(ly:make-moment 1 4)
+    \set baseMoment = #(ly:make-moment 1 8)
+    \set subdivideBeams = ##t
+    \times 4/6 { \repeat unfold 24 { c16 } }
+}
index b6b9060ddaeb59a9e3a3ed30782920148cee9919..f1408497cd3f0dafc5794faf8b838904caf38571 100644 (file)
@@ -270,16 +270,11 @@ Beaming_pattern::find_rhythmic_importance (Beaming_options const &options)
           Moment tuplet_moment (tuplet);
           Moment tuplet_dt = infos_[i].start_moment_ - tuplet_start_moment;
           tuplet_number = tuplet.den ();
-          // set the beat end (if not in a tuplet) and increment the next beat
+          // set the beat end and increment the next beat
           if (infos_[i].start_moment_ == next_beat_pos)
             {
-              if (tuplet_number == 1)
-                {
-                  infos_[i].rhythmic_importance_ = -1;
-                  next_beat_pos += options.base_moment_;
-                }
-              if (infos_[i].tuplet_start_)
-                infos_[i].rhythmic_importance_ = -1;
+              infos_[i].rhythmic_importance_ = -1;
+              next_beat_pos += options.base_moment_;
             }
           // The rhythmic importance of a stem between beats depends on its fraction
           // of a beat: those stems with a lower denominator are deemed more