Counter is a nice app to trigger MIDI sequences.
However, I suggest you don’t use it; it sorta breaks the mouse.
One of very 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.
You could instead use a non-mainstream DAW. These often do have scripting languages. 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.
Build your own plugins
This is the best option; there are many audio frameworks/languages that do this, such as csound, faust, Juce/c++, and so on. However, these lack the ability to control Ableton back; the control flow is mostly one-way. Even, e.g. synchronizing with the host can be harder.
So, let’s say you really want to automate Ableton in some new and exciting ways.
Max for live
Max4live is API accessed only through a clunky “arty codey” quasi programming language MaxMSP, whose chief selling point is that it is probably Turing complete. Although if Alan Turing’s had modeled his famous Universal Machine off MaxMSP, the paper tape would have been on fire.
- sync with supercollider: atk.scsync handles tempo-syncing with supercollider. You can use Jack to plug the two together, and ignore the worst of Ableton.
- Sebastian Tomczak is a patient saint who creates wonderfully simple hacks using Max and Live, probably hundreds by now, and they all do simple but wonderful things that do not involve butting against the limitations of the platform.
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.
- String values are returned with quotes in the string. Set the value of a LiveAPI path and then get it back again. You’ll find it is still a string has decorative quotes stuck it, which you then have to remove before you do parse it, or even submit it to the same API again. Why? Who will ever be made a happier person by this?
- Float values are returned as some kind of object which looks like a number, but fails if you do arithmetic. So you have to cast your float return values to floats to use them. Maybe they are strings? Who knows? The docs don’t. And anyway, why would an internal API only return strings? The simplest explanation I have is that it is always returning me strings then sloppily casting them to floats sometimes, but why the hell would a high-performance DSP program handle floats by casting them to strings sporadically when reading values? The mind quails; I will pretend it is not so. I guess the quotes are there to tell you that the API looks typed, but is JSON, merely to rub in how it would have been no harder for them to expose it as an open web service, but they didn’t because they want to shamelessly up-sell you, and are reveling in that fact.
- Lots of details are just badly thought out. Such as:
- throwing errors doesn’t do anything useful. Try it out.
|||Were it not for Max For Live, there would be no scriptable mainstream audio production tools at all. This, in an age when even word-processors have macros. I could draw comparison with the degree of repetitiveness in modern techno and in modern bureaucracy that this implies, but that would be petty. Anyway, it means more jobs in techno that have not yet been automated away.|
|||wrote that in 2013, haven’t checked it since then. Based on experience, even if this bug is gone, it will have been replaced by others equally dire.|
The alternative. LiveOSC is really poorly documented, but definitely a real thing, and far and away the most convenient way to access Live. 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 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.