Skip to content

P0 DAW First Sound: route any of 10 channel IN selectors directly to verified native hardware - #415

Closed
masarray wants to merge 28 commits into
mainfrom
integration/daW-direct-strip-input-20261105
Closed

masarray wants to merge 28 commits into
mainfrom
integration/daW-direct-strip-input-20261105

Conversation

@masarray

@masarray masarray commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Closes a central UX disconnect in #412. Built on HEAD e477b3e and merged #411, not historical feature branches.

Source-grounded root cause

The actual shipped /preview/ WebView2 bundle loads only web/approved-native-bridge.js and its transport contract, not the legacy web/mixer-io.js / monitor.js setup/routing UI. Its approved on-strip IN dropdown was still a browser DEMO control that native G0 intercepted as unsupported; only separate More > PATCH CH1 > ARM was wired. This was why the app remained complicated and why changing unshipped mixer-io.js would not solve the operator's screenshots.

One integrated DAW workflow, no second DSP or GUI

  • Native M4 reports ten actual physical channel sources in the existing G0 snapshot, gated by current verified device+epoch+revision, valid enabled physical pins, and actual accepted/prepared native channel rows. No ChannelId/PCM fabrication.
  • The already-visible approved mixer IN selector on CH1–CH10 uses verified mono and adjacent stereo hardware ports, and sends the exact selected strip ordinal to the existing routingSourceSwitch real DSP kernel. Uses native epoch/revision and source ACK/readback; no patch-wizard, no JS virtual audio engine. Nonadjacent advanced stereo routing is out of scope.
  • Replace redundant CH1-only More Patch/Arm wizard with a single Audio I/O settings entry that opens a scoped compact native WebView dialog populated by real audioDeviceInventory and audioDeviceApply events. Existing stock JUCE AudioDeviceSelectorComponent remains available in source for advanced recovery, not the default operator workflow.
  • A clearly labelled I ON / I OFF switch on MAIN offers a single explicit monitoring control; native preflight still rejects wrong output, stale device, or unaccepted routing. Hardware reconfiguration internally mutes output before changing device, without putting the user through a multi-step START/ARM sequence.
  • Virtual VB-Cable output is identified as not automatically audible on headphones. No invented output or auto route.
  • Keep approved GUI/CSS/engine, one JUCE realtime callback and one native output ARM authority. 12Hz telemetry only updates select options when the port list changes; no heavy DOM repaint loop.

Actual ten-channel + MAIN mixing control (not merely selectors)

  • In the same installed G0 M4 PCM kernel, source status now includes the real 10-strip fader/pan/mute/solo readback and callback-derived L/R meters; MAIN actual fader/mute atomics are read back separately. No synthetic gain or browser-made meter.
  • Each native gesture uses a bounded requestId, exact device epoch/revision, verified native ACK plus a subsequent producer readback before the GUI displays acceptance. Fail/reopen/hotplug rolls back the view, with no UI-owned audio DSP. The normal fader/pan/mute/solo workflow is no longer blocked merely because newer universal ChannelId graph is not admitted.
  • routingM4ChannelControl delegates to the existing LiveDryRoutingLab::setChannelParameter; routingM4MasterControl delegates to existing LiveAudioEngine atomic MASTER controls. Main volume and panic MUTE remain usable without extra START wizard.
  • Output destination on the visible MAIN strip reflects the real JUCE playback device, not the Pages virtual demonstration. Selecting a change opens the same compact native Audio I/O setup; changing sound card remains an explicit, safety-gated hardware transaction.

Qualification and stop-ship

Windows MSVC/JUCE build + 55 native tests, JS native contracts, approved GUI provenance and Chromium. Real live performance hardware FAT remains pending: wired MAIN output, source/fader/mute, 0FX ≥30 minutes and VST3. Do not mark product ready based only on CI. Do not merge until exact head checks pass.

Adobe benchmarks: https://helpx.adobe.com/audition/desktop/importing-recording-and-playing/recording-audio.html ; https://www.image-line.com/fl-studio-learning/fl-studio-online-manual/html/mixer.htm


2026-11-08 reconciliation: ARCHIVED, NOT MERGED

Superseded competing first-sound branch based on pre-#418 source. Current main has one native approved input/WIRE/ACK flow; retaining this as an active merge candidate risks regressing newer routing code. Keep user acceptance questions in #412.

Current authority: main, #418. Historical branch retained; hardware FAT not inferred.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 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-11-05T05:22:38.442204Z 0e6c0be 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: 0e6c0be5da

ℹ️ 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".

Comment on lines +159 to +160
const physicalUiIds=(scope?.tracks||[]).filter(t=>t.kind==="audio")
.slice(0,10).map(t=>String(t.id));

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 Refresh physical strip identities after native graph projection

Once an admitted native snapshot reaches projection(), it creates replacement tracks through scope.make() and installs them with new UI IDs, but physicalUiIds permanently retains the initial demo IDs. Consequently, subsequent syncDawNativeInputs() calls cannot find the rendered strips, leaving their IN selectors with demo options and no nativeChannel binding; further physical input changes are rejected. An in-memory execution of the bridge reproduced captured IDs 1–10 versus projected IDs 13–22. Rebuild the physical-strip mapping from the accepted projection rather than caching startup identities.

AGENTS.md reference: AGENTS.md:L36-L36

Useful? React with 👍 / 👎.

Comment on lines +264 to +268
function createAudioDeviceDialog(){
if(deviceDialog)return deviceDialog;
const style=document.createElement("style");
style.id="armix-native-device-style";
style.textContent=`

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 Keep new visual components out of the native-only adapter

Opening Audio I/O settings now renders a separately styled dialog defined entirely inside the native bridge, and syncDawNativeInputs() also injects a new MAIN monitoring button absent from the assembled public preview. These are native-only appearance and interaction changes, not data/event-authority substitutions, so the Windows GUI no longer matches the sole approved /preview/ GUI. AGENTS.md explicitly restricts the adapter to authority changes; introduce any approved visual components in the shared assembled GUI and bind native behavior to those components instead.

AGENTS.md reference: AGENTS.md:L34-L34

Useful? React with 👍 / 👎.

Comment on lines +378 to +381
if(!deviceDraft){
deviceDraft={backend:active.backend||types[0]?.name||"",
captureDevice:active.captureDevice||"",playbackDevice:active.playbackDevice||"",
sampleRate:0,bufferSize:0};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Initialize device drafts to the displayed endpoint selections

When the inventory has available devices but no active capture/playback names, the draft stores empty strings while fillSelect() visually selects each list's first option. Apply then remains disabled because those empty draft values are not in the device lists. On a backend with only one input or output, the user cannot even trigger a change to select that already-displayed sole option, preventing recovery through the replacement setup dialog. Initialize missing draft endpoints from the selected backend's actual lists, respecting duplex pairing, or synchronize the draft with the populated selects.

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