From: Reinhold Kainhofer Date: Fri, 11 Apr 2008 19:21:09 +0000 (+0200) Subject: MusicXML: Fix figured bass without duration X-Git-Tag: release/2.11.44-1~4^2~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6ef579c20b90edc2a30af833a2f4003277b94b7b;p=lilypond.git 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 --- 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 = []