Hacker News new | past | comments | ask | show | jobs | submit login
Learn How to Build Your Own Max for Live Devices (elphnt.io)
32 points by nijaru on Jan 24, 2024 | hide | past | favorite | 22 comments



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/


I love Pd, and think plugdata is great, but it should be mentioned that it's not really an equivalent of M4L devices - it does the audio processing side, but none of the DAW controlling side.

(I wrote Scheme for Pd, which puts a scheme interpreter in Pd)


Max was started in 1985 but PureData wasn't until 1996.


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


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.


Is it great? I've never liked it. It has downsides of assembly programming, like unnamed (but persistent) values stored in temporary "register" slot output pins, some additional own-goal downsides like "significant whitespace" of the positioning of wires and port output ordering, and all of the downsides of an oldschool scripting language like TCL, with terrible performance characteristics, buggy implementation, an editor that crashes pretty regularly in normal use, and incomplete documentation.

In the long history of Max, I can only think of a couple of things I've liked that were made with it, and they were both for Max for Live. I think the fact that they were made with Max was just incidental — it's the easiest way to add MIDI effects to Live.

(For anyone who answers with "but you can just write JavaScript now to do everything in it" — running MIDI events through its JS nodes defers the events to the non-timing-critical thread, ruining the timing of the MIDI events.)


Well, it is great, just not great for you. :-) It's a low code environment built to allow non-developers to develop! It is undoubtedly great for many, many people.

BTW, my Scheme for Max extension does run in the timing thread, if you want to write sequencing code in Max. I basically did the same thing they did with JS (lock it to one thread) but let the user choose the thread and let the user control when the GC runs. It works suprisingly well for sequencing - locks in with Live completely if you trigger things with plugsync~


I don't know any non-programmers who can successfully use it to make anything that isn't a glitchy mess. It's not really a low code environment. It's a "code but it's in squares with lines connecting them" environment. You're still writing code, but unlike some systems which can successfully use this model to try to make some parts easier, it's made much harder because of how much hidden, weird, and counterproductive stuff Max does. I had a much easier time teaching people to use ChucK or just C. Of the people I've showed Max and something else, everyone preferred whatever the other thing was.

Your thing sounds cool, though.


Well I agree that programming Max is weird. And if I didn't like code better, I wouldn't have made Scheme for Max or the csound~ max object. :-)

But... we teach max to a high level at the university where I'm doing my Phd in music and CS, and I have seen tons of great stuff built with it by non-devs. I would argue Max is counterintuitive to programmers. My experience with non-coders is that they take to it usually better than to things like Chuck, Csound, SuperCollider, etc.

As a programmer, Max and Live provide me with an outer container layer and environment that is far more productive compared to code-only. but this of course depends on what you are trying to do and how you like to do it!


I addressed all those points in my post, some implicitly and some explicitly, did you read the whole thing? I really don't think it was too long for you to read...


Which post? Is the original articles yours? It doesn't mention anything I complained about. I don't see anything about the crashes, the bad performance, the bugs, the incomplete documentation, the design problems with the significant whitespace and unnamed values stored on output ports. I'm confused by what you've said.

Edit: I think you just meant your comment. I don't really see those things mentioned there, either.


My post implicitly addresses those things, hence my comparison to C++ and my complaints about it. It seems like you only read "Max and Max for Live are great" and got upset. Please read my posts more charitably in the future. It's fine for you to add extra information, but you must do so in the context of agreeing with me, not disagreeing. It is rude to be like "how is what you said true? I'm going to repeat what you said back at you"


What? I never disagreed with you, except for your opening statement of "Max and Max for Live are great," which you provide no further reasoning for in your comment. And I agree with most of the rest of your comment.


If you start your comment with a disagreement then why would I read the rest of your comment as an agreement if you did not state so?


If you can realize that your opening statement was a 'backhanded-compliment' towards MAX, you would see that you both functionally said the same thing.

"It's great, but..." and "Is it great?" both convey the message that MAX gets a lot of praise/recognition that maybe isn't deserved or warranted, at least anymore. They're much more in agreement than disagreement when taken full context.


Yes, that's what I'm saying


See my top level reply on Scheme for Max. By I have managed to hide the Max bits when working in Scheme so one gets essentially a Scheme api for Ableton. I have plans to release more features for this when Live 12 goes public...

As someone who works in all spots on the spectrum, I would personally never say "just learn to code". My music rig includes Live, Max, C code, Scheme, and eurorack. There are parts in each layer that are vastly more efficient to do in that layer. (Many years ago I did do it all in code, and wouldn't go back)


I love max, though I haven't used it since it got the upgrade from the old black and white UI. One thing I really liked about it is you can combine visual programming with procedural code, you can add boxes which process inputs using javascript code


JS code is not processed at audio rate. Would be a total gamechanger if it was


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.


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.


Maaybe you'd find https://ossia.io interesting :D




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: