MIDI Remote + CC121 Knobs: speed the EQ knobs value


I’ve been fine tuning a CC121 script made by another user and I always feel that the CC121 resolution is to high and you have to move the knobs too fast to make them useful.

The system that it uses is just a CC with to values ranges scaled to how fast you move every knob, from -6 to 6, so hacking that it’s just a matter of intercept the value and add /subtract another one.

I’ve been looking at the MIDI Remote API and, not being a JS programmer, it’s kind of cryptic. Anybody could help me about this?


Hi, suggesting changes to a script though easy some times, can be frustrating.

I mean, I can throw here a snippet for achieving what you want, however you then have to “study” it, place it in the appropriate code segment and so on…

Thus, I would recommend that you suggest a change/addition to the user who created the original script, and probably knows best how to treat it.

Thank you for responding. If it’s not too much trouble, would you be able to share the code with me? Although I’m not currently a programmer, I did dabble in it about 25 years ago (LOL) and can handle some basic tasks.

Thank you in advance :slight_smile:

I’m not a CC121 owner, but based on your description about the ±6 steps (?) based on the speed of movement, (by the way, I don’t quite understand this; Isn’t it obvious that the faster you turn a knob, the bigger the step? But anyway, again, I don’t really know anything about it, it may be some kind of accelerated functionality) here’s what I would suggest:

Inspect your knob inside an mOnProcessValueChange, by always console.logging the arguments:


   console.log("value="+value+" diff="+diff)


Once you do this, you can get a better feel (or even a precise one) on the knob’s behaviour by checking both value/diff variables. The first should give you the range, the other one the “velocity” of turning this knob.

Now, say, you find out that this diff is of no importance, and you want to provide a change to your hostValue even at its smaller fraction.

You’ll need a custom Variable defined as (just an example):

var surfaceElements.aTranformingCustomVariable=surfaceElements.makeCustomValueVariable("aTransformer")

Back to your mOnProcessValueChange of your knob, you can now have this:

   var transformedValue=Math.sign(diff)


Finally, instead of binding the original knob, you have to bind this new custom variable to your host value:

yourPage.makeValueBinding(surfaceElements.aTransformingCustomVariable, yourHostValue)

Enough with snippets, I get back to my first post: I really insist on getting in touch with the user who wrote the original script. Maybe your suggestion/notice would be beneficial to the community using the initial script, maybe not. BUT the way I see it (and this happens with every new API, not just this one here) collaboration maximises the benefit for all users :slight_smile: