Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (msg.checkAddrPattern('/lp/matrix')) {
// and check messages typetag.
if (msg.checkTypetag('iii')) {
client.send({
OSCMessage: {
address: msg.address,
typetags: msg.typetags,
args: msg.args
}
});
}
}
});
} else {
// Bundle is now available.
var bundle = new osc.Bundle(),
message1 = new osc.Message(obj.address, obj.message),
message2 = new osc.Message('/status', 'from ' + client.sessionId + ' at ' + new Date().toString());
// to bundle messages, simply call 'add()' with instance of the Message.
bundle.add(message1);
bundle.add(message2);
// set timetag.
bundle.setTimetag(bundle.now());
// we can send Bundle in the same way as Message.
OSCServer.send(bundle, OSCClient);
}
});