]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/musicxml2ly.py
Tutorial update seven; reorg tutorial into sections.
[lilypond.git] / scripts / musicxml2ly.py
index 431a43631cdb3a6680a214f27e539b08a49895a3..665cc1d02fcab5623e45e14784d77f44c4fad17b 100644 (file)
@@ -208,8 +208,11 @@ def musicxml_note_to_lily_main_event (n):
         event = musicexp.RestEvent()
     elif n.instrument_name:
         event = musicexp.NoteEvent ()
-        event.drum_type = instrument_drumtype_dict[n.instrument_name]
-        
+        try:
+            event.drum_type = instrument_drumtype_dict[n.instrument_name]
+        except KeyError:
+            n.message ("drum %s type unknow, please add to instrument_drumtype_dict" % n.instrument_name)
+            event.drum_type = 'acousticsnare'
     
     if not event:
         n.message ("cannot find suitable event")