For the most part I’ve moved over to using live.objects, which can look pretty smart (and not Max-like), though I think you can do a lot with color, layout, and typography (mlrv was a big inspiration for the look of TPV, especially the Setup window).

I did mess with custom on/off indicators and things like that at one point, but abandoned it. So it’s really just about restructuring the space, and then getting into the things you mentioned in your email, establishing a visual/interaction hierarchy.

1 Like

@jasonw22
I would like to encourage you on this topic.

I started teaching CoreAudio on macOS last semester, and this semester I am teaching AudioUnits. I assume that the techniques are very similar to C externals for Max/MSP and Pd, although I have no experience with the latter.

One huge side-effect of teaching is that I find myself thinking about how to teach the broader concepts of structured programming, procedural programming, and object-oriented programming - possibly more than the audio concepts that somehow seem simpler for someone with studio patching experience. Whether the language is Objective C, C++, or plain old C, I find that I always think in terms of objects and the high-level system design. The way that the pieces fit together, and the sharing of information and configuration, is actually way more powerful than the choice of language (although some languages make this easier or harder than others).

Personally, I find that I think in Objective C. At least that’s how my design is constructed in my thoughts. But implementation in standard C or C++ is sometimes chosen based upon the restrictions of the environment, e.g., AudioUnits must be written in C++; user interface must be written in ObjC; certain other pieces, particularly firmware, must be written in standard C.

If you’re written up anything that you’ve learned since starting this topic, please reply with some links. I believe it’s a good thing to be very conscious of design.

Brian Willoughby

Oh… so much to respond to in this thread… Sorry for what will be one of my longer missives…

First, imagine my surprise to wake up to a thread named after a debate that was still raging when I learned programming 40 years ago. Yes, there was a time when people argued about the value of “structured code”.

Max has always failed the “Princess Bride” principle for me: The code often “doesn’t mean what you think it means”. I think this is because, beyond the basic atoms, the constructs don’t have simple effects, easy to reason about. Inserting a send/receive is an example that you want to be able to note, and erase from your mental model of the patch - but you can’t because it affects message order, which is another difficult, global effect in the system.

There’s a long history of visual programming systems, and for the most part they have failed as general programming solutions. The only real successes one can point to are Max and Scratch, both fairly domain specific. The large hurdles remain abstraction, and data structures - and after decades of development (I remember Dan Ingalls’ and Jaron Lanier’s efforts in the 80s) - there is still no breakthrough. As prior comments attest, these remain the pressing problem in larger Max systems.

Two of the main arguments against “structured code” back in the day were:

  • We can’t afford to waste memory and CPU on standardized looping constructs over hand crafted code.
  • A programmer can better express program flow as they understand the whole problem.

Modern programming has destroyed all that: We have plenty of CPU and memory (for 99.99% of tasks), and no one programmer writes everything any more. As such - coding for clarity, robustness, and reusability generally top all other concerns. As a professional programmer, these concerns are always first. But when we are programming for our personal aims, these need to be first too: Even this kind of programming is no longer a personal endeavor: We open source our code, build on other code frameworks and libraries, and hope people will examine what we do.

Saddly, the call outs from Max are C and Java, and JavaScript. C, by modern standards, is weak in the abstraction department. Java seems now deprecated for Max - and I won’t miss it. JavaScript has the best promise, but well structured code in JS takes almost as much discipline as Max: As a language it was only designed for programming in the small. Compounding all this difficulty is that getting into and out of the language in question is a significant amount of work, which leads away from building the thing at hand.

So where does this leave us? Max does well at audio signal chain, and somewhat well at UI objects that reflect state… but when it comes to control and structure - both of code and of music - I find it totally unworkable. Sorry Max, I can’t bring myself to code anything complex in you.

For myself, my current project is a live-performance oriented percussion sequencer controlled by grid controllers. I am coding it in Haskell: Functional (the current forefront of programming systems), highly concurrent (good for real-time and music), and built to support abstraction in the small and in the large. It will present MIDI in/out ports so I can connect it to other things.

Where I’m looking for better integration with Ableton Live, I will do it via remote scripts: Python is moderately better at larger code, and the Live API is much easier to use from Python than via Max (or even JS via Max). I’ll have to plumb some connection between the Python and the Haskell (probably an OS pipe or perhaps a TCP socket)… which is sad, but frankly seems less awkward than building this thing in Max.


Sooooo… anyone know what the programmable extension environment in Bitwig looks like…?

6 Likes

Much much much better documented than the same in Ableton Live.

A starting point:
https://www.keithmcmillen.com/blog/controller-scripting-in-bitwig-studio-part-1/

That’s always been my experience with Max as well, which is why I’ve never done anything serious with it. I know other artists have been willing to fight with it long enough to make something workable, but as a professional programmer I give up in frustration long before I reach that point.

I prefer Supercollider, even though it has its own warts, and doesn’t have nearly as strong of a UI toolkit.

1 Like

Have some other things to get through first, but when I return to this thread, I’ll write a bit about DSP for macOS/iOS apps, and maybe a bit about DSP for microcontrollers.

Controller scripting is relatively simple by comparison, and I’m honestly less concerned at this moment about how that happens, although I am very curious to learn more about @mzero’s Haskell sequencer (Haskell in general has really started to intrigue me since recent adventures with Tidal). I’m probably also more interested in DSP at the moment simply because it’s my next frontier for music-related programming, it’s something I’ve never really attempted before.

Are you going FRP for the Grid UI? Or a more traditional event loop?

When I bought my 128 one of the potential uses I had in mind was to use it for experimenting with FRP in Haskell. Perhaps once I’ve dragged myself out of the embedded C hole I’m in I’ll actually get round to it.

I’m afraid I haven’t really been following this thread (I despise visual programming). But Haskell is really composable, you could easily write a MSP style inlet / outlet DSL in it. It’s a shame it’s such a royal pain in the backside to learn…

3 Likes

A colleague just pointed me at Luna. Haven’t had time to look deeper than the marketing landing page, but it seems worth investigation time. Design wise it looks an awful lot like Audulus.

1 Like

Ooh, that looks interesting! Also reminding me of Lighttable, which itself was inspired by Bret Victor’s many essays and presentations.

Some good ones:
http://worrydream.com/LearnableProgramming/
http://worrydream.com/MediaForThinkingTheUnthinkable/

Quick note, looks like Luna is in private Alpha, you can’t just download it and try it out. Definitely not a fan of “private alpha” for a programming language. I’m heavily biased towards open source languages.

1 Like

If they’re still in a language design phase it might make sense? You don’t want people writing production code before you’ve frozen the design.

I guess I don’t have a good counter example of an open source language developed in the clear. Most are developed by one or two people, then released fully formed and then iterated on as FOSS. Given Luna looks like an IDE and a language, I guess it makes more sense to have an alpha.

1 Like