feat: Add parameter modulation in Node mode

Closed
FC
1mo ago
+5558-187

Change

Node mode could not connect control sources to audio parameters. This adds a working modulation prototype with Macro, LFO, Steps, Randomiser, Follower, ADSR, Curve, Slew, Multi-stage envelope, Shaped LFO, Clock and MIDI input.

Parameter cables expose target, depth and enable controls through React Flow edges and shared Radix components. Module editors add live traces, step and curve editing, gate controls and backend readouts. Assignments preserve authored values, undo history and persistence, and restore base values when disabled or removed.

LFO, Steps, Randomiser and Macro use the existing openDAW Project's public modulation API by default. Extended controls fall back to DSP; the other adapters reuse exported openDAW primitives where applicable. The common target bridge updates at about 30 Hz with Web Audio smoothing; assignments are not native audio-rate modulation. Follower measures the upstream lane after FX and before its fader.

Cleanup consolidates typed modulation guards, simplifies routing and runtime ownership, isolates gate interactions, and reuses existing effect traversal. No new dependencies were added.

Keep this PR in draft: the sources drive real playback, but this implements one proposed UX. UX acceptance, code review and device checks are still required before merge. The prototype is available directly in Node mode, without a separate feature flag.

See the runtime and acceptance contract and source audit.

Validation

  • bun run check — passed.
  • bun run typecheck — all six workspaces passed.
  • bun run --filter @avoid.quest/radio test — 2,625 tests passed.
  • bun run --filter @avoid.quest/radio build — passed, including the React Flow lazy-chunk guard.
  • Browser smoke checks covered native source readouts, live Web Audio and official FX targets, restoration, and unchanged authored values/history.

Still unverified: physical MIDI, microphone capture, WebKit/touch interactions and listening quality. Your original patch was restored after the screenshot capture.

Native modulators and parameter assignments

Changelog: Add LFOs, envelopes and other modulators in Node mode.


Summary by cubic

Node mode can now connect control sources to audio parameters. A new Modulators palette section adds LFO, Macro, Steps, Randomiser, Follower, ADSR, Curve, Slew, Multi-stage envelope, Shaped LFO, Clock, and MIDI input nodes, while sources, FX, and splits expose Parameter inputs. This prototype drives real playback without a feature flag; keep it in draft until UX and device acceptance land.

New Features

  • Parameter cables expose target, depth, and enable controls on the edge.
  • Assignments preserve authored values, undo history, and persistence, then restore output levels and effect parameters when modulation ends or cables change.
  • Older v2 graphs are normalized before use, and startup MIDI triggers and control mappings remain consistent.
  • LFO, Steps, Randomiser, and Macro use openDAW’s native modulation API; other sources use a DSP fallback at about 30 Hz with Web Audio smoothing.
  • Follower measures the upstream lane after FX but before its fader.
  • No dependencies were added.

Summary by CodeRabbit

  • New Features
    • Added a Modulators section to the node palette, with LFO, Macro, MIDI input, Clock, Randomiser, envelope, curve, and step-sequence tools.
    • Connect modulators to supported audio and effect parameters, adjust connection depth, enable or mute connections, and edit settings in the node or inspector.
    • Added editors for step sequences and curves, along with gate controls and MIDI input for supported modulators.
    • Modulation can change supported parameters during playback without altering their saved settings.
  • Bug Fixes
    • Improved connection guidance and validation when connecting or rewiring parameter and modulation cables.
    • Existing node graphs are now normalized when needed during migration.