+ # implicit measures are used for artificial measures, e.g. when
+ # a repeat bar line splits a bar into two halves. In this case,
+ # don't reset the measure position to 0. They are also used for
+ # upbeats (initial value of 0 fits these, too).
+ # Also, don't reset the measure position at the end of the loop,
+ # but rather when starting the next measure (since only then do we
+ # know if the next measure is implicit and continues that measure)
+ if not m.is_implicit ():
+ # Warn about possibly overfull measures and reset the position
+ if attributes_object and previous_measure and previous_measure.partial == 0:
+ length = attributes_object.get_measure_length ()
+ new_now = measure_start_moment + length
+ if now <> new_now:
+ problem = 'incomplete'
+ if now > new_now:
+ problem = 'overfull'
+ ## only for verbose operation.
+ if problem <> 'incomplete' and previous_measure:
+ previous_measure.message ('%s measure? Expected: %s, Difference: %s' % (problem, now, new_now - now))
+ now = new_now
+ measure_start_moment = now
+ measure_position = Rational (0)
+
+ for n in m.get_all_children ():
+ # figured bass has a duration, but applies to the next note
+ # and should not change the current measure position!
+ if isinstance (n, FiguredBass):
+ n._divisions = factor.denominator ()
+ n._when = now
+ n._measure_position = measure_position
+ continue
+
+ if isinstance (n, Hash_text):
+ continue