From: Reinhold Kainhofer Date: Sat, 15 Nov 2008 23:43:06 +0000 (+0100) Subject: MusicXML: Use "None" voice only for notes w/o voice, not for directions or attrs X-Git-Tag: release/2.11.64-1~10 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=071a1aed4d8d170d5dcc8927d1171ca77442cad9;p=lilypond.git MusicXML: Use "None" voice only for notes w/o voice, not for directions or attrs --- diff --git a/python/musicxml.py b/python/musicxml.py index 3c9d8a0111..e9df0b3010 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -702,9 +702,11 @@ class Part (Music_xml_node): voice_to_staff_dict = {} for n in elements: voice_id = n.get_maybe_exist_named_child (u'voice') - vid = "None" + vid = None if voice_id: vid = voice_id.get_text () + elif isinstance (n, Note): + vid = "None" staff_id = n.get_maybe_exist_named_child (u'staff') sid = None