Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
> **M1B CURRENT OPERATOR INTEGRATION (2026-10-31):** See [CHANNEL FOCUS + LIVE AUX MASTER engineering gate](docs/M1B_SELECTED_CHANNEL_AND_AUX_MASTER_20261031.md) in addition to [Product Truth](docs/PRODUCT_TRUTH_CROSS_THREAD_20261031.md). A thin selected-channel SOURCE→FX→SENDS→OUTPUT header reads ONLY native ACK data; each click enters the SAME existing native controller. A separate AUX master return fader uses the SAME prepared realtime graph, atomic target, <=64-sample ramp and native epoch/revision ACK; valid MAIN and MONITOR sinks use the SAME gain. No global output MUTE, duplicate graph or second driver. No live armed SOURCE hot-switch, GROUP/DCA/MATRIX, dynamic live +CHANNEL, Master VST, PDC or verified zero-FX hardware release. Preserve RAIL3/L2 and 64-pin verified input setup from #224, output streaming, FACTORYFX quarantine, FX leases, Show and #15.

> **CUSTOM DEVICE SETUP DESIGN LOCK (2026-10-31) — IMPLEMENTATION PENDING:** Read [PRD](docs/PRD_CUSTOM_AUDIO_DEVICE_SETUP_20261031.md), [ARD](docs/ARD_CUSTOM_AUDIO_DEVICE_SETUP_20261031.md) and [per-file handoff](docs/HANDOFF_CUSTOM_AUDIO_DEVICE_SETUP_20261031.md) before touching AUDIO DEVICE / DEVICE-DRIVER / ASIO / WASAPI. Existing WebView2 Audio I/O Matrix must become the SINGLE real device setup UI: backend, actual capture/playback endpoints, sample rate, buffer, enabled pins, APPLY with verified JUCE readback, fail-closed muted rollback. Keep ONE existing AudioDeviceManager, native routing epoch/ACK, MAIN/MONITOR/OUTPUT1/FX and #15 gate. Currently the DEVICE tab remains inventory-only and opens native AudioDeviceSelectorComponent; this feature is NOT YET IMPLEMENTED. Driver scans/opens may block vendor code: don't claim async bridge eliminates freeze; audit pinned JUCE thread affinity and instrument physical hangs. No second hardware setup UI, manager, audio graph or naive per-dropdown device restart.

> **SOURCE1 + SETUP1 — 2026-10-31:** See [source/real-device integrated milestone](docs/SOURCE1_NATIVE_MUTED_FAST_COMMIT_20261031.md). 64-pin real JUCE ASIO/WASAPI/DirectSound selector; current hardware Input→CH from MIX ROUTE auto-submits via ONE native routingDryApply/ACK only if outputs already MUTED and no other drafts. Armed output fails closed, no auto-mute/unmute; true RT clickless source crossfade and persistent named aliases are NOT IMPLEMENTED. Preserve #223 AUX live, MAIN/MONITOR/OUTPUT1, L2/RAIL3, VST/Show and physical #15 gate.\n\n> **M1 LIVE AUX POST FADER (2026-10-31):** [Native implementation & FAT contract](docs/M1_LIVE_AUX_SEND_FADER_20261031.md). Ordinary gain on an EXISTING native CH→AUX POST edge is a realtime atomic target with callback-only <=64-sample smoothing. Control write via `routingAuxSendGain` is fenced by actual device epoch, published routing revision, existing edge, 0..1 value and native ACK. It does NOT MUTE outputs, recompile topology, detach, instantiate plugins or change MAIN fader. New send/return enable, PRE/PAN and physical I/O remain structural DRAFT→MUTE→APPLY→native ACK. No fake dynamic CH11, Master FX or hardware crackle certification. Preserve source and standalone mixer-io JS parity, L2/RAIL3, DYN1B, OUTPUT1, factory lock and P0 hardware #15.
Expand Down
184 changes: 181 additions & 3 deletions AR-MIX-Live-FX-Host-Standalone-v0.3.html
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,58 @@
.arIOOverlay[data-active-tab="device"] .arIOWindow footer [data-io-revert],
.arIOOverlay[data-active-tab="device"] .arIOWindow footer [data-io-internal],
.arIOOverlay[data-active-tab="device"] .arIOWindow footer [data-io-advanced]{display:none!important}

/* M1 CHANNEL FOCUS: one thin native-ACK signal-flow header across the workbench,
never packed into RAIL3/sidebar. No blur, animations or per-pointer redraw. */
#app .workbench .arChannelSignalFlow{
box-sizing:border-box;flex:none;display:flex;align-items:stretch;gap:4px;
width:100%;height:35px;padding:3px 5px;min-width:0;
border-bottom:1px solid #425966;background:linear-gradient(#23353e,#15242d);
color:#d3e6eb;font:500 10px/1.2 "ArSonMix Inter","Segoe UI",sans-serif;
}
#app .workbench .arChannelSignalFlow[hidden]{display:none!important}
#app .arChannelSignalFlow .arFocusIndex{
flex:0 0 51px;display:grid;place-items:center;
background:#14272f;border:1px solid #37535f;color:#b8edf0;
font:600 10px Consolas,monospace;
}
#app .arChannelSignalFlow button{
flex:1 1 0;min-width:0;max-width:none;display:flex;align-items:center;gap:6px;
background:#10232d;border:1px solid #38505d;padding:0 7px;
color:#a2c4ce;font:600 9px "ArSonMix Inter","Segoe UI",sans-serif;
cursor:pointer;white-space:nowrap;text-align:left;
}
#app .arChannelSignalFlow button span{
flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;
white-space:nowrap;color:#e1ebef;font:500 9px Consolas,monospace;
}
#app .arChannelSignalFlow[data-native-state="unverified"] button span{
color:#baa88c;
}
#app .arChannelSignalFlow button:hover{background:#203b48;border-color:#4c8894}
#app .arChannelSignalFlow button:focus-visible{
outline:2px solid #81dfe5;outline-offset:-2px;
}
/* Existing MS5 rail lives in a strict two-column grid. AUX MASTER occupies one
additional short row, preserving the existing mode buttons and RAIL3. */
#app .left-rail .arSofControls .arAuxMasterInline{
grid-column:1/-1;display:flex;align-items:center;gap:5px;min-width:0;
height:29px;padding:0 5px;background:#0e2530;border:1px solid #3d6676;
color:#a9d5de;font:550 8px "ArSonMix Inter","Segoe UI",sans-serif;
}
#app .left-rail .arAuxMasterInline input{
flex:1 1 auto;width:36px;min-width:0;accent-color:#52b5c2;
}
#app .left-rail .arAuxMasterInline input:disabled{opacity:.38}
#app .left-rail .arAuxMasterInline output{
flex:0 0 43px;text-align:right;color:#d5edf2;
font:9px Consolas,monospace;white-space:nowrap;
}
@media(max-width:1080px){
#app .arChannelSignalFlow button{padding:0 4px;gap:3px;font-size:8px}
#app .arChannelSignalFlow button span{font-size:8px}
#app .arChannelSignalFlow .arFocusIndex{flex-basis:45px}
}
</style></head>
<body>
<div id="app" class="app">
Expand Down Expand Up @@ -3190,10 +3242,68 @@
const toolbar=node('div','arMixerBankBar');
toolbar.innerHTML='<div class="arMixerBankModes" role="group" aria-label="Mixer channel bank"><button type="button" class="btn-180 active" data-mix-mode="FX" aria-pressed="true">FX</button><button type="button" class="btn-180" data-mix-mode="ROUTE" aria-pressed="false">ROUTE</button><button type="button" class="btn-180" data-mix-mode="SENDS" aria-pressed="false">SENDS</button></div><div class="arMixerBankInfo" id="arMixerBankInfo" role="status">NO HARDWARE · PREVIEW</div><button type="button" class="btn-180 arMixApply" data-mix-apply title="MUTE OUTPUT first; native ACK required">APPLY</button><button type="button" class="btn-180 arMixIoOpen" data-io-open>AUDIO I/O</button>';
host.insertBefore(toolbar,mixer);
// One genuinely selected-channel journey, NOT another DSP or source registry.
// Four compact steps show ACKNOWLEDGED state, never stage a hidden graph.
const focusFlow=node('div','arChannelSignalFlow');
focusFlow.setAttribute('aria-label','Selected live mixer channel signal flow');
focusFlow.innerHTML='<span class="arFocusIndex" data-focus-channel>CH 01</span>'+
'<button type="button" data-focus-step="source" title="Select verified physical input">SOURCE <span data-focus-source>UNPATCHED</span></button>'+
'<button type="button" data-focus-step="fx" title="Open existing native insert rack">FX <span data-focus-fx>0 INSERTS</span></button>'+
'<button type="button" data-focus-step="sends" title="Open channel AUX sends">SEND <span data-focus-sends>NO AUX</span></button>'+
'<button type="button" data-focus-step="output" title="Open verified output routing">OUT <span data-focus-out>NO OUTPUT</span></button>';
// mixer-layout.js moves the whole toolbar into the LEFT RAIL.
// The selected channel overview is therefore a separate compact WORKBENCH
// row; placing it in toolbar would jam 4 steps into 168px of sidebar.
host.insertBefore(focusFlow,mixer);
let focusIndex=0,focusSignature='';
const focusSet=(q,value)=>{
const target=focusFlow.querySelector(q);
if(target&&target.textContent!==value)target.textContent=value;
};
const selectedInputChannel=()=>{
const chosen=mixer.querySelector('.strip[data-strip].selected');
const i=chosen?Number(chosen.dataset.strip):focusIndex;
return Number.isInteger(i)&&i>=0&&i<10?i:0;
};
function refreshFocus(s){
const i=selectedInputChannel(),r=s.acceptedRoute?.channels?.[i];
const ack=!!s.ready&&!!s.active&&!!r&&Number(s.acceptedRoute.deviceEpoch)===Number(s.epoch);
const driverPins=portList(s);
const names=id=>driverPins.find(p=>p.port===id)?.label;
let source='UNPATCHED';
if(ack&&r.mode==='MONO')
source=names(r.left)||'PIN '+(Number(r.left)+1)+' · VERIFY';
if(ack&&r.mode==='STEREO')
source=(names(r.left)||'L'+(Number(r.left)+1))+' / '+
(names(r.right)||'R'+(Number(r.right)+1));
if(ack&&r.mode==='BUS')source='INTERNAL BUS';
if(!ack)source='NO NATIVE ACK';
const routed=ack?lastStatus.dryRoutingLab?.fxInstances?.[i]:null;
const inserts=Array.isArray(routed)?routed.length:0;
const legacy=i===0?Math.max(0,Number(lastStatus.chainCount)||0):0;
const fx=(inserts+legacy)+' VST3'+(legacy&&inserts?' · SPLIT OWNERS':'');
const sends=ack&&Array.isArray(s.acceptedRoute.sends)?
s.acceptedRoute.sends.filter(x=>x.from===i&&x.to>=10&&x.to<14):[];
const sendsText=sends.length?sends.map(x=>'AUX'+(x.to-9)+' '+x.tap).join(' / '):'NO AUX';
const outputs=s.mainOutputs?.length===2?s.mainOutputs:[];
const dest=ack&&r.main&&outputs.length===2?
'MAIN HW '+(outputs[0]+1)+'/'+(outputs[1]+1):
ack&&r.main?'MAIN · NO PIN':ack?'SEND ONLY':'NO OUTPUT';
const sig=JSON.stringify([i,source,fx,sendsText,dest,ack,s.pending]);
if(sig!==focusSignature){
focusIndex=i;focusSignature=sig;
focusSet('[data-focus-channel]','CH '+String(i+1).padStart(2,'0'));
focusSet('[data-focus-source]',source);
focusSet('[data-focus-fx]',fx);
focusSet('[data-focus-sends]',sendsText);
focusSet('[data-focus-out]',dest);
focusFlow.dataset.nativeState=ack&&!s.pending?'accepted':'unverified';
}
}
// MS5: explicit Sends-on-Faders control, scoped to a single real AUX return.
// MAIN fader DOM and all audio controls remain resident and unmodified.
const sofControls=node('div','arSofControls');
sofControls.innerHTML='<select data-sof-bus aria-label="Sends on Faders AUX destination"><option value="0">AUX 1</option><option value="1">AUX 2</option><option value="2">AUX 3</option><option value="3">AUX 4</option></select><button type="button" class="btn-180" data-sof-toggle aria-pressed="false">SEND FADERS</button>';
sofControls.innerHTML='<select data-sof-bus aria-label="Sends on Faders AUX destination"><option value="0">AUX 1</option><option value="1">AUX 2</option><option value="2">AUX 3</option><option value="3">AUX 4</option></select><button type="button" class="btn-180" data-sof-toggle aria-pressed="false">SEND FADERS</button><label class="arAuxMasterInline" title="Native AUX return gain — live, after AUX inserts">AUX MASTER <input type="range" data-aux-master min="-60" max="6" step=".5" value="0" aria-label="Selected AUX master return level"><output data-aux-master-read>0.0 dB</output></label>';
sofControls.hidden=true;toolbar.appendChild(sofControls);
const overlay=node('div','arIOOverlay');
overlay.id='arIOOverlay';overlay.hidden=true;
Expand Down Expand Up @@ -3311,6 +3421,18 @@
sofControls.hidden=mode!=='SENDS';
const selector=sofControls.querySelector('[data-sof-bus]');
const toggle=sofControls.querySelector('[data-sof-toggle]');
const auxLevel=sofControls.querySelector('[data-aux-master]');
const auxRead=sofControls.querySelector('[data-aux-master-read]');
const busSelected=Number(selector.value);
const acceptedBus=s.acceptedRoute?.auxes?.[busSelected];
const enabled=!!acceptedBus?.enabled&&!s.pending&&s.ready&&isNative();
const currentGain=Number(acceptedBus?.gain);
const db=Number.isFinite(currentGain)&&currentGain>0
?Math.max(-60,Math.min(6,20*Math.log10(currentGain))):-60;
auxLevel.disabled=!enabled;
if(document.activeElement!==auxLevel)auxLevel.value=String(db);
const readText=enabled?(db<=-60?'OFF':db.toFixed(1)+' dB'):'AUX OFF';
if(auxRead.textContent!==readText)auxRead.textContent=readText;
if(sofBus>=0&&(!isNative()||!s.ready||!s.active||s.epoch!==sofEpoch)){
leaveSof();sofStatus('SEND FADERS EXITED · DEVICE CHANGED');
}
Expand Down Expand Up @@ -3522,6 +3644,7 @@
if(!overlay.hidden)refreshIO();
if(!sendEditor.hidden)drawSendEditor();
sofRefresh(s);
refreshFocus(s);
}

// IO-MATRIX: reusable presentation of the existing native 10-channel graph.
Expand Down Expand Up @@ -4029,6 +4152,50 @@
lastSignature='';refresh();
}
},true);
// AUX return fader updates only after release/keyboard change; native
// DSP ramps it inside one callback. Never touch the MAIN fader or rack.
sofControls.addEventListener('change',event=>{
if(event.target.matches('[data-sof-bus]')){sofMessage='';refresh();return;}
if(!event.target.matches('[data-aux-master]'))return;
const bus=Number(sofControls.querySelector('[data-sof-bus]').value);
const db=Number(event.target.value);
const gain=db<=-60?0:Math.pow(10,db/20);
const answer=window.__arMixSetLiveAuxMasterGain?.(bus,+gain.toFixed(7));
sofMessage=answer?.ok?'AUX MASTER · WAIT NATIVE ACK':
answer?.error||'AUX master unavailable';
refresh();
});
// Channel focus is intentionally lightweight: point into existing MIX
// modes and native controller, never create a parallel mixer/FX model.
focusFlow.addEventListener('click',event=>{
const button=event.target.closest('[data-focus-step]');
if(!button)return;
event.preventDefault();
const index=selectedInputChannel();
const strip=mixer.querySelector('[data-strip="'+index+'"]');
const step=button.dataset.focusStep;
if(step==='source'){
if(!route().ready)openIO('device');
else {
setMode('ROUTE');
strip?.querySelector('.arBankSource')?.focus();
}
} else if(step==='fx'){
setMode('FX');
if(typeof chooseChannel==='function')chooseChannel(index);
strip?.querySelector('.rack')?.scrollIntoView?.({block:'nearest',inline:'nearest'});
} else if(step==='sends'){
setMode('SENDS');
const sends=route().acceptedRoute?.sends||[];
const found=sends.find(x=>x.from===index&&x.to>=10&&x.to<14);
editSend(index,found?found.to-10:0,button);
} else if(step==='output')openIO('outputs',index);
});
document.addEventListener('click',event=>{
if(event.target.closest?.('#arChannelFocus,[data-focus-step]'))return;
const strip=event.target.closest?.('.strip[data-strip],[data-choose],[data-chanselect]');
if(strip)refreshFocus(route());
});
// The legacy native VST3 bridge registers document capture before this module.
// Window capture intercepts only AUDIO SETUP, without changing FX/Orbit ownership.
window.addEventListener('click',e=>{
Expand Down Expand Up @@ -4142,8 +4309,13 @@
if(!sendEditor.hidden){closeSendEditor();e.stopImmediatePropagation();}
else if(!overlay.hidden){closeIO();e.stopImmediatePropagation();}
},true);
const observer=new MutationObserver(records=>{if(records.some(r=>r.type==='childList'))refresh();});
observer.observe(mixer,{childList:true});
const observer=new MutationObserver(records=>{
if(records.some(r=>r.type==='childList'))refresh();
if(records.some(r=>r.attributeName==='class'))
focusFlow.hidden=mixer.classList.contains('hidden');
});
observer.observe(mixer,{childList:true,attributes:true,attributeFilter:['class']});
focusFlow.hidden=mixer.classList.contains('hidden');
backend?.addEventListener?.('arMixStatus',d=>{
lastStatus=d;
// 12Hz native telemetry: update only when topology, epoch or safety changes.
Expand All @@ -4168,6 +4340,12 @@
refresh();
});
window.addEventListener('arMixRoutingDraftChanged',()=>{lastSignature='';refresh();});
window.addEventListener('arMixAuxMasterGainResult',event=>{
const ack=event.detail||{};
sofMessage=ack.ok?'AUX '+(ack.bus+1)+' MASTER · LIVE NATIVE ACK':
'AUX MASTER REJECTED · '+(ack.error||'Stale device');
refresh();
});
window.addEventListener('arMixAuxSendGainResult',event=>{
const a=event.detail||{};
if(sofBus>=0&&a.bus===sofBus){
Expand Down
Loading
Loading