Generate at scale
Inclusive ranges, stepped loops, numeric conditions, and interpolated expressions create consistent banks without copy/paste drift.
for voice in 0..31 { ... }
TEXT → PATCHER
maxforge compiles a compact DSL into valid .maxpat files.
Use loops, conditions, and arithmetic for the repetitive object creation
that Max's visual editor handles poorly.
Unofficial software. Not affiliated with, endorsed by, or sponsored by Cycling '74.
for i in 0..7 {
osc_${i} = cycle~ ${110 + i * 27.5}
amp_${i} = *~ 0.125
osc_${i} -> amp_${i} -> dac
if i < 4 {
meter_${i} = meter~
amp_${i} -> meter_${i}
}
}
00 / QUICKSTART
npx maxforge@latest compile input.maxdsl -o output.maxpat
npx maxforge@latest validate input.maxdsl
01 / DSL
Names become stable Max box IDs. Connections stay explicit. Layout can
be automatic, pinned with at(x, y), or preserved as a full
rectangle with at(x, y, width, height).
Inclusive ranges, stepped loops, numeric conditions, and interpolated expressions create consistent banks without copy/paste drift.
for voice in 0..31 { ... }
Build .maxpat from DSL, or decompile existing patch structure and positions back to editable text.
Define subpatchers inline, or register reusable abstractions and third-party externals with a strict project catalog.
Emit compressed patch text for the clipboard when a file is unnecessary.
CLI reference →02 / LIVE CONTROL
The MCP server compiles desired DSL and sends ordered plans to one native
maxforge.sync object in each patch. The external inspects and
mutates through the Max SDK—including text, comments, and bounded changed
box/cord attributes—without a JavaScript bridge or screenshot.
Project-scoped edit evidence can survive MCP restarts without treating
filenames or window titles as patch identity.
Run the published server directly with npx. Node.js 20 or newer is required.
{
"mcpServers": {
"maxforge": {
"command": "npx",
"args": [
"-y",
"--package=maxforge@latest",
"maxforge-mcp"
]
}
}
}
Protocol v1 validates complete plans and reverse operations before mutation, then attempts managed-graph recovery after a failure. It is not transactional: inspect after every error before retrying.
03 / INSTALL
Use for DSL compilation, decompilation, planning, and the MCP server.
npm install maxforge
Use for native maxforge.sync live inspection and mutation. Includes help, reference, docs, and examples.
Install offline authoring or stricter live-control instructions for compatible coding agents.
npx skills add 2bbb/maxforge
SOURCE-CONTROL THE BORING PART