Scripting Live

Share what you’d like to see added to Ableton Live.
Post Reply
Tobia
Posts: 10
Joined: Thu Aug 26, 2010 6:09 pm

Scripting Live

Post by Tobia » Mon Nov 16, 2015 8:51 pm

I've been experimenting with M4L, on a friend's computer. I love the way I can access the Live internal object model in M4L, to query and observe tracks, clips, instruments, and so on.

But I really despise the graphical programming style of Max. It's so slow and messy. Any programming language, from C to Scala, would be better than this mess. Or this. Or any other moderately complex "patch". On top of that, I used old versions of Max years ago, and Max 7 has managed to make it even harder to see the pretty boxes and lines.

Is there any scripting language that can access Live's object model and process MIDI events? Any programming language would do.

I know Live supports some plugin APIs, such as VST and AU, which are used by all the professional plugins, but as far as I can tell they don't expose Live's object model, so one cannot work directly with tracks, clips, and control surfaces.

I read somewhere that you can embed Javascript code inside a M4L patch and access the object model from there. But that code would run on a low-priority, single-threaded engine, so every part of it that touches real time data would still need to be assembled with boxes and lines.

Another option is to write a Max "external" in C and just put all the logic there. But if there was a way to avoid M4L altogether, that would be the best.

What do you say?
Last edited by Tobia on Sun Feb 07, 2016 6:49 pm, edited 1 time in total.

Angstrom
Posts: 14975
Joined: Mon Oct 04, 2004 2:22 pm
Contact:

Re: Scripting Live

Post by Angstrom » Mon Nov 16, 2015 9:13 pm

Tl;dr - Use the JS API.

I also find the boxes and wires method weird and impractical for programming. It's just odd, not an improvement, not quicker, not clearer. It's fine for connecting a filter to an envelope but not really the best method for representing a class, function, variable scope, arrays, whatever.

But yes - this short guide at http://compusition.com/writings/js-live-api
Is what you need. I don't do a great deal with Max, and I haven't because it seemed super weird to try and program with boxes - neither a simple modular DSP environment nor an IDE. " Caught between two stools" as the phrase goes. But once I could simply write script for it - it all became a lot less painful .

In the more recent version of Max they have included a require/include method , so you can have your toolbox of classes and functions available. That helps keep things tidy.

Tobia
Posts: 10
Joined: Thu Aug 26, 2010 6:09 pm

Re: Scripting Live

Post by Tobia » Thu Nov 19, 2015 12:43 am

Thank you for that pointer, it's a great introduction.

I spent the last few days learning the JS API and trying to make my Launchpad interact with my clips. But the JS API is very messy and not well documented at all. It's also not very responsive. It's clearly executed in a background thread.

The effort needed to code using Max as an IDE, with an undocumented API on top of it, is just too much.

Project aborted.

I'll leave this wishlist here for Live to provide a proper scripting language.

Post Reply