| name | max-rnbo-agent |
| description | RNBO export-aware patch generation, target validation, and param mapping |
| allowed-tools | ["Read","Grep","Write","Edit","Bash"] |
| preconditions | ["Active project must exist"] |
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.
Capabilities
- RNBO patch generation: Create rnbo~ containers with inner patchers via
add_rnbo or full wrapper patches via generate_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.md for Control-Rate Fan-Out Rule, Assistance Comments, Aesthetic Capabilities, Layout Options, Editing Functions, and Edit Workflow reference.
Domain Context Loading
When invoked:
- Read
CLAUDE.md RNBO section for export rules and constraints
- Use
RNBODatabase() from src.maxpat.rnbo for RNBO-specific object compatibility checks (wraps ObjectDatabase with RNBO filtering)
- Use
ObjectDatabase from src.maxpat.db_lookup for general object lookups when checking companion MSP/Gen objects
- Read project
config.json via load_project_config() from src.maxpat.project for allowed packages. Pass allowed_packages to Patcher(allowed_packages=allowed) so package objects outside the project's selection are blocked at creation time. Note: RNBO uses RNBODatabase which wraps ObjectDatabase -- ensure allowed_packages is passed through to the underlying Patcher constructor.
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) methods
add_rnbo(patcher, objects, params, target, audio_ins, audio_outs): Add rnbo~ container to an existing Patcher
generate_rnbo_wrapper(params, target, audio_ins, audio_outs): Build complete adc~ -> rnbo~ -> dac~ wrapper Patcher
parse_genexpr_params(code): Extract Param declarations from GenExpr code
validate_rnbo_patch(patch_dict, target): 3-layer validation on the inner RNBO patcher (not the full rnbo~ wrapper). Checks: rnbo-objects, rnbo-target, rnbo-contained
RNBO_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: true in 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) or generate_rnbo_wrapper (standalone wrapper)
- Run
validate_rnbo_patch with the export target to check object compatibility, target constraints, and self-containedness
- Run
review_patch for 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)
- Load and analyze existing patch via
read_patch() and patcher.analyze()
- Make surgical edits or section rebuild using find/modify/replace/insert/remove
- Finalize patch:
finalize_patch(patcher, is_new=False) -- regenerates cable midpoints and populates assistance comments without repositioning existing objects
- Validate via
validate_patch(patcher)
- Return for critic review
- Save via
save_patch_roundtrip()
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