Relative To Absolute Keystroke

I hate to bug you about something I’ve already learned before, but it escapes me now.
I’ve been all over the forum looking for my old question but can’t find it.

I’m just trying to convert an absolute 0-127 fader to relative to have up/down arrow keystrokes.
I will use the slow down formula and a ‘pause processing’ for when it hits 0 or 127.
But I can’t for the life of me remember how the absolute number converts to plus or minus 1 value.

Hi Trevor,

The attached file read CC13 from the alias “My Controller” and uses a timer to generate keystrokes “L” or “R” depending on the direction you are turning the controller.

I use the global variable “ga” to determine the last known position of the absolute encoder.

I use CC 81 value 127 to disable keystroke output so you can re-center your knob without sending keystrokes if it hits a hard stop. CC81 value 0 re-enables keystroke output.

Absolute to Keystroke-2021-11-21.bmtp (2.5 KB)

Steve Caldwell
Bome Customer Care


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

Ok nice, thank you. It’s more complicated than I remember. I changed all variables to n. g is used. Changed it to up/down arrow key output, to use it with scroll bars.

So I thought to suspend output at the 1 and 127 values, then have it reenable at 64. There doesn’t seem to be a refresh translator anywhere, so it only reenables at the 1 and 127. So I made one.

My calibrate translators:
At 127 it is no output and nb=1.
At 1 it is no output and nb=1.
At 64 it is no output and nb=0. When crossing 64 it will send the ‘on’ message, but won’t affect it if it currently isn’t disabled so it works.
I don’t have them activating or killing any timers. I got rid of the multiple repeats and the delays on the main timer. It works fine but has a weird side effect.

After hitting the end (1 or 127), then going and crossing 64 it always goes in the opposite direction of my movement for a second before going back to normal. Say I’m moving the scroll bar down with the down fader movement and I hit the bottom of the fader. It will suspend. So I move the fader back up to the middle to continue downward, but moving the fader down actually moves the scroll bar up for a while before starting to back down again. Same thing happens vice versa, trying to move up.
So I tried suspending MTP processing instead of using a variable, but it is the same.

When it’s going backwards the log window is saying condition satisfied: nc=127 so exit rules. When it’s back to normal, it doesn’t say that anymore.

Yes, I use timers in this version as they are less likely to miss CC values if you turn the knob too fast.

Your solution is interested as you can turn the knob in the opposite direction when you hit the end to keep going the same direction. I think in my case this would be really confusing for me.

Another solution could be to set a dead zone around the middle (say 60-70) and if you go under 60 start a left timer and if you go over 70 start a right timer and if you are in the dead zone, kill both timers. Then the issue is how fast you want the keystrokes to send while outside of the dead zone. There is no perfect solution when you have a knob with hard stops.

Steve Caldwell
Bome Customer Care


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

I tried without timers and the bug is still there. When the flag reenables it at 64, the output is backwards for a time.

I didn’t think to use a dead zone. Issue with that is I will use it for more than just the scroll bar. Actually I just thought to use the other fader as mouse wheel up/down. That will be nice.
Anytime there is a dead zone, like a bipolar pan knob or something, it’s nice to easily reset it to exactly middle, but really annoying when you want to record automation or something. There is always a little bump in the movement that you have to correct later. All my knobs on the LC XL have middle detents and they are not smooth for anything that isn’t bipolar.

In the situations when I want to record an automation that has a dead zone, I always use my dj controller cross fader, that I have it linked up to FL Studio’s ‘volatile link’ feature. I just have to tweak the knob (or the physical knob if it’s already linked) with my mouse to arm it, then the crossfader is now linked to it. It’s really smooth. So volatile link frog jumps to whatever parameter is last used. It’s really nice.

Before I had a seperate button to disable MTP processing to recalibrate the faders. That might be what I have to do again. But I thought it would be neat to have the same disable processing effect on the bumper ends of the faders instead of having a button. I might try removing the 64 reenable. Just have the end bumpers disable processing, then reenable after 1.5 seconds. But this bug will probably still be there.

So I kept the timers and set up a disable/enable button on my keyboard, as I had it before.
It works good, but too fast. I injected the slow down rules from my platters formula onto the up and down translators.
That actually works. Looks like a lot of processing for a simple up/down but meh.
When the fader hits the top it pushes a couple more arrow up keys on its own. It doesn’t do that at the bottom. So I think the issue is reusing the nc=127 for a formula value and the input value from the fader. I don’t remember this being an issue back when I first had up/down arrows on my fader.

Yes, actually 127 is seen for MIDI as -1 so maybe the top value should be 126?

But then I have to be careful not to hit the end. Don’t want to have to worry about it.
But I did put the mouse wheel on the right fader. It’s cool.

So on the left side: up/down arrow keys. Hold shift to move events. Hold Ctrl to transpose notes.
Hold the dj controller shift: master tempo.
Right side: mouse wheel. It isn’t that useful but interesting. I can think of other uses too.
Hold the dj controller shift: master swing mix.

The left platter is right/left arrow keys. They are priority because every editor in the daw is always a lot longer than it is tall. So it’s nice to just be able to quickly nudge up or down with the fader when needed.
Right platter is zooms.

1 Like