From: Carl Date: Sat, 10 Mar 2012 20:11:47 +0000 (-0700) Subject: Fix triplet subdivision (issue 2386) X-Git-Tag: release/2.15.34-1~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c7a4f68ba213532f50b262d2a9d15e0aa58770fa;p=lilypond.git Fix triplet subdivision (issue 2386) Add regression test --- diff --git a/input/regression/beam-subdivide-tuplets.ly b/input/regression/beam-subdivide-tuplets.ly new file mode 100644 index 0000000000..afd84974e8 --- /dev/null +++ b/input/regression/beam-subdivide-tuplets.ly @@ -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 } } +} diff --git a/lily/beaming-pattern.cc b/lily/beaming-pattern.cc index b6b9060dda..f1408497cd 100644 --- a/lily/beaming-pattern.cc +++ b/lily/beaming-pattern.cc @@ -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