Skip to content

Volst/node-abletonlink

 
 

Repository files navigation

node-abletonlink

node.js port of ableton Link with nbind

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)
  • if you install version of MSVS isn't 2015, npm config set msvs_version 2015 before install this package.

Tested env

  • OSX 10.10〜10.12 with Xcode / node.js 6.x, 8.9.4
  • Ubuntu 16.04 (on docker) with gcc 4.9.4 / node.js 7.0.0
  • Ubuntu 16.04 (on docker) with gcc 6.2.0 / node.js 7.0.0
  • Fedora 25 (on docker) with gcc 6.2.1 / node.js 7.0.0 * but it will get stack issue#1
  • Windows 10 with windows-build-tools / node.js 6.13.0, 8.9.4

Install

npm install abletonlink --save

or

npm install 2bbb/node-abletonlink --save

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

property

  • beat: number
  • bpm: number
  • phase: number
  • quantum: number

method

  • getNumPeers: (void) -> number

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.

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

  • off : (key: string) -> void

remove callback.

  • enable: (void) -> void

  • disable: (void) -> void

  • update: (void) -> void

call update manually.

  • startUpdate: (interval: number [, callback: (beat:number, phase:number, bpm:number) -> void]) -> void

start update timer with interval.

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

  • stopUpdate: (void) -> void

stop update timer.

License

MIT

Author

  • ISHII 2bit [bufferRenaiss co., ltd.]
  • ishii[at]buffer-renaiss.com

Special Thanks

At last

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

Bitcoin: 17AbtW73aydfYH3epP8T3UDmmDCcXSGcaf

About

node.js porting of ableton Link

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 83.0%
  • JavaScript 9.1%
  • Python 7.9%