Learn How to Build Your Own Max for Live Devices

by nijaruon 1/24/2024, 7:24 AMwith 22 comments

by kallistisofton 1/24/2024, 10:17 AM

Max4Live is what got me into Ableton, it also got me out of Ableton...

As someone who had been using PureData for quite a while the idea of having that kind of development environment integrated into the DAW was super exciting, unfortunately the actual implementation leaves a lot to be desired; personally the final straw was when I realized that the Max process space was global to Ableton so that global variables would leak between devices (no sandboxing)... This may have been addressed in further releases as I was a very early adopter, but all of the other issues pointed out by the other posters still stand.

If you're looking for a platform agnostic alternative to Max4Live there is PlugData[0] which is a VST implementation of PureData -- the open-source origin of Max and created by the same authors.

And there is the Grid for Bitwig[1] which offers a modular graph based MIDI/DSP programming environment that runs at audio rate and is fully integrated into the DAW as a native solution! The Grid is somewhat limited as it isn't extensible, but it supports >95% of common use cases and is used internally to build Bitwig's native devices. Hopefully in the future Bitwig will extend it's open API surface to include building custom Grid modules -- in the meantime PlugData is perfectly acceptable patch for doing unusual logic calculations and doing left-field things like interfacing with robotics :)

[0] https://plugdata.org/ [1] https://www.bitwig.com/the-grid/

by iainctduncanon 1/24/2024, 3:43 PM

Of possible interest here, I wrote Scheme for Max, which lets you use S7 Scheme in side Max, and hence, inside Lisp. I use it to make Max for Live devices in Scheme!

It's fantastic for controlling the Live API because the way the Live API works is you identify things you want to control with lists of symbols. This is far more pleasant in Scheme than either in Max, JS, or Python (your other options in Live, though Python is not officially supported for non-device vendors).

While Live has many warts, and I wouldn't want it to be my only DAW (I also use Reaper), the Live API lets you do things you can't come close to any other pro audio software (yes, including bitwig and reaper). Being able to have my sequencers interface with the entire app is incredibly powerful.

Here's the project page and youtube page if you want to check it out:

YouTube: Hacking Live with Lisp https://www.youtube.com/watch?v=j0sKBA-Pv2c

Scheme for Max on Github: https://github.com/iainctduncan/scheme-for-max

I also ported csound~ for Pd to Max so one can mix csound in with Scheme and Max seamlessly. https://github.com/iainctduncan/csound_max

by bowsamicon 1/24/2024, 8:04 AM

Max and Max for Live are both great, though I do wish for something more like a normal programming API. I own Max and have loved to use it but dealing with the fact that it's a visual language can be very painful. I know a lot of people who just moved away from Max to JUCE, which is a C++ framework for writing VSTs, AUs, etc. The problem is that in that case you lose a lot of the power of Max for Live, since Ableton Live only exposes its deep internal API through Max for Live. It's a huge shame there isn't a C or C++ API for Ableton Live.

I don't really use Max that much anymore, since ultimately the benefit is that it's supposed to be easier to use than C++, but I find that really hard to believe in my experience. Another supposed benefit was supposed to be that Max came with a bunch of UI and DSP stuff built in, but they seem to have now neglected that aspect of the software and instead creating new projects like gen~ and RNBO (I'm not sure what the point of RNBO is). The thing is, JUCE gives us all the stuff that it was cool that Max came with 2 decades ago, plus more, while being less buggy and able to create production quality plugins.

I think the ultimate staying power of Max is simply due to it having aesthetic weight in the artistic community. It's still the "cool option" for the interactive art exhibition crowd. Other than that, the only thing really keeping it alive is Ableton...

Max is still a great piece of software, but these days, just learn to code.

by MrScruffon 1/24/2024, 9:06 AM

I'm familiar with node based development environments in other domains (VFX) and when done well (eg. Houdini) they can be much more efficient than solving creative problems with Python or C++. So I expected to like Max, but in practice found it pretty unintuitive. Complex devices I've written end up doing as much as possible in JS, but the bridges to Ableton are pretty rickety and while you usually can find a solution eventually, it's not a fun process. I prefer Reaktor, but that has it's own set of issues and isn't really evolving at any pace.

In the end I shifted to doing as much as possible in Eurorack which feels a much more creatively enabling and stable platform, relegating Ableton/Max to covering what's left.

by odirooton 1/24/2024, 10:41 AM

I really wish Bitwig had similar capabilities.

Yes you could quite easily write plugins nowadays but you can't really embed them into the DAW itself, using floating windows instead. And you can't really make them look native easily.

OTOH you can create Grid devices but they're not as sophisticated as Max. And you can't explicitly code them.