Little excerpt of me playing my chaotic pointcloud system, in which the particles are being audioreactive to the incoming audio signal in real-time. What do you guys think?
Autechre's LA shows on Friday killed it. Spent 3 hours in a total mind haze. Had to get home and Max hard to keep the vibe goin, hope we don't have to wait another 10 years.
I plan to finish the game it in a few months and release it on Steam. It'll be a musical maze shooter. The RNBO integration in Unreal Engine is great, it works in the Metasound environment.
I'll keep adding bits and pieces to it but the core functionality is there. Full project pattr recall with dynamic patcher loading was a bit finicky but it seems pretty stable atm. Also, vst/au support :)
I just want to share some stills for an open source DSP pedal platform I've been working on, derived from Guitar ML's open source FunBox project.
The goal was get the project working with Max Msp Gen~, as that's my primary DSP programming language of choice, while also allowing for users to have swappable artwork for their pedals. This is achieved by using 3D printed panels with UV printed decals adhered to the panels. Which is then placed between the washers/nuts and enclosure itself.
The pedal comes equipped with:
- Stereo TRS input/output
- 6 potentiometers
- 3 threeway toggle switches
- 4 two way dipswitches
- 2 soft stomp switches
- 2 LED indicators
- ⅛” TRS expression pedal input
- ⅛” TRS MIDI input
- USB input port for Daisyseed
- 9V single barrel DC input
If anybody has any questions or concerns, please feel free to let me know!
The DeepScan module is now fully implemented within Max, ust like in the original Envion. It listens through your folders, uncovering traces, fragments, and hidden resonances. Together with DeepFolder, it transforms local archives into living sonic material.
This phase is complete and running beautifully. Next, the rest of the ecosystem awaits.
There’s also a small hidden detail somewhere in this video something subtle, but alive. See if you can spot it. 👁️
v1.1 => I fixed some typoes. You'll recognize an error by stricken out words and an italic correction behind it.
Max is an awesome visual programming environment which allows you to do some really cool things. But at the same time it's also kinda picky about how to do things and if you're not aware of these then... I'm sure it can quickly become a huge frustrating mess. Don't feel bad, we've all been there one time, myself included. Heck.. sometimes I'm still experiencing this during my [gen~] studies and experimentations.
So... why don't we dive into some Max basics and look at their "how's and why's"? Yah, one of the things I really dislike about many tutorials is that they'll easily tell you how important something is to know, yet then don't seem capable of providing any real examples to showcase this. Guess it wasn't as important as they claim?
Enough blabbering!
Data processing goes from RIGHT to LEFT
When I first started with Max I thought that I had it all figured out... see: many nodes which require multiple input values use the right inlet to 'prime' the node and the left to trigger its functionality. For example nodes for additions ([+ ]) or subtractions ([- ]).
But this goes much deeper than that, as you can see above. Signal processing in your patches is done from right to left, period (even though I used a comma there ;)). And as you can see above this is really how Max behaves.
And this can quickly become important the very moment you need to perform some tasks in parallel.
So here I'm having fun 'playing' with Live while also studying and experimenting with existing audio, in this particular case I'm working with Delicate Weapon, which - in my opinion - is one of the most amazing tracks within video gaming...
Back to Max: as you might notice I started with reducing the gain of the signal using the utility effect which gives me more room to play with this sound in Live. So now I'm toying with the idea to try a variable gain changer (don't ask ;)). But first I need to see if this idea is actually feasible.
So I grab the sound signal, I then check the dB value using a [levelmeter] which I then feed into my comparison node. Obviously I need something to compare against before I can do the comparison so.. as you can see I made sure to keep the first 'routine' on the right side, thus ensuring that this gets processed first. I even honored this mechanic again at the bottom of the meter: first I 'trigger' the numeric output and only then do I start converting my list into a usable (and comparable) signal.
Right to left...
So let's take that sentence above ("right to left") and do some Max comparisons. Yes, it's silly, but who cares? I trigger this patch by clicking on the [message] nodes on top. So first I grab the left and right words of the sentence using [zl.slice] and [zl.ecils]. As their names implies both these objects do the opposite of the other, this allows me to only grab the first and last words.
I then do the comparison using [zl.compare] which first needs something to compare against. You hopefully guessed it: this is why the [zl.ecils] node is on the right side, and also connected to the right inlet. All that's left to do is check the outcome and send the appropriate message. I know this will work because... right to left.
Another example... check the lower right side of the patcher.
Here's something useful to know about [message]: the right inlet is used to set its contents (any contents) but without triggering it. Because of that "non triggering effect" we refer to such inlets as cold inlets, also recognizable by its blue outline (hover your mouse over it and you'll see). The right inlet on the other hand triggers output, it also has a red outline to indicate this: a hot inlet.
So... I connected the output of [message] to both inlets of the other [message] and then checked what would happen. Why do you think this worked, hmm?
Once again: right to left. First the right inlet was used which primed the second [message] with my text. Then the left inlet got used which triggered the output.
Message types in Max
Programming in Max is done by connecting nodes together and then having these "do" something. These nodes interact with each other through virtual patch cables which are used to send messages and/or signals. Everything you send from one node into another is referred to as a message (or a signal).
Thing is though... there are a few message types and formats to be aware of.
Bang
First the small routine in the upper left corner: I connected a [button] to the right inlet of a [message], and as soon as I click this the word "bang" appears (as you can see). What gives? Well, bang is a special message type which is generally used to trigger nodes.
Need to get a [message] to send output? Trigger it using a bang in the left inlet. Done a mathematical operation but you need the results again? Send a bang into the nodes left inlet. In some cases any kind of input will trigger output, but even so... a bang is always the safest way to do that.
Lists
Generally speaking all messages which aren't a bang are lists. That is... unless you're working with specific signal types such as those provided by MSP or Jitter; you can see an example of that at the bottom of my screenshot. The yellow/black cords indicate MSP audio data, the blue/black cords indicate MSP multichannel audio data and the green/black cords are used for Jitter graphics data (edit: it's probably a bogus Jitter example, I barely use Jitter myself).
Ignore the part on the lower right side for now.
But everything that's sent between nodes using normal patch cords is essentially either a bang or a list.
The key here though is to keep in mind that data can be presented using different formatting. Take for example a string or a symbol, as I showcased above. Yet despite this specific formatting you can still process that data as if it were a list. Seriously: try using [zl.join] to group together two numbers, two strings or two symbols and you'll see what I mean.
Of course that would also be a completely wrong way to approach all of that, fair enough. There's a reason why we have a nodes such as [string.tolist], but even so... I think it's much easier to get your fingers behind behind these concepts by thinking about messages as either bangs, signals or lists using one or another formatting. At least for now.
Reference pages are your best friend
On a totally unrelated side note: Live 12's Meld and Roar devices can easily make a possible upgrade to 12 worth your while, these two have quickly become one of my major to-go-to devices.
But about references... learning about Max doesn't imply knowing about all the available nodes and what each and every node can do. Sure, there are some essential nodes to be aware of (more on that in a moment) but it's much more important to know the essential mechanics.
Essentials like messages (data sent between objects) vs. parameters (extra arguments to set default messagesproperties/attributes when adding a new object) vs. attributes (same as parameters, but these can also be changed dynamically). Oh, fun fact: an attribute is essentially also a parameter.
Or knowing that data processing is done from right to left. Essentials.
So... what if you come across a node which you want to use, but you're not fully sure how you can use it with your patch at hand? Or how about trying to find nodes which do something similar as the one you're working with now?
In all those cases you need to check out the nodes reference page.
The reference page will briefly tell you what a node does, what messages it supports and also what attributes you can use. Clicking on an entry will also show you a brief explanation of that entry. And finally, at the bottom of the reference page you'll find links to related nodes and sometimes also some tutorial examples.
There's a reason why all of this can be accessed using the sidebar of your patcher window you know ;)
Essential nodes to be aware of
Disclaimer: Max is a complex environment which provides tons of different ways to process your data. Therefor I am not claiming that these nodes will always become an essential part of whatever patch you make, all I'm saying is that you'll likely run into situations somewhere down the line where knowing about these patchesnodes will come in quite handy.
These nodes are marked in red above, case you couldn't tell ;)
loadbang => A Max patcher is usually triggered by messages going from top to bottom and right to left. But how to start all that? It's easy when you expect user input, but what if you need to prime your patch with some specific data beforehand? That's where [loadbang] comes in: it'll send a bang the very moment your patch is loaded (and more, check its reference page :P).
trigger => Sometimes you need to perform multiple tasks in order to handle your data. Sure, 'right to left' is a thing, but so are possible delays. If you need to ensure that signal(s) get sent out in a predefined sequence then [trigger] is your friend.
message => One of the nodes that's so easily taken for granted, yet can quickly become an invaluable part of your patches. Need to store a "variable" somewhere? Why not use a [message] node and set its "noclick" property to true just to be safe? Need to quickly check the value of some output? Debugging is an option, but a [message] node might be quicker to insert (and remove!). This can also become invaluable if you need to work with [send] and [receive] (= send data across nodes without using patch cords).
zl => This is your swiss army knife for handling lists, pretty much anything can be done using one of the zl variants. Need to know how many elements are in your list? [zl.len]. Or maybe you need to process a list and are now wondering how to use a for...next or while...then loop? Why not use [zl.iter] instead? Need to process the elements of a list one by one based on user interaction? [zl.queue] may be just what you need. When working with zl be sure to check out the "See also" section of its reference page!
defer => If you check the console in my above screenshot you might notice that 'sliced' is printed last, despite the fact that there are several more routines on its right side. Does 'right to left' suddenly present us with exceptions to the rule?! No, none of the sort: don't worry! This is caused by [defer]: it allows you to pause processing for a moment in order to make sure that other sections take priority. When performing specific tasks then [defer] and maybe [deferlow] can become quite important, though I want to warn you against (too?) casual usage.
print => Sometimes you need output, for one reason or the other. Well... here you go ;) Print picks up on incoming signals and will output their contents to the Max console.
select => Message routing is a thing. You don't need if...then statements to check if a message contains specific data, instead.. use [select] if you need to check for a value and then trigger other nodes; if there's a match then [select] will send out a bang. If there's no match then the input will be sent out the right outlet.
route => Route data through one of the outlets based on either message type or direct comparisons. Beware that lists can contain multiple elements, but only the first element is checked (and omitted if there's a match).
attrui, gesundheit! :P => ok, ok, sorry ;) bad pun. [attrui] will become invaluable if you want to quickly check up on the available attributes of a node, while being too lazy to open its reference page. 🤫 Ok, ok... even more serious then: this will give you a quick overview of all available attributes, including options to change their value, which can be quite useful if you need to expose those attributes to a user. Sure, you could make your own menu selections and what not, but why spent all that time if your device was meant for specific usage in the first place?
button => Once again an easily overlooked node. Button is very useful for receiving user input, but also to check for bang messages.
Now, we're talking about Max here so that's obviously the focus of this post. But being a vivid Max for Live user as well I'd also like to point your attention to the Live nodes. Many Max nodes have a Live counterpart. For example [button] and [live.button], [toggle] and [live.togge]. Often these nodes behave in the same way, and sometimes they don't.
And of course there are nodes which will become invaluable when interacting with Live itself, nodes like [live.path] and [live.object].
Use subpatchers to maintain overview of your projects
Max is somewhat of a low level programming environment; meaning so much that it'll require plenty of "steps" to get to a certain result, something which is often inevitable when working with audio data.
As a result patches can easily become quite large which may not be much of a problem when you're still actively working on said project.. but what about 6 months later? Or two years? Will you still be able to get your fingers behind the general design and flow of the patch?
This is a patch which I made years ago, back in the days of Live 8 / 9. It's used to study the so called Live Object Model which is essentially an API that allows you to access or control part of the Live DAW using Max for Live.
As you can see its decently complex, but despite that it's still relatively easy to see how this works thanks to the use of sub-patchers.
As you can see subpatchers are basically "mini patches" that reside in your main patch and can contain parts of your project. This allows you to save room and reduce clutter in your main patcher window, but also to separate internal functionality between separate sections. Heck, if you play your cards right you may even be able to keep such subpatchers self-contained so that you can re-use them as-is later in other projects.
Remember me mentioning earlier to ignore the lower right part of a screenshot for now? Back in the section about Max message types?
You can add a subpatcher by using the [patcher] node, or use [p] for quicker access, don't forget to specify a name using an argument (edit: though this is optional it'll help in the longer run). Inside the subpatcher window you'll need to use [inlet] and [outlet] nodes to add, well.. inlets and outlets to your [patcher] node. Those numbers shown above?
Keep in mind that you have no control over the sequence: inlets and outlets add up based on their left or right position relative to each other. So if you have 2 [inlet] nodes (or outlets) and then move the one on the left side towards the right side of the other node then both nodes will change their number.
Pro tip: use the `@cool` attribute to mark an inlet as 'cold', trust me: that can help improve reusability a lot.
Don't approach Max as if it were another language!
When inRomeMax... do as theRomansMaxians (??) do.
Even though I consider myself a rather die-hard Ableton Live user I also have plenty of experience with some other DAW's as well. I've been using Reason alongside Live through use of ReWire for most of the past decade. And now that this protocol has been discontinued I ended up replacing Reason with FL Studio; 'FLS' provides a VSTi which allows you to use the full DAW "inside" another. Maybe needless to say, but I know my way around these three DAW's quite well.
Somewhat (un?)related to the story I'd also like to mention Reaper. I have so much respect for that project, despite the fact that I use Reaper very sporadically myself. Sorry, had to at least mention it.
Now... the #1 problem when working with different DAW's that utilize different workflows is to use one as if it were the other. You can't do that. Well.. you can, but if you do so then you will run into problems sooner or later.
Thing is: this also applies to programming languages, and Max... is essentially a (visual) programming "language", though programming environment covers it much better I think.
Max has its own quirks and its own routines to work around certain issues or problems and because of that it's best to start using the Max environment with an open mind. Don't try to find matches between your favorite programming language(s) and Max because... it usually doesn't work that way.
Comparing two values
This subpatcher checks the length of the incoming list: processing is only done if the list has 2 elements, if not... nothing happens. If it does then the comparison is triggered by making [zl.group] output the list through means of a bang, the list gets split in two courtesy of [zl.slice] and then the comparison takes place.
Notice the use of [delay] to ensure that [zl.group] is ready to output? Or the use of the two [message] nodes at the bottom which basically serve as "variables" if you will: temporarily storing the two values after which one of them gets sent out. And of course [select] which basically acts as the "if" statement here.
See, I don't think in the likes of "if ... then", instead I break down my problems and build my patch accordingly. So... what needs to happen?
First check the length of the list. First means: this routine needs to go on the right side.
Second: only initiate the comparison if the first condition is met. This means: store the list somehow, somewhere, and 'manually' trigger output. [zl.group] is excellent for this, but [zl.queue] and [zl.reg] might also have been useable with a little extra work to trigger the output.
Third: store the individual values so that the highest can be sent out, as such [message].
Let's transpose our notes by one octave
We all do realize that MIDI is basically just parseable ascii data, right? Which is also where our lists become an invaluable factor. [midiparse] breaks down incoming MIDI data into more manageable chunks; the first outlet gives me a list which contains the pitch and velocity. So... I break the list down into 2 parts using [unpack], I add 12 to the pitch and then I re-assemble the whole thing and sent it out with the rest into [midiformat].
And yes, technically I didn't need to use the right inlet ("MIDI channel") but oh well, force of habit.
But notice how "right to left" is all over in effect here?
In conclusion...
Well, that covers my list of Max basics which I think you might want to know about. I'm running out of example ideas so I might as well round things up here ;)
Thanks for reading, hope you enjoyed and of course I also hope that this could be useful for some of you.
Now... if you'll excuse me... gf has food prepared... on my server.... in Minecraft :P (burp ;)).