From 457a35b1606ec4a074623798441f06d35c5d8f4f Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:19:59 +0700 Subject: [PATCH 01/42] fix(native): single live mixer instance and focus existing window on repeated launch --- src/Main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Main.cpp b/src/Main.cpp index 6c8023712..28f1e31c7 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -1374,6 +1374,19 @@ class ConsoleApp final : public juce::JUCEApplication public: const juce::String getApplicationName() override { return "ArSonMix"; } const juce::String getApplicationVersion() override { return "0.5.0-native-catalog"; } + // Shared WASAPI/ASIO endpoints, VST editors, settings and WebView2 cache + // belong to one console session. Bring the existing window forward rather + // than creating a second host instance against the same physical device. + bool moreThanOneInstanceAllowed() override { return false; } + void anotherInstanceStarted (const juce::String&) override + { + if (window_) + { + window_->setMinimised (false); + window_->toFront (true); + window_->grabKeyboardFocus(); + } + } void initialise (const juce::String&) override { const auto folder = armix::storage::PortableWorkspace::browserDataRoot(); From 1543b231861ac57911741a40fdf61d3801996054 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:20:25 +0700 Subject: [PATCH 02/42] fix(gui): flat four-sided consistent fader recess and DAW drag indicator --- web/styles-src/42-mixer-premium.css | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/web/styles-src/42-mixer-premium.css b/web/styles-src/42-mixer-premium.css index 9e4ed9ebe..66e2a4631 100644 --- a/web/styles-src/42-mixer-premium.css +++ b/web/styles-src/42-mixer-premium.css @@ -183,3 +183,40 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m } /* LED increments stay fixed and the meter keeps its native dBFS conversion. No hot-path DOM reads, filters, blur or per-frame scale animation. */ + +/* Flat milled-fader bay: a fixed-width, four-sided recess for EVERY strip, + including the wider MASTER. The center detent and 36×77 PNG remain unchanged. + Two static layers, no gradients/glow/filter/animated surface repaint. */ +#app #mixer .fader-zone .fader{ + position:relative;isolation:isolate;min-width:36px; + background:transparent!important;border:0!important;box-shadow:none!important; +} +#app #mixer .fader-zone .fader::before{ + content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; + transform:translateX(-50%);z-index:0;pointer-events:none; + background:#10181e;border:1px solid #34424c;border-radius:2px; + box-shadow:inset 0 2px 2px #050a0e,inset 0 -2px 2px #070c10,inset 2px 0 2px #080e13,inset -1px 0 1px #26333b; +} +#app #mixer .fader-zone .fader::after{ + content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; + transform:translateX(-50%);z-index:0;pointer-events:none; + background:#020506;border:0;box-shadow:inset 1px 0 #26323a,inset -1px 0 #26323a; +} +#app #mixer .fader-zone .fader-travel{z-index:1} +/* DAW insertion markers are painted only while an FX drag is active. */ +#app #mixer .insert-slot.fx-drop-before::before, +#app #mixer .insert-slot.fx-drop-after::after{ + content:"";position:absolute;left:1px;right:1px;height:2px; + background:#9dd6d3;z-index:5;pointer-events:none; +} +#app #mixer .insert-slot{position:relative} +#app #mixer .insert-slot.fx-drop-before::before{top:-1px} +#app #mixer .insert-slot.fx-drop-after::after{bottom:-1px} +.fx-drag-ghost{ + position:fixed;z-index:5000;top:0;left:0;box-sizing:border-box; + min-width:84px;max-width:290px;padding:6px 9px;pointer-events:none; + color:#e7f8f8;background:#172a34;border:1px solid #81c5c8; + border-radius:3px;box-shadow:0 3px 8px #0008;font:11px/1.2 Arial,sans-serif; + white-space:nowrap;overflow:hidden;text-overflow:ellipsis;will-change:transform; +} +.fx-drag-source{opacity:.48} From df8c753c32914d53546cf01d86d704d2fc2b39c2 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:21:33 +0700 Subject: [PATCH 03/42] feat(gui): actual pointer-held FX ghost reorder in offline mixer preview --- web/app.js | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index 281fe2aa7..be11c01c0 100644 --- a/web/app.js +++ b/web/app.js @@ -427,6 +427,73 @@ document.addEventListener('dblclick',e=>{const el=e.target.closest('[data-editst e.preventDefault();e.stopPropagation();openChannelIdentity(i); },true); document.addEventListener('dblclick',e=>{const pan=e.target.closest('[data-pan]');if(pan){e.preventDefault();e.stopPropagation();updatePan(pan.dataset.pan==='master'?'master':+pan.dataset.pan,0)}},true); +// DAW-like insert move in standalone preview: ghost and insertion line during +// pointer travel; one final chain transaction at drop. Native host owns its +// own verified DSP reorder and this preview path never sends native edits. +let fxGesture=null,fxSuppressClick=false; +function clearFxGesture(){ + const d=fxGesture;if(!d)return; + d.marker?.classList.remove('fx-drop-before','fx-drop-after'); + d.source?.classList.remove('fx-drag-source');d.ghost?.remove(); + fxGesture=null; +} +document.addEventListener('pointerdown',e=>{ + if(window.__JUCE__?.backend?.emitEvent||e.button!==0||fxGesture)return; + const button=e.target.closest('#mixer .rack .insert:not(.empty)'); + if(!button)return; + const strip=button.closest('[data-strip]'),rack=button.closest('.rack'); + if(!strip||!rack)return; + const channel=Number(strip.dataset.strip),from=Number(button.dataset.insert?.split(':')[1]); + const count=normalChain(channels[channel]).length; + if(!Number.isInteger(from)||from>=count||count<2)return; + const slots=[...rack.querySelectorAll('.insert-slot')]; + fxGesture={pointerId:e.pointerId,source:button.closest('.insert-slot'),channel,from,count, + startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY, + bounds:slots.map(slot=>({slot,rect:slot.getBoundingClientRect()})), + insertion:from,active:false,ghost:null,marker:null}; +},true); +document.addEventListener('pointermove',e=>{ + const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; + d.x=e.clientX;d.y=e.clientY; + if(!d.active){ + if(Math.hypot(d.x-d.startX,d.y-d.startY)<7)return; + d.active=true;d.source.classList.add('fx-drag-source'); + d.ghost=document.createElement('div');d.ghost.className='fx-drag-ghost'; + d.ghost.textContent=d.source.querySelector('.insert-name')?.textContent||'FX'; + document.body.appendChild(d.ghost); + } + e.preventDefault(); + d.ghost.style.transform='translate3d('+(d.x+12)+'px,'+(d.y+10)+'px,0)'; + d.marker?.classList.remove('fx-drop-before','fx-drop-after');d.marker=null; + const bounds=d.bounds; + const inside=bounds.length&&d.x>=bounds[0].rect.left-15&&d.x<=bounds[0].rect.right+15 + &&d.y>=bounds[0].rect.top-8&&d.y<=bounds[bounds.length-1].rect.bottom+8; + if(!inside){d.insertion=-1;return} + let insertion=d.count; + for(let i=0;i{ + const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; + const active=d.active,from=d.from,at=d.insertion,ch=d.channel; + clearFxGesture(); + if(active){fxSuppressClick=true;setTimeout(()=>fxSuppressClick=false,0); + if(at>=0)movePluginTo(ch,from,Math.max(0,Math.min(d.count-1,at>from?at-1:at)));} +},true); +document.addEventListener('pointercancel',e=>{ + if(fxGesture?.pointerId===e.pointerId)clearFxGesture(); +},true); +document.addEventListener('keydown',e=>{ + if(e.key==='Escape'&&fxGesture){clearFxGesture();fxSuppressClick=true;setTimeout(()=>fxSuppressClick=false,0);} +},true); +document.addEventListener('click',e=>{ + if(fxSuppressClick&&!window.__JUCE__?.backend?.emitEvent){fxSuppressClick=false;e.preventDefault();e.stopImmediatePropagation()} +},true); + // Double-click a fader for 0 dB unity gain, without changing workspace. document.addEventListener('dblclick',e=>{const f=e.target.closest('[data-fader]');if(!f)return;e.preventDefault();e.stopPropagation();updateFader(f.dataset.fader,0)},true); // Idle pointer movement has no handler. Acquire geometry only once per drag @@ -626,7 +693,17 @@ function insertPlugin(name){ flash('Master FX updated (GUI preview)');return; } const c=channels[currentChannel];const chain=normalChain(c);if(chain.length>=8){flash('Maximum 8 FX slots in this UI trial');return}const index=clamp(pendingSlot,0,chain.length);shiftFxMetaRight(currentChannel,index,chain.length);chain.splice(index,0,name);pluginEditorIndex=index;setChain(c,chain);closePluginBrowser();flash(name+' added to preview chain');send('chainChanged',{chain},currentChannel)} -function movePlugin(idx,dir){const c=channels[currentChannel],ch=normalChain(c),n=idx+dir;if(n<0||n>=ch.length)return;[ch[idx],ch[n]]=[ch[n],ch[idx]];moveFxMeta(currentChannel,idx,n);pluginEditorIndex=n;setChain(c,ch);send('chainChanged',{chain:ch},currentChannel)} +function movePluginTo(channel,from,to){ + const c=channels[channel],chain=normalChain(c); + if(from<0||to<0||from>=chain.length||to>=chain.length||from===to)return false; + const [fx]=chain.splice(from,1);chain.splice(to,0,fx); + // Preserve each insert's bypass and editor settings, rather than swapping labels. + for(let i=from;i!==to;i+=to>from?1:-1)moveFxMeta(channel,i,i+(to>from?1:-1)); + if(channel===currentChannel)pluginEditorIndex=to; + setChain(c,chain);persistSession(); + send('chainChanged',{chain},channel);return true; +} +function movePlugin(idx,dir){movePluginTo(currentChannel,idx,idx+dir)} function removePlugin(idx){const c=channels[currentChannel],ch=normalChain(c);shiftFxMetaLeft(currentChannel,idx,ch.length);ch.splice(idx,1);pluginEditorIndex=null;setChain(c,ch);send('chainChanged',{chain:ch},currentChannel)} function setFxBypass(ch,slot,disabled){ const chain=normalChain(channels[ch]); From c7ba298c56749d02b33c9b1d764c1ea225f22e4c Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:23:20 +0700 Subject: [PATCH 04/42] feat(gui): DAW insert ghost and drop-reorder once, six plus ADD FX rows on every strip --- web/bridge.js | 128 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 116 insertions(+), 12 deletions(-) diff --git a/web/bridge.js b/web/bridge.js index de1601071..2191cc364 100644 --- a/web/bridge.js +++ b/web/bridge.js @@ -27,6 +27,7 @@ }); const send = (action, more = {}) => backend.emitEvent("arMixAction", {action, ...more}); + let fxNativeGesture=null,fxNativeBlockClick=false; const state = {catalog: [], chain: [], scanning: false, message: "Connecting to native host...", device: {}, presets: [], addRequestId:0, addError:"", pendingPlugin:"", filter: "", selectedCategory: "All", monitor: false, error: "", progress: {active:false,phase:"done",done:0,total:0,found:0,current:""}, adding:false}; @@ -167,6 +168,22 @@ } function renderRack(){ if(!workspace || currentTab()!=="FX RACK") return; + const selected=typeof currentChannel==="number"?currentChannel:0; + const isMaster=typeof masterSelected!=="undefined"&&masterSelected; + if(isMaster||selected!==0){ + const label=isMaster?"MASTER":(typeof channels!=="undefined"&&channels[selected]?.name)||("Channel "+(selected+1)); + workspace.innerHTML=`
+ ${cardHeader("FX Rack · "+label,"Same DAW insert layout across all mixer channels")} +
+

${escapeHtml(label)} · FX CHAIN

+
This bus is not yet connected to independent native VST3 processing. Its inserts are unavailable for audio until channel routing is implemented.
+
+ ${Array.from({length:6},(_,i)=>``).join("")} +
+
+
`; + return; + } workspace.innerHTML=`
${cardHeader("Live FX Chain · Vocal Input","Arrange your real VST3 effects here. Use + ADD FX to choose from your installed catalog.")}
@@ -179,7 +196,7 @@

MIC INPUT → PROCESSING → MAIN OUTPUT

INPUT 1 / MICROPHONE
- ${state.chain.map((p,i)=>`
+ ${state.chain.map((p,i)=>`
${String(i+1).padStart(2,"0")} ${escapeHtml(p.name)}${p.latency||0} samples processing latency @@ -551,9 +568,14 @@ if(track.classList.contains("master-strip")){ track.dataset.preview="1"; track.title="Master FX and master PAN are visual previews; Master fader and meters are native"; - track.querySelectorAll("[data-master-insert],[data-master-power]").forEach(x=>{ - x.disabled=true;x.title="Preview only — Master FX DSP not yet implemented"; - }); + const masterRack=track.querySelector(".master-fx-rack"); + if(masterRack&&masterRack.dataset.nativeSig!=="empty-nonlive"){ + masterRack.dataset.nativeSig="empty-nonlive"; + masterRack.innerHTML=Array.from({length:6},()=>`
+
`).join(""); + } const pan=track.querySelector('[data-pan="master"]'); if(pan){pan.removeAttribute("tabindex");pan.style.pointerEvents="none";pan.title="Master PAN DSP not yet implemented";} const marker=track.querySelector(".master-info-kicker span"); @@ -563,6 +585,13 @@ const rack=track.querySelector(".rack"); if(!rack)return; if(i!==0){ + if(rack.dataset.nativeSig!=="empty-nonlive"){ + rack.dataset.nativeSig="empty-nonlive"; + rack.innerHTML=Array.from({length:6},()=>`
+
`).join(""); + } rack.dataset.preview="1"; track.dataset.preview="1"; track.querySelectorAll(".meter-peak").forEach(x=>x.style.display="none"); @@ -572,8 +601,8 @@ const signature=state.chain.map(p=>p.id+"|"+p.bypass).join(","); if(rack.dataset.nativeSig===signature)return; rack.dataset.nativeSig=signature; - rack.innerHTML=state.chain.slice(0,5).map((p,i)=> - `
+ rack.innerHTML=state.chain.slice(0,6).map((p,i)=> + `
@@ -581,11 +610,10 @@ data-native-fx="bypass" data-slot="${i}" aria-pressed="${!p.bypass}" title="${p.bypass?"Enable":"Bypass"} ${escapeHtml(p.name)}">⏻
`).join("")+ - `
`; + Array.from({length:Math.max(0,6-Math.min(state.chain.length,6))},()=> + `
`).join(""); }); } let renderPending = false; @@ -688,10 +716,18 @@ },true); // Capture native controls before the legacy v0.3 demo handlers. document.addEventListener("click", function(e){ - const el=e.target.closest("[data-native-action],[data-native-add],[data-native-fx],[data-fxpower],[data-master-insert],[data-master-power],[data-native-category],[data-go-native-rack],[data-insert],[data-plugin-picker],[data-plugin-manager],[data-my-sounds],[data-preset-mute],[data-preset-save],[data-preset-load],[data-close-modal],[data-orbit-start],[data-orbit-stop]"); + if(fxNativeBlockClick){fxNativeBlockClick=false;e.preventDefault();e.stopImmediatePropagation();return;} + const el=e.target.closest("[data-native-unrouted],[data-native-action],[data-native-add],[data-native-fx],[data-fxpower],[data-master-insert],[data-master-power],[data-native-category],[data-go-native-rack],[data-insert],[data-plugin-picker],[data-plugin-manager],[data-my-sounds],[data-preset-mute],[data-preset-save],[data-preset-load],[data-close-modal],[data-orbit-start],[data-orbit-stop]"); if(!el)return; e.preventDefault();e.stopImmediatePropagation(); + if(el.hasAttribute("data-native-unrouted")){ + const id=Number(el.dataset.nativeUnrouted); + if(id===-1){if(typeof focusMaster==="function")focusMaster();} + else if(Number.isInteger(id)&&id>=0&&id<10&&typeof focusChannel==="function")focusChannel(id); + if(currentTab()!=="FX RACK")document.querySelector('.nav button[data-view="FX RACK"]')?.click(); + renderRack();return; + } if(el.dataset.closeModal){if(el.dataset.closeModal==="nativeOrbit")hideOrbit();else hideDialog(el.dataset.closeModal);return;} if(el.hasAttribute("data-orbit-start")){ const raw=document.getElementById("nativeOrbitParameter")?.value; @@ -808,6 +844,74 @@ if(fx==="bypass")send("fxBypass",{slot,value:!state.chain[slot]?.bypass}); if(fx==="up"||fx==="down")send("fxMove",{slot,value:fx==="up"?-1:1}); },true); + // True DAW FX insert gesture. Geometries are captured ONCE at pointerdown; + // pointermove only moves a ghost and a 2px insertion marker. Exactly one + // native fxMove request is emitted at pointerup (never while dragging). + const removeNativeDrag=()=>{ + const d=fxNativeGesture;if(!d)return; + d.marker?.classList.remove("fx-drop-before","fx-drop-after"); + d.row?.classList.remove("fx-drag-source"); + d.ghost?.remove();fxNativeGesture=null; + }; + document.addEventListener("pointerdown",e=>{ + if(e.button!==0||fxNativeGesture||state.chain.length<2)return; + const row=e.target.closest(".native-insert-row[data-native-move],.native-node[data-native-move]"); + if(!row||!row.isConnected)return; + if(row.classList.contains("native-node")){ + if(!e.target.closest(".node-text,.node-index"))return; + }else if(!e.target.closest(".insert:not(.empty)"))return; + const from=Number(row.dataset.nativeMove),siblings=[...row.parentElement.children] + .filter(n=>n.hasAttribute("data-native-move")); + if(!Number.isInteger(from)||from<0||from>=state.chain.length||siblings.length<2)return; + fxNativeGesture={pointerId:e.pointerId,row,from,count:siblings.length, + startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY, + bounds:siblings.map(el=>({el,rect:el.getBoundingClientRect()})), + insertion:from,marker:null,ghost:null,active:false}; + },true); + document.addEventListener("pointermove",e=>{ + const d=fxNativeGesture;if(!d||e.pointerId!==d.pointerId)return; + d.x=e.clientX;d.y=e.clientY; + if(!d.active){ + if(Math.hypot(d.x-d.startX,d.y-d.startY)<7)return; + d.active=true;d.row.classList.add("fx-drag-source"); + d.ghost=document.createElement("div");d.ghost.className="fx-drag-ghost"; + d.ghost.textContent=state.chain[d.from]?.name||"VST3"; + document.body.appendChild(d.ghost); + } + e.preventDefault(); + d.ghost.style.transform="translate3d("+(d.x+12)+"px,"+(d.y+10)+"px,0)"; + d.marker?.classList.remove("fx-drop-before","fx-drop-after");d.marker=null; + const bs=d.bounds,first=bs[0].rect,last=bs[bs.length-1].rect; + if(d.xfirst.right+20||d.ylast.bottom+12){ + d.insertion=-1;return; + } + let at=d.count; + for(let i=0;i{ + const d=fxNativeGesture;if(!d||d.pointerId!==e.pointerId)return; + const active=d.active,at=d.insertion,from=d.from,count=d.count; + removeNativeDrag(); + if(active){ + fxNativeBlockClick=true;setTimeout(()=>fxNativeBlockClick=false,0); + if(at>=0){ + const to=Math.max(0,Math.min(count-1,at>from?at-1:at)); + if(to!==from)send("fxMove",{slot:from,value:to-from}); + } + } + },true); + document.addEventListener("pointercancel",e=>{ + if(fxNativeGesture?.pointerId===e.pointerId)removeNativeDrag(); + },true); + document.addEventListener("keydown",e=>{ + if(e.key==="Escape"&&fxNativeGesture)removeNativeDrag(); + },true); document.addEventListener("input", function(e){ if(e.target.id!=="nativeVstSearch")return; state.filter=e.target.value; From e81ca000468d2ff3ff92c46056d878870d24ecfa Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:26:16 +0700 Subject: [PATCH 05/42] perf(rt): publish FX reorder atomically per audio block without detach or moving VST3 instances --- src/LiveAudioEngine.h | 103 +++++++++++++++++++++++++++++++----------- 1 file changed, 77 insertions(+), 26 deletions(-) diff --git a/src/LiveAudioEngine.h b/src/LiveAudioEngine.h index bead8706f..ad93f6db9 100644 --- a/src/LiveAudioEngine.h +++ b/src/LiveAudioEngine.h @@ -26,7 +26,7 @@ // The audio callback never scans files, creates plugins, mutates the chain, // enters UI code, locks host mutexes, logs, or changes device settings. // P2.5 recall pre-stages a graph and transitions at callback boundaries. -// Legacy Add/Remove/Move still detach; seamless structural editing is deferred. +// Add/Remove still use a bounded offline lifecycle; MOVE is a lock-free order publication. class LiveAudioEngine final : private juce::AudioIODeviceCallback { public: @@ -43,6 +43,19 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback struct Graph { + // Eight 4-bit physical slot indices in one x64 lock-free word. + // Moving an insert publishes one complete order for the NEXT audio + // block; the processor objects and their binary states never move. + static constexpr std::uint64_t canonicalOrder = 0x76543210ULL; + std::atomic orderPacked {canonicalOrder}; + static int physicalAt (std::uint64_t order, int logical) noexcept + { + return static_cast ((order >> (logical * 4)) & 0xfULL); + } + int physicalAt (int logical) const noexcept + { + return physicalAt (orderPacked.load (std::memory_order_acquire), logical); + } std::array slots {}; std::array, maxFx> bypassFlags {}; int count = 0; @@ -480,7 +493,8 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback juce::AudioPluginInstance* pluginAt (int index) noexcept { - return index >= 0 && index < graphOwned_->count ? graphOwned_->slots[index].processor.get() : nullptr; + return index >= 0 && index < graphOwned_->count + ? graphOwned_->slots[graphOwned_->physicalAt (index)].processor.get() : nullptr; } juce::var chainState() const @@ -490,15 +504,32 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback { auto node = std::make_unique(); node->setProperty ("index", i); - node->setProperty ("name", graphOwned_->slots[i].name); - node->setProperty ("id", graphOwned_->slots[i].catalogId); - node->setProperty ("bypass", graphOwned_->slots[i].bypass); - node->setProperty ("latency", graphOwned_->slots[i].latency); + const auto& slot = graphOwned_->slots[graphOwned_->physicalAt (i)]; + node->setProperty ("name", slot.name); + node->setProperty ("id", slot.catalogId); + node->setProperty ("bypass", slot.bypass); + node->setProperty ("latency", slot.latency); nodes.add (juce::var (node.release())); } return juce::var (nodes); } + // Called only after the current audio callback has been detached for a + // structural ADD/REMOVE. Normalize physical storage before mutation. + void materializeOrderOnStoppedCallback() + { + auto& graph = *graphOwned_; + const auto order = graph.orderPacked.load (std::memory_order_acquire); + if (order == Graph::canonicalOrder) return; + std::array rearranged {}; + for (int i = 0; i < graph.count; ++i) + rearranged[i] = std::move (graph.slots[Graph::physicalAt (order, i)]); + graph.slots = std::move (rearranged); + for (int i = 0; i < graph.count; ++i) + graph.bypassFlags[i].store (graph.slots[i].bypass, std::memory_order_relaxed); + graph.orderPacked.store (Graph::canonicalOrder, std::memory_order_release); + } + juce::String addVst3 (const juce::String& filename, int uid, const juce::String& catalogId) { @@ -534,6 +565,7 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback return chosen->name + ": " + busError; detach(); + materializeOrderOnStoppedCallback(); Slot node; node.name = chosen->name; node.catalogId = catalogId; @@ -568,14 +600,15 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback { for (int i = 0; i < graphOwned_->count; ++i) { - const auto& slot = graphOwned_->slots[i]; + const int physical = graphOwned_->physicalAt (i); + const auto& slot = graphOwned_->slots[physical]; if (!slot.processor) { error = "Invalid active FX slot"; break; } armix::storage::FxState state; state.path = slot.path; state.name = slot.name; state.catalogId = slot.catalogId; state.uid = slot.uid; - state.bypass = graphOwned_->bypassFlags[i].load (std::memory_order_acquire); + state.bypass = graphOwned_->bypassFlags[physical].load (std::memory_order_acquire); slot.processor->getStateInformation (state.binary); if (state.binary.getSize() > armix::storage::NativePresetArchive::maxStateBytes) { @@ -694,8 +727,9 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback if (handoff_.busy()) return false; if (index < 0 || index >= graphOwned_->count) return false; // Message-thread metadata and an atomic value consumed by the audio thread. - graphOwned_->slots[index].bypass = value; - graphOwned_->bypassFlags[index].store (value, std::memory_order_release); + const int physical = graphOwned_->physicalAt (index); + graphOwned_->slots[physical].bypass = value; + graphOwned_->bypassFlags[physical].store (value, std::memory_order_release); return true; } @@ -704,6 +738,7 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback if (handoff_.busy()) return false; if (index < 0 || index >= graphOwned_->count) return false; detach(); + materializeOrderOnStoppedCallback(); if (graphOwned_->slots[index].processor) graphOwned_->slots[index].processor->releaseResources(); for (int i = index; i + 1 < graphOwned_->count; ++i) @@ -717,19 +752,31 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback bool moveSlot (int from, int to) { + // The processor instances remain at stable PHYSICAL addresses. + // A 64-bit release store publishes the complete logical order. + // The callback takes one acquire snapshot per audio buffer. if (handoff_.busy()) return false; - if (from < 0 || from >= graphOwned_->count || to < 0 || to >= graphOwned_->count || from == to) + const int count = graphOwned_->count; + if (from < 0 || to < 0 || from >= count || to >= count || from == to) return false; - detach(); - auto moved = std::move (graphOwned_->slots[from]); + const auto previous = graphOwned_->orderPacked.load (std::memory_order_acquire); + std::array indices {}; + for (int i = 0; i < count; ++i) + indices[i] = Graph::physicalAt (previous, i); + const int moved = indices[from]; if (from < to) - for (int i = from; i < to; ++i) graphOwned_->slots[i] = std::move (graphOwned_->slots[i + 1]); + for (int i = from; i < to; ++i) indices[i] = indices[i + 1]; else - for (int i = from; i > to; --i) graphOwned_->slots[i] = std::move (graphOwned_->slots[i - 1]); - graphOwned_->slots[to] = std::move (moved); - for (int i = 0; i < graphOwned_->count; ++i) - graphOwned_->bypassFlags[i].store (graphOwned_->slots[i].bypass, std::memory_order_release); - attach(); + for (int i = from; i > to; --i) indices[i] = indices[i - 1]; + indices[to] = moved; + auto next = Graph::canonicalOrder; + for (int i = 0; i < count; ++i) + { + const auto shift = static_cast (i * 4); + next = (next & ~(0xfULL << shift)) + | (static_cast (indices[i]) << shift); + } + graphOwned_->orderPacked.store (next, std::memory_order_release); return true; } @@ -842,9 +889,10 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback { auto item = std::make_unique(); item->setProperty ("slot", i + 1); - item->setProperty ("name", graphOwned_->slots[i].name); - item->setProperty ("lastUs", static_cast (lastPluginUsBySlot_[i].load())); - item->setProperty ("worstUs", static_cast (worstPluginUsBySlot_[i].load())); + const int physical = graphOwned_->physicalAt (i); + item->setProperty ("name", graphOwned_->slots[physical].name); + item->setProperty ("lastUs", static_cast (lastPluginUsBySlot_[physical].load())); + item->setProperty ("worstUs", static_cast (worstPluginUsBySlot_[physical].load())); pluginTimings.add (juce::var (item.release())); } o->setProperty ("pluginTimings", juce::var (pluginTimings)); @@ -1238,16 +1286,19 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback juce::MidiBuffer midi; if (!dry) { + // One order snapshot: never observe half of a drag reorder. + const auto order = cycle.graph->orderPacked.load (std::memory_order_acquire); for (int fx = 0; fx < cycle.graph->count; ++fx) { - auto& slot = cycle.graph->slots[fx]; - if (slot.processor && ! cycle.graph->bypassFlags[fx].load (std::memory_order_relaxed)) + const int physical = Graph::physicalAt (order, fx); + auto& slot = cycle.graph->slots[physical]; + if (slot.processor && ! cycle.graph->bypassFlags[physical].load (std::memory_order_relaxed)) { const auto pluginBeginUs = clockMicros(); slot.processor->processBlock (scratchView, midi); const auto pluginUs = clockMicros() - pluginBeginUs; - lastPluginUsBySlot_[fx].store (pluginUs, std::memory_order_relaxed); - publishMax (worstPluginUsBySlot_[fx], pluginUs); + lastPluginUsBySlot_[physical].store (pluginUs, std::memory_order_relaxed); + publishMax (worstPluginUsBySlot_[physical], pluginUs); publishMax (worstPluginUs_, pluginUs); if (static_cast (pluginUs) > periodUs * 0.75) slowPlugins_.fetch_add (1, std::memory_order_relaxed); From d33c004af5687d118b6acf46910ada0bd71f3e8f Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:26:43 +0700 Subject: [PATCH 06/42] fix(native): keep FX editor and independent clock live during atomic reorder --- src/Main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index 28f1e31c7..e33331cc8 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -838,7 +838,7 @@ class ConsoleWindow final : public juce::DocumentWindow, private juce::Timer, pr return emitNotice (error, true); } if (engine_.independentClockActive() && - (action == "fxRemove" || action == "fxMove" || + (action == "fxRemove" || action == "presetLoad" || action == "presetSave")) return emitNotice ("Return to DIRECT mode before editing VST3 graph (live-safe graph edits are a later gate).", true); @@ -1123,8 +1123,10 @@ class ConsoleWindow final : public juce::DocumentWindow, private juce::Timer, pr if (engine_.hasTemporaryDiagnosticDevice()) return emitNotice ("Return to NORMAL before rearranging VST3 effects.", true); const auto* orbitPlugin=orbit_.processor(); + // MOVE only publishes a lock-free order word at the next audio + // buffer boundary; the underlying VST3 processor/editor remains + // alive, so neither callback detach nor editor close is needed. orbit_.pauseForGraphEdit(); - editorWindow_.reset(); const bool changed=engine_.moveSlot(slot,slot+static_cast(value)); if(orbitPlugin && orbit_.active()){ for(int i=0;i Date: Wed, 28 Oct 2026 03:27:17 +0700 Subject: [PATCH 07/42] style: preserve olive-lime active toolbar palette instead of white --- web/styles-src/20-button-180.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/styles-src/20-button-180.css b/web/styles-src/20-button-180.css index fd8296344..e1d42e3f5 100644 --- a/web/styles-src/20-button-180.css +++ b/web/styles-src/20-button-180.css @@ -145,7 +145,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:#778c45;--b180-ink:#253019; } #app .left-rail button.btn-180:is(.selected,.active){ --b180-color:var(--b180-on-magenta);--b180-border:#ad6d9f;--b180-ink:#32172f; From 09db244ff4ce4a7d85e007ac56e68f5583a990e9 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:27:21 +0700 Subject: [PATCH 08/42] style: matching insertion markers for native FX Rack rows --- web/styles-src/42-mixer-premium.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/styles-src/42-mixer-premium.css b/web/styles-src/42-mixer-premium.css index 66e2a4631..14af17bf1 100644 --- a/web/styles-src/42-mixer-premium.css +++ b/web/styles-src/42-mixer-premium.css @@ -220,3 +220,12 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m white-space:nowrap;overflow:hidden;text-overflow:ellipsis;will-change:transform; } .fx-drag-source{opacity:.48} + +/* Native FX Rack uses the same lightweight insertion marker as mixer inserts. */ +.native-node[data-native-move]{position:relative} +.native-node.fx-drop-before::before,.native-node.fx-drop-after::after{ + content:"";position:absolute;left:1px;right:1px;height:2px; + background:#9dd6d3;z-index:5;pointer-events:none; +} +.native-node.fx-drop-before::before{top:-2px} +.native-node.fx-drop-after::after{bottom:-2px} From 0b47bd37bc35a6e33cbe5077be54bc9decbef7c5 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:27:50 +0700 Subject: [PATCH 09/42] build(ui): synchronize CSS source with WebView2 and standalone --- web/styles.css | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/web/styles.css b/web/styles.css index c8a91e769..4569de544 100644 --- a/web/styles.css +++ b/web/styles.css @@ -753,7 +753,7 @@ html,body,body *:not(svg):not(path):not(circle):not(rect){ /* 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:#778c45;--b180-ink:#253019; } #app .left-rail button.btn-180:is(.selected,.active){ --b180-color:var(--b180-on-magenta);--b180-border:#ad6d9f;--b180-ink:#32172f; @@ -1142,3 +1142,49 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m } /* LED increments stay fixed and the meter keeps its native dBFS conversion. No hot-path DOM reads, filters, blur or per-frame scale animation. */ + +/* Flat milled-fader bay: a fixed-width, four-sided recess for EVERY strip, + including the wider MASTER. The center detent and 36×77 PNG remain unchanged. + Two static layers, no gradients/glow/filter/animated surface repaint. */ +#app #mixer .fader-zone .fader{ + position:relative;isolation:isolate;min-width:36px; + background:transparent!important;border:0!important;box-shadow:none!important; +} +#app #mixer .fader-zone .fader::before{ + content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; + transform:translateX(-50%);z-index:0;pointer-events:none; + background:#10181e;border:1px solid #34424c;border-radius:2px; + box-shadow:inset 0 2px 2px #050a0e,inset 0 -2px 2px #070c10,inset 2px 0 2px #080e13,inset -1px 0 1px #26333b; +} +#app #mixer .fader-zone .fader::after{ + content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; + transform:translateX(-50%);z-index:0;pointer-events:none; + background:#020506;border:0;box-shadow:inset 1px 0 #26323a,inset -1px 0 #26323a; +} +#app #mixer .fader-zone .fader-travel{z-index:1} +/* DAW insertion markers are painted only while an FX drag is active. */ +#app #mixer .insert-slot.fx-drop-before::before, +#app #mixer .insert-slot.fx-drop-after::after{ + content:"";position:absolute;left:1px;right:1px;height:2px; + background:#9dd6d3;z-index:5;pointer-events:none; +} +#app #mixer .insert-slot{position:relative} +#app #mixer .insert-slot.fx-drop-before::before{top:-1px} +#app #mixer .insert-slot.fx-drop-after::after{bottom:-1px} +.fx-drag-ghost{ + position:fixed;z-index:5000;top:0;left:0;box-sizing:border-box; + min-width:84px;max-width:290px;padding:6px 9px;pointer-events:none; + color:#e7f8f8;background:#172a34;border:1px solid #81c5c8; + border-radius:3px;box-shadow:0 3px 8px #0008;font:11px/1.2 Arial,sans-serif; + white-space:nowrap;overflow:hidden;text-overflow:ellipsis;will-change:transform; +} +.fx-drag-source{opacity:.48} + +/* Native FX Rack uses the same lightweight insertion marker as mixer inserts. */ +.native-node[data-native-move]{position:relative} +.native-node.fx-drop-before::before,.native-node.fx-drop-after::after{ + content:"";position:absolute;left:1px;right:1px;height:2px; + background:#9dd6d3;z-index:5;pointer-events:none; +} +.native-node.fx-drop-before::before{top:-2px} +.native-node.fx-drop-after::after{bottom:-2px} From 6987a18ae323e5597481bbbc5bdd6f4532a6e13a Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:27:55 +0700 Subject: [PATCH 10/42] build(ui): synchronize CSS source with WebView2 and standalone --- AR-MIX-Live-FX-Host-Standalone-v0.3.html | 48 +++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/AR-MIX-Live-FX-Host-Standalone-v0.3.html b/AR-MIX-Live-FX-Host-Standalone-v0.3.html index 0a7173964..96cd25558 100644 --- a/AR-MIX-Live-FX-Host-Standalone-v0.3.html +++ b/AR-MIX-Live-FX-Host-Standalone-v0.3.html @@ -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:#778c45;--b180-ink:#253019; } #app .left-rail button.btn-180:is(.selected,.active){ --b180-color:var(--b180-on-magenta);--b180-border:#ad6d9f;--b180-ink:#32172f; @@ -1143,6 +1143,52 @@ } /* LED increments stay fixed and the meter keeps its native dBFS conversion. No hot-path DOM reads, filters, blur or per-frame scale animation. */ + +/* Flat milled-fader bay: a fixed-width, four-sided recess for EVERY strip, + including the wider MASTER. The center detent and 36×77 PNG remain unchanged. + Two static layers, no gradients/glow/filter/animated surface repaint. */ +#app #mixer .fader-zone .fader{ + position:relative;isolation:isolate;min-width:36px; + background:transparent!important;border:0!important;box-shadow:none!important; +} +#app #mixer .fader-zone .fader::before{ + content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; + transform:translateX(-50%);z-index:0;pointer-events:none; + background:#10181e;border:1px solid #34424c;border-radius:2px; + box-shadow:inset 0 2px 2px #050a0e,inset 0 -2px 2px #070c10,inset 2px 0 2px #080e13,inset -1px 0 1px #26333b; +} +#app #mixer .fader-zone .fader::after{ + content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; + transform:translateX(-50%);z-index:0;pointer-events:none; + background:#020506;border:0;box-shadow:inset 1px 0 #26323a,inset -1px 0 #26323a; +} +#app #mixer .fader-zone .fader-travel{z-index:1} +/* DAW insertion markers are painted only while an FX drag is active. */ +#app #mixer .insert-slot.fx-drop-before::before, +#app #mixer .insert-slot.fx-drop-after::after{ + content:"";position:absolute;left:1px;right:1px;height:2px; + background:#9dd6d3;z-index:5;pointer-events:none; +} +#app #mixer .insert-slot{position:relative} +#app #mixer .insert-slot.fx-drop-before::before{top:-1px} +#app #mixer .insert-slot.fx-drop-after::after{bottom:-1px} +.fx-drag-ghost{ + position:fixed;z-index:5000;top:0;left:0;box-sizing:border-box; + min-width:84px;max-width:290px;padding:6px 9px;pointer-events:none; + color:#e7f8f8;background:#172a34;border:1px solid #81c5c8; + border-radius:3px;box-shadow:0 3px 8px #0008;font:11px/1.2 Arial,sans-serif; + white-space:nowrap;overflow:hidden;text-overflow:ellipsis;will-change:transform; +} +.fx-drag-source{opacity:.48} + +/* Native FX Rack uses the same lightweight insertion marker as mixer inserts. */ +.native-node[data-native-move]{position:relative} +.native-node.fx-drop-before::before,.native-node.fx-drop-after::after{ + content:"";position:absolute;left:1px;right:1px;height:2px; + background:#9dd6d3;z-index:5;pointer-events:none; +} +.native-node.fx-drop-before::before{top:-2px} +.native-node.fx-drop-after::after{bottom:-2px}
From f33d6261cf55695a506dcbdf97b9eed1a3b12a0b Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:29:45 +0700 Subject: [PATCH 11/42] test(rt): extract and stress true no-detach FX order plan --- engine/core/FxOrderPlan.h | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 engine/core/FxOrderPlan.h diff --git a/engine/core/FxOrderPlan.h b/engine/core/FxOrderPlan.h new file mode 100644 index 000000000..33e83da50 --- /dev/null +++ b/engine/core/FxOrderPlan.h @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: AGPL-3.0-only +#pragma once +#include +#include + +namespace armix::dsp +{ +// Logical insert order is encoded as eight 4-bit physical slot identities. +// Callback reads exactly one 64-bit snapshot at an audio block boundary. +// Reorder is control-thread-only; processor ownership is NOT changed. +struct FxOrderPlan final +{ + static constexpr int capacity = 8; + static constexpr std::uint64_t canonical = 0x76543210ULL; + static constexpr int physicalAt (std::uint64_t word, int logical) noexcept + { + return static_cast ((word >> (logical * 4)) & 0xfULL); + } + static constexpr std::uint64_t moved (std::uint64_t previous, + int count, int from, int to) noexcept + { + if (count < 1 || count > capacity || from < 0 || to < 0 + || from >= count || to >= count || from == to) + return previous; + std::array slots {}; + for (int i = 0; i < count; ++i) slots[i] = physicalAt (previous, i); + const auto chosen = slots[from]; + if (from < to) + for (int i = from; i < to; ++i) slots[i] = slots[i + 1]; + else + for (int i = from; i > to; --i) slots[i] = slots[i - 1]; + slots[to] = chosen; + auto next = canonical; + for (int i = 0; i < count; ++i) + { + const auto shift = static_cast (i * 4); + next = (next & ~(0xfULL << shift)) + | (static_cast (slots[i]) << shift); + } + return next; + } +}; +} // namespace armix::dsp From ce1377c2c35cf4d70a9941696a96802836230f09 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:29:49 +0700 Subject: [PATCH 12/42] test(rt): extract and stress true no-detach FX order plan --- tests/fx_order_atomic_test.cpp | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/fx_order_atomic_test.cpp diff --git a/tests/fx_order_atomic_test.cpp b/tests/fx_order_atomic_test.cpp new file mode 100644 index 000000000..5454db2f9 --- /dev/null +++ b/tests/fx_order_atomic_test.cpp @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: AGPL-3.0-only +#include "../engine/core/FxOrderPlan.h" +#include +#include +#include +#include +#include + +int main() +{ + using Plan = armix::dsp::FxOrderPlan; + static_assert (Plan::canonical == 0x76543210ULL); + static_assert (std::atomic::is_always_lock_free, + "Realtime order publication requires lock-free x64 atomic."); + // Entire insert identities survive every arbitrary move. No duplicates. + for (int count=2; count<=8; ++count) + for (int from=0; from found {}; + for (int i=0; i=0 && physical order {Plan::canonical}; + std::atomic running {true}; + std::thread reader([&]{ + while (running.load(std::memory_order_acquire)) + { + const auto snapshot=order.load(std::memory_order_acquire); + std::array seen {}; + for(int i=0;i<8;++i) + { + const int p=Plan::physicalAt(snapshot,i); + assert(p>=0 && p<8 && !seen[p]); + seen[p]=true; + } + } + }); + for(int i=0;i<20000;i++){ + const auto old=order.load(std::memory_order_acquire); + order.store(Plan::moved(old,8,i%8,(i*7+3)%8),std::memory_order_release); + } + running.store(false,std::memory_order_release); + reader.join(); +} From 5ef17f625e91e8267319226c19a5c22fe306abad Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:30:12 +0700 Subject: [PATCH 13/42] refactor(rt): use independently tested pure FX order planner --- src/LiveAudioEngine.h | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/LiveAudioEngine.h b/src/LiveAudioEngine.h index ad93f6db9..6d19650d5 100644 --- a/src/LiveAudioEngine.h +++ b/src/LiveAudioEngine.h @@ -12,6 +12,7 @@ #include "../engine/device/AsioRegistryIdentityProbe.h" #include "../engine/device/DirectRouteFence.h" #include "../engine/device/WasapiEndpointIdentityGuard.h" +#include "../engine/core/FxOrderPlan.h" #include "../engine/core/RealtimeHealthHistogram.h" #include "../engine/core/CallbackCadenceEvidence.h" #include @@ -46,11 +47,11 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback // Eight 4-bit physical slot indices in one x64 lock-free word. // Moving an insert publishes one complete order for the NEXT audio // block; the processor objects and their binary states never move. - static constexpr std::uint64_t canonicalOrder = 0x76543210ULL; + static constexpr std::uint64_t canonicalOrder = armix::dsp::FxOrderPlan::canonical; std::atomic orderPacked {canonicalOrder}; static int physicalAt (std::uint64_t order, int logical) noexcept { - return static_cast ((order >> (logical * 4)) & 0xfULL); + return armix::dsp::FxOrderPlan::physicalAt (order, logical); } int physicalAt (int logical) const noexcept { @@ -760,22 +761,7 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback if (from < 0 || to < 0 || from >= count || to >= count || from == to) return false; const auto previous = graphOwned_->orderPacked.load (std::memory_order_acquire); - std::array indices {}; - for (int i = 0; i < count; ++i) - indices[i] = Graph::physicalAt (previous, i); - const int moved = indices[from]; - if (from < to) - for (int i = from; i < to; ++i) indices[i] = indices[i + 1]; - else - for (int i = from; i > to; --i) indices[i] = indices[i - 1]; - indices[to] = moved; - auto next = Graph::canonicalOrder; - for (int i = 0; i < count; ++i) - { - const auto shift = static_cast (i * 4); - next = (next & ~(0xfULL << shift)) - | (static_cast (indices[i]) << shift); - } + const auto next = armix::dsp::FxOrderPlan::moved (previous, count, from, to); graphOwned_->orderPacked.store (next, std::memory_order_release); return true; } From f4fa8b9639fc4bc7343ef99416a7190ad9a8797a Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:31:18 +0700 Subject: [PATCH 14/42] test(rt): assert live FX move never detaches or destroys plugins --- tests/live_graph_contract_test.mjs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/live_graph_contract_test.mjs b/tests/live_graph_contract_test.mjs index 86ce65738..eb6b6d7c2 100644 --- a/tests/live_graph_contract_test.mjs +++ b/tests/live_graph_contract_test.mjs @@ -28,7 +28,14 @@ test('preset UI reflects callback-acknowledged state not queued state',()=>{ assert.match(m,/arMixNativePresetLoaded/); assert.match(b,/RECALL LIVE/); }); -test('old structural operations remain guarded and declared as unfinished',()=>{ +test('atomic MOVE keeps VST3 instances live while ADD/REMOVE remain guarded',()=>{ assert.match(e,/if \(handoff_\.busy\(\)\) return false/); - assert.match(e,/Legacy Add\/Remove\/Move still detach/); + assert.match(e,/Add\/Remove still use a bounded offline lifecycle/); + assert.match(e,/std::atomic orderPacked/); + const begin=e.indexOf('bool moveSlot (int from, int to)'); + const move=e.slice(begin,e.indexOf('juce::var status()',begin)); + assert.match(move,/FxOrderPlan::moved/); + assert.match(move,/orderPacked.store/); + assert.doesNotMatch(move,/detach\(|attach\(|releaseResources\(|prepareToPlay\(/); + assert.match(e,/cycle\.graph->orderPacked.load/); }); From 38a57584ceb3c6f2db72344fdae1474759acf62b Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:31:48 +0700 Subject: [PATCH 15/42] test(gui): identity-preserving reorder and unified DAW FX insert contract --- tests/fx_drag_reorder_contract_test.mjs | 52 +++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/fx_drag_reorder_contract_test.mjs diff --git a/tests/fx_drag_reorder_contract_test.mjs b/tests/fx_drag_reorder_contract_test.mjs new file mode 100644 index 000000000..772d445e8 --- /dev/null +++ b/tests/fx_drag_reorder_contract_test.mjs @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: AGPL-3.0-only +import test from 'node:test'; +import assert from 'node:assert/strict'; +import {readFileSync} from 'node:fs'; +import vm from 'node:vm'; +const app=readFileSync('web/app.js','utf8'); +const bridge=readFileSync('web/bridge.js','utf8'); +const css=readFileSync('web/styles-src/42-mixer-premium.css','utf8'); +const native=readFileSync('src/Main.cpp','utf8'); +function extractFunction(name){ + const start=app.indexOf('function '+name+'('); + assert.ok(start>=0,'Missing '+name); + const begin=app.indexOf('{',start); + let depth=0; + for(let i=begin;i{ + const channels=[{inserts:['Gate','EQ','Reverb','Limiter']}]; + const meta={'0:0':{name:'gate'},'0:1':{name:'eq'},'0:2':{name:'reverb'},'0:3':{name:'limiter'}}; + const bypassed={'0:0':false,'0:1':true,'0:2':false,'0:3':true}; + let saved=0,sends=[]; + const state={channels,fxParams:meta,bypassed,currentChannel:0,pluginEditorIndex:0, + persistSession:()=>{saved++;},send:(...v)=>sends.push(v), + setChain:(ch,items)=>{ch.inserts=[...items];}, + }; + vm.createContext(state); + vm.runInContext('function fxKey(ch,slot){return ch+":"+slot;}\nfunction normalChain(ch){return ch.inserts.filter(Boolean);}\n'.replaceAll('\\n','\n')+ + extractFunction('moveFxMeta')+'\n'+extractFunction('movePluginTo'),state); + assert.equal(state.movePluginTo(0,0,3),true); + assert.deepEqual([...channels[0].inserts],['EQ','Reverb','Limiter','Gate']); + assert.deepEqual([...Array(4)].map((_,i)=>meta['0:'+i].name),['eq','reverb','limiter','gate']); + assert.deepEqual([...Array(4)].map((_,i)=>bypassed['0:'+i]),[true,false,true,false]); + assert.equal(saved,1);assert.equal(sends.length,1); + assert.equal(state.movePluginTo(0,3,0),true); + assert.deepEqual([...channels[0].inserts],['Gate','EQ','Reverb','Limiter']); + assert.equal(state.movePluginTo(0,0,0),false); + assert.equal(sends.length,2,'no redundant graph change when dropped in place'); +}); +test('native has six consistent empty inserts and one DSP reorder per drop',()=>{ + assert.match(bridge,/Array.from\(\{length:6\}/); + assert.match(bridge,/Math.max\(0,6-Math.min\(state.chain.length,6\)\)/); + assert.match(bridge,/fx-drag-ghost/); + assert.match(bridge,/send\("fxMove",\{slot:from,value:to-from\}\)/); + assert.doesNotMatch(bridge,/FX FULL/); + assert.match(css,/width:46px/); + assert.match(css,/background:#10181e/); + assert.match(css,/top:0;bottom:0;width:46px/); + assert.match(native,/moreThanOneInstanceAllowed\(\) override \{ return false; \}/); +}); From 4f1f0d4ed7a2433cc66b42cbec24da9d6356942c Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:32:12 +0700 Subject: [PATCH 16/42] ci: gate DAW true move and atomic callback order in existing Windows/Chromium workflows --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a54213f3..9f20f10fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,9 @@ target_link_libraries(ARMixConsole PRIVATE include(CTest) if(BUILD_TESTING) + add_executable(ARMixFxOrderTests tests/fx_order_atomic_test.cpp) + target_compile_features(ARMixFxOrderTests PRIVATE cxx_std_20) + add_test(NAME FxOrderAtomicBlockSnapshot COMMAND ARMixFxOrderTests) add_executable(ARMixOrbitPhaseTests tests/orbit_phase_test.cpp) target_compile_features(ARMixOrbitPhaseTests PRIVATE cxx_std_20) add_test(NAME VstAzimuthOrbitRamp COMMAND ARMixOrbitPhaseTests) From 56e67603d82e6463f7285184457dcfb4c7edc6c7 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:32:16 +0700 Subject: [PATCH 17/42] ci: gate DAW true move and atomic callback order in existing Windows/Chromium workflows --- .github/workflows/p1-windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/p1-windows.yml b/.github/workflows/p1-windows.yml index aa980ae2a..d49f0934e 100644 --- a/.github/workflows/p1-windows.yml +++ b/.github/workflows/p1-windows.yml @@ -42,6 +42,7 @@ jobs: 'tests/native_preset_contract_test.mjs' 'tests/fx_add_contract_test.mjs' 'tests/live_graph_contract_test.mjs' + 'tests/fx_drag_reorder_contract_test.mjs' 'tests/reconciled_gui_engine_contract_test.mjs' 'tests/main_v08_native_integration_test.mjs' 'tests/smart_audio_ard_contract_test.mjs' @@ -63,7 +64,7 @@ jobs: -DBUILD_TESTING=ON -DJUCE_WEBVIEW2_PACKAGE_LOCATION="${{ github.workspace }}/.deps" - name: Build executable and native RT tests - run: cmake --build build --config Release --target ARMixConsole ARMixWorkspaceTests ARMixVaultTests ARMixOrbitPhaseTests ARMixOrbitControlTests ARMixOrbitMotionTests ARMixRTTests ARMixPresetTests ARMixDiagnosticTests ARMixClockBridgeTests ARMixVirtualClockSoakTests ARMixCadenceTests ARMixCrackleWindowTests ARMixHealthTests ARMixPolicyTests ARMixPeriodEvidenceTests ARMixLifecycleTests ARMixWasapiProbeTests ARMixDualJuceTests ARMixClockSizingTests ARMixIndependentFormatTests ARMixRecoveryTests ARMixStreamWatchdogTests ARMixBridgeContinuityTests ARMixEndpointPolicyTests ARMixEndpointGuardTests ARMixAsioPolicyTests ARMixAsioBackendTests ARMixAsioRegistryIdentityTests ARMixDirectFenceTests --parallel 2 + run: cmake --build build --config Release --target ARMixConsole ARMixFxOrderTests ARMixWorkspaceTests ARMixVaultTests ARMixOrbitPhaseTests ARMixOrbitControlTests ARMixOrbitMotionTests ARMixRTTests ARMixPresetTests ARMixDiagnosticTests ARMixClockBridgeTests ARMixVirtualClockSoakTests ARMixCadenceTests ARMixCrackleWindowTests ARMixHealthTests ARMixPolicyTests ARMixPeriodEvidenceTests ARMixLifecycleTests ARMixWasapiProbeTests ARMixDualJuceTests ARMixClockSizingTests ARMixIndependentFormatTests ARMixRecoveryTests ARMixStreamWatchdogTests ARMixBridgeContinuityTests ARMixEndpointPolicyTests ARMixEndpointGuardTests ARMixAsioPolicyTests ARMixAsioBackendTests ARMixAsioRegistryIdentityTests ARMixDirectFenceTests --parallel 2 - name: Test realtime control primitives run: ctest --test-dir build -C Release --output-on-failure - name: Package verified JUCE GUI for hardware FAT From 77b1a3653154831fa437b7bc380bac3f83e674cb Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:32:26 +0700 Subject: [PATCH 18/42] ci: gate DAW true move and atomic callback order in existing Windows/Chromium workflows --- .github/workflows/ui-smoke.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml index 018ea7780..3db0d4141 100644 --- a/.github/workflows/ui-smoke.yml +++ b/.github/workflows/ui-smoke.yml @@ -40,6 +40,7 @@ jobs: run: | node --check web/app.js node --test tests/gui_workflow_contract_test.mjs + node --test tests/fx_drag_reorder_contract_test.mjs - name: Validate approved GUI checkpoint and single publisher run: python tests/gui_baseline_lock_test.py - name: Validate smart audio architecture handoff contract From fba93c2b8d36d55aa0f3b05aedf98fe48064048a Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:33:47 +0700 Subject: [PATCH 19/42] build(ui): sync standalone JavaScript with DAW drag preview and CSS --- AR-MIX-Live-FX-Host-Standalone-v0.3.html | 79 +++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/AR-MIX-Live-FX-Host-Standalone-v0.3.html b/AR-MIX-Live-FX-Host-Standalone-v0.3.html index 96cd25558..70d9310d2 100644 --- a/AR-MIX-Live-FX-Host-Standalone-v0.3.html +++ b/AR-MIX-Live-FX-Host-Standalone-v0.3.html @@ -1666,6 +1666,73 @@ e.preventDefault();e.stopPropagation();openChannelIdentity(i); },true); document.addEventListener('dblclick',e=>{const pan=e.target.closest('[data-pan]');if(pan){e.preventDefault();e.stopPropagation();updatePan(pan.dataset.pan==='master'?'master':+pan.dataset.pan,0)}},true); +// DAW-like insert move in standalone preview: ghost and insertion line during +// pointer travel; one final chain transaction at drop. Native host owns its +// own verified DSP reorder and this preview path never sends native edits. +let fxGesture=null,fxSuppressClick=false; +function clearFxGesture(){ + const d=fxGesture;if(!d)return; + d.marker?.classList.remove('fx-drop-before','fx-drop-after'); + d.source?.classList.remove('fx-drag-source');d.ghost?.remove(); + fxGesture=null; +} +document.addEventListener('pointerdown',e=>{ + if(window.__JUCE__?.backend?.emitEvent||e.button!==0||fxGesture)return; + const button=e.target.closest('#mixer .rack .insert:not(.empty)'); + if(!button)return; + const strip=button.closest('[data-strip]'),rack=button.closest('.rack'); + if(!strip||!rack)return; + const channel=Number(strip.dataset.strip),from=Number(button.dataset.insert?.split(':')[1]); + const count=normalChain(channels[channel]).length; + if(!Number.isInteger(from)||from>=count||count<2)return; + const slots=[...rack.querySelectorAll('.insert-slot')]; + fxGesture={pointerId:e.pointerId,source:button.closest('.insert-slot'),channel,from,count, + startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY, + bounds:slots.map(slot=>({slot,rect:slot.getBoundingClientRect()})), + insertion:from,active:false,ghost:null,marker:null}; +},true); +document.addEventListener('pointermove',e=>{ + const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; + d.x=e.clientX;d.y=e.clientY; + if(!d.active){ + if(Math.hypot(d.x-d.startX,d.y-d.startY)<7)return; + d.active=true;d.source.classList.add('fx-drag-source'); + d.ghost=document.createElement('div');d.ghost.className='fx-drag-ghost'; + d.ghost.textContent=d.source.querySelector('.insert-name')?.textContent||'FX'; + document.body.appendChild(d.ghost); + } + e.preventDefault(); + d.ghost.style.transform='translate3d('+(d.x+12)+'px,'+(d.y+10)+'px,0)'; + d.marker?.classList.remove('fx-drop-before','fx-drop-after');d.marker=null; + const bounds=d.bounds; + const inside=bounds.length&&d.x>=bounds[0].rect.left-15&&d.x<=bounds[0].rect.right+15 + &&d.y>=bounds[0].rect.top-8&&d.y<=bounds[bounds.length-1].rect.bottom+8; + if(!inside){d.insertion=-1;return} + let insertion=d.count; + for(let i=0;i{ + const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; + const active=d.active,from=d.from,at=d.insertion,ch=d.channel; + clearFxGesture(); + if(active){fxSuppressClick=true;setTimeout(()=>fxSuppressClick=false,0); + if(at>=0)movePluginTo(ch,from,Math.max(0,Math.min(d.count-1,at>from?at-1:at)));} +},true); +document.addEventListener('pointercancel',e=>{ + if(fxGesture?.pointerId===e.pointerId)clearFxGesture(); +},true); +document.addEventListener('keydown',e=>{ + if(e.key==='Escape'&&fxGesture){clearFxGesture();fxSuppressClick=true;setTimeout(()=>fxSuppressClick=false,0);} +},true); +document.addEventListener('click',e=>{ + if(fxSuppressClick&&!window.__JUCE__?.backend?.emitEvent){fxSuppressClick=false;e.preventDefault();e.stopImmediatePropagation()} +},true); + // Double-click a fader for 0 dB unity gain, without changing workspace. document.addEventListener('dblclick',e=>{const f=e.target.closest('[data-fader]');if(!f)return;e.preventDefault();e.stopPropagation();updateFader(f.dataset.fader,0)},true); // Idle pointer movement has no handler. Acquire geometry only once per drag @@ -1865,7 +1932,17 @@ flash('Master FX updated (GUI preview)');return; } const c=channels[currentChannel];const chain=normalChain(c);if(chain.length>=8){flash('Maximum 8 FX slots in this UI trial');return}const index=clamp(pendingSlot,0,chain.length);shiftFxMetaRight(currentChannel,index,chain.length);chain.splice(index,0,name);pluginEditorIndex=index;setChain(c,chain);closePluginBrowser();flash(name+' added to preview chain');send('chainChanged',{chain},currentChannel)} -function movePlugin(idx,dir){const c=channels[currentChannel],ch=normalChain(c),n=idx+dir;if(n<0||n>=ch.length)return;[ch[idx],ch[n]]=[ch[n],ch[idx]];moveFxMeta(currentChannel,idx,n);pluginEditorIndex=n;setChain(c,ch);send('chainChanged',{chain:ch},currentChannel)} +function movePluginTo(channel,from,to){ + const c=channels[channel],chain=normalChain(c); + if(from<0||to<0||from>=chain.length||to>=chain.length||from===to)return false; + const [fx]=chain.splice(from,1);chain.splice(to,0,fx); + // Preserve each insert's bypass and editor settings, rather than swapping labels. + for(let i=from;i!==to;i+=to>from?1:-1)moveFxMeta(channel,i,i+(to>from?1:-1)); + if(channel===currentChannel)pluginEditorIndex=to; + setChain(c,chain);persistSession(); + send('chainChanged',{chain},channel);return true; +} +function movePlugin(idx,dir){movePluginTo(currentChannel,idx,idx+dir)} function removePlugin(idx){const c=channels[currentChannel],ch=normalChain(c);shiftFxMetaLeft(currentChannel,idx,ch.length);ch.splice(idx,1);pluginEditorIndex=null;setChain(c,ch);send('chainChanged',{chain:ch},currentChannel)} function setFxBypass(ch,slot,disabled){ const chain=normalChain(channels[ch]); From 6abe9fe2f9986318c9eb67f92813507421762c3a Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:34:25 +0700 Subject: [PATCH 20/42] perf(gui): register pointermove only during active FX drag, never on idle hover --- web/bridge.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/bridge.js b/web/bridge.js index 2191cc364..21c567d1b 100644 --- a/web/bridge.js +++ b/web/bridge.js @@ -852,6 +852,7 @@ d.marker?.classList.remove("fx-drop-before","fx-drop-after"); d.row?.classList.remove("fx-drag-source"); d.ghost?.remove();fxNativeGesture=null; + document.removeEventListener("pointermove",moveNativeFxGesture); }; document.addEventListener("pointerdown",e=>{ if(e.button!==0||fxNativeGesture||state.chain.length<2)return; @@ -867,8 +868,9 @@ startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY, bounds:siblings.map(el=>({el,rect:el.getBoundingClientRect()})), insertion:from,marker:null,ghost:null,active:false}; + document.addEventListener("pointermove",moveNativeFxGesture,{passive:false}); },true); - document.addEventListener("pointermove",e=>{ + const moveNativeFxGesture=e=>{ const d=fxNativeGesture;if(!d||e.pointerId!==d.pointerId)return; d.x=e.clientX;d.y=e.clientY; if(!d.active){ @@ -893,7 +895,7 @@ const end=at===d.count; d.marker=bs[end?bs.length-1:at].el; d.marker.classList.add(end?"fx-drop-after":"fx-drop-before"); - },{passive:false}); + }; document.addEventListener("pointerup",e=>{ const d=fxNativeGesture;if(!d||d.pointerId!==e.pointerId)return; const active=d.active,at=d.insertion,from=d.from,count=d.count; From 50d0c096394b12ecde7ffa4224c64ab65df9f6ea Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:34:30 +0700 Subject: [PATCH 21/42] perf(gui): register pointermove only during active FX drag, never on idle hover --- web/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app.js b/web/app.js index be11c01c0..3eee1c461 100644 --- a/web/app.js +++ b/web/app.js @@ -435,6 +435,7 @@ function clearFxGesture(){ const d=fxGesture;if(!d)return; d.marker?.classList.remove('fx-drop-before','fx-drop-after'); d.source?.classList.remove('fx-drag-source');d.ghost?.remove(); + document.removeEventListener('pointermove',moveFxGesture); fxGesture=null; } document.addEventListener('pointerdown',e=>{ @@ -451,8 +452,9 @@ document.addEventListener('pointerdown',e=>{ startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY, bounds:slots.map(slot=>({slot,rect:slot.getBoundingClientRect()})), insertion:from,active:false,ghost:null,marker:null}; + document.addEventListener('pointermove',moveFxGesture,{passive:false}); },true); -document.addEventListener('pointermove',e=>{ +const moveFxGesture=e=>{ const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; d.x=e.clientX;d.y=e.clientY; if(!d.active){ @@ -476,7 +478,7 @@ document.addEventListener('pointermove',e=>{ const last=insertion===d.count; d.marker=bounds[last?Math.max(0,d.count-1):insertion]?.slot||null; d.marker?.classList.add(last?'fx-drop-after':'fx-drop-before'); -},{passive:false}); +}; document.addEventListener('pointerup',e=>{ const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; const active=d.active,from=d.from,at=d.insertion,ch=d.channel; From 30fbbfa0d6c195c46b00538ac14c2ede2140a9cc Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:34:52 +0700 Subject: [PATCH 22/42] build(ui): preserve offline preview JS parity after drag-performance hardening --- AR-MIX-Live-FX-Host-Standalone-v0.3.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AR-MIX-Live-FX-Host-Standalone-v0.3.html b/AR-MIX-Live-FX-Host-Standalone-v0.3.html index 70d9310d2..c67dcb95b 100644 --- a/AR-MIX-Live-FX-Host-Standalone-v0.3.html +++ b/AR-MIX-Live-FX-Host-Standalone-v0.3.html @@ -1674,6 +1674,7 @@ const d=fxGesture;if(!d)return; d.marker?.classList.remove('fx-drop-before','fx-drop-after'); d.source?.classList.remove('fx-drag-source');d.ghost?.remove(); + document.removeEventListener('pointermove',moveFxGesture); fxGesture=null; } document.addEventListener('pointerdown',e=>{ @@ -1690,8 +1691,9 @@ startX:e.clientX,startY:e.clientY,x:e.clientX,y:e.clientY, bounds:slots.map(slot=>({slot,rect:slot.getBoundingClientRect()})), insertion:from,active:false,ghost:null,marker:null}; + document.addEventListener('pointermove',moveFxGesture,{passive:false}); },true); -document.addEventListener('pointermove',e=>{ +const moveFxGesture=e=>{ const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; d.x=e.clientX;d.y=e.clientY; if(!d.active){ @@ -1715,7 +1717,7 @@ const last=insertion===d.count; d.marker=bounds[last?Math.max(0,d.count-1):insertion]?.slot||null; d.marker?.classList.add(last?'fx-drop-after':'fx-drop-before'); -},{passive:false}); +}; document.addEventListener('pointerup',e=>{ const d=fxGesture;if(!d||e.pointerId!==d.pointerId)return; const active=d.active,from=d.from,at=d.insertion,ch=d.channel; From ce810016e8346b11381469aad067bc950d48947e Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:37:42 +0700 Subject: [PATCH 23/42] test(native): verify bypass targets physical slot behind logical FX reorder --- tests/native_ui_contract_test.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/native_ui_contract_test.mjs b/tests/native_ui_contract_test.mjs index 48e8041af..049744d37 100644 --- a/tests/native_ui_contract_test.mjs +++ b/tests/native_ui_contract_test.mjs @@ -32,7 +32,8 @@ test('quick FX bypass is wired to native slot instead of demo mock',()=>{ assert.match(bridge,/data-native-fx="bypass" data-slot="\$\{i\}"/); assert.match(bridge,/aria-pressed="\$\{!p\.bypass\}"/); assert.match(bridge,/send\("fxBypass",\{slot,value:!state\.chain\[slot\]\?\.bypass\}\)/); - assert.match(engine,/graphOwned_->bypassFlags\[index\]\.store/); + assert.match(engine,/graphOwned_->bypassFlags\[physical\]\.store/); + assert.match(engine,/const int physical = graphOwned_->physicalAt \(index\)/); }); test('GUI pan event reaches actual callback pan matrix',()=>{ assert.match(app,/send\(master\?'masterPan':'pan',c\.pan,master\?-1:idx\)/); From 14f25d5edce14a467afcb81019dc44e1007dc658 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 03:39:19 +0700 Subject: [PATCH 24/42] test(ui): align selected toolbar optical assertion to owner-approved olive-lime token --- tests/ui_smoke.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ui_smoke.py b/tests/ui_smoke.py index dfef0141d..5601097b2 100644 --- a/tests/ui_smoke.py +++ b/tests/ui_smoke.py @@ -309,7 +309,7 @@ def shared_shadow_shape(shadow): assert style[key]['image']=='none',(key,style) assert style[key]['shadow'].count('rgb')==7,(key,style) assert style[key]['radius']=='3px',(key,style) - assert style['selected']['face']=='rgb(240, 241, 243)',style + assert style['selected']['face']=='rgb(185, 207, 119)',style assert style['railOn']['face']=='rgb(227, 166, 216)',style # Audio Device shares the physical BTN-180 toolbar face and dark ink. # The OFF state is truthful in UI-only preview. Explicitly force ON @@ -367,7 +367,7 @@ def shared_shadow_shape(shadow): const on=document.querySelector('[data-view="FX RACK"]'); const off=document.querySelector('[data-view="MIX"]'); return on.classList.contains('selected') && !off.classList.contains('selected') - && getComputedStyle(on).backgroundColor==='rgb(240, 241, 243)' + && getComputedStyle(on).backgroundColor==='rgb(185, 207, 119)' && getComputedStyle(off).backgroundColor==='rgb(179, 179, 179)'; }""") nav=page.locator('[data-view="FX RACK"]') From 3bf2d770a4829743c69afffc359f321aed3f83bd Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:08:57 +0700 Subject: [PATCH 25/42] fix(rt): two-buffer click-free FX order handoff with zero-crossing ramp and no VST rebuild --- src/LiveAudioEngine.h | 65 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/src/LiveAudioEngine.h b/src/LiveAudioEngine.h index 6d19650d5..6e366e7e2 100644 --- a/src/LiveAudioEngine.h +++ b/src/LiveAudioEngine.h @@ -211,6 +211,8 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback detach(); handoff_.resetAfterStop (graphOwned_.get()); stagedOwner_.reset(); + fxMovePhase_.store (0, std::memory_order_release); + fxMovePendingOrder_.store (Graph::canonicalOrder, std::memory_order_relaxed); for (int i = 0; i < graphOwned_->count; ++i) { if (graphOwned_->slots[i].processor) graphOwned_->slots[i].processor->releaseResources(); @@ -492,20 +494,30 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback return true; } + // Non-RT UI readers show the requested order even during the two-buffer + // de-click handoff. DSP still uses the active order until fade-out reaches 0. + std::uint64_t visibleFxOrder() const noexcept + { + return fxMovePhase_.load (std::memory_order_acquire) != 0 + ? fxMovePendingOrder_.load (std::memory_order_acquire) + : graphOwned_->orderPacked.load (std::memory_order_acquire); + } + juce::AudioPluginInstance* pluginAt (int index) noexcept { return index >= 0 && index < graphOwned_->count - ? graphOwned_->slots[graphOwned_->physicalAt (index)].processor.get() : nullptr; + ? graphOwned_->slots[Graph::physicalAt (visibleFxOrder(), index)].processor.get() : nullptr; } juce::var chainState() const { juce::Array nodes; + const auto logicalOrder = visibleFxOrder(); for (int i = 0; i < graphOwned_->count; ++i) { auto node = std::make_unique(); node->setProperty ("index", i); - const auto& slot = graphOwned_->slots[graphOwned_->physicalAt (i)]; + const auto& slot = graphOwned_->slots[Graph::physicalAt (logicalOrder, i)]; node->setProperty ("name", slot.name); node->setProperty ("id", slot.catalogId); node->setProperty ("bypass", slot.bypass); @@ -520,8 +532,11 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback void materializeOrderOnStoppedCallback() { auto& graph = *graphOwned_; - const auto order = graph.orderPacked.load (std::memory_order_acquire); - if (order == Graph::canonicalOrder) return; + const auto order = fxMovePhase_.load (std::memory_order_acquire) != 0 + ? fxMovePendingOrder_.load (std::memory_order_acquire) + : graph.orderPacked.load (std::memory_order_acquire); + fxMovePhase_.store (0, std::memory_order_release); + if (order == Graph::canonicalOrder) { graph.orderPacked.store (order, std::memory_order_release); return; } std::array rearranged {}; for (int i = 0; i < graph.count; ++i) rearranged[i] = std::move (graph.slots[Graph::physicalAt (order, i)]); @@ -534,7 +549,8 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback juce::String addVst3 (const juce::String& filename, int uid, const juce::String& catalogId) { - if (handoff_.busy()) return "FX graph transition in progress; retry shortly"; + if (handoff_.busy() || fxMovePhase_.load (std::memory_order_acquire) != 0) + return "FX graph transition in progress; retry shortly"; if (graphOwned_->count >= maxFx) return "FX Rack is full (maximum 8 VST3 effects)"; auto* device = deviceManager_.getCurrentAudioDevice(); if (device == nullptr) return "Configure a working audio input/output device first"; @@ -736,7 +752,7 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback bool removeAt (int index) { - if (handoff_.busy()) return false; + if (handoff_.busy() || fxMovePhase_.load (std::memory_order_acquire) != 0) return false; if (index < 0 || index >= graphOwned_->count) return false; detach(); materializeOrderOnStoppedCallback(); @@ -756,13 +772,17 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback // The processor instances remain at stable PHYSICAL addresses. // A 64-bit release store publishes the complete logical order. // The callback takes one acquire snapshot per audio buffer. - if (handoff_.busy()) return false; + if (handoff_.busy() || fxMovePhase_.load (std::memory_order_acquire) != 0) + return false; const int count = graphOwned_->count; if (from < 0 || to < 0 || from >= count || to >= count || from == to) return false; const auto previous = graphOwned_->orderPacked.load (std::memory_order_acquire); const auto next = armix::dsp::FxOrderPlan::moved (previous, count, from, to); - graphOwned_->orderPacked.store (next, std::memory_order_release); + // Plugin objects are not moved. Acknowledge UI intent immediately, + // then run output ramp 1->0, publish at 0, ramp 0->1 in callback. + fxMovePendingOrder_.store (next, std::memory_order_relaxed); + fxMovePhase_.store (1, std::memory_order_release); return true; } @@ -1028,6 +1048,10 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback std::unique_ptr graphOwned_ {std::make_unique()}; std::unique_ptr stagedOwner_; armix::rt::LiveGraphHandoff handoff_; + // 0 idle, 1 fade-out, 2 fade-in. One controller producer, one RT reader. + // No allocation, plugin re-instantiation or extra processing pass. + std::atomic fxMovePhase_ {0}; + std::atomic fxMovePendingOrder_ {Graph::canonicalOrder}; bool attached_ = false; juce::AudioBuffer scratch_; armix::diagnostics::DiagnosticTone diagnosticTone_; @@ -1235,6 +1259,11 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback const float monoL = 0.5f * (matrix.ll + matrix.rl); const float monoR = 0.5f * (matrix.lr + matrix.rr); const float rampStep = samples > 1 ? 1.f / static_cast (samples - 1) : 0.f; + const int fxMovePhase = fxMovePhase_.load (std::memory_order_acquire); + // The same envelope applies to every output channel and sample. + // Old graph reaches zero before the callback publishes new order. + const bool fxFadeOut = fxMovePhase == 1; + const bool fxFadeIn = fxMovePhase == 2; float inPeak = 0.f, postFxPeak = 0.f, outPeak = 0.f; float outPeakL = 0.f, outPeakR = 0.f; for (int offset = 0; offset < samples; offset += maxFrames) @@ -1311,8 +1340,11 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback { const float mapped = toneTest ? left[i] : fromL * left[i] + fromR * right[i]; const auto phase = (offset + i) * rampStep; - const float ramp = cycle.fadeOut ? 1.f - phase - : cycle.fadeIn ? phase : 1.f; + const float graphRamp = cycle.fadeOut ? 1.f - phase + : cycle.fadeIn ? phase : 1.f; + const float fxRamp = fxFadeOut ? 1.f - phase + : fxFadeIn ? phase : 1.f; + const float ramp = graphRamp * fxRamp; const float value = captureTest ? 0.f : toneTest ? mapped * ramp : (enabled && !muted) ? mapped * gain * ramp : 0.f; @@ -1329,6 +1361,19 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback outputPeak_.store (juce::jmin (1.f, outPeak), std::memory_order_relaxed); outputPeakL_.store (juce::jmin (1.f, outPeakL), std::memory_order_relaxed); outputPeakR_.store (juce::jmin (1.f, outPeakR), std::memory_order_relaxed); + if (fxFadeOut) + { + // The last emitted sample of this block is exactly zero. + // Switch order only after all outputs were rendered. Next block + // starts at zero under the NEW order, so there is no step edge. + cycle.graph->orderPacked.store ( + fxMovePendingOrder_.load (std::memory_order_acquire), + std::memory_order_release); + fxMovePhase_.store (2, std::memory_order_release); + } + else if (fxFadeIn) + fxMovePhase_.store (0, std::memory_order_release); + if (cycle.fadeOut) { // Ownership remains with stagedOwner_ until message thread ack. From f82a079952e4bbaa6792738b45a1a829c4234a87 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:11:48 +0700 Subject: [PATCH 26/42] feat(gui): anchored FX picker model, Orbit active marker and material-bin context Delete --- web/bridge.js | 71 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 10 deletions(-) diff --git a/web/bridge.js b/web/bridge.js index 21c567d1b..f7122c0ab 100644 --- a/web/bridge.js +++ b/web/bridge.js @@ -28,7 +28,8 @@ const send = (action, more = {}) => backend.emitEvent("arMixAction", {action, ...more}); let fxNativeGesture=null,fxNativeBlockClick=false; - const state = {catalog: [], chain: [], scanning: false, message: "Connecting to native host...", + let pickerAnchor=null,pickerChannel=0,pickerSlot=0; + const state = {orbitActiveSlot:-1,catalog: [], chain: [], scanning: false, message: "Connecting to native host...", device: {}, presets: [], addRequestId:0, addError:"", pendingPlugin:"", filter: "", selectedCategory: "All", monitor: false, error: "", progress: {active:false,phase:"done",done:0,total:0,found:0,current:""}, adding:false}; const orbit = {slot:-1, plugin:"", parameters:[], active:false, activeSlot:-1, activeParameter:-1, periodSeconds:20, reverse:false, preferredParameter:-1, selection:-1, revision:null,nearSetpoint:20,farSetpoint:70,distanceUnit:"%",distanceMin:0,distanceMax:100,selectedShape:0,appliedPeriod:20,appliedReverse:false,initialized:false,shape:0,distanceSelection:-1,elevationSelection:-1,distanceIndex:-1,elevationIndex:-1,preferredDistance:-1,preferredElevation:-1,motionPath:[],visualPhase:0,visualTime:0}; @@ -75,6 +76,8 @@ .native-node .node-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px} .native-node .node-text small{display:block;color:#7196a8;font-size:10px;margin-top:3px} .native-node.is-bypassed{opacity:.55} + .native-node.has-orbit{background:#19343b;border-color:#44757b} + .native-node.has-orbit .node-text::after{content:" · ORBIT";color:#a1e7da;font-size:9px;letter-spacing:.05em} .native-node button{padding:5px 7px;font-size:10px;min-width:28px} .native-search{box-sizing:border-box;display:block;width:100%;font:12px inherit;outline:0;color:#dcecf2; border:1px solid #4b6b79;background:#0b1923;border-radius:5px;padding:10px;margin-bottom:9px} @@ -196,7 +199,7 @@

MIC INPUT → PROCESSING → MAIN OUTPUT

INPUT 1 / MICROPHONE
- ${state.chain.map((p,i)=>`
+ ${state.chain.map((p,i)=>`
${String(i+1).padStart(2,"0")} ${escapeHtml(p.name)}${p.latency||0} samples processing latency @@ -226,7 +229,10 @@ return overlay; } function showDialog(id){const d=document.getElementById(id);if(d){d.hidden=false;d.querySelector("input")?.focus()}} - function hideDialog(id){const d=document.getElementById(id);if(d)d.hidden=true} + function hideDialog(id){ + const d=document.getElementById(id);if(d)d.hidden=true; + if(id==="nativeFxSelector")clearPickerTarget(); + } let orbitAnchor=null; function hideOrbit(){ const d=document.getElementById("nativeOrbit"); @@ -266,7 +272,8 @@ const paths={ close:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z", play:"M8 5v14l11-7z", - stop:"M6 6h12v12H6z" + stop:"M6 6h12v12H6z", + bin:"M6 7h12v2H6V7zm2 3h2v9H8v-9zm6 0h2v9h-2v-9zM9 4h6l1 2H8l1-2zm-2 6h10l-.7 11H7.7L7 10z" }; return ''; }; @@ -453,7 +460,7 @@ const dlg=document.getElementById("nativeFxSelector"); if(!dlg)return; dlg.querySelector(".native-dialog-body").innerHTML=` -
SELECT EFFECT → INSERT INTO LIVE VOCAL FX RACK
+
INSERT → ${pickerChannel===-1?"MASTER":"CH "+(pickerChannel+1)} · SLOT ${pickerSlot+1}${pickerChannel===0?" · LIVE VST3":" · ROUTING NOT CONNECTED"}
${fxCategories.map(c=>``).join("")}
@@ -468,7 +475,42 @@
${pluginRows(filterPlugins())}
`; dlg.querySelector(".native-dialog-footer").innerHTML=`${state.catalog.length} available plugins · OPEN PLUGIN MANAGER for scanning and import`; } - function openPicker(){renderPicker();showDialog("nativeFxSelector")} + function clearPickerTarget(){ + pickerAnchor?.classList.remove("fx-picker-target"); + pickerAnchor=null; + } + function positionPicker(){ + const overlay=document.getElementById("nativeFxSelector"),dlg=overlay?.querySelector(".native-dialog"); + if(!overlay||overlay.hidden||!dlg)return; + if(!pickerAnchor?.isConnected){hideDialog("nativeFxSelector");return;} + const rect=pickerAnchor.getBoundingClientRect(),w=dlg.offsetWidth,h=dlg.offsetHeight; + const left=Math.max(8,Math.min(window.innerWidth-w-8,rect.left+rect.width/2-34)); + const above=(window.innerHeight-rect.bottomwindow.innerHeight-rect.bottom); + const top=above?Math.max(8,rect.top-h-9):Math.max(8,Math.min(window.innerHeight-h-8,rect.bottom+9)); + dlg.style.left=left+"px";dlg.style.top=top+"px"; + dlg.style.setProperty("--fx-arrow-x",Math.max(12,Math.min(w-20,rect.left+rect.width/2-left))+"px"); + dlg.classList.toggle("picker-above",above); + } + function openPicker(anchor,channel=0,slot=state.chain.length){ + clearPickerTarget(); + const row=anchor?.closest(".insert-slot,.master-fx-slot,.native-node"); + pickerAnchor=(row||anchor)?.isConnected?(row||anchor):document.querySelector('.nav button[data-view="FX RACK"]'); + pickerChannel=Number(channel);pickerSlot=Math.max(0,Number(slot)||0); + pickerAnchor?.classList.add("fx-picker-target"); + renderPicker();showDialog("nativeFxSelector");positionPicker(); + } + window.addEventListener("resize",positionPicker); + document.addEventListener("pointerdown",e=>{ + const picker=document.getElementById("nativeFxSelector"); + if(picker&&!picker.hidden&&!e.target.closest("#nativeFxSelector .native-dialog") + &&!e.target.closest("[data-plugin-picker],[data-native-unrouted]"))hideDialog("nativeFxSelector"); + },true); + document.addEventListener("keydown",e=>{ + if(e.key==="Escape"){ + const picker=document.getElementById("nativeFxSelector"); + if(picker&&!picker.hidden){e.preventDefault();hideDialog("nativeFxSelector");} + } + },true); function scanProgressHtml(){ const p=state.progress||{}; const count=p.done||0,total=p.total||0,found=p.found||0; @@ -598,11 +640,11 @@ track.title=`${track.querySelector(".strip-name")?.textContent?.trim()||"Channel"} — visual preview only; native I/O not wired`; return; } - const signature=state.chain.map(p=>p.id+"|"+p.bypass).join(","); + const signature=state.chain.map(p=>p.id+"|"+p.bypass).join(",")+"|orbit="+state.orbitActiveSlot; if(rack.dataset.nativeSig===signature)return; rack.dataset.nativeSig=signature; rack.innerHTML=state.chain.slice(0,6).map((p,i)=> - `
+ `
@@ -654,7 +696,9 @@ fxContext.innerHTML=''+ ''+ ''+ - ''; + ''+ + ''+ + ''; fxContext.hidden=false; fxContext.style.left=Math.max(4,Math.min(x,window.innerWidth-fxContext.offsetWidth-4))+'px'; fxContext.style.top=Math.max(4,Math.min(y,window.innerHeight-fxContext.offsetHeight-4))+'px'; @@ -688,6 +732,7 @@ if(action==="orbit")openOrbit(slot,anchor); else if(action==="editor")send("fxEditor",{slot}); else if(action==="bypass")send("fxBypass",{slot,value:!state.chain[slot].bypass}); + else if(action==="delete")send("fxRemove",{slot}); },true); document.addEventListener("pointerdown",e=>{ const popup=document.getElementById("nativeOrbit"); @@ -980,7 +1025,13 @@ renderOrbit(); },true); backend.addEventListener("arMixOrbitState",data=>{ - if(!data||Number(data.slot)!==orbit.slot)return; + if(!data)return; + const activeSlot=data.active&&Number.isInteger(Number(data.activeSlot))?Number(data.activeSlot):-1; + if(state.orbitActiveSlot!==activeSlot){ + state.orbitActiveSlot=activeSlot; + patchMixer(); + } + if(Number(data.slot)!==orbit.slot)return; const wasInitialized=orbit.initialized; const preview=data.previewShape!==-1; const draft={nearSetpoint:orbit.nearSetpoint,farSetpoint:orbit.farSetpoint, From 437dd972d05e51af535580dc930014d5da66ea29 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:12:32 +0700 Subject: [PATCH 27/42] fix(gui): wire all ADD FX slots to context popover without pretending other buses process VST3 --- web/bridge.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/web/bridge.js b/web/bridge.js index f7122c0ab..68622e7bb 100644 --- a/web/bridge.js +++ b/web/bridge.js @@ -767,11 +767,9 @@ e.preventDefault();e.stopImmediatePropagation(); if(el.hasAttribute("data-native-unrouted")){ - const id=Number(el.dataset.nativeUnrouted); - if(id===-1){if(typeof focusMaster==="function")focusMaster();} - else if(Number.isInteger(id)&&id>=0&&id<10&&typeof focusChannel==="function")focusChannel(id); - if(currentTab()!=="FX RACK")document.querySelector('.nav button[data-view="FX RACK"]')?.click(); - renderRack();return; + const id=Number(el.dataset.nativeUnrouted),rack=el.closest(".rack,.master-fx-rack"); + const slot=rack?[...rack.children].indexOf(el.closest(".insert-slot,.master-fx-slot")):0; + openPicker(el,id,Math.max(0,slot));return; } if(el.dataset.closeModal){if(el.dataset.closeModal==="nativeOrbit")hideOrbit();else hideDialog(el.dataset.closeModal);return;} if(el.hasAttribute("data-orbit-start")){ @@ -836,7 +834,9 @@ renderManager();showDialog("nativePluginManager");return; } if(el.hasAttribute("data-plugin-picker")){ - openPicker();return; + const rack=el.closest(".rack"); + const slot=rack?[...rack.children].indexOf(el.closest(".insert-slot")):state.chain.length; + openPicker(el,0,slot<0?state.chain.length:slot);return; } if(el.hasAttribute("data-insert")){ const article=el.closest(".strip"); @@ -847,7 +847,8 @@ setTimeout(()=>toast.classList.remove("show"),2200);} return; } - openPicker();return; + const slot=Number(el.dataset.insert?.split(":")[1]||state.chain.length); + openPicker(el,idx,slot);return; } if(el.hasAttribute("data-go-native-rack")){ document.querySelector('.nav button[data-view="FX RACK"]')?.click();return; @@ -860,6 +861,10 @@ } if(el.dataset.nativeAdd){ if(state.adding)return; + if(pickerChannel!==0){ + toStatus("Native VST3 routing is not connected on "+(pickerChannel===-1?"MASTER":"CH "+(pickerChannel+1))+". No effect was loaded."); + return; + } const id=el.dataset.nativeAdd; const chosen=state.catalog.find(p=>p.id===id); state.adding=true; From 830ec335e1c8ef0fdd8056378904aeb632a6ab0c Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:13:24 +0700 Subject: [PATCH 28/42] style(gui): smooth folded-metal fader recess, Orbit tint and compact slot-anchored FX catalog --- web/styles-src/42-mixer-premium.css | 58 ++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/web/styles-src/42-mixer-premium.css b/web/styles-src/42-mixer-premium.css index 14af17bf1..a6e7a0d0a 100644 --- a/web/styles-src/42-mixer-premium.css +++ b/web/styles-src/42-mixer-premium.css @@ -194,8 +194,16 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m #app #mixer .fader-zone .fader::before{ content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; transform:translateX(-50%);z-index:0;pointer-events:none; - background:#10181e;border:1px solid #34424c;border-radius:2px; - box-shadow:inset 0 2px 2px #050a0e,inset 0 -2px 2px #070c10,inset 2px 0 2px #080e13,inset -1px 0 1px #26333b; + /* A gently folded metal lip, NOT a bright rectangular outline. + One flat, graphite-grey interior plus small static bevels at four edges. */ + background:#1b2a32;border:0;border-radius:4px; + box-shadow: + inset 0 3px 2px -2px #060c11, + inset 0 -3px 2px -2px #080e13, + inset 3px 0 2px -2px #0b151b, + inset -3px 0 2px -2px #0b151b, + 0 -1px 0 #364650, 0 1px 0 #293b45, + -1px 0 0 #2c3c45, 1px 0 0 #2c3c45; } #app #mixer .fader-zone .fader::after{ content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; @@ -229,3 +237,49 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m } .native-node.fx-drop-before::before{top:-2px} .native-node.fx-drop-after::after{bottom:-2px} + +/* FX slot selection is always clear without expensive hover blur/compositing. */ +#app #mixer .fx-picker-target{ + outline:1px solid #88cfc5;outline-offset:-1px; + background-color:#1b393e; +} +#app #mixer .native-insert-row.has-orbit .insert, +#app #mixer .native-insert-row.has-orbit .fx-power{ + background-color:#24454b!important;color:#b7eee1; +} +#app #mixer .native-insert-row.has-orbit .insert-name::after{ + content:" · ↻";color:#8dd9c4;font-size:10px; +} +#nativeFxSelector.native-modal{ + background:transparent!important;backdrop-filter:none!important; + pointer-events:none!important;display:block;padding:0; +} +#nativeFxSelector[hidden]{display:none!important} +#nativeFxSelector .native-dialog{ + position:fixed;pointer-events:auto;width:min(390px,calc(100vw - 16px)); + max-height:min(560px,calc(100vh - 16px)); + margin:0;padding:0;box-shadow:0 5px 19px #0008; + border:1px solid #547c85;border-radius:6px; + background:#172a34;overflow:visible; +} +#nativeFxSelector .native-dialog::before{ + content:"";position:absolute;top:-5px;left:var(--fx-arrow-x,22px); + width:8px;height:8px;background:#172a34; + border-left:1px solid #547c85;border-top:1px solid #547c85; + transform:rotate(45deg); +} +#nativeFxSelector .native-dialog.picker-above::before{ + top:auto;bottom:-5px;border:0;border-right:1px solid #547c85; + border-bottom:1px solid #547c85; +} +#nativeFxSelector .native-dialog-header{ + padding:8px 11px;border-bottom:1px solid #34515e; +} +#nativeFxSelector .native-dialog-header h2{font-size:13px;margin:2px 0;font-weight:500} +#nativeFxSelector .native-dialog-body{padding:9px 11px;min-height:0;overflow:auto} +#nativeFxSelector .native-dialog-footer{padding:6px 11px} +#nativeFxSelector .native-category{gap:3px} +#nativeFxSelector .native-category button{padding:4px 6px;font-size:10px} +#nativeFxSelector .native-search{padding:7px 9px;margin-bottom:5px} +#nativeFxContext .fx-context-delete{color:#efb2a8;display:flex;align-items:center;gap:7px} +#nativeFxContext .fx-context-delete svg{width:15px;height:15px;fill:currentColor} From 23b2e821a04a323075fda42467c00e4ae87a968b Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:14:48 +0700 Subject: [PATCH 29/42] fix(rt): guard FX save/recall during fade and handle offline reorder without deadlocking --- src/LiveAudioEngine.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/LiveAudioEngine.h b/src/LiveAudioEngine.h index 6e366e7e2..da3704d63 100644 --- a/src/LiveAudioEngine.h +++ b/src/LiveAudioEngine.h @@ -602,7 +602,7 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback juce::String captureSnapshot (armix::storage::Snapshot& snapshot) { if (!isOutputMuted()) return "Mute hardware output before saving a native preset"; - if (handoff_.busy()) return "Finish pending FX graph transition before saving"; + if (handoff_.busy() || fxMovePhase_.load (std::memory_order_acquire) != 0) return "Finish pending FX graph transition before saving"; snapshot.effects.clear(); snapshot.channelDb = juce::Decibels::gainToDecibels ( channelGain_.load (std::memory_order_relaxed), -60.f); @@ -648,7 +648,7 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback // or destroys a plugin. No manual output mute is required for recall. juce::String restoreSnapshot (const armix::storage::Snapshot& snapshot) { - if (handoff_.busy()) + if (handoff_.busy() || fxMovePhase_.load (std::memory_order_acquire) != 0) return "A live FX graph transition is already in progress"; if (snapshot.effects.size() > maxFx) return "Too many plugins in preset"; auto* device = deviceManager_.getCurrentAudioDevice(); @@ -781,6 +781,11 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback const auto next = armix::dsp::FxOrderPlan::moved (previous, count, from, to); // Plugin objects are not moved. Acknowledge UI intent immediately, // then run output ramp 1->0, publish at 0, ramp 0->1 in callback. + if (!attached_ && !independent_.active()) + { + graphOwned_->orderPacked.store (next, std::memory_order_release); + return true; // no callback exists to acknowledge a fade + } fxMovePendingOrder_.store (next, std::memory_order_relaxed); fxMovePhase_.store (1, std::memory_order_release); return true; From 9ed398460b12365d36b7ff53954c581586aae2b5 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:15:21 +0700 Subject: [PATCH 30/42] feat(rt): pure no-alloc per-sample envelope for click-free VST order swaps --- engine/core/FxMoveRamp.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 engine/core/FxMoveRamp.h diff --git a/engine/core/FxMoveRamp.h b/engine/core/FxMoveRamp.h new file mode 100644 index 000000000..38e6bfed9 --- /dev/null +++ b/engine/core/FxMoveRamp.h @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: AGPL-3.0-only +#pragma once + +namespace armix::dsp +{ +// Output-only de-click around a graph's single atomic order publication. +// 1 = fade old processing 1->0; 2 = fade new processing 0->1. +// A callback completes one stage, so channel outputs share exact envelope. +// Does not duplicate VST processing or allocate on the audio thread. +struct FxMoveRamp final +{ + static constexpr float gain (int stage, int sample, int frames) noexcept + { + if (stage != 1 && stage != 2) return 1.f; + if (frames <= 1) return stage == 1 ? 0.f : 1.f; + const float phase = static_cast(sample) / static_cast(frames-1); + return stage == 1 ? 1.f-phase : phase; + } +}; +} // namespace armix::dsp From 646ded86353e66fb0921b133dc50719d637f5d75 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:15:26 +0700 Subject: [PATCH 31/42] refactor(rt): reuse tested pure de-click gain in live audio callback --- src/LiveAudioEngine.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/LiveAudioEngine.h b/src/LiveAudioEngine.h index da3704d63..09b49710d 100644 --- a/src/LiveAudioEngine.h +++ b/src/LiveAudioEngine.h @@ -13,6 +13,7 @@ #include "../engine/device/DirectRouteFence.h" #include "../engine/device/WasapiEndpointIdentityGuard.h" #include "../engine/core/FxOrderPlan.h" +#include "../engine/core/FxMoveRamp.h" #include "../engine/core/RealtimeHealthHistogram.h" #include "../engine/core/CallbackCadenceEvidence.h" #include @@ -1347,8 +1348,8 @@ class LiveAudioEngine final : private juce::AudioIODeviceCallback const auto phase = (offset + i) * rampStep; const float graphRamp = cycle.fadeOut ? 1.f - phase : cycle.fadeIn ? phase : 1.f; - const float fxRamp = fxFadeOut ? 1.f - phase - : fxFadeIn ? phase : 1.f; + const float fxRamp = armix::dsp::FxMoveRamp::gain ( + fxMovePhase, offset + i, samples); const float ramp = graphRamp * fxRamp; const float value = captureTest ? 0.f : toneTest ? mapped * ramp From 4965751af21dc3a8cda8f7a2f231a023bc166054 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:15:45 +0700 Subject: [PATCH 32/42] test(rt): verify click-free output envelope seam and monotonic fades at multiple buffer sizes --- tests/fx_order_atomic_test.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/fx_order_atomic_test.cpp b/tests/fx_order_atomic_test.cpp index 5454db2f9..eaa967370 100644 --- a/tests/fx_order_atomic_test.cpp +++ b/tests/fx_order_atomic_test.cpp @@ -1,5 +1,6 @@ // SPDX-License-Identifier: AGPL-3.0-only #include "../engine/core/FxOrderPlan.h" +#include "../engine/core/FxMoveRamp.h" #include #include #include @@ -12,6 +13,21 @@ int main() static_assert (Plan::canonical == 0x76543210ULL); static_assert (std::atomic::is_always_lock_free, "Realtime order publication requires lock-free x64 atomic."); + // Both halves meet at exact digital zero across the graph-order seam. + using Ramp = armix::dsp::FxMoveRamp; + for (int frames : {32, 64, 128, 480, 1024}) + { + assert(Ramp::gain(1,0,frames)==1.f); + assert(Ramp::gain(1,frames-1,frames)==0.f); + assert(Ramp::gain(2,0,frames)==0.f); + assert(Ramp::gain(2,frames-1,frames)==1.f); + assert(Ramp::gain(0,17,frames)==1.f); + for(int i=1;i=Ramp::gain(2,i-1,frames)); + } + } // Entire insert identities survive every arbitrary move. No duplicates. for (int count=2; count<=8; ++count) for (int from=0; from Date: Wed, 28 Oct 2026 04:16:26 +0700 Subject: [PATCH 33/42] test(gui): assert soft metal recess, per-slot popover and active Orbit/delete commands --- tests/fx_drag_reorder_contract_test.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/fx_drag_reorder_contract_test.mjs b/tests/fx_drag_reorder_contract_test.mjs index 772d445e8..d5258850e 100644 --- a/tests/fx_drag_reorder_contract_test.mjs +++ b/tests/fx_drag_reorder_contract_test.mjs @@ -46,7 +46,13 @@ test('native has six consistent empty inserts and one DSP reorder per drop',()=> assert.match(bridge,/send\("fxMove",\{slot:from,value:to-from\}\)/); assert.doesNotMatch(bridge,/FX FULL/); assert.match(css,/width:46px/); - assert.match(css,/background:#10181e/); + assert.match(css,/background:#1b2a32/); assert.match(css,/top:0;bottom:0;width:46px/); + assert.match(css,/#nativeFxSelector .native-dialog::before/); + assert.match(css,/#app #mixer .native-insert-row.has-orbit/); + assert.match(bridge,/fx-context-delete/); + assert.match(bridge,/pickerAnchor/); + assert.match(bridge,/data\.activeSlot/); + assert.match(bridge,/openPicker\(el,id,Math.max\(0,slot\)\)/); assert.match(native,/moreThanOneInstanceAllowed\(\) override \{ return false; \}/); }); From 1fe21b363aa6c59ccb7736a3b6bc3fdefb99a3cc Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:17:03 +0700 Subject: [PATCH 34/42] build(ui): keep native CSS, standalone CSS and standalone JS at exact source parity --- web/styles.css | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/web/styles.css b/web/styles.css index 4569de544..d3c45d811 100644 --- a/web/styles.css +++ b/web/styles.css @@ -1153,8 +1153,16 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m #app #mixer .fader-zone .fader::before{ content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; transform:translateX(-50%);z-index:0;pointer-events:none; - background:#10181e;border:1px solid #34424c;border-radius:2px; - box-shadow:inset 0 2px 2px #050a0e,inset 0 -2px 2px #070c10,inset 2px 0 2px #080e13,inset -1px 0 1px #26333b; + /* A gently folded metal lip, NOT a bright rectangular outline. + One flat, graphite-grey interior plus small static bevels at four edges. */ + background:#1b2a32;border:0;border-radius:4px; + box-shadow: + inset 0 3px 2px -2px #060c11, + inset 0 -3px 2px -2px #080e13, + inset 3px 0 2px -2px #0b151b, + inset -3px 0 2px -2px #0b151b, + 0 -1px 0 #364650, 0 1px 0 #293b45, + -1px 0 0 #2c3c45, 1px 0 0 #2c3c45; } #app #mixer .fader-zone .fader::after{ content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; @@ -1188,3 +1196,49 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m } .native-node.fx-drop-before::before{top:-2px} .native-node.fx-drop-after::after{bottom:-2px} + +/* FX slot selection is always clear without expensive hover blur/compositing. */ +#app #mixer .fx-picker-target{ + outline:1px solid #88cfc5;outline-offset:-1px; + background-color:#1b393e; +} +#app #mixer .native-insert-row.has-orbit .insert, +#app #mixer .native-insert-row.has-orbit .fx-power{ + background-color:#24454b!important;color:#b7eee1; +} +#app #mixer .native-insert-row.has-orbit .insert-name::after{ + content:" · ↻";color:#8dd9c4;font-size:10px; +} +#nativeFxSelector.native-modal{ + background:transparent!important;backdrop-filter:none!important; + pointer-events:none!important;display:block;padding:0; +} +#nativeFxSelector[hidden]{display:none!important} +#nativeFxSelector .native-dialog{ + position:fixed;pointer-events:auto;width:min(390px,calc(100vw - 16px)); + max-height:min(560px,calc(100vh - 16px)); + margin:0;padding:0;box-shadow:0 5px 19px #0008; + border:1px solid #547c85;border-radius:6px; + background:#172a34;overflow:visible; +} +#nativeFxSelector .native-dialog::before{ + content:"";position:absolute;top:-5px;left:var(--fx-arrow-x,22px); + width:8px;height:8px;background:#172a34; + border-left:1px solid #547c85;border-top:1px solid #547c85; + transform:rotate(45deg); +} +#nativeFxSelector .native-dialog.picker-above::before{ + top:auto;bottom:-5px;border:0;border-right:1px solid #547c85; + border-bottom:1px solid #547c85; +} +#nativeFxSelector .native-dialog-header{ + padding:8px 11px;border-bottom:1px solid #34515e; +} +#nativeFxSelector .native-dialog-header h2{font-size:13px;margin:2px 0;font-weight:500} +#nativeFxSelector .native-dialog-body{padding:9px 11px;min-height:0;overflow:auto} +#nativeFxSelector .native-dialog-footer{padding:6px 11px} +#nativeFxSelector .native-category{gap:3px} +#nativeFxSelector .native-category button{padding:4px 6px;font-size:10px} +#nativeFxSelector .native-search{padding:7px 9px;margin-bottom:5px} +#nativeFxContext .fx-context-delete{color:#efb2a8;display:flex;align-items:center;gap:7px} +#nativeFxContext .fx-context-delete svg{width:15px;height:15px;fill:currentColor} From f6e1daebc33861a51432d306dc4ea89481d55c1b Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:17:13 +0700 Subject: [PATCH 35/42] build(ui): keep native CSS, standalone CSS and standalone JS at exact source parity --- AR-MIX-Live-FX-Host-Standalone-v0.3.html | 58 +++++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/AR-MIX-Live-FX-Host-Standalone-v0.3.html b/AR-MIX-Live-FX-Host-Standalone-v0.3.html index c67dcb95b..b71442040 100644 --- a/AR-MIX-Live-FX-Host-Standalone-v0.3.html +++ b/AR-MIX-Live-FX-Host-Standalone-v0.3.html @@ -1154,8 +1154,16 @@ #app #mixer .fader-zone .fader::before{ content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; transform:translateX(-50%);z-index:0;pointer-events:none; - background:#10181e;border:1px solid #34424c;border-radius:2px; - box-shadow:inset 0 2px 2px #050a0e,inset 0 -2px 2px #070c10,inset 2px 0 2px #080e13,inset -1px 0 1px #26333b; + /* A gently folded metal lip, NOT a bright rectangular outline. + One flat, graphite-grey interior plus small static bevels at four edges. */ + background:#1b2a32;border:0;border-radius:4px; + box-shadow: + inset 0 3px 2px -2px #060c11, + inset 0 -3px 2px -2px #080e13, + inset 3px 0 2px -2px #0b151b, + inset -3px 0 2px -2px #0b151b, + 0 -1px 0 #364650, 0 1px 0 #293b45, + -1px 0 0 #2c3c45, 1px 0 0 #2c3c45; } #app #mixer .fader-zone .fader::after{ content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; @@ -1189,6 +1197,52 @@ } .native-node.fx-drop-before::before{top:-2px} .native-node.fx-drop-after::after{bottom:-2px} + +/* FX slot selection is always clear without expensive hover blur/compositing. */ +#app #mixer .fx-picker-target{ + outline:1px solid #88cfc5;outline-offset:-1px; + background-color:#1b393e; +} +#app #mixer .native-insert-row.has-orbit .insert, +#app #mixer .native-insert-row.has-orbit .fx-power{ + background-color:#24454b!important;color:#b7eee1; +} +#app #mixer .native-insert-row.has-orbit .insert-name::after{ + content:" · ↻";color:#8dd9c4;font-size:10px; +} +#nativeFxSelector.native-modal{ + background:transparent!important;backdrop-filter:none!important; + pointer-events:none!important;display:block;padding:0; +} +#nativeFxSelector[hidden]{display:none!important} +#nativeFxSelector .native-dialog{ + position:fixed;pointer-events:auto;width:min(390px,calc(100vw - 16px)); + max-height:min(560px,calc(100vh - 16px)); + margin:0;padding:0;box-shadow:0 5px 19px #0008; + border:1px solid #547c85;border-radius:6px; + background:#172a34;overflow:visible; +} +#nativeFxSelector .native-dialog::before{ + content:"";position:absolute;top:-5px;left:var(--fx-arrow-x,22px); + width:8px;height:8px;background:#172a34; + border-left:1px solid #547c85;border-top:1px solid #547c85; + transform:rotate(45deg); +} +#nativeFxSelector .native-dialog.picker-above::before{ + top:auto;bottom:-5px;border:0;border-right:1px solid #547c85; + border-bottom:1px solid #547c85; +} +#nativeFxSelector .native-dialog-header{ + padding:8px 11px;border-bottom:1px solid #34515e; +} +#nativeFxSelector .native-dialog-header h2{font-size:13px;margin:2px 0;font-weight:500} +#nativeFxSelector .native-dialog-body{padding:9px 11px;min-height:0;overflow:auto} +#nativeFxSelector .native-dialog-footer{padding:6px 11px} +#nativeFxSelector .native-category{gap:3px} +#nativeFxSelector .native-category button{padding:4px 6px;font-size:10px} +#nativeFxSelector .native-search{padding:7px 9px;margin-bottom:5px} +#nativeFxContext .fx-context-delete{color:#efb2a8;display:flex;align-items:center;gap:7px} +#nativeFxContext .fx-context-delete svg{width:15px;height:15px;fill:currentColor}
From f0359b68d35af6e4605bbbe93806d365d7b18a0a Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 04:30:34 +0700 Subject: [PATCH 36/42] fix(ui): preserve Orbit popup anchor and animation by toggling insert class without rack rerender --- web/bridge.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/web/bridge.js b/web/bridge.js index 86cc2e622..9a6356e5a 100644 --- a/web/bridge.js +++ b/web/bridge.js @@ -659,7 +659,7 @@ track.title=`${track.querySelector(".strip-name")?.textContent?.trim()||"Channel"} — visual preview only; native I/O not wired`; return; } - const signature=state.chain.map(p=>p.id+"|"+p.bypass).join(",")+"|orbit="+state.orbitActiveSlot; + const signature=state.chain.map(p=>p.id+"|"+p.bypass).join(","); if(rack.dataset.nativeSig===signature)return; rack.dataset.nativeSig=signature; rack.innerHTML=state.chain.slice(0,6).map((p,i)=> @@ -677,6 +677,13 @@
`).join(""); }); } + // Orbit lighting changes a class on existing rows. Never replace the row + // holding the native popup's anchor, nor reset its animation. + function updateOrbitRackMarker(){ + document.querySelectorAll('.native-insert-row[data-native-move],.native-node[data-native-move]') + .forEach(row=>row.classList.toggle("has-orbit", + state.orbitActiveSlot>=0&&Number(row.dataset.nativeMove)===state.orbitActiveSlot)); + } let renderPending = false; function syncView(){ if(renderPending) return; @@ -1053,7 +1060,7 @@ const activeSlot=data.active&&Number.isInteger(Number(data.activeSlot))?Number(data.activeSlot):-1; if(state.orbitActiveSlot!==activeSlot){ state.orbitActiveSlot=activeSlot; - patchMixer(); + updateOrbitRackMarker(); } if(Number(data.slot)!==orbit.slot)return; const wasInitialized=orbit.initialized; @@ -1078,8 +1085,7 @@ orbit.visualTime=performance.now(); } renderOrbit(); - if(currentTab()==="FX RACK")renderRack(); - patchMixer(); + updateOrbitRackMarker(); }); backend.addEventListener("arMixPresets",items=>{ state.presets=Array.isArray(items)?items:[]; From 4a4e5638a101c0a9e9b0ec653d019edcab2b9ff7 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 05:01:08 +0700 Subject: [PATCH 37/42] style(fader): replace boxed outline with smooth four-sided folded-metal trough --- web/styles-src/42-mixer-premium.css | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/web/styles-src/42-mixer-premium.css b/web/styles-src/42-mixer-premium.css index a6e7a0d0a..63d73ce39 100644 --- a/web/styles-src/42-mixer-premium.css +++ b/web/styles-src/42-mixer-premium.css @@ -184,9 +184,10 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m /* LED increments stay fixed and the meter keeps its native dBFS conversion. No hot-path DOM reads, filters, blur or per-frame scale animation. */ -/* Flat milled-fader bay: a fixed-width, four-sided recess for EVERY strip, - including the wider MASTER. The center detent and 36×77 PNG remain unchanged. - Two static layers, no gradients/glow/filter/animated surface repaint. */ +/* P0: one folded-sheet-metal trough across CH1–10 and MASTER. + Dark graphite flat interior, soft top/bottom rolled lips, zero bright + rectangular border. 46px bay independently centered in each fader rail. + Preserve existing cap PNG, gain travel, and mouse hit targets. */ #app #mixer .fader-zone .fader{ position:relative;isolation:isolate;min-width:36px; background:transparent!important;border:0!important;box-shadow:none!important; @@ -194,21 +195,20 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m #app #mixer .fader-zone .fader::before{ content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; transform:translateX(-50%);z-index:0;pointer-events:none; - /* A gently folded metal lip, NOT a bright rectangular outline. - One flat, graphite-grey interior plus small static bevels at four edges. */ - background:#1b2a32;border:0;border-radius:4px; + box-sizing:border-box;border:0;border-radius:6px; + background:#24333b; + /* Smooth machine folds at all four edges, no light outer rectangle. */ box-shadow: - inset 0 3px 2px -2px #060c11, - inset 0 -3px 2px -2px #080e13, - inset 3px 0 2px -2px #0b151b, - inset -3px 0 2px -2px #0b151b, - 0 -1px 0 #364650, 0 1px 0 #293b45, - -1px 0 0 #2c3c45, 1px 0 0 #2c3c45; + inset 0 4px 4px -3px #070e13, + inset 0 -4px 4px -3px #070e13, + inset 4px 0 5px -4px #081116, + inset -4px 0 5px -4px #081116; } #app #mixer .fader-zone .fader::after{ content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; transform:translateX(-50%);z-index:0;pointer-events:none; - background:#020506;border:0;box-shadow:inset 1px 0 #26323a,inset -1px 0 #26323a; + background:#05090c;border:0; + box-shadow:inset 1px 0 #34434b,inset -1px 0 #34434b; } #app #mixer .fader-zone .fader-travel{z-index:1} /* DAW insertion markers are painted only while an FX drag is active. */ From cffd60a8f0f05d1d19507a4f3ce6cb664ff2aa88 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 05:01:55 +0700 Subject: [PATCH 38/42] fix(fx): compact slot-anchored catalogue without dimming and disabled non-routed ADD --- web/bridge.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/web/bridge.js b/web/bridge.js index 9a6356e5a..92d26f883 100644 --- a/web/bridge.js +++ b/web/bridge.js @@ -151,6 +151,33 @@ #nativeFxContext .native-context-divider{height:1px;background:#334a58;margin:3px 4px} `; css.textContent += "\n #nativeOrbit .native-dialog{width:374px;max-width:calc(100vw - 16px)}\n #nativeOrbit .orbit-motion-view{background:#0b1e2a;border:1px solid #2f5161;\n border-radius:6px;margin:0 0 10px;padding:7px;display:flex;align-items:center;gap:10px}\n #nativeOrbit .orbit-map{width:132px;height:132px;flex:none}\n #nativeOrbit .orbit-mode-help{font-size:11px;color:#9abfce;line-height:1.55}\n #nativeOrbit .orbit-mode-help strong{display:block;color:#d8f0f7;font-weight:500;margin-bottom:4px}\n #nativeOrbit .orbit-field-label{font-size:11px}\n #nativeOrbit .orbit-extra-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}\n #nativeOrbit .orbit-help-note{font-size:10px;color:#87a8b9;line-height:1.4;margin:0 0 8px}\n #nativeOrbit .material-icon{width:18px;height:18px;fill:currentColor;vertical-align:middle;flex:none}\n #nativeOrbit .orbit-actions .native-btn{display:inline-flex;justify-content:center;align-items:center;gap:5px}\n #nativeOrbit .orbit-map path{vector-effect:non-scaling-stroke}\n"; + // Slot-attached FX catalogue — independent of large screen-dimming dialogs. + css.textContent += ` + #nativeFxSelector{position:fixed;inset:0;display:block;padding:0; + background:transparent!important;backdrop-filter:none!important; + pointer-events:none;z-index:970} + #nativeFxSelector[hidden]{display:none} + #nativeFxSelector .native-dialog{position:fixed;box-sizing:border-box; + width:min(386px,calc(100vw - 16px));max-height:min(530px,calc(100vh - 20px)); + pointer-events:auto;overflow:hidden;margin:0;border:1px solid #4b6b78; + background:#1b2c36;border-radius:7px; + box-shadow:0 7px 18px #0009,inset 0 1px #ffffff14} + #nativeFxSelector .native-dialog::before{content:"";position:absolute; + top:-5px;left:var(--fx-arrow-x,20px);width:8px;height:8px; + background:#1b2c36;transform:rotate(45deg); + border-top:1px solid #4b6b78;border-left:1px solid #4b6b78} + #nativeFxSelector .native-dialog.picker-above::before{ + top:auto;bottom:-5px;border:0;border-right:1px solid #4b6b78; + border-bottom:1px solid #4b6b78} + #nativeFxSelector .native-dialog-header{padding:8px 11px} + #nativeFxSelector .native-dialog-header h2{font-size:13px;font-weight:500;margin:1px 0} + #nativeFxSelector .native-dialog-body{min-height:0;padding:8px 11px} + #nativeFxSelector .native-dialog-footer{padding:6px 11px} + #nativeFxSelector .native-result{padding:5px 7px;margin:3px 0} + #nativeFxSelector .native-result button{padding:5px 7px} + #nativeFxSelector .native-category button{padding:4px 6px} + .native-engine .fx-picker-target{outline:1px solid #7ccac3;outline-offset:-1px} + `; document.head.appendChild(css); document.getElementById("engineBadge").textContent="NATIVE CH1 · ORBIT"; const workspace = document.querySelector("#rackWorkspace"); @@ -467,7 +494,7 @@ ${escapeHtml(p.vendor||"Unknown vendor")} · ${escapeHtml(p.category||"Audio effect")} VST3
`).join("") + ${state.chain.length>=8||state.adding||pickerChannel!==0?"disabled":""} title="${pickerChannel===0?"Insert native VST3":"Channel routing not yet connected"}">+ ADD
`).join("") :'
No matching installed VST3 effects. Open Plugin Manager to scan your folders.
'; } function filterPlugins(){ From fb83abe3e9908ba439355645d388285e660b1d10 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 05:02:30 +0700 Subject: [PATCH 39/42] build(gui): synchronize softer milled fader CSS across native and offline preview --- web/styles.css | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/web/styles.css b/web/styles.css index d3c45d811..8e3869efd 100644 --- a/web/styles.css +++ b/web/styles.css @@ -1143,9 +1143,10 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m /* LED increments stay fixed and the meter keeps its native dBFS conversion. No hot-path DOM reads, filters, blur or per-frame scale animation. */ -/* Flat milled-fader bay: a fixed-width, four-sided recess for EVERY strip, - including the wider MASTER. The center detent and 36×77 PNG remain unchanged. - Two static layers, no gradients/glow/filter/animated surface repaint. */ +/* P0: one folded-sheet-metal trough across CH1–10 and MASTER. + Dark graphite flat interior, soft top/bottom rolled lips, zero bright + rectangular border. 46px bay independently centered in each fader rail. + Preserve existing cap PNG, gain travel, and mouse hit targets. */ #app #mixer .fader-zone .fader{ position:relative;isolation:isolate;min-width:36px; background:transparent!important;border:0!important;box-shadow:none!important; @@ -1153,21 +1154,20 @@ html:not([data-mixperf="baseline"]):not([data-mixperf="layers-off"]):not([data-m #app #mixer .fader-zone .fader::before{ content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; transform:translateX(-50%);z-index:0;pointer-events:none; - /* A gently folded metal lip, NOT a bright rectangular outline. - One flat, graphite-grey interior plus small static bevels at four edges. */ - background:#1b2a32;border:0;border-radius:4px; + box-sizing:border-box;border:0;border-radius:6px; + background:#24333b; + /* Smooth machine folds at all four edges, no light outer rectangle. */ box-shadow: - inset 0 3px 2px -2px #060c11, - inset 0 -3px 2px -2px #080e13, - inset 3px 0 2px -2px #0b151b, - inset -3px 0 2px -2px #0b151b, - 0 -1px 0 #364650, 0 1px 0 #293b45, - -1px 0 0 #2c3c45, 1px 0 0 #2c3c45; + inset 0 4px 4px -3px #070e13, + inset 0 -4px 4px -3px #070e13, + inset 4px 0 5px -4px #081116, + inset -4px 0 5px -4px #081116; } #app #mixer .fader-zone .fader::after{ content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; transform:translateX(-50%);z-index:0;pointer-events:none; - background:#020506;border:0;box-shadow:inset 1px 0 #26323a,inset -1px 0 #26323a; + background:#05090c;border:0; + box-shadow:inset 1px 0 #34434b,inset -1px 0 #34434b; } #app #mixer .fader-zone .fader-travel{z-index:1} /* DAW insertion markers are painted only while an FX drag is active. */ From b86b011eef191886bc090c599394004bf0261c95 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 05:02:37 +0700 Subject: [PATCH 40/42] build(gui): synchronize softer milled fader CSS across native and offline preview --- AR-MIX-Live-FX-Host-Standalone-v0.3.html | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/AR-MIX-Live-FX-Host-Standalone-v0.3.html b/AR-MIX-Live-FX-Host-Standalone-v0.3.html index b71442040..63d5320a4 100644 --- a/AR-MIX-Live-FX-Host-Standalone-v0.3.html +++ b/AR-MIX-Live-FX-Host-Standalone-v0.3.html @@ -1144,9 +1144,10 @@ /* LED increments stay fixed and the meter keeps its native dBFS conversion. No hot-path DOM reads, filters, blur or per-frame scale animation. */ -/* Flat milled-fader bay: a fixed-width, four-sided recess for EVERY strip, - including the wider MASTER. The center detent and 36×77 PNG remain unchanged. - Two static layers, no gradients/glow/filter/animated surface repaint. */ +/* P0: one folded-sheet-metal trough across CH1–10 and MASTER. + Dark graphite flat interior, soft top/bottom rolled lips, zero bright + rectangular border. 46px bay independently centered in each fader rail. + Preserve existing cap PNG, gain travel, and mouse hit targets. */ #app #mixer .fader-zone .fader{ position:relative;isolation:isolate;min-width:36px; background:transparent!important;border:0!important;box-shadow:none!important; @@ -1154,21 +1155,20 @@ #app #mixer .fader-zone .fader::before{ content:"";position:absolute;left:50%;top:0;bottom:0;width:46px; transform:translateX(-50%);z-index:0;pointer-events:none; - /* A gently folded metal lip, NOT a bright rectangular outline. - One flat, graphite-grey interior plus small static bevels at four edges. */ - background:#1b2a32;border:0;border-radius:4px; + box-sizing:border-box;border:0;border-radius:6px; + background:#24333b; + /* Smooth machine folds at all four edges, no light outer rectangle. */ box-shadow: - inset 0 3px 2px -2px #060c11, - inset 0 -3px 2px -2px #080e13, - inset 3px 0 2px -2px #0b151b, - inset -3px 0 2px -2px #0b151b, - 0 -1px 0 #364650, 0 1px 0 #293b45, - -1px 0 0 #2c3c45, 1px 0 0 #2c3c45; + inset 0 4px 4px -3px #070e13, + inset 0 -4px 4px -3px #070e13, + inset 4px 0 5px -4px #081116, + inset -4px 0 5px -4px #081116; } #app #mixer .fader-zone .fader::after{ content:"";position:absolute;left:50%;top:38px;bottom:39px;width:5px; transform:translateX(-50%);z-index:0;pointer-events:none; - background:#020506;border:0;box-shadow:inset 1px 0 #26323a,inset -1px 0 #26323a; + background:#05090c;border:0; + box-shadow:inset 1px 0 #34434b,inset -1px 0 #34434b; } #app #mixer .fader-zone .fader-travel{z-index:1} /* DAW insertion markers are painted only while an FX drag is active. */ From 0b7c3da3215b841bdaf501a440670da3bdc4ba8b Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 05:03:52 +0700 Subject: [PATCH 41/42] test(gui): lock folded trough, slot popover and truthful per-channel add controls --- tests/fx_drag_reorder_contract_test.mjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/fx_drag_reorder_contract_test.mjs b/tests/fx_drag_reorder_contract_test.mjs index d5258850e..9c3b8d75b 100644 --- a/tests/fx_drag_reorder_contract_test.mjs +++ b/tests/fx_drag_reorder_contract_test.mjs @@ -56,3 +56,19 @@ test('native has six consistent empty inserts and one DSP reorder per drop',()=> assert.match(bridge,/openPicker\(el,id,Math.max\(0,slot\)\)/); assert.match(native,/moreThanOneInstanceAllowed\(\) override \{ return false; \}/); }); + + +test('premium fold and per-slot popover avoid rectangle border and global backdrop',()=>{ + const b=readFileSync('web/bridge.js','utf8'); + const trough=css.slice(css.indexOf('/* P0: one folded-sheet-metal trough'),css.indexOf('/* DAW insertion markers')); + assert.match(trough,/background:#24333b/); + assert.match(trough,/width:46px/); + assert.match(trough,/border:0;border-radius:6px/); + assert.doesNotMatch(trough,/0 -1px 0 #364650/); + assert.match(b,/#nativeFxSelector\{position:fixed;inset:0;display:block;padding:0/); + assert.match(b,/background:transparent!important;backdrop-filter:none!important/); + assert.match(b,/pickerAnchor\?\.classList\.add\("fx-picker-target"\)/); + assert.match(b,/state\.chain\.length>=8\|\|state\.adding\|\|pickerChannel!==0/); + assert.match(b,/data-context-fx=\\"delete\\"/); + assert.match(b,/native-node\.has-orbit/); +}); From 5c8fb32dc79825caf845cea96178daa690710837 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Wed, 28 Oct 2026 05:04:10 +0700 Subject: [PATCH 42/42] test(gui): use literal exact Material delete context action assertion --- tests/fx_drag_reorder_contract_test.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fx_drag_reorder_contract_test.mjs b/tests/fx_drag_reorder_contract_test.mjs index 9c3b8d75b..28592294b 100644 --- a/tests/fx_drag_reorder_contract_test.mjs +++ b/tests/fx_drag_reorder_contract_test.mjs @@ -69,6 +69,6 @@ test('premium fold and per-slot popover avoid rectangle border and global backdr assert.match(b,/background:transparent!important;backdrop-filter:none!important/); assert.match(b,/pickerAnchor\?\.classList\.add\("fx-picker-target"\)/); assert.match(b,/state\.chain\.length>=8\|\|state\.adding\|\|pickerChannel!==0/); - assert.match(b,/data-context-fx=\\"delete\\"/); + assert.ok(b.includes('data-context-fx="delete"')); assert.match(b,/native-node\.has-orbit/); });