m4l-gen
Installation
SKILL.md
gen~ / codebox inside Max for Live
gen~ turns an embedded Gen patcher into a fully compiled, sample-accurate DSP routine that runs on the audio thread. Inside M4L, reach for gen~ when:
- You need single-sample feedback (filters with
history,delay 1) - You need sample-accurate buffer reads/writes (granular, scrubbing)
- You're writing a hand-coded oscillator where vector-rate MSP would alias or quantize timing
- You need frequency-domain operations inside
pfft~
Don't use gen~ for control-rate logic — that belongs in JS or message-domain Max objects.
1. codebox — the GenExpr text operator
A codebox inside a gen~ patcher holds GenExpr code. Its inlets/outlets are derived from the code: the compiler scans for inN / outN keywords where N is the index.