Articles

CNMAT ODOT: Tools for OSC and beyond

It's the dog days of summer, a great time to go digging through the package manager for some new tools to add to your Max toolkit. Today I'm going to share one that holds a special place in my heart and was recently added to the Max Package Manager — CNMAT's ODOT.

When I first learned Max, I was in an algorithmic composition course taught by a visiting scholar from CNMAT, Matt Schumaker. Naturally, that meant I started out my Max journey with the full set of CNMAT externals. Any time I'm without the objects, I notice just how integral they are to my patching!

In this article, we'll take a look at two quick reasons to check out ODOT in particular:
1. the OpenSoundControl object
2. o.expr.codebox

Open Sound Control

At its core, ODOT works with the Open Sound Control (OSC) protocol, a flexible data serialization protocol that is used throughout the computer music world, such as with monome grid devices and the TouchOSC iOS application. OSC uses UDP networking, so to use OSC with native Max objects, you can use udpsend or udpreceive objects.

However, as you might have learned from the help patcher tabs of those native Max objects, those objects contain only a subset of the features of CNMAT’s OpenSoundControl external available in the ODOT package.

If you open the OpenSoundControl help patch, you’ll see all of the capabilities available, including debugging options, time tags, type tags, and much more. I’m particularly a fan of the string substitution options available.

If you spend any time at all sending and/or receiving OSC messages, this object is worth checking out.

o.expr.codebox

I suspect some readers are like me and sometimes just want to sprinkle in some codeboxing into non-gen~ patchers. The o.expr.codebox is an easy way to write out procedural code directly in the patch without whipping out a js or node.script object. Besides evaluating mathematical expressions, o.expr.codebox is capable of performing recursion, working with dynamic OSC addresses, handling conditional operators, and more.

In this quick example, you can see how easy it is to grab the minimum and maximum values of a multislider without using a single zl object.

There are dozens more useful built-in functions besides the extrema function in this example, and each has its own help patch readily available in the o.expr.overview.maxpat documentation.

If you’re not in the mood to write any code yourself, there are clever examples available that you could easily grab and incorporate into your own patches, too. One of my favorites is o.demo.cellular.automata.maxpat for visualizing cellular automata:


Now that you’ve seen two of the reasons I am constantly reaching for ODOT, I hope you’ll take the chance to give it a whirl yourself. Follow along with the package's extensive built in tutorials or play around with their examples and see what speaks to you!

Happy patching!

by Isabel Kaspriskie on August 3, 2021

Creative Commons License
Namakemon's icon

Thanks for this article, I had a small "eureka" moment when I checked the resonators~ example from the overview, and saw the "excitation signal" was simply a noise~ generator.

I was like "Of course! With noise you have "material" to resonate for several resonators in all freqs!".

Totally changed my perception of what "resonators" could be used for, creatively.

(I had already noticed the "Noise section" in Collision/Chromaphone was just a noise osc with ADSR envelope, hence Corpus with any synth's noise osc allows some nice stuff that is harder to do even with the newer AAS Chromaphone versions, but I still Live's Resonators was still unloved here. Obs: IMO a sine wave single "pulse" is pretty much the same as Mallet excitator in Collision too.)

And that's just one tiny "bog standard" example in that package.

I come to Max from Live and M4L and since I started digging into it I always marvel at the HUMONGOUS quantity of interesting knowledge semi-"hidden" in Extras, Help>Examples, Paste From, etc. in Max.

(Thanks to the package creators too, of course.)

Federico Visi's icon

Thanks for the article, ODOT is great! Once one gets used to the scripting language of the codebox handling complex patches and data streams becomes a lot easier.
I use ODOT a lot in a gestural interaction design and machine learning package I have designed, here are some YT tutorials and the GitHub repo:
Tutorial 1: https://youtu.be/Dace1sHy1IM
Tutorial 2: https://youtu.be/GoNqiCvVgoY
GitHub: https://github.com/federicoVisi/GIMLeT

Benjamin Lavastre's icon

Hello,

Is there a new version of the osc-route object for MAC with ARM architecture?
Thank you

Federico Visi's icon

You can find the latest builds on GitHub, the latest release supports M1 architectures: https://github.com/CNMAT/CNMAT-odot/releases

Benjamin Lavastre's icon

Thank you very much!