Hello,
So I have a MIDI project where I need to keep track of what MIDI notes are currently being held down.
For instance if notes 40, 50, 60 were pressed (in that order) I would like to be able to quickly retrieve this info. Then say if note 50 was released, then I would get just notes 40 & 60. I'd obviously like to be able to manage more than just three notes (was thinking up to 16), but I've been scratching my head for a few days trying to figure out the best or most optimal way to do this and have not got very far. I don't want to be iterating over an entire array of 128 notes just to find which ones are currently being held, and I'd also like to be able to figure out the order that the notes were pressed. I'm normally fairly good with MIDI stuff, but my coding skills are average at best.
I've been looking at linked lists, maps etc.... but I can't help think that they might be a bit overkill, and I'm missing a trick somewhere... Any advice or thoughts would be grand!
TIA
So I have a MIDI project where I need to keep track of what MIDI notes are currently being held down.
For instance if notes 40, 50, 60 were pressed (in that order) I would like to be able to quickly retrieve this info. Then say if note 50 was released, then I would get just notes 40 & 60. I'd obviously like to be able to manage more than just three notes (was thinking up to 16), but I've been scratching my head for a few days trying to figure out the best or most optimal way to do this and have not got very far. I don't want to be iterating over an entire array of 128 notes just to find which ones are currently being held, and I'd also like to be able to figure out the order that the notes were pressed. I'm normally fairly good with MIDI stuff, but my coding skills are average at best.
I've been looking at linked lists, maps etc.... but I can't help think that they might be a bit overkill, and I'm missing a trick somewhere... Any advice or thoughts would be grand!
TIA