Midi remote mapping to Jog Wheel?


please take a look at Jochen Trappe’s example code here:

var knob = deviceDriver.mSurface.makeFader(0, 0, 1, 3)
knob.mSurfaceValue.mMidiBinding.setInputPort(midiInput).bindToControlChange(15, 21)

var triggerValue1 = deviceDriver.mSurface.makeCustomValueVariable('Trigger1')
var triggerValue2 = deviceDriver.mSurface.makeCustomValueVariable('Trigger2')

var page = deviceDriver.mMapping.makePage('Default')

page.makeCommandBinding(triggerValue1, 'Transport', 'Nudge Cursor Left')
page.makeCommandBinding(triggerValue2, 'Transport', 'Nudge Cursor Right')

knob.mSurfaceValue.mOnProcessValueChange = function(activeDevice, value) {
	if(value < 0.3)
		triggerValue1.setProcessValue(activeDevice, 1 - value / 0.3)
	else if (value > 0.7)
		triggerValue2.setProcessValue(activeDevice, (value - 0.7) / 0.3)

Ok. What am I looking for exactly?

Programming acrobatics?! You were looking for a specific functionality and I showed you one way to accomplish it.

I believe the functions you list would work poorly on both sliders and potentiometers.

What you did was to confirm what I’ve been telling you from the start: that you need to convert the data to virtual key presses if you want to transmit it to Cubase.

That’s why you bothered to do a Jog, because it doesn’t make sense?

I have no idea.


No, seriously…I thought you were looking for some code to implement jog wheel functionality into your midi remote script.

Apparently you already found a solution. I was posting too soon, didn’t see that.

Sorry for the confusion.

1 Like

It’s not really “virtual key presses” since you’re not going through any input/HUI layers. You bind the controller to a function that also happens to be accessible through key commands. In the case of Jog, as this thread originally was about, the end result would be the same no matter how you could theoretically tie the controller to the function.

I’m not sure I understand your comment. I was referring specifically to using potentiometers and sliders for functions such as jog and zoom. Those controllers don’t lend themselves very well to these functions as they’re only able to output absolute data as opposed to encoders which typically supports some form of relative CCs.

All said and done, @okdaniel 's question whether or not it is possible to bind a CC to Jog, the answer is yes, if your controller supports any relative MIDI mode it can be accomplished through a few lines of script code using the MIDI API.

@digitallysane If you’re unhappy with the path to accomplish a binding of a controller to a function, may I suggest you start a new topic and use the tag “feature-request”?

I said knobs, not potentiometers, implying encoders.

You may not, this was already discussed in multiple threads and the feature requests were made.

i am trying to use your script on this device.
Not sure how to do It…
Thank you

I’d be happy to help but you would have to present some more specifics. What issues are you running into?
I also don’t know what “this device” is.

Hello and thank you for answering my post.

I would like to use a Nuendo “Multi panner” endless knob (360 degrees) to rotate my effect without end turning or right or left …
My Device is a DJTechtools Midi fighter Twister…
I used the relative option on both device and VST … but it does not work …

Thank you again and regards