diff --git a/oscreceiver.js b/oscreceiver.js index e6cc259..dabc426 100644 --- a/oscreceiver.js +++ b/oscreceiver.js @@ -1,4 +1,5 @@ var readline = require('readline'); +var dateFormat = require('dateformat'); var osc = require('node-osc'); var listenPort = 8000; @@ -9,7 +10,8 @@ var oscClient = new osc.Client(hubAddress, hubPort); var oscServer = new osc.Server(listenPort, '0.0.0.0'); oscServer.on("message", function (msg, rinfo) { - console.log("message: " + msg); + var dateString = dateFormat(new Date(), "HH:MM:ss.L"); + console.log(dateString + "\t" + msg); }); oscClient.send('/subscribe','192.168.23.102', listenPort, "sekret"); @@ -42,4 +44,6 @@ function isNumber(value) { return true; } return !isNaN(value - 0); -} \ No newline at end of file +} + + diff --git a/testsender.js b/testsender.js index 199b162..84dbc25 100644 --- a/testsender.js +++ b/testsender.js @@ -1,7 +1,7 @@ var osc = require('node-osc'); -var hubAddress = '192.168.23.43'; -var hubPort = 7110; +var hubAddress = '192.168.23.31'; +var hubPort = 2345; var oscClient = new osc.Client(hubAddress, hubPort); @@ -15,6 +15,6 @@ function fubs() { } -setInterval(fubs, 200); +setInterval(fubs, 50);