--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">\r
+<score-partwise version="2.0">\r
+ <identification>\r
+ <miscellaneous>\r
+ <miscellaneous-field name="description">The <voice> element \r
+ of notes is optional in MusicXML (although Dolet always writes it out). \r
+ Here, there is one note with lyrics, but without a voice assigned. It \r
+ should still be correctly converted.</miscellaneous-field>\r
+ </miscellaneous>\r
+ </identification>\r
+ <part-list>\r
+ <score-part id="P1">\r
+ <part-name>MusicXML Part</part-name>\r
+ </score-part>\r
+ </part-list>\r
+ <!--=========================================================-->\r
+ <part id="P1">\r
+ <measure number="1">\r
+ <attributes>\r
+ <divisions>4</divisions>\r
+ <clef>\r
+ <sign>G</sign>\r
+ <line>2</line>\r
+ </clef>\r
+ </attributes>\r
+ <note>\r
+ <pitch>\r
+ <step>G</step>\r
+ <octave>4</octave>\r
+ </pitch>\r
+ <duration>16</duration>\r
+ <type>whole</type>\r
+ <lyric number="1">\r
+ <syllabic>single</syllabic>\r
+ <text>A</text>\r
+ </lyric>\r
+ </note>\r
+ <barline location="right">\r
+ <bar-style>light-heavy</bar-style>\r
+ </barline>\r
+ </measure>\r
+ </part>\r
+</score-partwise>\r
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 ()
id = None
for n in elements:
voice_id = n.get_maybe_exist_typed_child (get_class ('voice'))
+ if voice_id:
+ id = voice_id.get_text ()
+ else:
+ id = "None"
- if not (voice_id or isinstance (n, Attributes) or
+ # We don't need backup/forward any more, since we have already
+ # assigned the correct onset times.
+ # TODO: Let Grouping through. Also: link, print, bokmark sound
+ if not (isinstance (n, Note) or isinstance (n, Attributes) or
isinstance (n, Direction) or isinstance (n, Partial) or
isinstance (n, Barline) or isinstance (n, Harmony) or
isinstance (n, FiguredBass) ):
assign_to_next_note.append (n)
continue
- id = voice_id.get_text ()
if hasattr (n, 'print-object') and getattr (n, 'print-object') == "no":
#Skip this note.
pass