The Living Thing / Notebooks :

Ableton live

Pro tips

Scripting live

One of few officially supported scripting languages for any DAW is Max for Live, for Ableton Live. It’s a pity, then, that it’s awful. There is an alternative semi-supported “back door” via LiveOSC. Ins and outs of both will be discussed here, plus the third option, the handmade backdoor of Gibberwocky.

However, just because it is prominent does not mean Live is unique in having a scripting API. Upstart Ableton competitor Bitwig Studio supports a simple and open javascript API, although its reach is more limited, and it improves most features of Ableton I care about.

Also, you could instead use a non-mainstream DAW. These often have scripting languages as their selling point. Notably, the audio production environment Renoise has embedded scripting using the respectable scripting language lua, although Renoise itself is a freaky non-mainstream sort of tool. csound also comes with some hybrid DAW/IDE options. There are probably other hacks available to the bloody-minded. See audio software.

If you care about nothing but tempo you can use the open Ableton Link to synchronise arbitrary things and skip the friction points.

Build your own plugins

OK, you have some weird thing you want to do with audio processing. There are many audio frameworks/languages that do this, such as csound, faust, Juce/c++, and so on. These lack the ability to control Ableton - they don’t know anything about their host environment. Even, e.g. synchronizing with the host can be fiddly.

So, let’s say you really want to automate Ableton itself, in some new and exciting ways.

Max for live

Max4live is an API accessed only through a clunky “arty codey” quasi-friendly programming language MaxMSP, whose chief selling points are that that

Not only can it automate certain features of Ableton, it can also do DSP. While this seems cool, in fact the experience of writing MaxMSP code is horrible and it locks you in to this one expensive, esoteric platform. Why not write your plugins in csound and run them as VSTs anywhere, or in supercollider and plug them in using Jack?

Worthy usages

Javascript in Max4Live

You can try to access MaxMSP’s patcher interface using javascript. I’m not a fan, because MaxMSP is horrid, and the API design is inconsistent and buggy. It’s a bad API wrapped in a bad language, which kind of removes the labour saving potential of the interface. An oft-made comparison for accessing things with APIs is that it is barrier contraceptives for sex. The loss of intimacy and convenience is real; but then, the trade-off is worth it for the safety, and you can still do most things you want to do, plus some things it would be dangerous to do any other way.

If that is so, using the Live API through Max for Live’s Javascript API is like fucking with a chicken carcass instead of a condom in that… You know what? In just about every way it is like that. I’m not breaking it down further for you.

Anyway, I use the in-built javascript interpreter for MaxMSP in Live, because having to wire patch-cords is depressing, and because Java has no access to the Live API.

On the plus side, the API is rich – you can do DSP and MIDI inside Ableton. It’s also officially supported by the manufacturer. Moreover, Max for Live does have a lot of market-share and hence a lot of community around it, which makes up for a many evils. Then again, there are other fetishes for putting weird things on penis that likely have an even larger community, and lots of those have more entertaining failure modes if you do them on stage.

Anyway, we push on.

But mark ye; avoid the following mistakes, for I have already made them for you, and shy from the following horrible flaws, lest ye be disappointed.


Nicely done and well-maintained. Charlie Robert’ high point.

gibberwocky is a trio of environments for music programming and live-coding performance. Each of these environments targets a different software package or communication protocol, but share principles and APIs for musical sequencing and musical control signals. All three environments use vanilla JavaScript as the end-user programming language.

Targets Max, MIDI and Ableton Live.


An alternative. LiveOSC is really poorly documented, but definitely a real thing, and despite being an undocumented hack job is one of the more convenient ways to script live; this is faint but real praise. (NB the equivalent in Bitwig is way easier.)

It doesn’t have DSP access, and it doesn’t have official recognition. It doesn’t even have good documentation or a github repo. However, it is used by cognoscenti-types and is genuinely well-designed, or at least doesn’t actively try to piss you off. LiveOSC is a python based interface using the private “control surface” python API to access Ableton over OpenSoundControl as a server. It is based in turn upon LiveAPI, which avoided the network layer but was more fragile and python-specific. pylive uses LiveOSC to control Ableton from a python client and thereby comes full circle. Thanks Daniel Jones for a tidy bit of work there. (Don’t be confused; there are two separate python thingies with blandly generic names working together here, but they are completely different.) You can also use LiveOSC with other interfaces, such as Livecontrol 2.

LiveOSC source is here, and livecontrol2 source is here, although I can’t find an actual download link for either. pylive is, by the way, dependent upon pyliblo, although they haven’t gotten around to documenting that yet.

File format

Ableton sets are gzipped XML. A couple of people have made scripts to parse them.