These simple lines are supposed to parse midi and then show me the midi that is represented by score variable:
score = music21.converter.parseFile(midi_file)
score.show('midi')
For some reason the midi I get after parsing a midi and immedately reassembling it is very different from the pre-parsing midi. I can't attach midi, unfortunately.
I tried to find alternatives to converter.parseFile in the docs, but seems that I shouldn't use anything different.
Like many programs,
music21quantizes MIDI files when parsing them. You can disable this by callingconverter.parsewith thequantizePost=Falseargument. This might rule out a major source of the discrepancies.