On loading of template, send osc?


Is it possible to send an osc/midi command when loading/opening a template (before hitting any buttons etc, just load template and bam, command is sent)?


Something like --state ? https://openstagecontrol.ammd.net/docs/getting-started/#options


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('', 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('', 5555, '/session/opened', data.path)






Worked perfectly. Thank you!