GithubHelp home page GithubHelp logo

jeffreykog / node-abletonlink Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 2bbb/node-abletonlink

0.0 0.0 0.0 84 KB

node.js porting of ableton Link

License: MIT License

Python 3.81% JavaScript 6.39% C++ 89.81%

node-abletonlink's Introduction

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 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

  • isLinkEnable: bool [get/set]

  • isPlayStateSync: bool [get/set]

  • numPeers: number [get]

  • beat: number [get/set]

  • bpm: number [get/set]

  • phase: number [get]

  • quantum: number [get/set]

method

  • getNumPeers: (void) -> number [deprecated from v0.0.8. use numPeers property]

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) -> void

  • disable: (void) -> void

  • enablePlayStateSync: (void) -> void

  • disablePlayStateSync: (void) -> void

  • update: (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.]
  • 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

node-abletonlink's People

Contributors

2bbb avatar hlolli avatar tbazin avatar yuichkun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.