Reputation: 11
I'm following another tutorial on stack-overflow about printing out all note on/off messages from a midi-file.
Now the problem is, when I have a Note_ON event, how do I know which of the following Note_OFF messages is the corresponding one? Since Notes can overlap and be within one another. I looked through the MIDI Specification but unfortunately found nothing concerning this, and also other sources did not provide any detail.
But this must be possible, since Mathematica prints out the tuples of (Note-Pitch,Start-time,Stop-time).
Upvotes: 1
Views: 266
Reputation: 180300
In theory, every note-on event must have a corresponding note-off event, and notes with the same value must not overlap.
What happens in practice in these cases is not specified. Therefore, any possible interpretation could be assumed to be correct.
(Most synthesizers (with their default settings) do not really allow overlapping notes, i.e., a note-on message will cancel any previous note(s) with the same channel and value.)
Upvotes: 1