Check out Bitwig. Some ex-Ableton engineers split off to rewrite Ableton using modern programming techniques. It has a public JS API for controlling anything in the GUI. Also, has a modular synth mode called the grid (which is similar to Max, but more like eurorack)
Bitwig gives you no access to their DSP technology in its scripting language, so it is not remotely comparable to Max in that regard.
Max, on the other hand, gives you no access to Ableton's UI or API.
I have both, but prefer Bitwig. But there is nothing out there quite like Max. Not even Reaktor covers the same territory.
I am hoping that the next big thing in Bitwig will be to open up their DSP API, and give us the ability to create our own Grid modules, and, beyond that even, our own native instruments and effects. But I do not believe that extending their Javascript API is the way to do this.
I remember reading the book by Miller Puckette about DSP as applied to music, featuring examples in PureData, some 10 years ago.
Back then, I thought that PureData was the open-source version of Max, while Max offered basically some polish and GUI conveniences. But now, I read about Max much more often than PureData.
What it doesn't give you, however, is access to the control surface internals, i.e., to create new control surface "drivers" inside Ableton itself. But of course, that's currently the ONLY thing Bitwig lets you do with their API.
I just got into learning music production and have been using Bitwig 8-track that came with my baby synth. I love it so far, honestly just for the aesthetic and the little tool explainer that appears at the bottom when you hover over anything.
If I stick with this for long enough I’ll spring for the full version but $400 is a steep price.