I have written a program to parse a midi file and find all the Note_On events.
I go into my DAW piano roll and draw in D4, D5, F4
My program correctly finds the Note_One events and identifies them correctly.
Then I go to my midi keyboard and play exactly the same notes, and save the midi file.
My program finds, D4,D4, D5,D5, F4,F4
i.e. it doubles the notes! Why am I getting a different result? Both midi files look the same in the DAW: they both have three notes.
Here are the two midi files:
https://drive.google.com/drive/folders/1CUgTJNH-jD5rPJEmT0aSwRp4PhaatxYq?usp=sharing
Heres my code which reads in the Midi data from file:
for i, track in enumerate(Ians_midi.tracks):
for msg in track:
if msg.type == 'note_on': ...