Absolute (endless knob) to relative (fixed) position. Knob left - keystroke down, Knob right keystroke up

Hey :slight_smile:

I wanted to make the following action.

When I move knob left, keystroke UP should happen, when I move knob right - keystroke DOWN should happen. I wanted to fix the position of the knob centered Value 64, to convert it to a relative knob.

Everytime when I go knob left, it should be in value 63, everytime when I move knob right, should be value 65, for endless keystrokes UPs and DOWN.

These to examples are great, but the browser encoder stop, after reaching values 0 or 127…

best regards

I think I answered this in another post some time back. If not, please get back to me.

Hey Steve :slight_smile:

I found only the post, you can see above. But in this solution, theres a limitation of the endless knob. Because, wenn I reach for example value 0, I cant continue the move.
The other example, where the other guy, shared his script, it`s a nice one, with reset the value after reaching the values 0 or 127. But then it go laggy.

I cant find another post, where I can make the easiest solution, with the example, Ive tried to explain. As with the fixed centeres position from the values 3F/4E or something like that.
When I move knob left, the value stays on value 3F (63) but triggered everytime this value to keystroke UP, by moving. Same to moving knob right, which stays on value 4E (65) and triggers everytime this value and keytroke DOWN, by moving. When I don`t move the knob, it stays on the centered value (64)

Would be great, to get the example for this small but very effective translation :slight_smile:

best regards

The easiest way to deal with dead ends on an absolute controller if you want to output relative is to have a button set up to disable output while you re-center the knob.

The attached does this.

The first translator sets gb=1 if a button is pressed which will disable all output for re-calibration.
The second translator sets gb=0 for normal operation
The third translator handles right movement and does nothing if gb=1 (recalibrate) or incoming value is less than ga - Outputs Down keystroke
The forth translator handles left movement and does nothing if gb=1 (recalibrate) or incoming value is greater than ga - Outputs Up keystroke
The fifth translator sets ga to the last known knob value for the next iteration.

Again, if you hit a dead end, you push the button and re-center the knob, release the button and then you have more room to continue to turn the knob in the direction that you wish.

Of course you will need to set up the proper incoming CC’s and note values for your knob and button to get this to work.

Absolute-to-KeyStroke-Center-Recalibration.bmtp (2.1 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Is there an easy possibilty to do not use a button, to re-calibrate it?

I mean, I saw this type of using an endless knob with a rule, which says, If 3E (turn knob left) is coming, then this happens (scroll up), If 4F (turn knob right) is coming the other happening (scroll down).
Like a mouse wheel…

It would be much more better to handle it without a button, where I have to hold a button, to re-calibrate the knob, because the knob is endless and hasn`t a deadend…

If your endless encoder sends relative numbers when turning the knob, it should work. What I would need to know is if it still sends something when it reaches the end and you keep turning and what it sends.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Sorry for the bad delay of answer, I haven`t realized, you wrote back Steve.

Here are the two examples. The one is from the X–Touch mini, with endless knobs, but with values from 0 to 127.

The other one, is the APC40 MK II, I`ve used the CUE Level Knob, because this knob, has the usage, I wanted to have, on the X-Touch mini, for going down or up everytime I want. Without limitations.

Hope you can, understand, what I mean :slight_smile:

kindest regards
Mike

Hi,

The following project file should help you.

The first preset handles X-touch for CC 8 on MIDI CH 11 with absolute values
The second preset handles Cue Level for APC-40 MK2 which uses relative values.

X-touch Preset

For absolute values, we need to capture the last known value on a global variable “ga” and then compare the input with the last known value to determine which keystroke is sent. The first translator sends “R” for right movement, the second translator sends “L” for left movement and the third translator reset the last known value of GA.

APC40 MKII Preset

The first translator sends “D” for right movement
The second translators sends “U” for left movement
We check the incoming value of pp to determine direction. If less than 0x40, (first translator)
then it is a right movement and if greater than 0x40 it is a left movement (second translator). There is no need to capture last known value since this is a relative encoder.

cc-to-keystroke-2022-09-18.bmtp (2.3 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

Hey Steve,

this is exactly what I meant :slight_smile:

I need to take a better understand of the rules, to get in this material deeper.
It looks like so easy afterwise, but complicated in the beginning.

Thank you so much for your help. I appreciate it a lot as always :slight_smile:

I wish you a great weekend.

kindest regards
Mike

1 Like