Insight · 8 min read
What is Gen~ and How Dubby Uses It
Gen~ is the Max/MSP export format that turns a visual patch into embeddable C++. See how it works and how it powers every algorithm running on Dubby.
Max/MSP and the Visual Patching Paradigm
Max was originally created by Miller Puckette at IRCAM in 1988, making it one of the oldest and most influential tools in computer music. Puckette later created Pure Data - an open-source sibling to Max that shares the same visual patching philosophy. Today, Max/MSP (now developed by Cycling '74) remains the go-to environment for experimental audio software. Musicians, sound designers, and researchers use it to build custom audio tools by connecting visual objects - oscillators, filters, delays, math operators - with virtual patch cables.
Enter Gen~: From Patch to Code
Gen~ is a special environment within Max/MSP that compiles visual patches into optimized, sample-rate C++ code. While standard Max patches run on a scheduler with some overhead, Gen~ patches run at the audio sample rate - every single sample is processed by your code. This makes Gen~ ideal for low-latency, high-performance DSP.
The key innovation: Gen~ can export its patches as standalone C++ code. That exported code doesn't need Max/MSP to run. It's just pure, portable DSP - and that's exactly what Dubby runs.
How Dubby Runs Gen~ Code
When you design an algorithm in Max/MSP using Gen~, our Dubby Max Patcher lets you build, compile, and flash it directly to Dubby with a single click from within your Max patch - as long as you follow our simple naming and routing conventions. The patcher handles exporting your Gen~ code as C++, compiling it for Dubby's ARM processor, and packaging it with metadata like parameter names, ranges, default values, and display info. The result is an algorithm file that Dubby loads and runs natively.
This means the DSP runs bare-metal - no operating system overhead, no garbage collection, no scheduler. Just your audio code running at 48kHz with sub-2ms latency from input to output.
Why Gen~ (and Not Something Else)?
We chose Gen~ because it hits a rare sweet spot: it's accessible to visual thinkers (patch cables, not text editors), it produces production-quality DSP code, and it has decades of community knowledge behind it. FAUST, Csound, and SuperCollider are all great - but none of them have Max's combination of visual workflow and code export quality.
That said, Dubby's architecture isn't locked to Gen~. You can also build DSP in C++ with libDubby. The algorithm format is documented and open, and the roadmap includes support for additional code sources.
Getting Started with Gen~
If you're new to Max/MSP, Cycling '74 offers a free trial and extensive documentation. Their Gen~ video tutorial series is a great place to start - build a simple delay or filter, then compile and export it with the Dubby Max patcher to transfer it to your Dubby. If you want to share your creation with other Dubby users, upload it to Dubby.Studio where others can flash it directly to their Dubbys. The full workflow is documented in the Max/gen~ export documentation.
For a deeper dive, we highly recommend Generating Sound and Organizing Time by Graham Wakefield & Gregory Taylor - it's a brilliant resource that we all use at the office. And the community Discord is always ready to help with your first patch.
Connect with other Dubby users building algorithms in Max/MSP and Gen~. Share patches, ask questions, and get help with the Dubby Max patcher.
Keep reading
Insight · 9 min
Gen~ vs FAUST for Hardware Audio DSP
Visual patching vs functional programming - two paths to the same C++ output. Here's how Gen~ and FAUST compare for embedded audio DSP.
Insight · 8 min
Run Pure Data Patches on Dubby: plugdata & the Heavy Compiler
plugdata is Pure Data with a modern editor, and both are free. Here's the difference, and how a patch becomes an effect running on hardware.
Tutorial · 6 min
Getting Started with Dubby
Unbox, plug in, and start processing sound. Everything you need to know to go from zero to your first patch in minutes.
Insight · 5 min
Open-Platform Music Hardware: Why It Matters
Closed ecosystems lock you in. Transparent instruments set you free. Here's why it changes everything for musicians.
Insight · 8 min
Eurorack vs Standalone Effects Processors
Total control vs instant playability. Here's how Eurorack and standalone effects compare - and where the lines are blurring.
