2bbb / node-abletonlink

node.js porting of ableton Link
MIT License
150 stars 16 forks source link
ableton-link nodejs

node-abletonlink

node.js port of ableton Link with node-addon-api

Dependencies

Required

see detail on node-gyp

Common

Mac

UNIX

Windows

Tested env

Install

npm install abletonlink

or

npm install 2bbb/node-abletonlink

How to use

const abletonlink = require('abletonlink');
const link = new abletonlink();

link.startUpdate(60, (beat, phase, bpm) => {
    console.log("updated: ", beat, phase, bpm);
});

// callback is option.
// link.startUpdate(60); // correct!

function do_something() {
    const beat = link.beat;
    const phase = link.phase;
    const bpm = link.bpm;
    ...
}

Example

API

const abletonlink = require('abletonlink'): Thread Safe abletonlink.Audio: Not Thread Safe (but on node.js/V8...??)

property

method

get num peers.

set beat force.

set callback will call change event.

key is 'tempo' then argument of callback is new tempo property.

key is 'numPeers' then argument of callback is new numPeers property.

key is 'playState' then argument of callback is new isPlaying property.

remove callback.

call update manually.

start update timer with interval.

if given callback, it will call every interval with arguments beat, phase, bpm, playState.

stop update timer.

License

MIT

Author

Special Thanks

At last

If you get happy with using this addon, and you're rich, please donation for support continuous development.

Bitcoin: 17AbtW73aydfYH3epP8T3UDmmDCcXSGcaf