Skip to content

kelexel/node-serialosc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-serialosc

serialosc module for monome device emulation

usage

// create a virtual device
var device = new (require('serialosc'))({
  name: 'monome 64 (v0000001)',
  prefix: '/monome',
  sizeX: 8,
  sizeY: 8
});

// listen for led state change events
device.on('stateChange', function(data) {
  console.log('stateChange: ' + data.x + ', ' + data.y + ', ' + data.s);
});

// listen for led level change events
device.on('levelChange', function(data) {
  console.log('levelChange: ' + data.x + ', ' + data.y + ', ' + data.s);
});

// begin listening on serialoscHost/serialoscPort, start bonjour
device.start();

// emulate a press
device.oscOut('/grid/key', x, y, s);

see https://github.com/dinchak/node-asciimonome for a more complete example

About

serialosc module for monome device emulation

Resources

Stars

Watchers

Forks

Packages

No packages published