Skip to content

P1J: preserve live VST3 instances through routing edits + native session SSOT + Signal Flow routing - #130

Merged
masarray merged 13 commits into
mainfrom
feature/p1j-stable-native-fx-session-20261029
Oct 28, 2026
Merged

masarray merged 13 commits into
mainfrom
feature/p1j-stable-native-fx-session-20261029

Conversation

@masarray

Copy link
Copy Markdown
Owner

P1J — stable vendor FX across routing APPLY + native-acknowledged routing SSOT + Signal Flow access

Based on current main@abcdf2b9 (P1I 10-channel native faders/meter/PAN/MUTE/SOLO and latest merged P0 GUI/Audio Setup/Snapshot work). Explicitly preserves user-approved CH/MASTER GUI, 30fps LED scheduler, Orbit, normal CH1 standalone FX, hardware port identity and zero-FX diagnostics.

Actual native milestone

  • Reuse the exact same JUCE VST3 processor instance across structural routing edits when channel/catalog ID/device epoch/quantum are unchanged; no duplicate plugin scanning/preparation, preserved vendor parameters and time-based FX tail state. Changed inserts instantiate off RT and retire safely. A stable FxInstance owns its MIDI scratch; immutable routing snapshots share it via control-thread-only shared_ptr copies. No audio callback allocation, locks, refcounting or spin. Atomic try-enter gates unexpected concurrent vendor access, fails closed. Vendor C++ exceptions silenced; OS/SEH crash isolation not claimed.
  • RealtimeRoutePublisher::controlPrepared(epoch,revision) exposes the active immutable FX identity only to single control writer; old snapshot leases retain lifetime.
  • Native acceptedRoute saved only after publish ACK; status returns current physical pins, source/BUS assignments, FX IDs and internal PRE/POST sends, plus actual live channel controls. On opening the editor, JS hydrates from the authoritative accepted graph (not stale browser draft), then overlays current native fader/PAN/MUTE/SOLO. fxReused visible in ACK.
  • Windows-host SIGNAL FLOW tab now opens actual Routing Matrix via window.__arMixOpenRoutingLab, retaining old standalone preview; no toolbar/mixer redesign.
  • Extends JUCE native test: same pointer, no plugin prepare/release on route-only revision, old reader lifetime and true processing sample continuity without RT malloc. Extends Node contract. Details in docs/P1J_STABLE_FX_ROUTING_SESSION_20261029.md.

No false equivalence: acceptedRoute is runtime-only (not portable Shows), 1 FX/channel, BUS consumes strips, 2 hardware outputs, PDC absent, output must be muted for structural APPLY, #15 hardware crackle FAT still open. One-SHA exact-head Windows/MSVC CTest/packager and Chromium smoke MUST pass before merging. Do not touch stale parallel #115/#117.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T21:13:20.424313Z ffaec7d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ffaec7db7f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

processing.clear(std::memory_order_release);
}
};
using FxBank=std::array<std::shared_ptr<FxInstance>,channels>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the existing contracts for shared FX ownership

The shared-instance refactor leaves the existing P1H contract incompatible with the implementation: node --test tests/live_routing_ui_contract_test.mjs fails at line 91 because it still requires std::array<std::unique_ptr<Processor>,channels>, and the following assertion also requires the removed direct processors_[strip]->processBlock(buffer,midi) call. Adding the P1J test does not replace those assertions. The Validate native UI JavaScript step in .github/workflows/p1-windows.yml runs this suite and exits on failure before configuring the native build, blocking the required Windows validation. Update the older assertions to verify independent strip instances through the new shared-instance wrapper.

AGENTS.md reference: AGENTS.md:L26-L26

Useful? React with 👍 / 👎.

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