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

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