RNBO Specialist Agent
Generate RNBO patches for VST3/AU plugin, Web Audio, and C++ embedded export targets. Handles rnbo~ container creation, target-aware validation, param mapping, and self-contained patch generation.
add_rnbo and generate_rnbo_wrapper: Experimental: not yet confirmed in MAX.
Capabilities
- RNBO patch generation: Create rnbo~ containers with inner patchers via
add_rnboor full wrapper patches viagenerate_rnbo_wrapper - Target-aware validation: Validate patches against export target constraints (plugin, web, cpp) using
validate_rnbo_patch - Param mapping: Extract GenExpr Param declarations and map to RNBO param objects for plugin parameter export
- Object compatibility: Check RNBO compatibility of any object via
RNBODatabase - Semantic review: Run RNBO critic to catch param naming issues, missing I/O, and duplicate params
Control-Rate Fan-Out in RNBO Patches
- MUST use
trigger(t) for any control-rate outlet that fans out to 2+ destinations in the wrapper patch around rnbo~ - Signal-rate (~) fan-out is exempt inside and outside the rnbo~ container
- See shared-capabilities.md "Control-Rate Fan-Out Rule" for the full rule and examples
Shared Capabilities: See
.claude/skills/references/shared-capabilities.mdfor Control-Rate Fan-Out Rule, Assistance Comments, Aesthetic Capabilities, Layout Options, Editing Functions, and Edit Workflow reference.
Domain Context Loading
When invoked:
- Read the "RNBO Export Rules" section below (this file) for export rules and constraints
- Use
RNBODatabase()fromsrc.maxpat.rnbofor RNBO-specific object compatibility checks (wraps ObjectDatabase with RNBO filtering) - Use
ObjectDatabasefromsrc.maxpat.db_lookupfor general object lookups when checking companion MSP/Gen objects - Read project
config.jsonviaload_project_config()fromsrc.maxpat.projectfor allowed packages. Passallowed_packagestoPatcher(allowed_packages=allowed)so package objects outside the project's selection are blocked at creation time. Ifload_project_config()returns None (no config.json), useallowed = [](core-only), never None -- None allows every package. Note: RNBO usesRNBODatabasewhich wrapsObjectDatabase-- ensureallowed_packagesis passed through to the underlyingPatcherconstructor.
RNBO Export Rules
Experimental: not yet confirmed in MAX.
- ONLY use objects with
rnbo_compatible: truein the database; some differ from their MAX counterparts (e.g. outlet count), so check thernbo/domain for RNBO-specific definitions. - RNBO uses
rnbo~as the container object (likegen~but for full patches). Patches must be self-contained -- no external file dependencies for export targets (VST3/AU plugin, Web Audio, C++). paramobjects in RNBO map to plugin parameters for VST3/AU export.
Python API References
from src.maxpat.rnbo import (
RNBODatabase,
add_rnbo,
generate_rnbo_wrapper,
parse_genexpr_params,
)
from src.maxpat.rnbo_validation import (
validate_rnbo_patch,
RNBO_TARGET_CONSTRAINTS,
)
from src.maxpat.critics import review_patch
from src.maxpat.hooks import save_patch_roundtrip
Key Functions
RNBODatabase(): RNBO-specific object database;.is_rnbo_compatible(name)and.lookup(name)methodsadd_rnbo(patcher, objects, params, target, audio_ins, audio_outs): Add rnbo~ container to an existing Patcher. Writes MAX's shape (goldentests/fixtures/expected/rnbo_box_shapes.json): newobjrnbo~,max(1, audio_ins)inlets (inlet 0 also takes messages),audio_outs + 1outlets (the last islist), innerclassnamespace "rnbo", and params asparam <name> <initial> @min <lo> @max <hi>. EXPERIMENTAL: not yet opened in MAXgenerate_rnbo_wrapper(params, target, audio_ins, audio_outs): Build complete adc~ -> rnbo~ -> dac~ wrapper Patcherparse_genexpr_params(code): Extract Param declarations from GenExpr codevalidate_rnbo_patch(patch_dict, target): 3-layer validation on the inner RNBO patcher (not the full rnbo~ wrapper). Checks: rnbo-objects, rnbo-target, rnbo-containedRNBO_TARGET_CONSTRAINTS: Per-target constraint definitions (plugin, web, cpp)
Package Intelligence
When generating patches with package objects (BEAP, Vizzie, etc.), read .claude/max-objects/PACKAGES.md for:
- Signal conventions (BEAP: 0-5V CV, +/-1 audio; Vizzie: Jitter matrices)
- Functional roles and canonical module selection
- Template signal chains with connection order
Package Compatibility Warning
BEAP and Vizzie modules are NOT RNBO-compatible:
- BEAP bpatchers contain MSP abstractions that cannot be exported to VST3/AU/Web targets
- Vizzie uses Jitter (video) which has no RNBO equivalent
- If user requests "RNBO synth like BEAP", build equivalent signal chains using RNBO-compatible objects (rnbo~ internal patching with cycle~, biquad~, etc.)
- jit.mo, Jitter Geometry, Jitter Tools are also NOT RNBO-compatible (Jitter domain)
- Only ableton-dsp objects marked
rnbo_compatible: truein the DB can be used in RNBO patches
Editing Existing Patches (via /max-iterate)
Domain focus: Edit RNBO patcher contents, param objects, export-compatible structures.
Output Protocol (New Patches)
- Build RNBO patcher using
add_rnbo(add to existing patch) orgenerate_rnbo_wrapper(standalone wrapper) - Run
validate_rnbo_patchwith the export target to check object compatibility, target constraints, and self-containedness - Run
review_patchfor semantic critic review (param naming, I/O completeness, duplicates) - Fix any blockers found by validation or critic
- Save wrapper .maxpat via
save_patch_roundtrip(patch_dict, path)for the final output
Output Protocol (Edited Patches)
Follow "Output Protocol (Edited Patches)" in .claude/skills/references/shared-capabilities.md.
Export Target Reference
| Target | Use Case | Constraints |
|--------|----------|-------------|
| plugin | VST3/AU | Self-contained, audio I/O required |
| web | Web Audio / WASM | Self-contained, .aif format warning for Chrome |
| cpp | C++ embedded | Max 128 params, no buffer~/data, self-contained |
When to Use
- User asks about RNBO export or plugin creation
- User wants to generate a VST3/AU plugin, Web Audio export, or C++ embedded target
- User needs target-aware RNBO patch validation
- Router dispatches an RNBO-related task
When NOT to Use
- Standard MSP/gen~ generation (not targeting RNBO) -- use max-dsp-agent
- General patch construction -- use max-patch-agent
- GenExpr authoring for gen~ (not RNBO) -- use max-dsp-agent
- UI layout or presentation mode -- use max-ui-agent