Skip to content

P2.5.1 Live preset graph handoff: no callback detach on recall, bounded de-click fade and retired-plugin ack - #10

Closed
masarray wants to merge 3 commits into
fix/p2-fabfilter-add-workflowfrom
feature/p25-live-preset-graph-swap
Closed

masarray wants to merge 3 commits into
fix/p2-fabfilter-add-workflowfrom
feature/p25-live-preset-graph-swap

Conversation

@masarray

Copy link
Copy Markdown
Owner

ARD phase P2.5 — foundation of live-safe snapshot recall

User confirmed FabFilter and iZotope RX can load and insert after P2.4.1. This PR preserves that working VST3 compatibility and existing visual UX.

Implementation

  • Prepare an entirely new set of VST3 processors with validated .armix vendor states before publishing. Current live audio continues using the old chain during preparation.
  • One-slot atomic Graph handoff between JUCE message thread (owner) and realtime audio callback (consumer) at buffer boundary. No callback detach, allocation, locks, graph copy or plugin destruction at transition.
  • Fade down old graph during one callback buffer and fade up new during next. This is a de-click transition, not full seamless two-graph crossfade and not latency-compensated.
  • Control thread retires old plugin instances only after audio callback acknowledges the old pointer; 3-phase publication prevents race between pending pointer and ACK.
  • Recall no longer requires output mute. SAVE still requires mute. UI reflects preset changes only after callback ACK. Native engine status exposes transition pending/completed counts.
  • 12k concurrent handoff tests plus static UI/graph contracts in Windows CI.

Important incomplete

  • ADD/REMOVE/REORDER still use JUCE remove/add callback; this milestone changes native preset recall only.
  • VST3 binary state load and prepare still run on message thread, temporarily blocking UI (but not callback). No external vendor plugin sandbox.
  • No full dual-DSP crossfade or latency compensation; audio may dip for two buffers. Avoid audio device changes mid-recall.
  • CI cannot test proprietary FabFilter/RX. Keep draft until Windows hardware soak and detailed callback telemetry confirm no regressions.

See docs/P25_LIVE_GRAPH_HANDOFF.md.

Copy link
Copy Markdown
Owner Author

P2.5.1 Windows candidate GREEN — Prepared Live Preset Graph

Final commit: 7a769105595aeaa2f8d8e3a549143426fdba5eae
Workflow (green): https://github.com/masarray/arsonmix/actions/runs/40164992415
Windows artifact: https://github.com/masarray/arsonmix/actions/runs/40164992415/artifacts/12587797164

Windows CI verified MSVC x64 JUCE Release, WebView JS/contract validation, packaging and CTest 2/2 PASS (including 12,000 cross-thread atomic graph handoffs and P2.4 .armix ZIP binary-state round-trip). Last optimization precomputes dB-to-linear gain coefficients during preset staging; callback only atomically publishes prepared float coefficients.

Real capability delivered: .armix RECALL LIVE while output remains armed. All VST3 plugin instances are recreated/prepared with saved vendor state off audio callback, graph is published at buffer boundary, old graph retired only after RT ACK, old/new fades use one buffer each without doubling DSP load, controls/UI are reconciled after ACK. Does not call removeAudioCallback for preset recall.

Not finished: Add/Remove/Reorder FX still detach callback; preparation and ZIP IO still block message thread; de-click down/up is not seamless concurrent 2-graph crossfade or latency-compensated. Must not change ASIO/WASAPI device mid-recall. FabFilter/iZotope RX proprietary runtime behavior and live stability require physical headphone trial. No claims of xrun-free or stage-ready operation. Keep draft; merge only after validation.

Test: save two distinct vendor-state presets using MUTE OUTPUT (P2.4 SAVE gate), unmute, alternate RECALL LIVE while continuous microphone/music is running. Observe restored editor states, master L/R, graph ACK and device start/stop counters in diagnostics. Physical 30-minute soak required.

Copy link
Copy Markdown
Owner Author

Backlog reconciliation — archived as SUPERSEDED (NOT merged). Legacy preset graph swap proposal predates current prepared FX leases/publisher. Any de-click/retirement idea must be verified against M-U1 #266 and vendor editor/Show issue #180, not merged into current callback.

Current PRD v5 / ARD v5. Active owners: native #266 / epic #192, UI #265, physical #15, Show #180 and owner GUI #176. This PR's historical commits remain accessible, and no head is blindly merged into modern engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant