From c25fa09c277d02f0b793a545464e682111abc527 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Fri, 12 Oct 2007 11:18:27 +0200 Subject: [PATCH] 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. --- scripts/musicxml2ly.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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': -- 2.39.5