Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
d1190ed
feat(gui): preserve lightweight native meter and add DAW preview FX d…
masarray Oct 28, 2026
6f5abe1
feat(gui): reconcile native FX ghost drag, context editor and orbit m…
masarray Oct 28, 2026
eab59fd
style(gui): preserve approved folded-metal fader and add FX drag/pick…
masarray Oct 28, 2026
8a680b2
feat(audio): integrate atomic physical FX order with sample-accurate …
masarray Oct 28, 2026
29e5e97
fix(native): keep Orbit and VST editor stable through FX MOVE; enforc…
masarray Oct 28, 2026
918fcbd
feat(rt): add deterministic lock-free FX insert order and bounded de-…
masarray Oct 28, 2026
8c50bc4
feat(rt): add deterministic lock-free FX insert order and bounded de-…
masarray Oct 28, 2026
dc1f0fb
test(rt): verify all FX permutations and 20k atomic snapshots under R…
masarray Oct 28, 2026
02934f9
test(gui): lock native drag semantics and approved folded-metal fader…
masarray Oct 28, 2026
7922f6c
build(rt): register FX atomic move Release CTest alongside retained b…
masarray Oct 28, 2026
8a46676
ci(native): execute FX order + drag tests with all existing P1E/bypas…
masarray Oct 28, 2026
5651164
build(gui): synchronize source-owned folded metal + FX drag CSS into …
masarray Oct 28, 2026
bd89ece
build(gui): regenerate exact standalone CSS and FX drag JavaScript fr…
masarray Oct 28, 2026
7d739bf
ci(gui): regression-lock native/preview FX ghost drop, Orbit badges a…
masarray Oct 28, 2026
7f9e6c0
test(gui): point FX/fader contract to currently merged PR120 fold sou…
masarray Oct 28, 2026
f77dd26
test(reconcile): assert stable physical-slot bypass and atomic FX ord…
masarray Oct 28, 2026
b0a3a15
test(native): enforce physical-slot bypass and envelope identity afte…
masarray Oct 28, 2026
cc0562b
style(gui): scope native popup transparency without forbidden fader/h…
masarray Oct 28, 2026
f922590
build(gui): maintain CSS/standalone source parity for FX picker witho…
masarray Oct 28, 2026
152c796
build(gui): maintain CSS/standalone source parity for FX picker witho…
masarray Oct 28, 2026
0de56ac
test(audio): correct real regex checks for order-only FX move and byp…
masarray Oct 28, 2026
4a1768a
fix(native): one FX order snapshot per block and reject ADD during in…
masarray Oct 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/p1-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
'tests/native_ui_contract_test.mjs'
'tests/native_preset_contract_test.mjs'
'tests/fx_add_contract_test.mjs'
'tests/fx_drag_reorder_contract_test.mjs'
'tests/live_graph_contract_test.mjs'
'tests/reconciled_gui_engine_contract_test.mjs'
'tests/main_v08_native_integration_test.mjs'
Expand All @@ -91,7 +92,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 ARMixMixerRoutingTests ARMixChannelRoutingContractTests ARMixChannelSendTests ARMixPreparedMixerBlockTests ARMixLiveRoutingEpochTests ARMixWorkspaceTests ARMixVaultTests ARMixBackupTests ARMixOrbitPhaseTests ARMixOrbitControlTests ARMixOrbitMotionTests ARMixOrbitDistanceTests ARMixFxBypassEnvelopeTests ARMixDearVrPolarPolicyTests 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 ARMixMixerRoutingTests ARMixChannelRoutingContractTests ARMixChannelSendTests ARMixPreparedMixerBlockTests ARMixLiveRoutingEpochTests ARMixWorkspaceTests ARMixVaultTests ARMixBackupTests ARMixOrbitPhaseTests ARMixOrbitControlTests ARMixOrbitMotionTests ARMixOrbitDistanceTests ARMixFxBypassEnvelopeTests ARMixDearVrPolarPolicyTests 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Validate JavaScript syntax
run: |
node --check web/app.js
node --test tests/gui_workflow_contract_test.mjs tests/ci_workflow_efficiency_test.mjs
node --test tests/gui_workflow_contract_test.mjs tests/ci_workflow_efficiency_test.mjs 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
Expand Down
153 changes: 152 additions & 1 deletion AR-MIX-Live-FX-Host-Standalone-v0.3.html
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,78 @@
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. */
#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}

/* 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;
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}
</style></head>
<body>
<div id="app" class="app">
Expand Down Expand Up @@ -1646,6 +1718,75 @@
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();
document.removeEventListener('pointermove',moveFxGesture);
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};
document.addEventListener('pointermove',moveFxGesture,{passive:false});
},true);
const moveFxGesture=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<d.count;i++)
if(d.y<(bounds[i].rect.top+bounds[i].rect.bottom)/2){insertion=i;break}
d.insertion=insertion;
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');
};
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;
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
Expand Down Expand Up @@ -1845,7 +1986,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]);
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ if(BUILD_TESTING)
target_compile_features(ARMixVirtualClockSoakTests PRIVATE cxx_std_20)
add_test(NAME IndependentClockASRCDriftJitterSoak COMMAND ARMixVirtualClockSoakTests)
set_tests_properties(IndependentClockASRCDriftJitterSoak PROPERTIES TIMEOUT 30)
# Live-safe logical FX move: deterministic x64 atomic order + output de-click.
add_executable(ARMixFxOrderTests tests/fx_order_atomic_test.cpp)
target_compile_features(ARMixFxOrderTests PRIVATE cxx_std_20)
add_test(NAME FxAtomicOrderAndOutputRamp COMMAND ARMixFxOrderTests)
add_executable(ARMixFxBypassEnvelopeTests tests/fx_bypass_envelope_test.cpp)
target_compile_features(ARMixFxBypassEnvelopeTests PRIVATE cxx_std_20)
add_test(NAME P0FXBypassSampleAccurateDeClick COMMAND ARMixFxBypassEnvelopeTests)
Expand Down
20 changes: 20 additions & 0 deletions engine/core/FxMoveRamp.h
Original file line number Diff line number Diff line change
@@ -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<float>(sample) / static_cast<float>(frames-1);
return stage == 1 ? 1.f-phase : phase;
}
};
} // namespace armix::dsp
43 changes: 43 additions & 0 deletions engine/core/FxOrderPlan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// SPDX-License-Identifier: AGPL-3.0-only
#pragma once
#include <array>
#include <cstdint>

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<int> ((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<int, capacity> 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<unsigned> (i * 4);
next = (next & ~(0xfULL << shift))
| (static_cast<std::uint64_t> (slots[i]) << shift);
}
return next;
}
};
} // namespace armix::dsp
Loading
Loading