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
33 changes: 26 additions & 7 deletions AR-MIX-Live-FX-Host-Standalone-v0.3.html
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@
/* Scope-specific ON palette: only variables change; all keys share
the same seven-layer pad and exact press recipe above. */
#app .toolbar-actions .nav button.btn-180.selected{
--b180-color:#f0f1f3;--b180-border:#939ba5;--b180-ink:#222932;
--b180-color:#b9cf77;--b180-border:#708942;--b180-ink:#263319;
}
#app .left-rail button.btn-180:is(.selected,.active){
--b180-color:var(--b180-on-magenta);--b180-border:#ad6d9f;--b180-ink:#32172f;
Expand All @@ -765,6 +765,8 @@
}
#app .left-rail .rail-presets button.btn-180{text-transform:none}
#app .toolbar-actions .nav button.btn-180{height:34px;min-height:34px;min-width:77px;padding:0 10px!important;letter-spacing:.35px!important}
/* The shared OFF selector inherits #masterLeft specificity through :is(). Scope toolbar OFF with explicit state guards, without new !important paint rules. */
#app .toolbar-actions .nav button.btn-180:not(.selected):not(.active):not(.on):not([aria-pressed="true"]){--b180-color:#adc875;--b180-border:#708942;--b180-ink:#263319}
#app .left-rail button.btn-180 > span,
#app .toolbar-actions .nav button.btn-180 > span{transform:none!important;transition:none!important}

Expand Down Expand Up @@ -1103,11 +1105,20 @@
#app #mixer .fader-zone .meter-signal-area .meter-peak{
bottom:0;left:1px;right:1px;
}
/* P0: static machined recess and narrow black slit. No blur or pointer listeners. */
#app #mixer .fader-zone .fader:before{
top:38px;bottom:39px;
top:7px;bottom:7px;left:50%;width:min(44px,100%);
transform:translateX(-50%);border:1px solid #070e13;border-radius:2px;
background:linear-gradient(90deg,#05090c 0%,#0d151a 12%,#18232b 32%,#1b2831 67%,#2a3943 95%,#46545e 100%);
box-shadow:inset 2px 0 3px #000a,inset -1px 0 2px #ffffff12,0 0 0 1px #27333a;
pointer-events:none;box-sizing:border-box;
}
#app #mixer .fader-zone .fader:after{
top:38px;bottom:39px;
top:10px;bottom:10px;left:50%;width:6px;
transform:translateX(-50%);border:0;border-radius:1px;
background:linear-gradient(90deg,#000204,#060b0f 26%,#020508 65%,#121e26);
box-shadow:inset 1px 0 1px #000b,1px 0 0 #43515a4d;
pointer-events:none;
}
#app #mixer .fader-zone .fader-travel{
position:absolute;top:38px;bottom:39px;left:0;right:0;
Expand Down Expand Up @@ -1491,7 +1502,7 @@
document.querySelectorAll('.strip').forEach(strip=>strip.classList.toggle('selected',strip.id==='masterLeft'));
document.querySelectorAll('#channelList [data-choose]').forEach(row=>row.classList.remove('selected'));
}
function chooseChannel(i){if(i<0||i>=channels.length){flash('Additional bank channels are not populated in this UI study');return}currentChannel=i;renderMixer();if(view==='FX RACK')renderRackWorkspace()}
function chooseChannel(i){if(i<0||i>=channels.length){flash('Additional bank channels are not populated in this UI study');return}masterSelected=false;currentChannel=i;renderMixer();if(view==='FX RACK')renderRackWorkspace()}
function toggleState(i,key){channels[i][key]=!channels[i][key];const btn=document.querySelector(`[data-${key}="${i}"]`);if(btn){btn.classList.toggle('active',channels[i][key]);btn.setAttribute('aria-pressed',String(channels[i][key]))}send(key,channels[i][key],i)}
document.addEventListener('click',e=>{const b=e.target.closest('button,[data-choose],[data-scene],[data-group]');
const icon=e.target.closest('[data-icon-choice]'),color=e.target.closest('[data-color-choice]');
Expand All @@ -1509,7 +1520,7 @@
if(b.dataset.pre!==undefined){let i=+b.dataset.pre;channels[i].pre=!channels[i].pre;b.classList.toggle('active');send('phase',channels[i].pre,i);return}
if(b.dataset.hpf!==undefined){let i=+b.dataset.hpf;channels[i].hpf=!channels[i].hpf;b.classList.toggle('active');send('hpf',channels[i].hpf,i);return}
if(b.dataset.masterInsert!==undefined){pendingMasterSlot=+b.dataset.masterInsert;openPluginBrowser(currentChannel,true);return}
if(b.dataset.masterPower!==undefined){const slot=+b.dataset.masterPower;masterBypassed[slot]=!masterBypassed[slot];renderMaster();persistSession();send('masterFxBypass',{slot,bypass:masterBypassed[slot]},-1);return}
if(b.dataset.masterPower!==undefined){const slot=+b.dataset.masterPower;masterBypassed[slot]=!masterBypassed[slot];renderMaster();if(view==='FX RACK'&&masterSelected)renderMasterRackWorkspace();persistSession();send('masterFxBypass',{slot,bypass:masterBypassed[slot]},-1);return}
if(b.dataset.clip!==undefined){resetClip(b.dataset.clip);return}
if(b.dataset.fxpower!==undefined){const [i,j]=b.dataset.fxpower.split(':').map(Number);setFxBypass(i,j,!bypassed[fxKey(i,j)]);return}
if(b.dataset.insert){let [i,j]=b.dataset.insert.split(':').map(Number);currentChannel=i;pendingSlot=j;openPluginBrowser(i);return}
Expand Down Expand Up @@ -1716,7 +1727,15 @@
function shiftFxMetaLeft(ch,at,len){for(let i=at;i<len-1;i++){fxParams[fxKey(ch,i)]=fxParams[fxKey(ch,i+1)];bypassed[fxKey(ch,i)]=bypassed[fxKey(ch,i+1)]}delete fxParams[fxKey(ch,len-1)];delete bypassed[fxKey(ch,len-1)]}
function setChain(ch,chain){ch.inserts=chain.slice(0,8);renderMixer();if(view==='FX RACK')renderRackWorkspace()}
function focusOptions(){return channels.map((c,i)=>`<option value="${i}" ${i===currentChannel?'selected':''}>${i+1} · ${safeText(c.name)}</option>`).join('')}
function renderRackWorkspace(){let c=channels[currentChannel];let chain=normalChain(c);$('rackWorkspace').innerHTML=`<div class="feature-top"><div><span class="eyebrow">YOUR SOUND · CORE WORKFLOW</span><h2>FX Rack — ${safeText(c.name)}</h2><p>Build your signature vocal sound. Add, reorder, bypass, and store your VST chain.</p></div><div style="display:flex;gap:7px"><select id="rackChannel" class="ghost-action" aria-label="Choose channel">${focusOptions()}</select><button class="ghost-action" id="recallFxPreset">LOAD CHAIN</button><button class="action" id="saveFxFromRack">SAVE FX CHAIN</button></div></div><div class="rack-layout"><div class="chain-list"><div class="chain-end">● AUDIO INPUT · ${safeText(c.name)}</div><div class="chain-path">↓</div>${chain.map((name,i)=>`<div class="chain-node ${bypassed[currentChannel+':'+i]?'dimmed':''}"><span class="chain-index">${String(i+1).padStart(2,'0')}</span><span class="chain-name"><b>${safeText(name)}</b><small>${safeText(pluginCatalog.find(p=>p.name===name)?.hint||'VST3 plugin · mock chain state')}</small></span><button data-chainedit="${i}" title="Open plugin controls">EDIT</button><button data-chainbypass="${i}" class="${bypassed[fxKey(currentChannel,i)]?'is-bypassed':'power-on'}" aria-pressed="${!bypassed[fxKey(currentChannel,i)]}" aria-label="${bypassed[fxKey(currentChannel,i)]?'Enable':'Bypass'} ${safeText(name)}" title="${bypassed[fxKey(currentChannel,i)]?'Enable':'Bypass'} ${safeText(name)}">⏻</button><button data-chainmove="-1" data-index="${i}" title="Move up" ${i===0?'disabled':''}>↑</button><button data-chainmove="1" data-index="${i}" title="Move down" ${i===chain.length-1?'disabled':''}>↓</button><button data-chainremove="${i}" title="Remove FX">×</button></div><div class="chain-path">↓</div>`).join('')}<button class="chain-add" data-addplugin="1">+ ADD VST3 EFFECT</button><div class="chain-path">↓</div><div class="chain-end">◎ OUTPUT · MASTER / STREAM</div></div>${pluginEditorIndex!==null&&pluginEditorIndex<chain.length?pluginInspector(currentChannel,pluginEditorIndex):`<div class="guide-panel"><h3>Ready-to-use Sound</h3><p>Start with a preset, then personalize your FX chain. No complex routing required.</p><div>${['Clean Vocal','Warm Karaoke','Live Broadcast'].map(s=>`<button class="guide-chip" data-preset="${s}">${s}</button>`).join('')}</div><h3 style="margin-top:20px">Make it sound better</h3><p>Recommended signal path:</p><p>Noise Gate → EQ → Compressor → De-Esser → Reverb</p><h3 style="margin-top:20px">Demo status</h3><p>Plugin names and bypass buttons currently change visual state only. Installed VST3 scanning and DSP are scheduled for the native engine phase.</p></div>`}</div>`}
function renderMasterRackWorkspace(){
const chain=masterInserts.filter(Boolean).slice(0,6);
$('rackWorkspace').innerHTML=`<div class="feature-top"><div><span class="eyebrow">MASTER BUS · UI PREVIEW</span><h2>FX Rack — MASTER</h2><p>Native MASTER VST3 processing is not implemented yet.</p></div><button class="action" data-master-insert="${Math.min(chain.length,5)}" ${chain.length>=6?"disabled":""}>${chain.length>=6?"FX FULL":"+ ADD FX"}</button></div>
<div class="rack-layout"><div class="chain-list"><div class="chain-end">● MIXED INPUTS</div><div class="chain-path">↓</div>
${chain.map((name,i)=>`<div class="chain-node"><span class="chain-index">${String(i+1).padStart(2,"0")}</span><span class="chain-name"><b>${safeText(name)}</b><small>Preview FX only</small></span><button data-master-insert="${i}">EDIT</button><button data-master-power="${i}" aria-label="Toggle preview master bypass">⏻</button></div><div class="chain-path">↓</div>`).join("")}
<button class="chain-add" data-master-insert="${Math.min(chain.length,5)}" ${chain.length>=6?"disabled":""}>${chain.length>=6?"FX FULL":"+ ADD FX"}</button><div class="chain-path">↓</div><div class="chain-end">◎ MASTER OUTPUT</div></div>
<div class="guide-panel"><h3>MASTER · PREVIEW</h3><p>Master FX will become real audio processors after native multi-channel routing is integrated.</p></div></div>`;
}
function renderRackWorkspace(){if(masterSelected){renderMasterRackWorkspace();return;}let c=channels[currentChannel];let chain=normalChain(c);$('rackWorkspace').innerHTML=`<div class="feature-top"><div><span class="eyebrow">YOUR SOUND · CORE WORKFLOW</span><h2>FX Rack — ${safeText(c.name)}</h2><p>Build your signature vocal sound. Add, reorder, bypass, and store your VST chain.</p></div><div style="display:flex;gap:7px"><select id="rackChannel" class="ghost-action" aria-label="Choose channel">${focusOptions()}</select><button class="ghost-action" id="recallFxPreset">LOAD CHAIN</button><button class="action" id="saveFxFromRack">SAVE FX CHAIN</button></div></div><div class="rack-layout"><div class="chain-list"><div class="chain-end">● AUDIO INPUT · ${safeText(c.name)}</div><div class="chain-path">↓</div>${chain.map((name,i)=>`<div class="chain-node ${bypassed[currentChannel+':'+i]?'dimmed':''}"><span class="chain-index">${String(i+1).padStart(2,'0')}</span><span class="chain-name"><b>${safeText(name)}</b><small>${safeText(pluginCatalog.find(p=>p.name===name)?.hint||'VST3 plugin · mock chain state')}</small></span><button data-chainedit="${i}" title="Open plugin controls">EDIT</button><button data-chainbypass="${i}" class="${bypassed[fxKey(currentChannel,i)]?'is-bypassed':'power-on'}" aria-pressed="${!bypassed[fxKey(currentChannel,i)]}" aria-label="${bypassed[fxKey(currentChannel,i)]?'Enable':'Bypass'} ${safeText(name)}" title="${bypassed[fxKey(currentChannel,i)]?'Enable':'Bypass'} ${safeText(name)}">⏻</button><button data-chainmove="-1" data-index="${i}" title="Move up" ${i===0?'disabled':''}>↑</button><button data-chainmove="1" data-index="${i}" title="Move down" ${i===chain.length-1?'disabled':''}>↓</button><button data-chainremove="${i}" title="Remove FX">×</button></div><div class="chain-path">↓</div>`).join('')}<button class="chain-add" data-addplugin="1">+ ADD VST3 EFFECT</button><div class="chain-path">↓</div><div class="chain-end">◎ OUTPUT · MASTER / STREAM</div></div>${pluginEditorIndex!==null&&pluginEditorIndex<chain.length?pluginInspector(currentChannel,pluginEditorIndex):`<div class="guide-panel"><h3>Ready-to-use Sound</h3><p>Start with a preset, then personalize your FX chain. No complex routing required.</p><div>${['Clean Vocal','Warm Karaoke','Live Broadcast'].map(s=>`<button class="guide-chip" data-preset="${s}">${s}</button>`).join('')}</div><h3 style="margin-top:20px">Make it sound better</h3><p>Recommended signal path:</p><p>Noise Gate → EQ → Compressor → De-Esser → Reverb</p><h3 style="margin-top:20px">Demo status</h3><p>Plugin names and bypass buttons currently change visual state only. Installed VST3 scanning and DSP are scheduled for the native engine phase.</p></div>`}</div>`}
function pluginInspector(ch,slot){const name=normalChain(channels[ch])[slot],v=getFxParams(ch,slot);return `<div class="guide-panel plugin-inspector"><span class="eyebrow">FX EDITOR · DEMO PARAMETERS</span><h3>${safeText(name)}</h3><p>These generic controls demonstrate the editing and preset workflow. The real VST3 editor will replace them when connected.</p><label>Mix <output data-fxread="mix">${v.mix}%</output><input type="range" min="0" max="100" value="${v.mix}" data-fxparam="mix" data-slot="${slot}"></label><label>Amount <output data-fxread="amount">${v.amount}%</output><input type="range" min="0" max="100" value="${v.amount}" data-fxparam="amount" data-slot="${slot}"></label><label>Output <output data-fxread="output">${v.output>0?'+':''}${v.output} dB</output><input type="range" min="-24" max="12" value="${v.output}" data-fxparam="output" data-slot="${slot}"></label><button id="closeFxInspector" class="ghost-action" style="margin-top:20px;width:100%">CLOSE EDITOR</button></div>`}
function renderSignalFlow(){$('rackWorkspace').innerHTML=`<div class="feature-top"><div><span class="eyebrow">NO TECHNICAL PATCHBAY REQUIRED</span><h2>Signal Flow — See where your voice goes</h2><p>A beginner-first view of the real-time audio path. Select your audio device in Setup.</p></div><button class="action" id="openSetupFromFlow">CHOOSE AUDIO DEVICE</button></div><div class="workflow"><div class="flow-node"><span class="eyebrow">01 · INPUT</span><b>Microphone</b><small>Audio Interface<br>ASIO or WASAPI</small></div><span class="flow-arrow">➜</span><div class="flow-node"><span class="eyebrow">02 · FX CHAIN</span><b>VST3 Plugins</b><small>EQ · Dynamics<br>Reverb · Delay</small></div><span class="flow-arrow">➜</span><div class="flow-node"><span class="eyebrow">03 · MIXER</span><b>Mix & Monitor</b><small>Fader · Pan<br>Master · Meters</small></div><span class="flow-arrow">➜</span><div class="flow-node"><span class="eyebrow">04 · OUTPUT</span><b>Speakers / Stream</b><small>Audio Device<br>Streaming bridge later</small></div></div><div class="flow-summary"><span>⚠ In this trial the audio flow is a visual concept; no microphone is captured and no audio is sent to a livestream.</span><button class="ghost-action" id="flowFxButton">OPEN FX RACK</button></div>`}
function openPluginBrowser(idx,isMaster=false){if(!isMaster){currentChannel=idx;pendingMasterSlot=null}activeCategory='All';$('pluginModal').classList.remove('hidden');$('pluginTarget').textContent=isMaster?'Adding to MASTER bus · demo FX catalog':'Adding to '+channels[idx].name+' · virtual effects catalog';$('pluginSearch').value='';renderPluginBrowser();$('pluginSearch').focus()}
Expand All @@ -1727,7 +1746,7 @@
const slot=pendingMasterSlot;
if(slot>=6)return;
masterInserts[slot]=name;delete masterBypassed[slot];pendingMasterSlot=null;
closePluginBrowser();renderMaster();persistSession();
closePluginBrowser();renderMaster();if(view==='FX RACK'&&masterSelected)renderMasterRackWorkspace();persistSession();
send('masterChainChanged',{chain:[...masterInserts]},-1);
flash('Master FX updated (GUI preview)');return;
}
Expand Down
27 changes: 27 additions & 0 deletions tests/gui_workflow_contract_test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,30 @@ test('quantised LED meter avoids redundant raw CSS writes while preserving diagn
assert.ok(monitor.includes('const setTextIfChanged='));
assert.ok(bridge.includes('footer.textContent!==text'));
});


test('P0 FX Rack allows selection of every channel and MASTER without falsely loading VST3',()=>{
for(const marker of ['function rackTarget','function rackOptions','function renderPendingRack','function openRackTarget','data-native-rack-open','data-native-routing-pending','id="nativeRackChannel"']){
assert.ok(bridge.includes(marker),marker);
}
assert.ok(bridge.includes('if(rackTarget()!==0)'));
assert.ok(bridge.includes('openRackTarget("master")'));
assert.ok(bridge.includes('rack.dataset.nativeSig="p0-master-pending"'));
assert.ok(bridge.includes('const signature="p0-unrouted-"+i'));
assert.ok(bridge.includes('if(rack.dataset.nativeSig==="p0-unrouted-"+i)return;'), 'No idle FX rack DOM rewrites');
assert.ok(bridge.includes('if(rack?.dataset.nativeSig==="p0-master-pending")return;'), 'No idle MASTER rack rewrites');
assert.ok(app.includes('function renderMasterRackWorkspace'));
assert.ok(app.includes('masterSelected=false;currentChannel=i;renderMixer()'));
assert.ok(cpp.includes('channel == 1'), 'P0 must preserve truthful Channel 1-only native DSP');
});
test('P0 selected toolbar pad and fader recess are paint-only refinements',()=>{
const btn=read('web/styles-src/20-button-180.css');
const fader=read('web/styles-src/42-mixer-premium.css');
assert.ok(btn.includes('--b180-color:#b9cf77;--b180-border:#708942;--b180-ink:#263319'));
assert.ok(fader.includes('width:min(44px,100%)'));
assert.ok(fader.includes('width:6px'));
assert.ok(fader.includes('top:7px;bottom:7px'));
assert.ok(fader.includes('pointer-events:none'));
assert.ok(css.includes('transform:translate(-50%,-38px)'));
assert.ok(!fader.includes('backdrop-filter:blur('));
});
Loading
Loading