Decreasing knob response speed for certain tasks

maybe this is just a lua script thing I need to figure out, but I have certain knobs in presets that are turning too fast, particularly program change ones, where the slightest touch jumps a preset, so I’m often jumping 2 to 3 presets on accident. Is there a way to make it so that I can slow down the knob’s response on electra? like making it respond to every two encoder changes instead of one, something like that?

I cannot give you an answer as to how to do it, but I have some presets that give a good program change selection experience. They use a control to select the program number first, then a button to activate it and request the parameters. There are also buttons to increment/decrement by one program. The K4 preset by NewIgnis is one.

Another more direct method, using just a knob, is achieved by the Bitwig preset by Moss, but this is going through a transformation in a Bitwig script. It takes quite a rotation of the knob before the program change actually happens.

1 Like

There is an option (on mk2 running 4.0) to configure one of the hardware buttons to decelerate knob readings. It can be configured using the Settings screen / Buttons tab and assigning the Toggle sensitivity function to one of the hardware buttons.

I am not sure, however, if it is a good solution for you though - if it is needed only for one specific control.

This helps, but it would be nice if the editor allowed users to select a slower scroll speed when adding a parameter in general.

1 Like

Is there a Lua method to change the sensitivity?

I am not sure about the sensitivity per se, but unless you need all 127 PC commands to be triggered via the encoder rotation, you can create a custom function that will trigger required PC commands at a certain spacing that you create on your own, using >= and <= arguments as the “boundaries” of the encoder rotation where a certain command is send.

Not exactly the same as changing the sensitivity, but could work.

The fix: declare a wider raw range than the logical range actually needs (0-396 instead of 0-99, a factor of 4), so it takes 4x more physical rotation to move 1 program step. Everywhere the raw value is written, multiply the logical value by the factor; everywhere it’s read, divide back down. This is the same technique already used on QuadraVerb Plus and TG77 for the same reason.

This is the “sensitivity” (knob-feel) fix specifically — a widened raw range.

Three pieces:

  1. JSON — declare the control’s raw range wider than its logical range (here, 99 * 4 = 396 instead of 99):

{
“id”: “value”,
“min”: 0,
“max”: 396,
“message”: {
“type”: “virtual”,
“deviceId”: 1,
“parameterNumber”: 7100,
“min”: 0,
“max”: 396
},
“formatter”: “formatProgramName”
}

  1. Lua constant:

– Program fader’s raw range is widened by this factor (JSON: 0..99N).
– raw → logical: floor(raw/N + 0.5); logical → raw: logical
N.
local PROG_SENSITIVITY = 4

  1. Divide by the factor everywhere you read the raw value:

local logical = clamp(midiValue / PROG_SENSITIVITY, 0, 99)
mv2_setProgram(logical)

  1. Multiply by the factor everywhere you write a logical value back:

parameterMap.set(CFG.deviceId or 1, PT_VIRTUAL, 7100, next * PROG_SENSITIVITY)

  1. Same division in any formatter that displays the value:

function formatProgramName(valueObject, v)
local n = clamp(v / PROG_SENSITIVITY, 0, 99)
return PROGRAM_NAMES[n] or string.format(“%02d”, n)
end

That’s the whole pattern: declare a raw range N times wider than the logical range, and convert with /N on read, *N on write. Higher N = less sensitive (more rotation per step). N=4 is what I’ve been using in the presets I’ve been making and it feels right.

This wasn’t programmed by me… completely AI but it works

2 Likes

I’ve implemented my own skip counter for the time being.

There is a function button on the E1 mini that allows toggling sensitivity and displays an indicator in the status bar.

  • For some popups, you cannot get to this control without closing the popup.
  • There’s no lua binding to get or set this state.
  • Not clear how low level this sensitivity method is. IIRC some controls don’t always respect it.

Would be nice to have this utility built into the framework (OS?) rather than each app develop it’s own implementation (none of which can touch the status bar). Not the highest priority for me, but should be done eventually IMHO.

1 Like