Expand description
User-driven structural edits: create, delete, replace, and rewire nodes in a patch tree — the “reconnect anything” surface of the workbench.
Because the genome is a typed tree, rewiring is expressed as a small vocabulary of operations that are type-safe by construction (an LFO can never end up in an audio slot; a filter always has exactly one audio input): replace a node, insert a node into a wire, delete/splice a node, change a modulation source, swap a mixer’s inputs. These are the same moves evolution’s structural proposals make — hand edits and MH walk the same lattice.
Nodes are addressed by their trace key (node, node/0, node/0/1,
node/0/m for mod slots — see crate::genome).
Enums§
- ModKind
- A modulation choice for
StructOp::SetMod. - Node
Kind - The buildable node palette (everything the grammar can express).
- Struct
Error - Why a structural edit was rejected.
- Struct
Op - One structural edit.
Constants§
- MAX_
DEPTH - Maximum tree depth for hand-built patches.
- MAX_
MOD_ DEPTH - Maximum nesting depth of a hand-built modulation term.
- MAX_
SIZE - Hard ceilings on hand-built patches (protects the realtime voice and the feature pipeline; evolution’s own prior rarely exceeds these).
Functions§
- apply_
struct_ op - Apply a structural edit, returning the new tree.
- validate_
tree - Every ceiling a hand-built patch has to respect, in one callable place.