• Stars
    star
    114
  • Rank 306,296 (Top 7 %)
  • Language
    CoffeeScript
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Control Ableton Live through Node.js. Yes, holy shit.

Ableton Live API for Node.js (through Max for Live)

This module exposes the Live Object Model so that it can be consumed directly from Node.js. It works by communicating with a Max for Live device (included in the repo) through udp sockets.

Requirements

  • Ableton Live 9
  • Max for Live (tested with version 7, might work with 6)

By default, the module binds on ports 9000 and 9001, so they need to be free.

Install

npm install max4node

Setup

The Max for Live device is located in max_device/max4node.amxd.
Drop the device in a MIDI track (doesn't matter which one).

Usage

var Max4Node = require('max4node');

var max = new Max4Node();
max.bind();
Get values

Get Master Track volume.

max.get({
  path: 'live_set master_track mixer_device volume',
  property: 'value'
})
.once('value', function(val) {
  console.log('Master track volume: ' + val);
});
Set values

Arm the first track.

max.set({
  path: 'live_set tracks 0',
  property: 'arm',
  value: true
});
Call functions

Play a clip.

max.call({
  path: 'live_set tracks 0 clip_slots 3 clip',
  method: 'fire'
});
Observe a value

Fire the callback with the updated position of the clip (if it's playing).

max.observe({
  path: 'live_set 0 clip_slots 3 clip',
  property: 'playing_position'
})
.on('value', function(val) {
  console.log('Playing position: ' + val);
});
Count

Number of clips in the track.

max.count({
  path: 'live_set tracks 0',
  property: 'clip_slots'
})
.once('value', function(count) {
  console.log(count + ' clips');
});
Promises

Promise based versions of get and count are available through max.promise().

max.promise().get({
  path: 'live_set master_track mixer_device volume',
  property: 'value'
})
.then(function(val) {
  console.log('Master track volume: ' + val);
});

max.promise().count({
  path: 'live_set tracks 0',
  property: 'clip_slots'
})
.then(function(count) {
  console.log(count + ' clips');
});

Testing

Testing is done with fake sockets, so you don't need to open Ableton and Max.

npm test

Big ups

I would have never been able to come up with the Max device without looking at the code of Fingz, an awesome project that you should definitely check out.
I learned a lot about Max from it, debugging in Max is as painful as listening to Justin Bieber, but it's the only way we have to access the Ableton API in a reliable manner (control surfaces programming is a joke, and not officially supported).

License

Copyright (c) 2015, Marco Sampellegrini [email protected]

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

More Repositories

1

zero-bs-haskell

Learn Haskell, with tiny lessons.
Haskell
558
star
2

quad-ci

A CI server written in Simple Haskell.
Haskell
188
star
3

elm-to-purescript-cheatsheet

Purescript for Elm devs. 🚀
PureScript
175
star
4

react-native-media-queries

Media queries like functionality for React Native
JavaScript
72
star
5

elm-hn

An Hacker News clone written in Elm.
Elm
67
star
6

runelm.io

A place to share and run elm code.
JavaScript
25
star
7

tex

Minimalistic file explorer, written in Haskell.
Haskell
17
star
8

elm-date-distance

Date/Time distance helpers: time ago, less than 5 minutes, about 1 month...
Elm
16
star
9

wadoo

An XML/XSLT static site generator written in PHP.
PHP
13
star
10

xpathr

be very very *very* careful
PHP
11
star
11

elm-star-dodge

A simple star dodge game clone.
Elm
11
star
12

purescript-simplecrypto

A set of useful cryptographic utilities for blockchain development.
PureScript
11
star
13

openid_auth

A Symphony CMS extension that allow users to authenticate with their OpenID.
PHP
8
star
14

resave_entries

A simple Symphony CMS extension that let you resave your entries after structural section changes.
PHP
7
star
15

shorten

A Symphony CMS field that shorten entry ids to tiny alphanumeric strings (like u8X).
PHP
7
star
16

node-xonek2

Node api for the awesome XONE:K2 MIDI controller by Allen & Heath
CoffeeScript
5
star
17

elm-mastermind

Mastermind game written in Elm. Play with a runnable demo at https://runelm.io/c/f2t
Elm
5
star
18

elm-memory-game

Memory Game written in Elm. Play with a runnable demo at https://runelm.io/c/fbi
Elm
5
star
19

builder-workspace

PHP
5
star
20

builder

Builder extension for Symphony CMS
PHP
4
star
21

xpathr-old

santa claus is coming to town ♫ (he's a bit late)
PHP
4
star
22

purescript-merkle-tree

Merkle Trees in Purescript.
PureScript
4
star
23

image_info

Iptc and Exif metadata for Symphony CMS
PHP
3
star
24

alpacaaa.github.io

HTML
3
star
25

quad-sample-pipeline

JavaScript
3
star
26

elm-rock-paper-scissors

Rock paper scissors game written in Elm. Play with a runnable demo at https://runelm.io/c/9cr
Elm
3
star
27

yothisiscool

Show some love to the amazing people behind cool open source projects!
HTML
3
star
28

trunk.life

There's only one branch that matters #trunklife
CSS
2
star
29

elm-roguelike

Elm
2
star
30

referendum2011

Python
2
star
31

redux-purify

Purify your actions and reducers, no more boilerplate and purified sin free code for ya
JavaScript
2
star
32

simpledb-backup

Simple solution to backup mysql dbs and push them to a remote server (ssh).
PHP
1
star
33

osso

PureScript
1
star
34

haybale

Haskell
1
star
35

purescript-AoC2017

I am perfectly aware I will never complete it.
PureScript
1
star
36

peanocoin

Simple cryptocurrency in Purescript.
PureScript
1
star