How to use the osc.readMessage function in osc

To help you get started, we’ve selected a few osc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ShaPOC / node-muse / src / server / osc.class.js View on Github external
this.udpPort.on("data", function (data, info) {

        // Prepare an error for when the try catch fails, inside the try this variable will get overridden
        var receivedData = {
            address : "error",
            args : ["The header of an OSC packet didn't contain an OSC address or a #bundle string"]
        try {
            receivedData = osc.readMessage(data);
        } catch(e) {
            if(self.debug) {
        self.emit("data", receivedData, info, data);