Using the Pitch Bend as a Cursor Nudge Knob

Hey Guys,

Just for fun I thought I’d ask about that. As the title states, Does anyone know if there would be a possibility to achieve that? Bending the Pitch bend Wheel up moves Forward and Down, Backwards.

There must be a way to use Macros for that!

Yes, it should be doable. But not via macros.
My best bet is writing a custom MIDI Remote script or using 3rd party tools such as BOME MIDI Translator.

1 Like

I was kinda hoping someone else would elaborate on this feed, but it doesn’t seem to be such a potentially tool for anyone else.

Okay can you run the process by me in more in depth please?

It’s a mini-project in itself Nicolas.

You have to use the API to write a script for your controller. And then it comes to feeding the MIDI message of the pitchbend wheel to a dummy variable, and setting up a function that “splits” the pitchbend’s values to + and -, that eventually connect to either Nudge Cursor ± command, or a transport rewind, fast forward, previous/next marker, whatever you want to do.

There are scripts you could study, there’s @m.c who is the defacto guru of elegant scripting.

It’s just not as easy as we’d hope it to be, and unfortunately it’s not possible to do this from the otherwise very intuitive Mapping Assistant.

1 Like

This is why I love the musicians’ community. In my field no one ever found my coding elegant, completely the opposite actually, thank you my friend :joy:

@NicolasJC, what is your keyboard? Perhaps there can be a quick solution.

3 Likes

Yeah… Now i know why it’s dubbed as an unpopular feature!

Hi @m.c , my main keyboard is a novation Launchkey 64

Sorry, I’m not aware of such model… Perhaps you mean something like 61 mk3 or?..

Apologies, i meant the Launchkey 61 MKIII yes.

This one :point_up_2:t2:

Ah, cool! This one already has a remote script, curious if you’re using it :slight_smile:

Anyway, since I do get that your request is about fun, and I like fun too, here’s a midi remote you can install by going to Studio→MIDI Remote Manager, clicking on Import Script and then choosing the file you’ve just downloaded.

Then you have to manually add it by clicking the big plus button at the midi remote section (that’s because I don’t know the exact names of the ports of the Launchkey).
You’ll find an entry under the Novation category, Launchkey PitchBend. Choose this and set the proper ports (Careful here, NOT the DAW ports).

Novation_Launchkey PitchBend.midiremote (1.7 KB)

I’ve tested it here on my Novation SL MK3 and it works as expected.

At the same time, inside the script I’ve added an option to enable a second set of commands (Zoom In/Out). If you turn this option on, you can then use the modulation wheel to toggle between these two sets. As said, it’s just for fun :slight_smile:

And here’s the source code, just in case anyone else find it interesting:

var enableDualSetsOfCommands=0 //If set to 1, we enable a second set of commands. We change set using the modulation wheel (moving it up we go to set 2, moving it down to set 1)

var delaySeconds=0.2 //initial delay in seconds, before we begin repeating a command (i.e. even if we hold the pitchBend steady)

var rateHZ=5 //How many times per second should a command be repeated


var midiremote_api = require("midiremote_api_v1")
var deviceDriver = midiremote_api.makeDeviceDriver("Novation","Launchkey PitchBend","Someone")

var midiInput = deviceDriver.mPorts.makeMidiInput("midiInput")
var midiOutput = deviceDriver.mPorts.makeMidiOutput("midiOutput")

var detectionUnit=deviceDriver.makeDetectionUnit()
detectionUnit.detectPortPair(midiInput, midiOutput)
    .expectInputNameContains("MIDI")
    .expectOutputNameContains("MIDI")
    

var surface=deviceDriver.mSurface

var btnUp=surface.makeButton(0,0,1,1)
var btnDn=surface.makeButton(0,1,1,1)
if (enableDualSetsOfCommands==1){

    var btnUp2=surface.makeButton(1,0,1,1)
    var btnDn2=surface.makeButton(1,1,1,1)

} else {

    var btnUp2=surface.makeButton(0,0,0,0)
    var btnDn2=surface.makeButton(0,0,0,0)

}

var customPitchBend=surface.makeCustomValueVariable("pitchBend")

customPitchBend.mMidiBinding
    .setInputPort(midiInput)
    .bindToPitchBend(0)

var customModulation=surface.makeCustomValueVariable("modulation")
customModulation.mMidiBinding.setInputPort(midiInput)
customModulation.mMidiBinding.bindToControlChange(0,1)

if (enableDualSetsOfCommands==0){

    customModulation.mMidiBinding.setIsConsuming(false)    

} else {

    customModulation.mOnProcessValueChange=function(activeDevice,value,diff){
        
        var pitchBendMode="1"

        if(diff<0 || value==0){
        
            pitchBendMode="0"
        
        }
        
        activeDevice.setState("pitchBendMode",pitchBendMode)
    
    }

}

customPitchBend.mOnProcessValueChange=function(activeDevice,value,diff){
    
    var roundedVal=Math.round(1000*value)
    
    if(roundedVal>500 && diff>=0){

        if(activeDevice.getState("pitchBendMode")=="1"){

            
            btnUp2.mSurfaceValue.setProcessValue(activeDevice,1)
        
        } else {

            btnUp.mSurfaceValue.setProcessValue(activeDevice,1)
        
        }
        
    } else if (roundedVal<500 && diff<=0){

        if(activeDevice.getState("pitchBendMode")=="1"){

            
            btnDn2.mSurfaceValue.setProcessValue(activeDevice,1)
        
        } else {

            btnDn.mSurfaceValue.setProcessValue(activeDevice,1)
        
        }
    
    } else {
        
        btnUp.mSurfaceValue.setProcessValue(activeDevice,0)
        btnDn.mSurfaceValue.setProcessValue(activeDevice,0)
        btnUp2.mSurfaceValue.setProcessValue(activeDevice,0)
        btnDn2.mSurfaceValue.setProcessValue(activeDevice,0)

    }

}


var aPage=deviceDriver.mMapping.makePage("aPage")

aPage.makeCommandBinding(btnUp.mSurfaceValue,'Transport', 'Nudge Cursor Right').makeRepeating(delaySeconds,rateHZ)

aPage.makeCommandBinding(btnDn.mSurfaceValue,'Transport', 'Nudge Cursor Left').makeRepeating(delaySeconds,rateHZ)

aPage.makeCommandBinding(btnUp2.mSurfaceValue,'Zoom', 'Zoom In').makeRepeating(delaySeconds,rateHZ)

aPage.makeCommandBinding(btnDn2.mSurfaceValue,'Zoom', 'Zoom Out').makeRepeating(delaySeconds,rateHZ)

3 Likes

@m.c thats amazing thank you!!

1 Like