feat: Connect and combine nodes more freely
Node mode previously required one source-owned effect tree that rejoined before an output. That imposed single-input effects, leading-only Filter/Pan nodes, raw-station keys, and unavailable shared buses. The editor consequently rejected useful audio graphs even when their signals and directions matched.
This change keeps React Flow and the existing modulation integration from #397. Audio and key inputs now sum multiple cables; sources can share effects, repeat Filter/Pan anywhere, fan out to independent outputs, and rejoin without a mandatory Merge. Keys and envelope followers receive the exact connected signal, including cable gain/mute. Merge and Split also route control signals with signed depths. Separate Output device nodes can use the same physical device with independent mutes, and duplication preserves their device selection.
Simple source-owned trees retain the existing engine path. Other graphs use stable Web Audio modules and cable gains with one shared processor per used FX output port, through the existing official/compatibility effects controller. Parameter changes reuse processors; removed wires fade out; cancellation and module ownership prevent stale startup/cleanup from reconnecting removed processors. Rack, connection hints, cable gestures, backend badges, and implementation docs follow the new routing semantics.
Typed ports, duplicate-wire checks, delay-free audio/key feedback checks, control-cycle checks, unsupported-node checks, and source/playing/modulator budgets remain enforced. The patch cable budget increases from 64 to 256; the separate eight-LFO and shared-bus limits are removed. Control-only routing uses unity depth by default and does not display a parameter target.
Validation:
bun run checkbun run typecheckbun run --filter @avoid.quest/radio test— 2,622 passing tests, including shared processor topology, distinct stereo outputs, exact key/follower taps, native-node ordering, processor cancellation, control sum/fan-out, independent device lifetimes, and editor/undo regressions.bun run --filter @avoid.quest/radio build— includes the React Flow lazy-chunk check.- Changed documentation links verified locally.
Browser interaction and physical listening/device acceptance remain unverified: the T3 collaborative preview failed to return a usable snapshot. No microphone/MIDI, multi-device listening, WebKit/touch, or large-patch performance acceptance is inferred from automated checks. Existing release gates remain documented in apps/radio/src/components/radio/node/docs/acceptance.md.
Stacked on #397 (t3/node-param-modulation-research).
Summary by cubic
Lets nodes connect and combine more freely: inputs that previously took one cable now sum many, output devices can share a physical device with independent mutes, and shared or keyed effects run as explicit graph processors instead of source-channel FX.
- Merge inputs, audio inputs, and sidechain keys accept unlimited cables; multiple cables and control signals add together.
node-audio-patchandaudio-patch-planlower shared FX, merges, and keyed compressors onto independent processors, so adding a key moves FX out of the source channel into shared graph routing; split bypass signals partition across ports and branch solos combine.- Several output device nodes may target the same physical device with independent mutes; the device-exclusivity rule and its UI disables are removed.
- Modulation control routes through merge and
fxCompositenodes, and followers detect the cabled signal including its gain and mute. Shared processors keep transient modulation values until authored synchronization restores them. - Removed validation rules that refused sidechain sources, bus FX, lane-positioned native strips, and bus budgets; docs and tests are updated to match.
- Unused processors release after cable fades and removed sources stay until their lane fades finish; source sends refresh only when their levels change.
Summary by CodeRabbit
-
New Features
- Build more flexible audio setups with branching and shared paths, multiple cables into inputs, and shared effects across sources.
- Route audio to the same output device from multiple nodes, and duplicate output nodes while retaining their device settings.
- Use Merge and Split nodes to combine and distribute audio or control signals; control cables can also carry modulation through these nodes.
- Connect multiple sidechain and follower inputs, with detection based on the connected cable signals.
- Add up to 256 cables per graph.
-
Bug Fixes
- Deleting a Merge now heals connected audio paths, and undo restores the previous graph.
- Rewiring into an occupied input preserves the existing cable instead of replacing it.