I'm using Mido
for python, working on parsing midi files into <start_time, duration, program, pitch>
tuples and met some problems.
Some files that I parse has multiple note_on
, resulting in notes at the same pitch and same program being opened more than once.
Some files contains multiple note_off
resulting in trying to close notes that is no longer on due to being closed before (assuming only one note at the same program and same pitch can be on).
Some tracks does not have a program_change
in the beginning of the track (or even worse, not even having one in the whole track).
Some files has more than one track containing set_tempo
messages.
What should I do in each of these cases to ensure I get the correct interpretation?