Hello !
I’ve made an octaver with MIDI tranlsator pro, so I can play a note + its octave up. Each incoming note ON message in MIDI translator pro is stored in a local variable (uu), which I transpose one octave up (uu = uu+12) and pass it to the output (with the same velocity as the incoming note ON message), along with the original note ON message. Same process with the note OFF message.
It works but I’m facing an issue : let’s say I’m playing C3 and C4 at the same time. When I depress the C3 and C4 keys, MIDI translator will receive note ON messages for C3 and C4, and will output note ON messages for C3, C4 and C4, C5 (so actually C3, C4, C5). But then if I release C3 while keeping C4 depressed, MIDI translator will receive note OFF message for C3 and will output note OFF messages for C3 AND C4. So only C5 will still be playing while C4 key is still depressed.
So I actually need a way to prevent note OFF messages to be send to the octave if the actual upper octave key is depressed (if I release C3 and stil have C4 depressed, I need MIDI translator NOT to send C4 note OFF message).
To be able to do that, I need to know the state of the keys (depressed or not). Is there any way to check at any time the state of the keys on a MIDI keyboard ?
It could be done by storing the Note On and Note Off messages in global variables for each note, but that would mean using 127 variables, and storing them in a table, which I’m not sure MIDI translator is capable of (nor having 127 global variables).
Any ideas to be able to do this would be welcome. Thanks a lot !