Prior to this PR, there were two bugs in the MIDI detokenizer:
the default velocity would be set to an invalid bin, which would break if the velocity had not been set prior to the first note being played
the detokenize method would crash when detokenizing a NOTE_OFF event when the note wasn't active.
The first issues is solved by setting the default velocity to a valid bin. The second issue is solved by first checking if the note is already active before trying to create the note.
Prior to this PR, there were two bugs in the MIDI detokenizer:
NOTE_OFF
event when the note wasn't active.The first issues is solved by setting the default velocity to a valid bin. The second issue is solved by first checking if the note is already active before trying to create the note.