On loading of template, send osc?

If you’re looking for a way to send arbitrary commands (not emitted by the widgets in your session), you need to write a custom module, here’s a basic example:

module.exports = {

    init: function(){

        // executed once when the server starts
        send('127.0.0.1', 5555, '/server/started')

        app.on('sessionOpened', (data, client)=>{

            // executed each time a session is opened
            // as from v0.44.0, this will only apply
            // for sessions loaded from the server's filesystem 
            
            send('127.0.0.1', 5555, '/session/opened', data.path)

        })

    }

}

https://openstagecontrol.ammd.net/docs/custom-module/

1 Like