+ is_chord = n.get_maybe_exist_named_child ('chord')
+ is_after_grace = (isinstance (n, musicxml.Note) and n.is_after_grace ());
+ if not is_chord and not is_after_grace:
+ try:
+ voice_builder.jumpto (n._when)
+ except NegativeSkip, neg:
+ voice_builder.correct_negative_skip (n._when)
+ n.message (_ ("Negative skip found: from %s to %s, difference is %s") % (neg.here, neg.dest, neg.dest - neg.here))
+
+ if isinstance (n, musicxml.Barline):
+ barlines = musicxml_barline_to_lily (n)
+ for a in barlines:
+ if isinstance (a, musicexp.BarLine):
+ voice_builder.add_barline (a)
+ elif isinstance (a, RepeatMarker) or isinstance (a, EndingMarker):
+ voice_builder.add_command (a)
+ continue
+
+ # Continue any multimeasure-rests before trying to add bar checks!
+ # Don't handle new MM rests yet, because for them we want bar checks!
+ rest = n.get_maybe_exist_typed_child (musicxml.Rest)
+ if (rest and rest.is_whole_measure ()
+ and voice_builder.pending_multibar > Rational (0)):
+ voice_builder.add_multibar_rest (n._duration)
+ continue
+
+
+ # print a bar check at the beginning of each measure!
+ if n.is_first () and n._measure_position == Rational (0) and n != voice._elements[0]:
+ try:
+ num = int (n.get_parent ().number)
+ except ValueError:
+ num = 0
+ if num > 0:
+ voice_builder.add_bar_check (num)
+ figured_bass_builder.add_bar_check (num)
+ chordnames_builder.add_bar_check (num)
+
+ # Start any new multimeasure rests
+ if (rest and rest.is_whole_measure ()):
+ voice_builder.add_multibar_rest (n._duration)
+ continue
+
+