chaosc-cosmdisplay/osc.js

20 lines
431 B
JavaScript
Raw Normal View History

var nodeosc = require('node-osc');
var osc = function(host, port) {
var self = this;
var hubAddress = host || '192.168.23.43';
var hubPort = port || 7110;
console.log("using " + hubAddress + ":" + hubPort + " as hub");
self._client = new nodeosc.Client(hubAddress, hubPort);
}
osc.prototype.send = function(path, value) {
var self = this;
self._client.send(path, value)
}
module.exports = osc;