Edit: I had asked a question here regarding MIDI Remote, but since the encoder is NRPN and setup on the controller itself, I’m going to do it on the controller and not MIDI Remote.
I have since found new information since making this post and will resolve it outside of Cubase, then program Cubase as if it were a standard controller later.
Original post:
The dilemma:
I need to cover .1db increments on a plugin’s db knob. Starting at 0db, the first turn is either +.1db or -.1db, all the way to -15.0db or +15.0db. That’s 301 possible values, including 0db as it’s own value.
NRPN covers 16,384 steps, so I divide this number into 301 and that’s how many moves each knob turn should make, so that I get a total of 301 possible encoder values (approx. 55 steps per turn).
So far, so good - I got the controller working great. It’s moving the Waves SSL plugin db knob in .1db increments.
The issue is that it only goes in .1db increments, no matter how fast or slow I turn the encoder. I don’t want to have to turn the knob 10 clicks per db if I’m turning the knob quickly.
Well, the MIDI plugin script for the Stream Deck has velocity control, but usually it’s not for NRPN messages. I have to set the step to “0” in order for the knob to be velocity sensitive, but I need the step to be 55 to cover my needs (which it does well), but now I lose my velocity control.
I can still find out and learn on that end how to script it on the controller-side by messaging the developer and asking him how to go about it, or I can consider doing it from the Cubase MIDI Remote script side.
My question is regarding how to handle velocity control in JavaScript with Cubase MIDI Remotes, vs handling it on the controller side.
Is the idea to use a timer function and store it in a variable, then use delta time and compare the old time with the new time, and if so, run a function to make the incremental steps more than 55? Did I even say that correctly?
If so, how would you do this? If not, what is a better method for velocity sensitivity if I require the 55-step-per-turn to remain intact as the slowest increment to keep the .1db part intact? I imagine the steps per turn will increase greatly if the velocity is faster, to get through the db values faster.
The reason I ask is because I imagine there could be multiple ways to address this issue, and I’m curious to hear what those ways are, then attempt to implement one of them.
Once I get the velocity down, the controller will be almost complete and I’ll have full resolution with standard MIDI, with the ability to make larger encoder leaps if necessary.
When the script is done, I’ll release it to the community. There’s nothing like it that I’ve seen online anywhere.