abletonlink v0.2.0-beta.0
node-abletonlink
node.js port of ableton Link with node-addon-api
Dependencies
Required
see detail on node-gyp
Common
- python v2.7
Mac
- Xcode
UNIX
- make
Windows
- Microsoft windows-build-tools (
npm install --global --production windows-build-tools)
Tested env
- OSX 10.14.6 with Xcode / node.js 10.16.0
- Windows 10 with windows-build-tools / node.js 10.16.0
Install
npm install abletonlinkor
npm install 2bbb/node-abletonlinkHow 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
isLinkEnable:boolget/setisPlayStateSync:boolget/setnumPeers:numbergetbeat:numberget/setbpm:numberget/setphase:numbergetquantum:numberget/set
method
getNumPeers:(void) -> numberdeprecated from v0.0.8. usenumPeersproperty
get num peers.
setBeatForce:(beat: number) -> void
set beat force.
on:(key: string, callback: (number) -> void) -> void
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.
off:(key: string) -> void
remove callback.
enable:(void) -> voiddisable:(void) -> voidenablePlayStateSync:(void) -> voiddisablePlayStateSync:(void) -> voidupdate:(void) -> void
call update manually.
startUpdate:(interval: number [, callback: (beat:number, phase:number, bpm:number, playState: bool) -> void]) -> void
start update timer with interval.
if given callback, it will call every interval with arguments beat, phase, bpm, playState.
stopUpdate:(void) -> void
stop update timer.
License
MIT
Author
- ISHII 2bit bufferRenaiss co., ltd.
- ishiiatbuffer-renaiss.com
Special Thanks
- Hlöðver Sigurðsson (hlolli) #3
- Yuichi Yogo (yuichkun) #10
- Jakob Miland #11
- Alessandro Oniarti #11
- Théis Bazin #12, #15
- Jeffrey Kog #16
At last
If you get happy with using this addon, and you're rich, please donation for support continuous development.
Bitcoin: 17AbtW73aydfYH3epP8T3UDmmDCcXSGcaf