From 6ef579c20b90edc2a30af833a2f4003277b94b7b Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Fri, 11 Apr 2008 21:21:09 +0200 Subject: [PATCH] MusicXML: Fix figured bass without duration Duration for figured bass is optional. If not given, take the duration of the following note. This was broken and caused musicxml2ly to crash (and I didn't notice because a test case was missing) Signed-off-by: Reinhold Kainhofer --- input/regression/musicxml/18a-FiguredBass.xml | 2 +- scripts/musicxml2ly.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/input/regression/musicxml/18a-FiguredBass.xml b/input/regression/musicxml/18a-FiguredBass.xml index c6f1d7da46..b0a43eb94b 100644 --- a/input/regression/musicxml/18a-FiguredBass.xml +++ b/input/regression/musicxml/18a-FiguredBass.xml @@ -66,7 +66,6 @@
6
- 2
G4 @@ -77,6 +76,7 @@
5slash
flat127slash
+ 8
G4 diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 22f7852375..98371b44f2 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1842,6 +1842,8 @@ def musicxml_voice_to_lily_voice (voice): dur = fb.real_duration if not dur: dur = ev_chord.get_length () + if not fb.duration: + fb.duration = ev_chord.get_duration () figured_bass_builder.add_music (fb, dur) pending_figured_bass = [] -- 2.39.2