From: Reinhold Kainhofer Date: Fri, 12 Oct 2007 09:18:27 +0000 (+0200) Subject: MusicXML: Fix wrong chord detection with mid-measure attributes X-Git-Tag: release/2.11.35-1~87 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c25fa09c277d02f0b793a545464e682111abc527;p=lilypond.git MusicXML: Fix wrong chord detection with mid-measure attributes Mid-measure attributes (like clef changes) need to be inserted as commands, not as music, because that will reset the current measure position and mess up chord detection for the following notes. --- diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index e07584eae2..ba841e0d00 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -608,7 +608,7 @@ class LilyPondVoiceBuilder: def add_bar_check (self, number): b = musicexp.BarCheck () b.bar_number = number - self.add_music (b, Rational (0)) + self.add_command (b) def jumpto (self, moment): current_end = self.end_moment + self.pending_multibar @@ -705,7 +705,7 @@ def musicxml_voice_to_lily_voice (voice): voice_builder.add_bar_check (number) for a in musicxml_attributes_to_lily (n): - voice_builder.add_music (a, Rational (0)) + voice_builder.add_command (a) continue if not n.__class__.__name__ == 'Note':