MIDI keyboard-state register
Posted: Thu Aug 31, 2017 6:12 pm
When we change a preset on a synth we're all used to nothing much happening until we send some new MIDI notes. However on an organ, if you're already holding some keys down, it's essential that the new sounds commence as soon as you pull the stop / drawbar / press the tab; conversely all the notes stop when you do the opposite.
My HB3 organ project ('Additive Organ Pipes') is intended to produce a single organ stop, so I need to add a means of turning the stop on and off. To enable all held notes to play as soon as the stop is turned ON I guess I need a register that tracks which keys are currently held down. When the stop is turned ON said notes need to play in exactly the same way as they do when they're pressed if the stop is already on, and when the stop is turned OFF they should cease in the same way as they do when the keys are released.
Not sure how I should do that - can someone advise? No doubt I need a keyboard register/buffer to keep track of the keyboard state and I'm wondering if Ruby is the place to go to set this up.
Err, which is definitely my weakest area
.. although I'm ready & willing if this is what I should be getting into next!! (But a starter hint from a maestro would be worth its weight in gold .. )
ALSO ... I need to be able to select which MIDI channel a stop responds to, so that if an organ has several keyboards (as they do ..) individual stops can be assigned to a particular keyboard on a particular MIDI channel.
Grateful for any advice on this one!
My HB3 organ project ('Additive Organ Pipes') is intended to produce a single organ stop, so I need to add a means of turning the stop on and off. To enable all held notes to play as soon as the stop is turned ON I guess I need a register that tracks which keys are currently held down. When the stop is turned ON said notes need to play in exactly the same way as they do when they're pressed if the stop is already on, and when the stop is turned OFF they should cease in the same way as they do when the keys are released.
Not sure how I should do that - can someone advise? No doubt I need a keyboard register/buffer to keep track of the keyboard state and I'm wondering if Ruby is the place to go to set this up.
Err, which is definitely my weakest area
ALSO ... I need to be able to select which MIDI channel a stop responds to, so that if an organ has several keyboards (as they do ..) individual stops can be assigned to a particular keyboard on a particular MIDI channel.
Grateful for any advice on this one!