tuplet_start_ = false;
}
-Beam_rhythmic_element::Beam_rhythmic_element (Moment m, int i, bool inv,
+Beam_rhythmic_element::Beam_rhythmic_element (Moment m, int i, bool inv,
Rational factor, bool tuplet_start)
{
start_moment_ = m;
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
Moment
Beaming_pattern::end_moment (int i) const
{
- Duration *dur = new Duration (2 + max (beamlet_count (i, LEFT),
- beamlet_count (i, RIGHT)),
- 0);
+ Duration dur (2 + max (beamlet_count (i, LEFT),
+ beamlet_count (i, RIGHT)),
+ 0);
- return infos_.at (i).start_moment_ + dur->get_length ();
+ return infos_.at (i).start_moment_
+ + infos_.at(i).factor_ * dur.get_length ();
}
bool