Arrangement Space: Nodes, Sheets & Context
This specification defines Cadence’s arrangement-space material model: addressable nodes, lanes that own their instrument, sections whose sheets override the song beneath them, unified parameter addressing, and musical context resolved by conductor time or by voice. See Material & Timing for schema bounds, meter mapping, transaction invariants, and executable score compilation.
Related specifications: Material & Timing · Decks & Interaction · DSP & Audio Engine · Protocols & Persistence · Design Decisions
1. Principles
Cadence is a score you can play: music kept as linked material, edited at an explicit scope, and performed by overriding the arrangement and deciding afterwards what to keep.
Four principles govern the model:
- Identity is universal and names are optional. Every musical node is addressable by stable
Idfrom the moment it exists. A name is an optional label for finding material again, not a prerequisite for referencing it. - Things point at things. No glue object exists solely to join two others. A lane owns its instrument, a placement points at a node, and a transform points at its main and side inputs.
- One rule decides what plays and one decides its context. What plays is decided by sheets stacked over the arrangement. Context is inherited either by conductor time or by voice.
- Whatever can be set can be driven, and every operation is available on every surface. Sound parameters, score parameters, and project macros share one
ParamAddressspace. Keys, the Action Palette, and typed JSON actions over the control socket expose the same operations.
2. The Model at a Glance
Picture the arrangement as a plane with sheets stacked above it and one shared material graph below it.
An interactive version of this figure can be turned, scrubbed, and traced.
- The plane is what you hear. Time runs across it and voices run down it.
- Above the plane are sheets that decide what plays: the song’s placements at the base, section items and instance overrides over spans of it, and live overrides on top.
- Below the plane is one shared DAG of musical nodes: sources, variations, and transforms chained on them.
Four Nouns
| Noun | What it is |
|---|---|
| Node | Anything musical: a source (notes, rhythm, a value curve), a variation, or a transform of other nodes. A node is a pure function from time to musical output with no timeline position of its own. |
| Lane | A voice line: owns its instrument (instrument: Id), voice context slots, launchable node slots, and song-sheet placements. |
| Section | A named length of time with items, conductor context, and pinned parameter values, defined once and placed on the song as one or more disjoint SectionInstances. |
| Placement | A span of time on a lane pointing at a Notes node, with phase clock, conductor context mode, voice overrides, and optional step exceptions. It is where the graph surfaces on the plane. |
Two Rules
- Content is decided by sheet. On one lane, the highest sheet that covers a step wins (Live overrides beat section instances; later section instances beat earlier ones across pickup/tail overlaps, with each instance’s
Instanceoverrides over itsSectionitems; everything sits over theSongsheet). Where higher sheets say nothing, lower sheets show through. - Context is decided two ways. Key, harmony, tempo, feel, and time signature come from the conductor, by time. Transpose, dynamics, and optional local feel overrides come from the voice (the lane and its placement).
3. Nodes
3.1 Identity, Names & Pointer Lifecycle
- Every
Nodecarries a stableId(u64) from creation and an optionalname: Option<String>. Sharing or unsharing a node is purely a change in incoming pointers. - Any consumer may point at any type-compatible node, including a node inside another lane’s chain. Views display each node’s live incoming pointer count (
Project::pointer_counts). - Pointers are counted across placements (on Song, Section, and Instance sheets), lane launch slots (
Lane.launch), other nodes (Apply::{main, side}andVariation::base), conductor harmony (Song, Section, and Instance), global modulations (Modulation.node), rhythmic filter envelopes (FilterPatch.env_node_id), and cycle launch boundaries (Boundary::Cycle { node }). - Lifecycle and visibility follow pointer count and name:
- 0 pointers: Unnamed nodes with zero incoming pointers are garbage-collected automatically to a fixed point at transaction commit (
Project::gc_unnamed_nodes). Named nodes with zero pointers stay in the Bank marked unused until deleted or reused. - 1 pointer, unnamed (
Project::is_inline_node): Renders inline inside its single consumer (the placement’s chain or parent transform) and stays out of the Bank and top-level Composition Graph columns while remaining directly addressable byId. - 2 or more pointers, or named: Appears as a first-class card in the Bank and Composition Graph with its live pointer count. A node cannot be deleted while anything points at it.
- 0 pointers: Unnamed nodes with zero incoming pointers are garbage-collected automatically to a fixed point at transaction commit (
Nodes live in one flat table (Project.nodes: Vec<Node>), so every node update is a flat upsert by Id.
3.2 Output Types
Every node has a statically checked NodeType and positive natural period (u64):
NodeType::NotesNodeType::RhythmNodeType::Values(ValueUnit::Degrees)NodeType::Values(ValueUnit::Normalized)
3.3 Sources & Transforms (NodeBody, TransformOp)
Sources are Notes, Rhythm, Values, SeededValues, and Euclidean.
A transform (NodeBody::Apply) takes one main: Id input and zero or more side: Vec<Id> inputs. Following main (and Variation::base) from a placement down to its root source defines its chain (Project::chain).
TransformOp | Main input | Side inputs | Parameters |
|---|---|---|---|
Follow | Notes | Values(Degrees) | — |
Mask | Notes | Rhythm | Notes | — |
Transpose | Notes | — | semitones (-96..=96) |
Velocity | Notes | — | scale (0.0..=2.0) |
Shape | Notes | Values(Normalized) (vel), opt. Values(Normalized) (gate) | — |
Control | Notes | Values(Normalized) | target (control name) |
NotesFromValues | Values(Degrees) | Rhythm | Notes | degree_offset, velocity, gate |
TimeScale | any | — | num, den (1..=16) |
Swing | Notes | — | amount (0.0..=0.45) |
Ratchet | Notes | — | count (1..=8) |
Shift | any | — | steps (-64..=64) |
Reverse | any | — | — |
Chance | Notes | Rhythm | — | probability (0.0..=1.0), seed |
Every | any | 1 same-type alternative | interval (2..=64) |
Arp | Notes | — | mode (Up/Down/UpDown/Random), rate (1..=4) |
RangeFold | Notes | — | low_midi, high_midi (span >= 11, 0..=127) |
Concat | any | 0..=15 same-type inputs (max 16 total) | — |
Stack | Notes | Rhythm | 0..=15 same-type inputs (max 16 total) | — |
Velocitymultiplies note and chord-tone velocity by a constant inside the chain, so shared chains share the scaling.Controlattaches a named per-note control lock from its normalized side curve sampled at the note’s exacttime + offset. At compile time,resolve_control_for_rack(crates/core/src/params.rs) resolvestargetdeterministically against the lane instrument’sRackPatchin strict 4-tier precedence order:- Matching curated
panel_pinslabel on the Rack (case-insensitive, automatable only). - Rack-level parameter name (
gain,pan,tune,cutoff,resonance) or explicit unpinned cable ID (cN/cableN, flaggingAmbiguousif multiple zones share that cable ID). - Unique matching automatable
ModuleParamacross all zones and modules (Ambiguousif more than one matches). - Explicit qualified path:
ModuleName.param,ZoneName.cN/zN.cN,ZoneName.param/zN.param,rack.param/bus.param, orzN.ModuleName.param(automatable only; ambiguous matches reportAmbiguous). A compiled chain holds at mostMAX_LINKS = 16unique resolved targets (with downstream controls overriding duplicate resolved targets).Project::check_control_warnings()surfaces structuredControlWarningdiagnostics (ControlWarningKind::{Unresolved, Ambiguous, DuplicateTarget, ExceedsMaxLinks}) in the UI and--check; unresolved or ambiguous names are otherwise ignored safely at compile time.
- Matching curated
Bypass (TransformOp::can_bypass). A transform may set bypassed: true whenever bypassing preserves its output type and static period. That covers every transform except NotesFromValues, TimeScale, Every, Concat, and Stack. Bypassed Follow and Swing stages do not opt out of inherited harmony or feel.
3.4 Variations & Placement Exceptions
A node may vary another (NodeBody::Variation { base, changes }) by storing only the steps where it differs, using the same StepChange payload as Placement.exceptions:
#![allow(unused)]
fn main() {
struct StepChange { step: u32, events: Vec<NoteEvent> } // empty `events` means an explicit rest
}
- In
NodeBody::Variation,stepindexes within the base node’s natural period (0..base_period) and replaces everything the base plays on that step on every pass (supporting per-event pass conditions). Untouched steps continue to evaluatebase, so edits to the base reach every untouched step. - In
Placement.exceptions,stepindexes within the placement’s own span (0..length_steps), applying only to that one occurrence (and requiring unconditionalStepCondition::ALWAYSevents). Varycreates aNodeBody::Variation { base, changes: Vec::new() }following its base.Detach(Action::DetachNode) materializes an independent copy (flattening a literal variation toNotes, cloning a literal viaEdit::ForkNode, or freezing a derived node viaEdit::FreezeNode) that no longer follows the base.- When editing notes on a placement whose node is shared or varied, the interface requires an explicit edit scope: definition (edit the underlying node), variation (record a
StepChangeon aVariation), or local exception (record aStepChangeonPlacement.exceptions).
3.5 Note Events
Pitch is either a scale degree or a fixed MIDI note:
#![allow(unused)]
fn main() {
enum Pitch { Degree { degree: i16, accidental: i8 }, Midi(u8) }
}
A Degree pitch is relative to the active key and follows key, harmony, transposition, and range folding. A Midi(u8) pitch is an absolute note (such as a drum kit pad) that ignores key, harmony, transpose, and range folding everywhere it is placed.
A step slot can hold multiple sparse events (NoteEvent):
| Field | Range / Default | Meaning |
|---|---|---|
step | 0..length_steps | Integer 16th-note slot index inside Notes. |
offset | [0.0, 1.0), default 0.0 | Fractional sub-step position inside the 16th. One slot may hold multiple events at different offsets. |
pitch | Pitch | Scale degree (-127..=128, accidental -6..=6) or fixed MIDI (0..=127). |
velocity | 0.0..=1.0, default 0.8 | Normalized hit velocity. |
gate | 0.05..=64.0, default 0.75 | Gate duration in 16th-note steps. |
condition | 1 <= turn <= every <= 16, default 1:1 | Pass condition (StepCondition { turn, every }). |
probability | 0.0..=1.0, default 1.0 | Deterministic hit chance via det_hash(0, node_id, time, idx). |
retrigger | 1..=8, default 1 | Evenly spaced sub-span repeats inside the event’s slot interval. |
chord | 0..=5 ChordTones | Extra stacked voices (up to 6 simultaneous notes per event), each with its own pitch, velocity, and gate. |
Sub-step subdivisions, pass alternations, probability, retriggers, accents, and chords are authored directly on NoteEvent inside NodeBody::Notes (via step/sub-step editing, live MIDI recording, or typed JSON actions) with no separate notation node type.
3.6 Schema (crates/core/src/material/types.rs, music.rs)
#![allow(unused)]
fn main() {
struct Node { id: Id, name: Option<String>, body: NodeBody }
enum NodeBody {
Notes { length_steps: u32, events: Vec<NoteEvent> },
Rhythm { steps: Vec<bool> },
Values { unit: ValueUnit, period: u32, mode: ValueMode, points: Vec<ValuePoint> },
SeededValues { unit: ValueUnit, period: u32, seed: u64, min: f32, max: f32 },
Euclidean { pulses: u16, steps: u16, rotation: i16 },
Apply { op: TransformOp, bypassed: bool, main: Id, side: Vec<Id> },
Variation { base: Id, changes: Vec<StepChange> },
}
struct NoteEvent {
step: u32, offset: f32, pitch: Pitch, velocity: f32, gate: f32,
condition: StepCondition, probability: f32, retrigger: u8, chord: Vec<ChordTone>,
}
}
4. Lanes & Instruments
#![allow(unused)]
fn main() {
struct Lane {
id: Id,
name: String,
instrument: Id,
voice: VoiceSlots,
launch: Vec<Launchable>,
placements: Vec<Placement>,
}
struct Launchable { node: Id, phase: PhaseMode, offset_steps: i32 }
}
- A lane owns its instrument (
lane.instrument). Placements never name an instrument. - Several lanes may share one instrument. The instrument receives every event from every lane naming it, ordered by step, sub-step offset, and lane order, and applies its own Rack voice rules (key/velocity zones, polyphony/mono, and choke groups).
- A lane is one non-overlapping line per sheet. Within the song sheet (
lane.placements), within any oneSection.items, and within any oneSectionInstance.overrides, items on the same lane do not overlap. Layering is a second lane targeting the same instrument. - Deterministic tie-breaking. Events arriving at the same step and sub-step offset reach an instrument in
Project.lanesorder; a monophonic zone plays the last of them. - Sidechain ducks are triggered by lanes (
Duck.source_lane).
Compiled ScoreEvents carry lane_id: Option<Id>, and EventOrigin provenance records (song_step, lane, placement, node, instrument, pattern_time, local_exception).
5. Sections & Sheets
5.1 Schema (crates/core/src/material/types.rs)
#![allow(unused)]
fn main() {
struct Section {
id: Id,
name: String,
length_steps: u32,
conductor: ConductorSlots,
values: Vec<(ParamAddress, f32)>,
items: Vec<Item>,
}
struct SectionInstance {
id: Id,
section: Id,
start_step: u32,
conductor: ConductorSlots,
values: Vec<(ParamAddress, f32)>,
overrides: Vec<Item>,
}
enum Item {
Play { lane: Id, placement: Placement },
Silence { id: Id, lane: Id, start_step: i32, length_steps: u32 },
}
struct Placement {
id: Id,
node: Id,
start_step: i32, // >= 0 on Song (`Lane.placements`); signed in sections/instances
length_steps: u32,
phase: PhaseMode, // Song | Section | Restart (Song placements reject Section)
offset_steps: i32,
context: ContextMode, // Follow | Own | Instance(Id)
voice: VoiceSlots, // transpose, dynamics, optional local feel
exceptions: Vec<StepChange>, // keyed by placement-relative step (0..length_steps)
}
}
- Song placements live on
Lane.placements(start_step >= 0). Section items and instance overrides live inSection.itemsandSectionInstance.overridesusingItem::{Play, Silence}.PhaseMode(Song | Section | Restart) is shared by placements and launch slots. - A section is defined once and placed as disjoint
SectionInstances. Nominal spans[start_step, start_step + length_steps)never overlap and fit withinProject::arrangement_steps(). Sections and instances carry strictly Conductor context and pinned section values across all lanes; sections do not nest. - Pickups and tails extend past nominal section boundaries. An item inside a section or instance may carry a negative
start_step(pickup) or run pastsection.length_steps(tail). Spans outside[0, arrangement_steps)clip cleanly at sheet resolution time. - Instance overrides localize changes.
SectionInstance.{conductor, values, overrides}override the section for that single instance (such as modulating a final chorus up a step, pinning a parameter value, or replacing/silencing a lane). When creating an instance override from a section item withstart_step < 0, the override spans the item’s full relative range so the pickup does not leak through from theSectionsheet underneath. Item::Silenceis content. It occludes lower sheets on its lane so a section or instance override can close a lane running underneath (including when keeping a muted lane over a section).
5.2 Sheet Stack
From lowest to highest:
| Sheet | Holds |
|---|---|
Song | Each lane’s own placements (Lane.placements) |
Section | Each section instance’s Section.items, offset by instance.start_step |
Instance | Each section instance’s SectionInstance.overrides, offset by instance.start_step |
Live | Active live overrides (PerformanceState.active) (§7) |
5.3 Sheet Resolution (Project::sheets in crates/core/src/material/sheets.rs)
For any lane at a song step:
- If the
Livesheet has an active override on that lane, the live override plays. - Beneath
Live,Project::sheets()resolves authored sheets in strict descending precedence:- Section instances ordered by descending
instance.start_step, with each instance’sInstanceoverrides layered ahead of itsSectionitems. - The
Songsheet (Lane.placements) at the bottom.
- Section instances ordered by descending
- Within one instance,
Instanceoverrides beatSectionitems. Across adjacent instances, a later instance’s item (such as an incoming section’s negative pickup) always beats an earlier instance’s overhanging tail or override. - Both
Item::PlayandItem::Silenceocclude lower layers; any lane a section or instance does not mention lets lower sheets show straight through. All visible stretches clip to[0, arrangement_steps).
5.4 Pattern Time (PhaseMode)
PhaseMode | Clock |
|---|---|
Song | song_step + offset_steps. Material keeps its place against the song clock. |
Section | (song_step - instance.start_step) + offset_steps (valid on section/instance items and live launch slots; Song placements reject Section). Periodic nodes wrap via Euclidean modulo so negative pickups align cleanly into beat 1 of the section. |
Restart | (song_step - item_abs_start) + offset_steps (or transport_step - anchor + offset_steps on live launches). Counts from the block’s own start. |
A jump or loop to a section begins at instance.start_step. A negative pickup sounds only when playback arrives through the steps preceding that origin.
6. Context
6.1 Conductor & Voice Slots
Context splits into Conductor (shared across the band: Song → Section → Instance) and Voice (owned by one lane or placement: Lane → Placement):
#![allow(unused)]
fn main() {
struct ConductorSlots {
key: Option<Key>,
harmony: Option<Id>,
tempo: Option<f64>,
feel: Option<f32>,
time_signature: Option<TimeSignature>,
}
struct VoiceSlots {
transpose: Option<i16>,
dynamics: Option<f32>,
feel: Option<f32>,
}
}
Song-level conductor defaults live directly on Project (root_midi, scale, harmony, bpm, feel, time_signature).
| Slot | Kind | Set on | Combination rule | Where it applies |
|---|---|---|---|---|
key (Key { root_midi, scale }) | Conductor | Song, section, instance | Nearest wins | Degree-to-MIDI resolution and pitch-dependent transforms |
harmony (Values(Degrees) node) | Conductor | Song, section, instance | Nearest wins | Added where degree notes enter a chain |
tempo (f64, 20..=300 BPM) | Conductor | Song, section, instance | Nearest wins (by song time only) | Step clock, ScoreWindow.step_bpm, and tempo-synced DSP |
time_signature (TimeSignature) | Conductor | Song, section, instance | Nearest wins (by song time only) | BarMap bar/beat boundaries, compound /8 grouping, launch quantization |
feel (f32, 0.0..=0.45) | Conductor (+ Voice override) | Song, section, instance; optionally overridden on lane or placement | Nearest wins (placement → lane → conductor) | After the chain, delaying odd 16ths on the song grid |
transpose (i16, -96..=96) | Voice | Lane, placement | Adds (lane + placement) | After the chain (degree pitches only) |
dynamics (f32, 0.0..=2.0) | Voice | Lane, placement | Multiplies (lane × placement) | After the chain (clamped 0.0..=1.0) |
6.2 Resolution Rules
- Conductor resolution (
Song → Section → Instance):key,harmony, andfeelresolve from the placement’sConductorAnchor(Project::conductor_owner).tempoandtime_signatureresolve strictly by song time (Project::tempo_at,Project::time_signature_at), because one clock and bar map govern the entire ensemble. - Harmony application: Shifts degree-pitched notes where they enter a chain (
Notes,Variationstep changes,NotesFromValues, andPlacement.exceptions) so downstream transforms (RangeFold,Arp) see harmonised notes. Song harmony reads atsong_step. Section/instance harmony reads at(song_step as i64 - instance.start_step as i64).max(0)— negative pickup offsets clamp cleanly to step0(reading bar 1’s chord without wrapping or underflowing). - Key application: Read when degrees resolve to MIDI and by chromatic transforms (
Transpose,RangeFold,Arp). - Voice application:
transposeadds anddynamicsmultiplies after the node chain.feelresolvesplacement.voice.feel → lane.voice.feel (including dynamic overrides) → conductor feeland delays odd 16th steps on the song grid, carryingoffset + feel >= 1.0cleanly onto the following step (Project::sounding_events). - Absolute notes (
Pitch::Midi): Ignore key, harmony, transpose, and range folding. - Explicit beats inherited (
Project::inheritance): A chain containing a non-bypassedTransformOp::Followopts out of inherited harmony; a chain containing a non-bypassedTransformOp::Swingopts out of inherited feel (both conductor and voice).transposeanddynamicsalways combine with chain transforms.
6.3 Context Modes & ConductorAnchor
#![allow(unused)]
fn main() {
enum ContextMode { Follow, Own, Instance(Id) }
enum ConductorAnchor { Song, Instance(InstanceAt) }
}
Project::conductor_owner(song_step, context, owner) maps ContextMode to a ConductorAnchor governing key, harmony, and feel:
Follow(default on theSongsheet): Resolves the conductor at each event’s ownsong_step. A placement spanning a verse into a chorus shifts key, harmony, and feel at the section boundary.Own(default insideSection.itemsandSectionInstance.overrides): Anchors to the section instance owning the item across its entire span — including negative pickups (with harmony clamped to step0) and overhanging tails.Instance(Id): Anchors a placement (typically on theSongsheet) to a specificSectionInstance. If that instance or its section is removed (Edit::RemoveInstance/Edit::RemoveSection),reset_instance_context_refsresets referencing placements toContextMode::Follow.
Tempo and time signature are never anchored per placement, because two clocks cannot run simultaneously.
Two ways to write a pickup:
| Approach | Where it lives | When the section is placed again |
|---|---|---|
Section item with negative start_step (ContextMode::Own) | Inside Section.items | Moves and repeats with every instance |
Song placement anchored via ContextMode::Instance(id) | Inside Lane.placements | Stays where written on the song |
7. The Live Sheet
- Launch places a
Launchableon the live sheet (Override { lane, entry, anchor }) for one lane; Release removes it. Both land on a quantizedBoundary(Now,Beat,Bar,Bars, orCycle { node }), honoringBarMapmeters andlate_tolerance_steps. - Staging (
StagedChange) queues multiple launches, releases, lane mutes/solos, and section jumps to land atomically on one boundary. - Live context: A launched item reads Conductor context by song time (
ContextMode::Follow) and Voice context from its own lane (lane.instrument,lane.voice). - Keep writes what was heard back into the arrangement: splitting the kept span at section boundaries, writing pieces inside section instances as
SectionInstance.overrides(orItem::Silencewhen keeping a muted lane over a section), and writing pieces outside sections ontoLane.placements. BecauseInstanceoverrides sit aboveSectionitems, kept material remains audible on replay.
Parameters share the same live layer:
- Any valid
ParamAddress(§8) may carry a normalized live value (Change::LiveValue, stored inPerformanceState.live_values) overriding its written or driven value immediately without waiting for a boundary. - Interacting with a driven control (keys, value field, or mapped MIDI knob) writes a live value; explicit
:set/Edit::SetParamcommands write the authored constant. - Release clears the live value back to its driven or written state; Keep commits the live value to the authored constant (or inserts a breakpoint at the current step if driven by a curve).
LiveFlags(mute and solo) persist alongside the project document but remain outside undo history and the authored song revision.
8. One Address Space (ParamAddress)
8.1 All 12 ParamAddress Variants (crates/core/src/params.rs)
| Variant | Class | Reaches |
|---|---|---|
Rack { instrument, param: RackParam } | Sound | Rack bus (Gain, Pan, Tune, Cutoff, Resonance) |
Zone { instrument, zone, param: ZoneParam } | Sound / Structural | Zone gain, pan, glide, pitch tracking, phase reset, root MIDI (VoiceMode, Legato are Structural) |
Module { instrument, zone, module, param: ModuleParam } | Sound / Structural | Any of the 62 Eurorack module parameters (LoopMode, LoopXfade, OneShot are Structural) |
Cable { instrument, zone, cable } | Sound | Bipolar patch cable attenuverter amount |
Channel { channel, param: ChannelParam } | Sound | Channel/Master Gain or Pan |
Send { channel, target } | Sound | Audio/Group send amount to a Return bus |
Effect { device, param: EffectParam } | Sound | Any insert effect parameter across all 8 EffectKinds |
Node { node, param: NodeParam } | Score | All 12 automatable transform params (Transpose, Velocity, SwingAmount, RatchetCount, ShiftSteps, ChanceProb, ArpRate, RangeLow, RangeHigh, DegreeOffset, NotesVel, NotesGate) |
Lane { lane, slot: VoiceSlotParam } | Score | Lane voice slots (Transpose, Dynamics, Feel) |
Song { slot: ConductorSlotParam } | Score | Song conductor Tempo and Feel |
Section { section, slot: ConductorSlotParam } | Score | Section conductor Tempo and Feel |
Macro { index } | Sound or Score | Project Macro M1..M8 (0..8); Project::address_class classifies as Score if any binding targets a Score address, Sound otherwise |
A direct Modulation targeting ParamAddress::Channel { channel, param: ChannelParam::Gain } compiles to multiplicative MixerParamTarget::ChannelGainScale, scaling the fader trim and ducks independently (gain * scale * duck) rather than overwriting the fader.
8.2 Address Classes (AddressClass)
| Class | Examples | Driven over time | Effect of a change |
|---|---|---|---|
Sound | Automatable Rack/Zone/Module/Cable, Channel, Send, Effect, sound-only Macros | Yes | Heard immediately via the sound-only update path |
Score | NodeParam, VoiceSlotParam, ConductorSlotParam, score-bound Macros | Yes | Alters evaluated events or tempo map; recompiles and lands on the edit boundary |
Structural | ZoneParam::{VoiceMode, Legato}, ModuleParam::{LoopMode, LoopXfade, OneShot}, and structural node fields (TimeScale ratio, Every interval, Euclidean steps, Concat/Stack inputs) | No | Alters voice topology, node period, or node type; edit-only |
Keeping structural node parameters static guarantees every node’s (NodeType, period) signature is statically determined.
8.3 Unified Resolution Precedence
Any automatable ParamAddress can be supplied by a written constant, a macro binding, a covering section/instance pinned value, a direct Modulation curve on the song clock, MIDI learn, or a live value.
Project::resolve_param_at (crates/core/src/material/eval.rs), ScoreBuilder::write_sound_automation, and crates/app/src/view/live_params.rs enforce one exact precedence order:
- Live value (
PerformanceState.live_values) - Direct modulation (
Project::driver(address), normalizedValuesnode on the song clock) - Section value (
SectionInstance.valuesoverSection.values, resolved by covering song step) - Macro fan-out (
MacroBinding.evaluatein ascending macro index order; highest macro index wins on collision) - Written constant (
Project::read_param_native)
Because every time-varying parameter is a pure function of (song_step, live_values), evaluation remains stateless and renders are bit-identical.
9. Operations
Every authoring and performance move reduces to this core vocabulary, exposed uniformly across keyboard bindings, the Action Palette, and typed JSON actions:
| Operation | What it does |
|---|---|
| Place | Put a pointer to a Notes node on a lane for a span (Song, Section, or Instance sheet) |
| Launch, release, stage | Manage live-sheet overrides and stage multi-lane gestures for one boundary |
| Keep | Commit the live sheet and live values into the authored arrangement |
| Group, ungroup | Turn a span of song placements into a reusable Section, or dissolve one |
| Silence | Place Item::Silence on a section or instance sheet to cover lower sheets on that lane |
| Wrap, unwrap | Insert or remove a TransformOp stage in a placement’s chain |
| Bypass, reorder | Toggle Apply.bypassed without removing a stage, or move stages within a chain |
| Set | Write a parameter or context slot via ParamAddress |
| Point | Redirect what a placement, transform input, harmony slot, modulation, or filter envelope points at |
| Name | Assign or clear a node’s optional name |
| Vary, detach | Create a Variation following a base node, or materialize an independent copy |
| Freeze | Evaluate a node range into literal Notes, Rhythm, or Values |
| Extract | Pull a literal Rhythm or Values(Degrees) contour out of a Notes node |
| Own, follow, anchor | Choose a placement’s ContextMode (Own, Follow, or Instance(id)) |
10. Compilation & Engine Contract
- Stateless memoized evaluation: Evaluation is pure recursion over the node DAG. Per-query
EvalMemo(crates/core/src/material/eval.rs) memoizesnode_values,notes, andrhythm_offsetson(node_id, time, ctx.song_step)(plus staticsignaturesonnode_id), preventing exponential work on diamond DAGs while keeping driven score parameters exact and renders bit-identical. - Single-point sheet & context compilation:
Project::compile_with_liveandProject::compile_live_steps_with_auditionboth resolve content viaProject::sheets()(§5.3) and events/context viaProject::sounding_events()(§6.2). - Multi-lane instrument delivery: An instrument receives events from every lane naming it, ordered by
(step_slot, offset, inst_idx, lane_order). - Sound-only vs score dispatch:
Project::address_classroutesSoundchanges through the fast sound-only patch path (Project::sound_patch_compatible+Project::patch_score_sound) without re-evaluating nodes, whileScorechanges (including score-bound macros and dynamic tempo changes) recompile the score window and land on the edit boundary. - Take journal parity: Live values (
TakeChange::LiveValue), launches, releases, flags, timeline remaps, and edits record in the take journal (crates/core/src/take.rs), folding through the samePerformanceState::applytransition during live playback and offline replay. - Per-step tempo map:
ScoreWindow.step_bpmcarries effective per-step BPM aligned 1:1 withstep_ranges(empty when uniformbpm).Engine(bpm_for_step) updatesactive_bpmand atomicactive_bpm_bitsat every step boundary, drivingStepScheduler, offlinerender::step_range_seconds, and tempo-synced DSP (Delay,Lfo,RhythmicFilter). - Workspace bounds:
MAX_NODES = 4096,MAX_LANES = 32,MAX_INSTRUMENTS = 16,MAX_PLACEMENTS = 4096,MAX_SECTIONS = 256,MAX_SECTION_INSTANCES = 1024. The audio engine depends only onMAX_INSTRUMENTS, never on lane count. - Schema version:
Project::VERSION = 2with#[serde(deny_unknown_fields)]and zero legacy converters.
11. Workspace Surfaces
The arrangement-space model surfaces across the workspace’s core decks:
- Lane deck (
LANE): Shows the lane’s instrument, voice context slots, andCHAINrows (source first through each transform stage). Transforms are wrapped, bypassed, reordered (J/Kin Edit mode), unwrapped, and nudged inline alongside a live evaluated preview. - Pattern deck (
PATTERN): Shows literal steps/sub-steps, source chips, and transform headers with focused parameter nudging and explicit edit-scope indicators (definition, variation, or local placement exception). - Bank deck (
BANK): Lists named and shared (>= 2pointers) nodes with live pointer counts, marking 0-pointer named nodes as unused while keeping unnamed single-consumer nodes inline inside their consumer. Also provides the paged section strip (1..0) and lane launchpad. - Arrange deck (
ARRANGE): Draws section sheets (§) and instance overrides (‡) over the song sheet, folds lanes sharing an instrument into a single row when folded, displays mixed-meterBarMapbars, and pages section banks cleanly. - Placement deck (
PLACEMENT): Displays a live evaluated preview alongside timing, phase, voice slots, exceptions, andContextMode(Own,Follow, or anchoredInstance). - Graph deck (
GRAPH): Provides both the Signal Graph (audio routing) and Composition Graph (v):SOURCES,STAGEtransform columns,LANES(counting song, section, and instance items), andINSTRUMENTS, collapsing unnamed single-consumer nodes inline while distinguishingMain,Side,Control,Placed, andSoundedges and lighting sounding nodes live.
12. Worked Examples
12.1 Sixteen Bars
A song in D minor at 124 BPM (4/4) with swing 18%. The Verse covers bars 1 to 8 and sets no overrides. The Chorus covers bars 9 to 16 and sets F major, 128 BPM, its own harmony, and a straight feel (0%). The Arp lane carries voice dynamics 80%, and the Kick lane carries a local voice feel override of 18%.
| Lane | Song | Verse | Chorus | Live |
|---|---|---|---|---|
| Kick (local feel: swing 18%) | Beat, bars 1 to 16 | — | Kick fill, bars 13 to 16 | — |
| Lead | — | Motif, bars 3 to 8 | Motif with an answer every fourth pass, from half a bar before bar 9 | Motif up an octave, bars 11 to 13 |
| Arp (dynamics: 80%) | Arp over the chord cell, bars 5 to 12 | — | — | — |
What plays, and in what context:
| Lane & bar | Plays | Why | Key / Harmony | Feel / Voice |
|---|---|---|---|---|
| Kick, bar 10 | Beat | Chorus says nothing for Kick before bar 13, so Song shows through | none: absolute MIDI notes | swing 18% (lane voice override beats Chorus conductor) |
| Kick, bar 14 | Kick fill | Section sheet over Song sheet | none: absolute MIDI notes | swing 18% (lane voice override applies to all items on Kick) |
| Lead, bar 12 | Motif up an octave | Live sheet over Section sheet | F major, Chorus harmony (Conductor, by time) | straight (Conductor, by time) |
| Lead, half bar before bar 9 | Chorus lead’s pickup | Chorus has the later instance.start_step on the Section sheet | F major, Chorus bar-1 chord (Own, negative harmony clamped to step 0) | straight (Own, from the Chorus) |
Same pickup, set to Follow | Chorus lead’s pickup | Same sheet precedence | D minor, song harmony (Conductor, by time) | swing 18% (Conductor, by time) |
| Arp, bar 7 | Arp | Only Song covers Arp | D minor (Conductor, by time) | swing 18% (Conductor), dynamics 80% (Voice) |
| Arp, bar 10 | Arp | Same Song placement | F major (Conductor, by time) | straight (Conductor, by time), dynamics 80% (Voice) |
Arp shifts to F major and straight feel at bar 9 because both come from the Conductor by time while retaining its lane dynamics (80%), whereas Kick keeps its swung pocket through the straight Chorus because its lane sets a local Voice feel override.
12.2 A Loop
Eight bars: a kit, bass, pad, and lead sharing one harmony.
Song 8 bars · 4/4 · D harmonic minor · 124 BPM · harmony: Harmony · feel: swing 18%
Kick [909 kit] kick notes
Hats [909 kit] hat notes |> time scale ×3 |> chance 30%
Clap [909 kit] clap notes
Bass [Sub bass] bass notes
Pad [Warm pad] chord notes
Lead [Pulse lead] Motif |> every 4: reverse can also launch: Motif |> transpose +12
Named: Harmony, Motif
- Three lanes share the kit instrument.
- Bass, pad, and lead follow the song harmony by context.
- Swing is set once on the song.
- Only
HarmonyandMotifneed names, because only those two nodes are shared; every single-consumer chain stage stays inline.
12.3 A Song with Form
A 64-bar arrangement built from six distinct sections placed across eight instances, with two instances carrying local overrides:
| Instance | Section | What the instance changes |
|---|---|---|
| Bars 17 to 24 | Build | none |
| Bars 41 to 48 | Build | Pinned value: Arp rate 2, accent off |
| Bars 25 to 32 | Drop | none |
| Bars 49 to 56 | Drop (Climax) | Lead adds an octave layer on alternate passes; pinned Arp rate 2; Ride, Bell, and Perc enter |
What runs where:
On the song, running through sections
Chords [Supersaw] Chord cell |> velocity 54% silent in the last bar of each Build
Arp [Glass Arp] Chord cell |> arp |> shape(accent) |> transpose +12
In sections
Lead [Anthem Lead] Hook Drop
Hook |> mask(Tease mask) |> velocity 60% Tease, Build, Outro
Chords Stab voicing |> mask(Stab rhythm) Drop, covering the pad
Bass [Sub Drive] Sub pulse |> range fold Intro, Build, Breakdown, Outro
Bass groove |> range fold |> shape(bounce) Tease, Drop
Kick [Club Kick] Kick 4x4 Tease, Drop, Outro
a four-bar build phrase second half of Build
Hats, Open hat, Rim [EDM Kit] one lane each Tease, first half of Build, Drop; hats in Outro
Clap [EDM Kit] second half of Tease, Outro
Snare [EDM Kit] backbeat, tom turnaround every 4th pass Drop
a four-bar roll second half of Build
Crash [EDM Kit] Drop, first bar of Breakdown, Outro
Ride [EDM Kit] Climax instance override only
Bell, Perc, FX Sweep one lane each
- The pad and arp live on the Song sheet so sections do not restate them; Build silences Chords on its last bar via
Item::Silence. - The kit is seven lanes sharing one Rack instrument, folding cleanly into one row in Arrange.
- The bass is degree
1on a rhythm node, following the active harmony automatically by context. - “Arp rate
2” in the second Build is a pinnedSectionInstance.valuesentry targetingParamAddress::Node { node, param: NodeParam::ArpRate }.