Fader moves with MIDI controller command by script, but does not send signal to DAW

Hello,
I'm mapping some parameters from Ableton Live to configure a Mackie controller using OSC, as my MIDI controller (WORLDE Easy Control) doesn't have settings for more specific parameters like PitchWheel for the volume faders.

I managed to configure a script that makes the fader of my MIDI controller move the fader of the OSC that is controlling the volume of the track in Ableton, but even this fader moving, it does not send a MIDI signal, but when I directly move the fader in the OSC with the Mouse, it sends signal.

The configuration used is as follows:

The MIDI Controller fader is set to /control channel: 1 CC:3 value: min 0 and max 127

As the pitchwheel is configured with a value of max: 16383, so the command in the script was:

set('fader_1',value * 129)

Could anyone help me improve my script?

Thanks!!!

Maybe you have to set in ableton live preferences, something like remote ?

if I move the OSC fader directly with the mouse, it moves the volume of the track in the DAW, but if I move the controller fader, the OSC fader moves, but does not change the volume of the track.

I'm using Protokol to monitor the MIDI signal, and the same thing happens there. The OSC fader signal sends a MIDI signal only when it is moved with the computer mouse, or by touch, but if it is moved with the MIDI controller, it does not send a signal.

Widgets do not reply to incoming messages, you have to write a custom module to do that.

2 Likes

Hi !

Ok i misunderstood your issue. Sorry.

So I propose this : (hope i'm not too far from your goal)

  1. loopmidi (on windows)
    image
    2 ports daw-to-OpenStageControl and openStageControl-to-daw
    your daw is my case ableton.

  2. In Ableton

  3. In server configuration

  4. fader_1


    Note that target is empty, o-s-c takes the value set into the server configuration send

  5. fader_2


    Note the interactive property to false. it's up to you.

  6. The custom module to be load

/* Greenman - 14-07-2022 */
module.exports = {
    

	init: function()
	{
        console.log("Youpi init")		        // this will be executed once when the osc server starts
    },

    oscInFilter:function(data){
    // Filter incoming osc messages
    var {address, args, host, port} = data
    // do what you want
    // address = string
    // args = array of {value, type} objects
    // host = string
    // port = integer
    console.log("inside oscInFilter")
    console.log(data)
    if (host === 'midi') {
 
        console.log(" midi détecté via la valeur de host !")
        console.log('adresse du message : ' + address)
        // on teste si c'est un message midi /note via la variable address
        // comparaison avec l'opérateur ===
        if(address === '/control'){

            // on dispatche les valeurs de args dans tes variables différentes
             // assign args to variables
             // https://openstagecontrol.ammd.net/docs/custom-module/examples/#midi-routing

            var [channel, ctrl, value] = args.map(arg=>arg.value)

                // simple condition
                // on my apc i press the button sending /note 1, 32, 127
                // when released sending /note 1, 32, 0

                if (ctrl === 23) 
                {
                // if you don't want to use the fader_1, comment this line
                // you need to insert that as we bypass the 'normal' return
                receive('/SET', 'fader_1', value )                               

                // set the fader_2 widget to 10 times the fader_1 value. it's an example :-)
                receive('/SET', 'fader_2', 10 * value )                               
                }
                else console.log('Autre valeur de ctrl')                
        }

            return // bypass the normal return


    }
    
    // return data if you want the message to be processed
    return {address, args, host, port}
    }
}

You have to adapt the address as i use /control for the purpose of the demo.

So what it does :

Use the fader in ableton midi mapped to channel 1, number cc 23, it will move the fader_2 for the pitch represented by a fader with values from 0 to 1270.

Hope it helps. If others find some errors, please notice me :slight_smile:

cheers

custom-module-01.js (2.0 KB)
widget-fader-control-volume.json (6.3 KB)

1 Like

It worked, I was able to solve it using a custom module.

Here's the code I used:

var routing = {
    // midi cc vs widget id
    01: 'fader_1',
    02: 'fader_2',
    // etc
}

module.exports = {

    oscInFilter:function(data){
        // Filter incoming osc messages

        var {address, args, host, port} = data

        if (host === 'midi') {

            // MIDI routing !
            if (address === '/control') {

                // assign args to variables
                var [channel, ctrl, value] = args.map(arg=>arg.value)

                // simple conditions
                if (ctrl === 3) receive('/SET', 'fader_1', value * 129)

                if (ctrl === 4) receive('/SET', 'fader_2', value * 129)

            }

            return // bypass original message

        }

    }

}

Thank you very much @jean-emmanuel e @Greenman

1 Like