我正在尝试解析一些 MIDI 文件,但没有任何反应。这很奇怪,因为有些文件的解析没有任何问题,而且速度非常快,而有些则卡住了。我不知道是什么问题,因为它没有显示任何错误,程序只是卡住了。MIDI 文件之间有什么区别?为什么有些文件无法解析?
midi = converter.parse(file) # some MIDI files just stuck here
notes_to_parse = None
try:
s2 = instrument.partitionByInstrument(midi)
notes_to_parse = s2.parts[0].recurse()
...