QuNeo + node.js + node-osc

That is the result of this code:


var osc = require('node-osc');

var client = new osc.Client('0.0.0.0', 9999);

var value = 0;
setInterval(function() {
    client.send('/quneo/leds/hSliders/0/' + value, 0);
    value = ++value % 7;
    client.send('/quneo/leds/hSliders/0/' + value, 1);
}, 500);

var bpmFlash = 0;
var bpmInterval = 60 * 1000.0 / 125;
console.log('bpm interval', bpmInterval);
setInterval(function() {
    client.send('/quneo/leds/transportButtons/2', bpmFlash);
    bpmFlash = bpmFlash > 0 ? 0 : 1;
}, bpmInterval);

which I think is AWESOME!

Also, the official docs on the OSC bridge are wrong. To turn pad lights on you have to use the SW/SE/NW/NE names too..., or use '*' in place of the direction, to turn the entire pad on. Otherwise I couldn't get anything to light up. I.e.


// works, turns on the red led on the bottom right corner
client.send('/quneo/leds/pads/0/SE/red', 1);

// works, turns on all the red leds on the first pad
client.send('/quneo/leds/pads/0/*/red', 1);

// doesn't work
client.send('/quneo/leds/pads/0/red', 1);

Another error I fell for was using slash-terminated input addresses. These (silently) do not work. I.e.


// won't work, address ends in '/'
client.send('/quneo/leds/pads/0/SE/red/', 1);

// works, address doesn't end in '/'
client.send('/quneo/leds/pads/0/SE/red', 1);

I have very little else to report as I just got this thingie today and I'm super excited that I got it communicating with node.js this early. Yay for OSC!