-/*
- Finds the best point at which to subdivide a beam. In order of priority
- (highest to lowest) this is
- - before or after an invisible beam
- - at the start of a beat group
- - at the start of a beat
- - whose position in its beat has the smallest denominator (that is,
- a stem that starts halfway through a beat will be preferred over stems
- that start 1/3 or 2/3s of the way through the beat).
- - any other beam
- - at the start of a beat group
- - at the start of a beat
- - whose position in its beat has the smallest denominator
-
- If the split point occurs at the start of a beat group or at the start of a
- beat, at_boundary will be set to true. Otherwise, it will be set to false.
-*/
-int
-Beaming_pattern::best_splitpoint_index (bool *at_boundary) const
-{
- bool require_invisible = false;
- for (vsize i = 0; i < infos_.size (); i++)
- require_invisible |= is_next_to_invisible_stem (i);
+ int count = infos_[i].count (LEFT); // Both directions should still be the same
+ int left_count = infos_[i-1].count (RIGHT);
+ int right_count = infos_[i+1].count (LEFT);