0.1.1 • Published 8 years ago
motujs v0.1.1
motujs
JavaScript library to control MOTU AVB audio interfaces
Implementation is based on MOTU's documentation:
http://cdn-data.motu.com/downloads/audio/AVB/avb_osc_api.pdf
Installation
npm install
gulp
Usage
Connecting
var motu = new Motu()
motu.connect('192.168.0.143')
motu.disconnect()
Get value
var motu = new Motu()
motu.connect('192.168.0.143')
motu.datastore.once('changed', function(a, b) {
// datastore is synced after first change
var value = motu.datastore.get('mix/chan/1/matrix/fader')
console.log('Value of first fader is ', value)
motu.disconnect()
});
Listening for changes
var motu = new Motu()
motu.datastore.on('changed', function(a, b) {
console.log(a.length + ' items changed by ' + b)
});
motu.connect('192.168.0.143')
Making changes
var motu = new Motu()
motu.connect('192.168.0.143')
setInterval(function () {
motu.datastore.set('mix/chan/1/matrix/fader', Math.random())
}, 500)