MidiFile noteOff pairs get lost [fix included]

Hello all, I’m new to the forums, but will jump right in to reporting a bug and a fix to it :slight_smile:

I did check that this hasn’t been fixed in git.

When a MidiFile get’s read, readNextTrack() does

addTrack (result);

However, addTrack() takes a copy of result, which doesn’t copy the matching note off pointers, created by updateMatchedPairs().

One possible fix would be to replace the above code with :

addTrack (result);

Ah! Excellent stuff, thanks very much! I’ll get that sorted out right away…