From 3976ce094cad7adc8d132e1db793806b6aa3a1e0 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 08:58:26 +0700 Subject: [PATCH 1/8] feat(sonku): P8.6 measured six-wall horizontal focus with independent late field control --- CMakeLists.txt | 11 ++++- .../builtin_fx/sonku/SonKuEarlyReflections.h | 25 ++++++++--- .../builtin_fx/sonku/SonKuP83SpeakerScene.h | 6 +++ engine/builtin_fx/sonku/SonKuSpatialCore.h | 41 +++++++++++++++++-- 4 files changed, 73 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 96e38e0fd..4d3cf705d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,13 @@ if(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT AND NOT ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT) message(FATAL_ERROR "P8.5 requires P8.4 native fusion research; production stays OFF") endif() +# Isolated post-FAT P8.6 horizontal speaker focus. OFF in production. +option(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + "Opt-in P8.6 horizontal speaker focus while keeping golden 0/3/4" OFF) +if(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT AND + NOT ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) + message(FATAL_ERROR "P8.6 focus requires P8.5 coherent-world research") +endif() set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -266,7 +273,9 @@ target_compile_definitions(ARMixConsole PRIVATE $<$:ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT=1> $<$:SONKU_P84_SINGLE_CORE_FUSION_RESEARCH=1> $<$:ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT=1> - $<$:SONKU_P85_WORLD_COHERENCE_RESEARCH=1>) + $<$:SONKU_P85_WORLD_COHERENCE_RESEARCH=1> + $<$:ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT=1> + $<$:SONKU_P86_HORIZONTAL_FOCUS_RESEARCH=1>) if(WIN32) # Windows retains its proven ASIO-first / WASAPI / static WebView2 distribution. # Never link Windows loader or sound APIs into macOS/Linux builds. diff --git a/engine/builtin_fx/sonku/SonKuEarlyReflections.h b/engine/builtin_fx/sonku/SonKuEarlyReflections.h index a14fb45b9..07658b42a 100644 --- a/engine/builtin_fx/sonku/SonKuEarlyReflections.h +++ b/engine/builtin_fx/sonku/SonKuEarlyReflections.h @@ -240,7 +240,7 @@ class SonKuEarlyReflections final { #endif } Ears process(float left,float right,double azimuth,float spread, - float headYawDegrees=0.f) noexcept { + float headYawDegrees=0.f,bool horizontalFocus=false) noexcept { if(!active())return {}; if(untilGeometry_==0){ updateGeometry(azimuth,spread,headYawDegrees); @@ -398,14 +398,29 @@ class SonKuEarlyReflections final { #if defined(SONKU_P83_PHYSICAL_SPEAKER_RESEARCH) && SONKU_P83_PHYSICAL_SPEAKER_RESEARCH if((p83WallMask_ & (1u<=wallCount){ + const float verticalWeight=wall==wallCount?.24f:.15f; + output.left+=verticalWeight*(p.gainL*l); + output.right+=verticalWeight*(p.gainR*r); + }else{ + output.left+=p.gainL*l; + output.right+=p.gainR*r; + } #if defined(SONKU_P83_PHYSICAL_SPEAKER_RESEARCH) && SONKU_P83_PHYSICAL_SPEAKER_RESEARCH } #endif }else{ - output.left+=p.gainL*delayed(s,p.delayL); - output.right+=p.gainR*delayed(s,p.delayR); + if(horizontalFocus && wall>=wallCount){ + const float verticalWeight=wall==wallCount?.24f:.15f; + output.left+=verticalWeight*(p.gainL*delayed(s,p.delayL)); + output.right+=verticalWeight*(p.gainR*delayed(s,p.delayR)); + }else{ + output.left+=p.gainL*delayed(s,p.delayL); + output.right+=p.gainR*delayed(s,p.delayR); + } } } } diff --git a/engine/builtin_fx/sonku/SonKuP83SpeakerScene.h b/engine/builtin_fx/sonku/SonKuP83SpeakerScene.h index 039372f17..efbf71ae9 100644 --- a/engine/builtin_fx/sonku/SonKuP83SpeakerScene.h +++ b/engine/builtin_fx/sonku/SonKuP83SpeakerScene.h @@ -12,6 +12,9 @@ enum class Mode : std::uint8_t { MusicSpatialP84=3 #if defined(SONKU_P85_WORLD_COHERENCE_RESEARCH) && SONKU_P85_WORLD_COHERENCE_RESEARCH ,MusicSpatialP85=4 +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + ,MusicSpatialP86=5 +#endif #endif #endif }; @@ -23,6 +26,9 @@ inline bool valid(Mode m) noexcept { || m==Mode::MusicSpatialP84 #if defined(SONKU_P85_WORLD_COHERENCE_RESEARCH) && SONKU_P85_WORLD_COHERENCE_RESEARCH || m==Mode::MusicSpatialP85 +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + || m==Mode::MusicSpatialP86 +#endif #endif #endif ; diff --git a/engine/builtin_fx/sonku/SonKuSpatialCore.h b/engine/builtin_fx/sonku/SonKuSpatialCore.h index a2ca2cc27..6253673b2 100644 --- a/engine/builtin_fx/sonku/SonKuSpatialCore.h +++ b/engine/builtin_fx/sonku/SonKuSpatialCore.h @@ -89,7 +89,11 @@ inline bool valid(const Settings& s) noexcept { s.renderMode>=0 && #if defined(SONKU_P84_SINGLE_CORE_FUSION_RESEARCH) && SONKU_P84_SINGLE_CORE_FUSION_RESEARCH #if defined(SONKU_P85_WORLD_COHERENCE_RESEARCH) && SONKU_P85_WORLD_COHERENCE_RESEARCH +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + s.renderMode<=5 && ((s.renderMode!=3 && s.renderMode!=4 && s.renderMode!=5) || !s.musicCompatibleLowFrequency) && +#else s.renderMode<=4 && ((s.renderMode!=3 && s.renderMode!=4) || !s.musicCompatibleLowFrequency) && +#endif #else s.renderMode<=3 && (s.renderMode!=3 || !s.musicCompatibleLowFrequency) && #endif @@ -431,6 +435,9 @@ class SonKuSpatialCore final { && p83Mode_!=p83::Mode::MusicSpatialP84 #if defined(SONKU_P85_WORLD_COHERENCE_RESEARCH) && SONKU_P85_WORLD_COHERENCE_RESEARCH && p83Mode_!=p83::Mode::MusicSpatialP85 +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + && p83Mode_!=p83::Mode::MusicSpatialP86 +#endif #endif #endif ; @@ -461,10 +468,17 @@ class SonKuSpatialCore final { (p84FusedMusic_ || p83Mode_==p83::Mode::MusicSpatialP84 #if defined(SONKU_P85_WORLD_COHERENCE_RESEARCH) && SONKU_P85_WORLD_COHERENCE_RESEARCH || p83Mode_==p83::Mode::MusicSpatialP85 +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + || p83Mode_==p83::Mode::MusicSpatialP86 +#endif #endif ); #else constexpr bool musicFused=false; +#endif +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + // Mode 5 changes wet only; P8.5 direct HRIR/LF/stereo/tonal remain. + const bool horizontalFocus=p83Mode_==p83::Mode::MusicSpatialP86; #endif // Deliberate music-monitor compensation: real distance perception // still comes from direct/reflected ratio and high-frequency cues, @@ -573,6 +587,9 @@ class SonKuSpatialCore final { #else ,positionedMode?p83HeadYaw_:0.f #endif +#endif +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + ,horizontalFocus #endif ) :SonKuEarlyReflections::Ears{}; @@ -619,9 +636,15 @@ class SonKuSpatialCore final { // Gain laws are bounded affine maps, zero wet stays EXACT // zero, no exp/pow/alloc on the audio callback. const float targetErPresence=roomEnabled&&!positionedMode? - 1.45f+2.0f*settings_.roomAmount:1.f; +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + (horizontalFocus?0.76f:1.f)* +#endif + (1.45f+2.0f*settings_.roomAmount):1.f; const float targetTailPresence=roomEnabled&&!positionedMode? - 2.2f+4.0f*settings_.ambience:1.f; +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + (horizontalFocus?0.38f:1.f)* +#endif + (2.2f+4.0f*settings_.ambience):1.f; smoothedErPresence_+=distanceSlew_* (targetErPresence-smoothedErPresence_); smoothedTailPresence_+=distanceSlew_* @@ -760,6 +783,9 @@ class SonKuSpatialCore final { && p83Mode_!=p83::Mode::MusicSpatialP84 #if defined(SONKU_P85_WORLD_COHERENCE_RESEARCH) && SONKU_P85_WORLD_COHERENCE_RESEARCH && p83Mode_!=p83::Mode::MusicSpatialP85 +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + && p83Mode_!=p83::Mode::MusicSpatialP86 +#endif #endif #endif && room_.preparedProfile()==SonKuReflectionProfile::SixSurfaceKemarResearch) { @@ -786,6 +812,9 @@ class SonKuSpatialCore final { if((p83Mode_==p83::Mode::MusicSpatialP84 || #if defined(SONKU_P85_WORLD_COHERENCE_RESEARCH) && SONKU_P85_WORLD_COHERENCE_RESEARCH p83Mode_==p83::Mode::MusicSpatialP85 || +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + p83Mode_==p83::Mode::MusicSpatialP86 || +#endif #endif (p84FusedMusic_ && p83Mode_==p83::Mode::MusicBedP82)) && room_.preparedProfile()==SonKuReflectionProfile::SixSurfaceKemarResearch){ @@ -797,8 +826,12 @@ class SonKuSpatialCore final { // P8.5: common music MID and both virtual speakers are in // the same head-relative frame. Earlier musical modes remain // byte-identical; only mode 4 uses this yaw-coherent anchor. - interpolate(centerTarget_,p83Mode_==p83::Mode::MusicSpatialP85 - ?static_cast(p83::toHead(static_cast(degrees_),p83HeadYaw_)) + // P8.6 retains P8.5's approved world/head direct music anchor. + interpolate(centerTarget_,(p83Mode_==p83::Mode::MusicSpatialP85 +#if defined(SONKU_P86_HORIZONTAL_FOCUS_RESEARCH) && SONKU_P86_HORIZONTAL_FOCUS_RESEARCH + || p83Mode_==p83::Mode::MusicSpatialP86 +#endif + )?static_cast(p83::toHead(static_cast(degrees_),p83HeadYaw_)) :degrees_); #else interpolate(centerTarget_,degrees_); From 0fc505af1af2510875be1ba0aa330537b080d5a6 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 08:59:21 +0700 Subject: [PATCH 2/8] feat(sonku): gate P8.6 JUCE schema v7 and native-mode A/B without touching saved scene --- engine/builtin_fx/SonKuSpatialProcessor.h | 17 ++++++++- site/preview-v2/assets/mixer-native-sonku.js | 36 ++++++++++++++------ src/Main.cpp | 9 ++++- src/SonKuNativeBridgeContract.h | 8 ++++- 4 files changed, 56 insertions(+), 14 deletions(-) diff --git a/engine/builtin_fx/SonKuSpatialProcessor.h b/engine/builtin_fx/SonKuSpatialProcessor.h index 9dcff61a9..e9cbf6e72 100644 --- a/engine/builtin_fx/SonKuSpatialProcessor.h +++ b/engine/builtin_fx/SonKuSpatialProcessor.h @@ -158,8 +158,11 @@ class SonKuSpatialProcessor final : public juce::AudioProcessor, #if defined(ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT) && ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT #if defined(ARMIX_SONKU_EXPERIMENTAL_P83_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P83_NATIVE_RT #if defined(ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT -#if defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT +#if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + out.writeInt(7); // 59-byte layout; mode 5, old sessions intact +#else out.writeInt(6); // unchanged 59-byte state; P8.5 is opt-in mode 4 +#endif #else out.writeInt(5); // same 59-byte layout as v4, new P8.4 mode #endif @@ -216,6 +219,9 @@ class SonKuSpatialProcessor final : public juce::AudioProcessor, &&version!=5 #if defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT &&version!=6 +#if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + &&version!=7 +#endif #endif #endif #endif @@ -229,6 +235,9 @@ class SonKuSpatialProcessor final : public juce::AudioProcessor, ||(version==5&&size!=59) #if defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT ||(version==6&&size!=59) +#if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + ||(version==7&&size!=59) +#endif #endif #endif #endif @@ -288,6 +297,12 @@ class SonKuSpatialProcessor final : public juce::AudioProcessor, if(version==6 && next.renderMode!=0 && next.renderMode!=3 && next.renderMode!=4) return false; if(version==6 && next.musicCompatibleLowFrequency)return false; +#if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + // P8.6 mode 5 is opt-in only. v6 mode 4 is never migrated. + if(version==7 && next.renderMode!=0 && next.renderMode!=3 && + next.renderMode!=4 && next.renderMode!=5)return false; + if(version==7 && next.musicCompatibleLowFrequency)return false; +#endif #endif #endif } diff --git a/site/preview-v2/assets/mixer-native-sonku.js b/site/preview-v2/assets/mixer-native-sonku.js index 77feefb6e..0990fce80 100644 --- a/site/preview-v2/assets/mixer-native-sonku.js +++ b/site/preview-v2/assets/mixer-native-sonku.js @@ -53,7 +53,7 @@ const valid=s=>s && Number.isFinite(s.startAzimuthDegrees) && 1.45+s.sourceDistanceMeters*Math.sin(s.directElevationDegrees*Math.PI/180)<= roomHeights[s.spacePreset]-.5)) && (s.renderMode===undefined || ( - Number.isInteger(s.renderMode)&&s.renderMode>=0&&s.renderMode<=4 && + Number.isInteger(s.renderMode)&&s.renderMode>=0&&s.renderMode<=5 && typeof s.musicCompatibleLowFrequency==="boolean" && Number.isFinite(s.headYawDegrees)&&Math.abs(s.headYawDegrees)<=360 && (s.renderMode!==2 || (s.stereoSpreadDegrees>=20&&s.stereoSpreadDegrees<=120)))); @@ -187,7 +187,7 @@ const depthLayers={far:$("skFarSources"),near:$("skNearSources")}; const mount=()=>{if(!root.isConnected)document.body.append(root)}; if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",mount,{once:true});else mount(); let current=null,accepted=defaults(),draft=defaults(),pending=null,latest=null, - xyzCapable=false,p83Capable=false,p84Capable=false,p85Capable=false,musicSafeStereo=false,p8TransparentBass=false,p82MultibandRoom=false, + xyzCapable=false,p83Capable=false,p84Capable=false,p85Capable=false,p86Capable=false,musicSafeStereo=false,p8TransparentBass=false,p82MultibandRoom=false, readId="",readSentAt=0,seq=1,clock=null,frame=null,observed=0,observedAt=0, drag=null,dialDrag=null,rangeEdits=new Set(),gestureStart=new Map(), visualPhase=0,visualAt=0,liveTimer=null,lastLiveAt=0; @@ -207,7 +207,14 @@ function render(){ const row=$("skRenderRow");row.hidden=!(p83Capable||p84Capable); if(p83Capable||p84Capable){ const picker=$("skRenderMode"); - if(p85Capable && picker.dataset.nativeModeSet!=="p85"){ + if(p86Capable && picker.dataset.nativeModeSet!=="p86"){ + picker.innerHTML=''+ + ''+ + ''+ + ''; + picker.dataset.nativeModeSet="p86"; + root.querySelector(".sk-render-label").textContent="RENDER MODE · P8.6 HEADPHONE FAT"; + }else if(!p86Capable && p85Capable && picker.dataset.nativeModeSet!=="p85"){ picker.innerHTML=''+ ''+ ''; @@ -226,7 +233,8 @@ function render(){ picker.dataset.nativeModeSet="p83"; root.querySelector(".sk-render-label").textContent="RENDER MODE · P8.3 TEST"; } - const v=p85Capable?(s.renderMode===4?"coherence":s.renderMode===3?"clarity":"music"): + const v=p86Capable?(s.renderMode===5?"focus":s.renderMode===4?"coherence":s.renderMode===3?"clarity":"music"): + p85Capable?(s.renderMode===4?"coherence":s.renderMode===3?"clarity":"music"): p84Capable?(s.renderMode===3?"clarity":"music"): s.renderMode===1?"mono":s.renderMode===2? (s.musicCompatibleLowFrequency?"musiclf":"physical"):"music"; @@ -276,7 +284,9 @@ function render(){ if(!rangeEdits.has("skElevation"))elevation.value=String(s.directElevationDegrees); $("skElevationValue").textContent=s.directElevationDegrees.toFixed(1)+"°"; } - root.querySelector(".sk-stage-caption").textContent=p85Capable&&s.renderMode===4? + root.querySelector(".sk-stage-caption").textContent=p86Capable&&s.renderMode===5? + "P8.6 FOCUSED HORIZONTAL SOURCES · CONTROLLED ROOM · HEADPHONE FAT REQUIRED": + p85Capable&&s.renderMode===4? "P8.5 WORLD-LOCKED MUSIC MID · EXPERIMENT · HEADPHONE FAT REQUIRED": p84Capable&&s.renderMode===3? "P8.4 FUSED HRIR · MUSIC-FIRST RESEARCH · NOT DEARVR QUALIFIED": @@ -309,7 +319,8 @@ function render(){ // redrawn at 60 Hz. The native audio callback remains the time authority. drawSpeakers(); $("skMode").textContent=native()?(context()? - (p85Capable&&s.renderMode===4?"NATIVE P8.5 WORLD COHERENCE · TEST": + (p86Capable&&s.renderMode===5?"NATIVE P8.6 HORIZONTAL FOCUS · TEST": + p85Capable&&s.renderMode===4?"NATIVE P8.5 WORLD COHERENCE · TEST": p84Capable&&s.renderMode===3?"NATIVE P8.4 MUSIC FUSION · TEST": p83Capable&&s.renderMode!==0?"NATIVE P8.3 SPEAKERS · RESEARCH": p82MultibandRoom?"NATIVE P8.2 ROOM · RESEARCH": @@ -456,7 +467,7 @@ backend()?.addEventListener?.("arMixBuiltinSonKuSnapshot",r=>{ String(r.deviceEpoch)!==String(c.deviceEpoch)|| String(r.graphRevision)!==String(c.graphRevision))return; const measured=(r.schemaVersion===3 || r.schemaVersion===4 || - r.schemaVersion===5 || r.schemaVersion===6) && + r.schemaVersion===5 || r.schemaVersion===6 || r.schemaVersion===7) && Number.isFinite(r.settings?.directElevationDegrees); if(r.schemaVersion!==2&&!measured)return; const incoming=normalizeSettings(r.settings); @@ -468,11 +479,13 @@ backend()?.addEventListener?.("arMixBuiltinSonKuSnapshot",r=>{ Number.isInteger(incoming.renderMode) && typeof incoming.musicCompatibleLowFrequency==="boolean" && Number.isFinite(incoming.headYawDegrees); - p85Capable=r.schemaVersion===6 && r.p85AcousticCoherence===true; + p86Capable=r.schemaVersion===7 && r.p86HorizontalFocus===true; + p85Capable=(r.schemaVersion===6 || p86Capable) && r.p85AcousticCoherence===true; p84Capable=(r.schemaVersion===5 || p85Capable) && r.p84MusicFusion===true && Number.isInteger(incoming.renderMode) && (incoming.renderMode===0||incoming.renderMode===3|| - (p85Capable&&incoming.renderMode===4)) && + (p85Capable&&incoming.renderMode===4)|| + (p86Capable&&incoming.renderMode===5)) && typeof incoming.musicCompatibleLowFrequency==="boolean" && incoming.musicCompatibleLowFrequency===false && Number.isFinite(incoming.headYawDegrees); @@ -506,7 +519,7 @@ backend()?.addEventListener?.("arMixBuiltinSonKuSnapshot",r=>{ } render(); }); -$("skClose").addEventListener("click",()=>{root.hidden=true;current=null;xyzCapable=false;p85Capable=false;musicSafeStereo=false;p8TransparentBass=false;p82MultibandRoom=false; +$("skClose").addEventListener("click",()=>{root.hidden=true;current=null;xyzCapable=false;p85Capable=false;p86Capable=false;musicSafeStereo=false;p8TransparentBass=false;p82MultibandRoom=false; cancelLiveTimer();pending=null;latest=null;readId="";readSentAt=0;dialDrag=null; drag=null;rangeEdits.clear();gestureStart.clear();lastLiveAt=0; if(clock!==null){clearInterval(clock);clock=null;} @@ -514,7 +527,8 @@ $("skClose").addEventListener("click",()=>{root.hidden=true;current=null;xyzCapa $("skRenderMode").addEventListener("change",()=>{ if(!(p83Capable||p84Capable))return; const v=$("skRenderMode").value; - const mode=p85Capable?(v==="coherence"?4:v==="clarity"?3:0): + const mode=p86Capable?(v==="focus"?5:v==="coherence"?4:v==="clarity"?3:0): + p85Capable?(v==="coherence"?4:v==="clarity"?3:0): p84Capable?(v==="clarity"?3:0): v==="mono"?1:v==="physical"||v==="musiclf"?2:0; const scene={...draft,renderMode:mode,musicCompatibleLowFrequency:v==="musiclf"}; diff --git a/src/Main.cpp b/src/Main.cpp index 13593ed95..e5be859b1 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -3046,7 +3046,14 @@ class ConsoleWindow final : public juce::DocumentWindow, private juce::Timer, pr armix::sonku::SonKuReflectionProfile::SixSurfaceKemarResearch) reply->setProperty("p8TransparentBass",true); #endif -#if defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT +#if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + if(processor && processor->preparedReflectionProfile()== + armix::sonku::SonKuReflectionProfile::SixSurfaceKemarResearch) { + reply->setProperty("p84MusicFusion",true); + reply->setProperty("p85AcousticCoherence",true); + reply->setProperty("p86HorizontalFocus",true); + } +#elif defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT if(processor && processor->preparedReflectionProfile()== armix::sonku::SonKuReflectionProfile::SixSurfaceKemarResearch) { reply->setProperty("p84MusicFusion",true); diff --git a/src/SonKuNativeBridgeContract.h b/src/SonKuNativeBridgeContract.h index 4eff284a3..158542a47 100644 --- a/src/SonKuNativeBridgeContract.h +++ b/src/SonKuNativeBridgeContract.h @@ -8,7 +8,9 @@ #include namespace armix::builtin_fx::sonku_bridge { inline constexpr int schemaVersion() noexcept { -#if defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT +#if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + return 7; +#elif defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT return 6; #elif defined(ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT return 5; @@ -84,7 +86,11 @@ inline bool decodeSettings(const juce::var& values,armix::sonku::Settings& out) // Rejected P8.3 physical/mono path is not an exposed option in // the P8.4 research binary. A/B is only P8.2 golden vs fused. #if defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT +#if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT + if(proposed.renderMode!=0 && proposed.renderMode!=3 && proposed.renderMode!=4 && proposed.renderMode!=5)return false; +#else if(proposed.renderMode!=0 && proposed.renderMode!=3 && proposed.renderMode!=4)return false; +#endif #else if(proposed.renderMode!=0 && proposed.renderMode!=3)return false; #endif From 7e4eae9a2263467aa185cfcd188878980d298329 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 08:59:47 +0700 Subject: [PATCH 3/8] fix(sonku): preserve P8.4 v5 serializer when P8.6 experiment is disabled --- engine/builtin_fx/SonKuSpatialProcessor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/builtin_fx/SonKuSpatialProcessor.h b/engine/builtin_fx/SonKuSpatialProcessor.h index e9cbf6e72..d40b7e8cf 100644 --- a/engine/builtin_fx/SonKuSpatialProcessor.h +++ b/engine/builtin_fx/SonKuSpatialProcessor.h @@ -158,6 +158,7 @@ class SonKuSpatialProcessor final : public juce::AudioProcessor, #if defined(ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT) && ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT #if defined(ARMIX_SONKU_EXPERIMENTAL_P83_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P83_NATIVE_RT #if defined(ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT +#if defined(ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT #if defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) && ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT out.writeInt(7); // 59-byte layout; mode 5, old sessions intact #else From 908a4b73ce8628be4ef3d13e330447296490efb2 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 09:00:49 +0700 Subject: [PATCH 4/8] test(sonku): prove P8.6 six-wall vertical suppression, horizontal parity and direct music fidelity --- ...86_horizontal_focus_native_source_test.cpp | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 tests/sonku_p86_horizontal_focus_native_source_test.cpp diff --git a/tests/sonku_p86_horizontal_focus_native_source_test.cpp b/tests/sonku_p86_horizontal_focus_native_source_test.cpp new file mode 100644 index 000000000..e44015a9e --- /dev/null +++ b/tests/sonku_p86_horizontal_focus_native_source_test.cpp @@ -0,0 +1,121 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// Actual P8.6 native DSP: P8.5 direct/side unchanged, wet room focuses +// at the listener's horizontal speaker plane. No subjective claims. +#if defined(NDEBUG) +#undef NDEBUG +#endif +#include "../engine/builtin_fx/sonku/SonKuSpatialCore.h" +#include +#include +#include +#include +#include +#include +using armix::sonku::Settings; +using armix::sonku::SonKuSpatialCore; +using armix::sonku::SonKuEarlyReflections; +using armix::sonku::SonKuRoomGeometry; +using armix::sonku::SonKuReflectionProfile; +struct Audio {std::vector l,r;}; +static Audio render(int mode,int rate,bool room,int block,float az,float yaw, + bool antiphase=false) { + constexpr int frames=12288; + auto core=std::make_unique(); + assert(core->prepare(rate,SonKuReflectionProfile::SixSurfaceKemarResearch)); + Settings s{}; + s.renderMode=mode;s.musicCompatibleLowFrequency=false; + s.moving=false;s.startAzimuthDegrees=az;s.headYawDegrees=yaw; + s.stereoSpreadDegrees=60.f;s.spatialMix=1.f;s.outputTrim=.75f; + s.sourceDistanceMeters=1.6f;s.spacePreset=room?1:0; + s.roomAmount=1.f;s.ambience=.47f;s.directElevationDegrees=0.f; + assert(core->setSettings(s)); + Audio a{std::vector(frames),std::vector(frames)}; + for(int i=0;i(i)/rate; + const float bass=.14f*std::sin(6.283185307179586f*81.f*t); + const float vocal=.06f*std::sin(6.283185307179586f*347.f*t); + const float side=.046f*std::sin(6.283185307179586f*2111.f*t); + const float transient=i==24?.12f:0.f; + a.l[i]=bass+vocal+side+transient; + a.r[i]=antiphase?(-bass-vocal-side-transient):bass+vocal-side+transient; + } + for(int i=0;iprocess(a.l.data()+i,a.r.data()+i,std::min(block,frames-i)); + return a; +} +static double energy(const Audio& a) { + double v=0.; + for(std::size_t i=0;i(1u<(i)/rate); + const auto y=room.process(x,x,0.,60.f,0.f,focus); + assert(std::isfinite(y.left)&&std::isfinite(y.right)); + sum+=static_cast(y.left)*y.left+ + static_cast(y.right)*y.right; + } + return sum; +} +int main() { + for(int rate:{44100,48000}) { + for(float az:{0.f,90.f,180.f})for(float yaw:{0.f,60.f,180.f}) { + for(bool anti:{false,true}){ + const auto baseline=render(4,rate,false,128,az,yaw,anti); + const auto focus=render(5,rate,false,128,az,yaw,anti); + const auto sliced=render(5,rate,false,64,az,yaw,anti); + assert(energy(baseline)>0.01); + assert(diff(baseline,focus)==0.); // EXACT DRY musical and heading parity + assert(diff(focus,sliced)==0.); + } + } + // Isolation: horizontal wall IR is identical; floor and ceiling retain + // non-zero physical image paths at exact bounded ratios, not muted. + for(int w=0;w<6;++w) { + const double p85=wall(rate,w,false),p86=wall(rate,w,true); + assert(p85>1.e-8 && p86>1.e-10); + const double expected=w==4?.24* .24:w==5?.15*.15:1.; + const double ratio=p86/p85; + std::printf("P86_WALL,rate=%d,wall=%d,ratio=%.5f,expected=%.5f\n", + rate,w,ratio,expected); + assert(std::abs(ratio-expected)<0.002); + } + for(bool anti:{false,true}){ + const auto old=render(4,rate,true,128,90.f,60.f,anti); + const auto focused=render(5,rate,true,128,90.f,60.f,anti); + const auto sliced=render(5,rate,true,64,90.f,60.f,anti); + assert(diff(focused,sliced)==0.); + assert(diff(old,focused)>1.e-6); // real PCM wet difference + const double delta=10.*std::log10(energy(focused)/energy(old)); + assert(std::isfinite(delta)); + std::printf("P86_SCENE,rate=%d,antiphase=%d,total_delta_db=%.4f,pcm_difference=%.7f\n", + rate,anti?1:0,delta,diff(old,focused)); + // Wet level reduction is intentional; the direct-only sound is exact. + assert(delta>-5. && delta<2.); + } + } + std::puts("PASS P86 HORIZONTAL FOCUS: measured wall IR ratios, unchanged direct music and block parity"); +} From cdfef1dd696b7fc690c28ee1a6df029232c3ca9b Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 09:01:06 +0700 Subject: [PATCH 5/8] test(sonku): JUCE v7 audio-applied ACK, restore P8.5 v6 and reject P8.3 modes --- tests/sonku_p86_native_juce_v7_test.cpp | 214 ++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 tests/sonku_p86_native_juce_v7_test.cpp diff --git a/tests/sonku_p86_native_juce_v7_test.cpp b/tests/sonku_p86_native_juce_v7_test.cpp new file mode 100644 index 000000000..13e29fe7f --- /dev/null +++ b/tests/sonku_p86_native_juce_v7_test.cpp @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// REAL native Windows JUCE v7 SonKu P8.4 headphone research: +// P8.2 -> native queued v7 -> fading -> AUDIO APPLIED ACK -> readback, +// v1..v7 .smix state, old v4 rejected physical rollback and no extra graph. +#if defined(NDEBUG) +#undef NDEBUG +#endif +#if !defined(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) || !ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT +#error Native JUCE v7 test requires explicit private P8.4 research build +#endif +#include "../engine/builtin_fx/SonKuSpatialProcessor.h" +#include "../src/SonKuNativeBridgeContract.h" +#include +#include +#include +#include +#include +using armix::builtin_fx::SonKuSpatialProcessor; +using armix::sonku::Settings; +using namespace armix::builtin_fx::sonku_bridge; +static constexpr float pi=3.14159265358979323846f; +static double render(SonKuSpatialProcessor& fx,int sampleOffset) { + juce::AudioBuffer pcm(2,128); + juce::MidiBuffer midi; + for(int i=0;i<128;++i){ + const float t=static_cast(sampleOffset+i)/48000.f; + const float main=.14f*std::sin(2*pi*311*t)+.08f*std::sin(2*pi*719*t); + const float side=.08f*std::sin(2*pi*1703*t); + pcm.setSample(0,i,main+side); + pcm.setSample(1,i,main-side); + } + fx.processBlock(pcm,midi); + double e=0; + for(int i=0;i<128;++i){ + const auto L=pcm.getSample(0,i),R=pcm.getSample(1,i); + assert(std::isfinite(L)&&std::isfinite(R)); + assert(std::abs(L)<1.f&&std::abs(R)<1.f); + e+=L*L+R*R; + } + return e; +} +static void complete(SonKuSpatialProcessor& fx,std::uint64_t id,int seed) { + SonKuSpatialProcessor::Completion ack{}; + bool ok=false; + for(int n=0;n<36;++n){ + render(fx,(seed+n)*128); + if(fx.pollCompletion(ack)){ + assert(ack.requestId==id && ack.applied); + ok=true;break; + } + } + assert(ok && "P86 must ACK only after native PCM applies settings"); + for(int n=0;n<20;++n) render(fx,(seed+40+n)*128); + assert(fx.stateSnapshotQuiescent()); +} +static juce::MemoryBlock legacy(int version,int oldMode=2){ + juce::MemoryBlock bytes; + { + juce::MemoryOutputStream o(bytes,false); + o.writeInt(0x534f4e4b);o.writeInt(version); + o.writeFloat(0.f);o.writeFloat(12.f);o.writeFloat(60.f); + o.writeFloat(1.f);o.writeFloat(.75f); + o.writeByte(0);o.writeByte(1); + if(version>=2){ + o.writeInt(1);o.writeFloat(1.6f);o.writeFloat(.55f); + o.writeFloat(.30f); + } + if(version>=3)o.writeFloat(0.f); + if(version>=4){ + o.writeInt(oldMode);o.writeByte(version>=5?0:1);o.writeFloat(0.f); + } + } // MemoryOutputStream must flush byte count before asserting the block. + assert(bytes.getSize()==static_cast( + version==1?30:version==2?46:version==3?50:59)); + return bytes; +} +int main(){ + static_assert(schemaVersion()==7); + auto fx=std::make_unique(); + fx->prepareToPlay(48000.,128); + assert(fx->isReady()); + assert(fx->preparedReflectionProfile()== + armix::sonku::SonKuReflectionProfile::SixSurfaceKemarResearch); + fx->sealForRealtime(); + Settings s=fx->acceptedSettings(); + assert(s.renderMode==0); + s.moving=false;s.startAzimuthDegrees=0.f; + s.stereoSpreadDegrees=60.f;s.spatialMix=1.f;s.outputTrim=.75f; + s.spacePreset=1;s.sourceDistanceMeters=1.6f;s.roomAmount=.55f;s.ambience=.3f; + s.headYawDegrees=0.f;s.musicCompatibleLowFrequency=false;s.renderMode=5; + auto json=acceptedSettings(s); + Settings decoded{}; + assert(decodeSettings(json,decoded)&&decoded.renderMode==5); + for(int rejected:{-1,1,2,6,63}){ + auto bad=acceptedSettings(s); + bad.getDynamicObject()->setProperty("renderMode",rejected); + assert(!decodeSettings(bad,decoded)); + } + auto bad=acceptedSettings(s); + bad.getDynamicObject()->setProperty("musicCompatibleLowFrequency",true); + assert(!decodeSettings(bad,decoded)); + bad=acceptedSettings(s); + bad.getDynamicObject()->setProperty("headYawDegrees","invalid"); + assert(!decodeSettings(bad,decoded)); + assert(fx->queueSettings(s,801)); + SonKuSpatialProcessor::Completion ack{}; + assert(!fx->pollCompletion(ack)); + render(*fx,0); + assert(!fx->pollCompletion(ack)); + assert(!fx->stateSnapshotQuiescent()); + assert(fx->acceptedSettings().renderMode==0); + complete(*fx,801,1); + assert(fx->acceptedSettings().renderMode==5); + juce::MemoryBlock snapshot; + fx->getStateInformation(snapshot); + assert(snapshot.getSize()==59); + juce::MemoryInputStream input(snapshot.getData(),snapshot.getSize(),false); + assert(input.readInt()==0x534f4e4b&&input.readInt()==7); + auto restored=std::make_unique(); + restored->prepareToPlay(44100.,128); + assert(restored->restoreUnpublishedState( + snapshot.getData(),static_cast(snapshot.getSize()))); + assert(restored->acceptedSettings().renderMode==5); + restored->prepareToPlay(48000.,256); + assert(restored->isReady() && restored->acceptedSettings().renderMode==5); + // Actual direct FIR must distinguish P8.4 from P8.2 without double engine. + auto golden=std::make_unique(); + golden->prepareToPlay(48000.,128); + auto g=s;g.renderMode=0; + assert(golden->queueSettings(g,811)); + golden->consumeRealtimeEdits(); + assert(golden->pollCompletion(ack)&&ack.applied&&ack.requestId==811); + double reference=0,fused=0; + for(int n=0;n<50;++n){ + reference+=render(*golden,(n+200)*128); + fused+=render(*restored,(n+200)*128); + } + assert(reference>0.1 && fused>0.1); + assert(std::abs(fused-reference)>0.0002); + const double relativeDb=10.*std::log10(fused/reference); + assert(std::abs(relativeDb)<1.5); + // Audio-thread head-yaw change is a separate accepted v7 transaction. + s.headYawDegrees=60.f; + assert(fx->queueSettings(s,802)); + complete(*fx,802,400); + assert(fx->acceptedSettings().renderMode==5); + assert(fx->acceptedSettings().headYawDegrees==60.f); + s.renderMode=0;s.headYawDegrees=0.f; + assert(fx->queueSettings(s,803)); + complete(*fx,803,480); + assert(fx->acceptedSettings().renderMode==0); + // Unpublished workspace has no PCM clock: edits ACK without fade. + auto offline=std::make_unique(); + offline->prepareToPlay(48000.,128); + s.renderMode=5; + assert(offline->queueSettings(s,901)); + offline->consumeRealtimeEdits(); + assert(offline->pollCompletion(ack)&&ack.applied&&ack.requestId==901); + assert(offline->acceptedSettings().renderMode==5); + assert(offline->stateSnapshotQuiescent()); + // Old v4 SpeakerPhysical and music-LF480 are REJECTED acoustically. + // When migrated into a v7 research binary, they explicitly fall back P8.2. + // Backward-compatible v5 P8.4 session must keep exact mode 3. + { + const auto v5=legacy(5,3); + auto p84=std::make_unique(); + p84->prepareToPlay(48000.,128); + assert(p84->restoreUnpublishedState(v5.getData(),static_cast(v5.getSize()))); + assert(p84->acceptedSettings().renderMode==3); + } + // v6 P8.5 world-coherence sessions restore unchanged; never rewritten as focus. + { + const auto v6=legacy(6,4); + auto p85=std::make_unique(); + p85->prepareToPlay(48000.,128); + assert(p85->restoreUnpublishedState(v6.getData(),static_cast(v6.getSize()))); + assert(p85->acceptedSettings().renderMode==4); + } + for(int version:{1,2,3,4}){ + const auto old=legacy(version); + auto dest=std::make_unique(); + dest->prepareToPlay(48000.,128); + assert(dest->restoreUnpublishedState(old.getData(),static_cast(old.getSize()))); + assert(dest->acceptedSettings().renderMode==0); + if(version==4){ + assert(!dest->acceptedSettings().musicCompatibleLowFrequency); + assert(dest->acceptedSettings().headYawDegrees==0.f); + } + } + // Even legacy v4 MusicBed with a stale LF480 toggle must be sanitized + // so the new v7 research UI always discovers truthful P8.4 capability. + const auto v4GoldenWithLf=legacy(4,0); + auto downgrade=std::make_unique(); + downgrade->prepareToPlay(48000.,128); + assert(downgrade->restoreUnpublishedState( + v4GoldenWithLf.getData(),static_cast(v4GoldenWithLf.getSize()))); + assert(downgrade->acceptedSettings().renderMode==0); + assert(!downgrade->acceptedSettings().musicCompatibleLowFrequency); + auto broken=std::make_unique(); + broken->prepareToPlay(48000.,128); + assert(!broken->restoreUnpublishedState(snapshot.getData(),58)); + juce::MemoryBlock corrupt(snapshot); + auto* ptr=static_cast(corrupt.getData()); + ptr[54]=0xff; // signed JUCE bool, 0xff must never become true + assert(!broken->restoreUnpublishedState(corrupt.getData(),59)); + corrupt=snapshot;ptr=static_cast(corrupt.getData()); + ptr[50]=2;ptr[51]=ptr[52]=ptr[53]=0; // old physical mode in v7 forbidden + assert(!broken->restoreUnpublishedState(corrupt.getData(),59)); + restored->sealForRealtime(); + assert(!restored->restoreUnpublishedState(snapshot.getData(),59)); + std::printf("PASS P86 JUCE v7: audio ACK fade, single native graph A/B, " + "safe v1-v6 migration, v7 59-byte state and device reopen; " + "P86_vs_P82_RMS_dB=%.3f; ASIO/headphone NOT PROVEN\n",relativeDb); +} From be3da193b436adfb5c582159c3ea02b794f1d240 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 09:01:24 +0700 Subject: [PATCH 6/8] build(sonku): add P8.6 horizontal wall PCM and real JUCE v7 CTests --- CMakeLists.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d3cf705d..9f2dacc8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -549,6 +549,49 @@ if(BUILD_TESTING) SONKU_P85_WORLD_COHERENCE_RESEARCH=1) add_test(NAME NativeSonKuP85JuceV6AudioAckLegacySafeRestore COMMAND ARMixSonKuP85NativeTests) + if(ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT) + add_executable(ARMixSonKuP86FocusSourceTests + tests/sonku_p86_horizontal_focus_native_source_test.cpp) + target_compile_features(ARMixSonKuP86FocusSourceTests PRIVATE cxx_std_20) + target_compile_definitions(ARMixSonKuP86FocusSourceTests PRIVATE + SONKU_P7_MEASURED_ELEVATION_RESEARCH=1 + SONKU_P71_DIRECT_XYZ_RESEARCH=1 + SONKU_P72_NATIVE_XYZ_RT=1 + SONKU_P75_MUSIC_SAFE_RESEARCH=1 + SONKU_P80_TRANSPARENT_BASS_RESEARCH=1 + SONKU_P82_MULTIBAND_ROOM_RESEARCH=1 + SONKU_P83_PHYSICAL_SPEAKER_RESEARCH=1 + SONKU_P84_SINGLE_CORE_FUSION_RESEARCH=1 + SONKU_P85_WORLD_COHERENCE_RESEARCH=1 + SONKU_P86_HORIZONTAL_FOCUS_RESEARCH=1) + add_test(NAME NativeSonKuP86SixWallHorizontalFocusAndMusicIntegrity + COMMAND ARMixSonKuP86FocusSourceTests) + juce_add_console_app(ARMixSonKuP86NativeTests + PRODUCT_NAME "ArSonMix SonKu P86 Native JUCE v7 Tests") + target_sources(ARMixSonKuP86NativeTests PRIVATE + tests/sonku_p86_native_juce_v7_test.cpp) + target_compile_features(ARMixSonKuP86NativeTests PRIVATE cxx_std_20) + target_link_libraries(ARMixSonKuP86NativeTests PRIVATE + juce::juce_audio_processors juce::juce_recommended_config_flags) + target_compile_definitions(ARMixSonKuP86NativeTests PRIVATE + ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT=1 + ARMIX_SONKU_EXPERIMENTAL_P83_NATIVE_RT=1 + ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT=1 + ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT=1 + ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT=1 + SONKU_P7_MEASURED_ELEVATION_RESEARCH=1 + SONKU_P71_DIRECT_XYZ_RESEARCH=1 + SONKU_P72_NATIVE_XYZ_RT=1 + SONKU_P75_MUSIC_SAFE_RESEARCH=1 + SONKU_P80_TRANSPARENT_BASS_RESEARCH=1 + SONKU_P82_MULTIBAND_ROOM_RESEARCH=1 + SONKU_P83_PHYSICAL_SPEAKER_RESEARCH=1 + SONKU_P84_SINGLE_CORE_FUSION_RESEARCH=1 + SONKU_P85_WORLD_COHERENCE_RESEARCH=1 + SONKU_P86_HORIZONTAL_FOCUS_RESEARCH=1) + add_test(NAME NativeSonKuP86JuceV7AudioAckAndV6Restore + COMMAND ARMixSonKuP86NativeTests) + endif() endif() endif() endif() From 38ef02ab14a200e89c7629590c9cfc2ef87cb256 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 09:02:06 +0700 Subject: [PATCH 7/8] docs(sonku): record P8.5 owner FAT, horizontal vs vertical hypothesis and P8.6 rejection gates --- ...U_P86_HORIZONTAL_SPEAKER_FOCUS_20261115.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/SONKU_P86_HORIZONTAL_SPEAKER_FOCUS_20261115.md diff --git a/docs/SONKU_P86_HORIZONTAL_SPEAKER_FOCUS_20261115.md b/docs/SONKU_P86_HORIZONTAL_SPEAKER_FOCUS_20261115.md new file mode 100644 index 000000000..dd358a2b1 --- /dev/null +++ b/docs/SONKU_P86_HORIZONTAL_SPEAKER_FOCUS_20261115.md @@ -0,0 +1,32 @@ +# SonKu P8.6 — Horizontal Speaker Focus (private FAT candidate, NOT released) + +## Owner headphone FAT → measurable hypothesis + +P8.5 Windows portable (sha `121fcc514c660327e29054c32266d2ed5ba54600`, Actions `43659462670`) creates **slight genuine perceived externalization**. Compared with dearVR PRO2, however, music feels too large and diffuse, as if speakers fill floor and ceiling instead of being identifiable ear-height virtual loudspeakers that can rotate around the listener. Preserve P8.5 as the newest physically preferred baseline, P8.4 as musical reference, P8.2 as fallback. **P8.3 remains rejected**. + +The source-backed difference is not that the HRIR direct source has an unexpected positive elevation (owner tested 0°). Rather, when ROOM is enabled, P8.5 renders six material-coloured measured reflection paths, including ceiling and floor, plus a diffuse eight-line FDN. The scene applies separate gain laws `1.45+2*reflection` and `2.2+4*ambience` to these fields. At LARGE / reflections 100% / reverb 47%, such a large diffuse room can mask the directional direct image. This is an acoustic **hypothesis consistent with the report**, not a proof of perceived causality. The HEAD frame yaw mismatch was already fixed in P8.5. Stereo SIDE still remains partially head-locked and generic KEMAR/headphone compensation can create unrelated localization errors. + +Sennheiser says dearVR's CLARITY tunes the spatialization–timbre trade-off for different sound material; its proprietary method is not copied: https://help.sennheiser.com/hc/en-us/articles/27424692616594-How-to-produce-natural-immersive-music-with-the-CLARITY-modul-of-dearVR-PRO2. Relevant review of directional, reverberant and head-motion cues: https://www.frontiersin.org/journals/psychology/articles/10.3389/fpsyg.2024.1408073/full and https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2023.1027827/full . + +## P8.6 algorithm and isolation + +Use new research-only mode `renderMode=5` with `ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT=ON` and `SONKU_P86_HORIZONTAL_FOCUS_RESEARCH=1`. Production default OFF; no change to old modes 0/3/4 or user's scene/preset. In mode 5 only: + +- Keep **exact P8.5 direct two fused HRIRs**, head yaw world→head, music SIDE, preserved original bass/crossover, tonality, output gain, limiter, PCM engine and convolution. Do **not** increase speaker contrast or invent crossfeed/phase shifts. +- The native six-wall room still processes all six paths and uses their original geometry, delay, HRTF coefficients, RT60 material and IACC cues. Four horizontal walls remain **100%** of their existing path response. Floor path is **24%**, ceiling path **15%** of P8.5 reflection pressure; neither is hard-muted. This specifically reduces *up/down* phantom energy without setting direct elevation to an artificial value. +- Independently lower the P8.5 **ER presence coefficient to 76%** and diffuse **late presence to 38%**. Keep both wet components separately audible, retaining room identity and distance. No EQ, limiter makeup, automatic loudness shift, extra FIR, additional audio callback, heap, locks, or new codec. +- Native v7 retains identical 59-byte state structure. Prior v1-v6 states load with old mode 0/3/4 intact. Reject P8.3 modes (1/2) in bridge and v7 state. GUI editor exposes P8.2 / P8.4 / P8.5 / P8.6 only after identity-matched native v7 capability/readback. No preset reset in A/B. + +Quantitative coefficients are **research starting points**, not optimized by ear or claimed equivalent to dearVR. Do not ship a GUI preset with forced reflections 100%, or silently rewrite any existing user state. + +## Required gates + +1. Source-native C++: P8.6 ROOM OFF must be bit-exact P8.5 at 44.1/48k, yaw 0/60/180, azimuth 0/90/180, correlated and anti-phase material, and 64/128 sample blocks. +2. Source-native isolated per-wall PCM impulse test: four horizontal walls P8.6/P8.5 energy = 1.000 each; floor = 0.24² = 0.0576; ceiling = 0.15² = 0.0225, and both nonzero. ROOM ON measured PCM difference and preserved finite output. +3. JUCE v7: queued audio-side mode change, accurate applied ACK, state save/restore, old v6 P8.5 recovery, disallow 1/2, device prepare, FX bypass, and native host unchanged. +4. Windows real executable, approved embedded GUI resources, source SHA and signed PE architecture, portable ZIP, CTests and exact run artifact; **not** approved on Linux only. +5. Perceptual FAT cannot be replaced by PCM directionality. On the same headphone/song and matched measured level, compare P8.5 vs P8.6 at yaw 0, ±30/60/90/180 with STATIC, 60° spread, 1.6–3m ROOM OFF/ON first, then owner LARGE/100%/47%, including intentional FRONT/LEFT/REAR/RIGHT. Rate ear-height source pinpoint accuracy, separation, music body, bass, vocal, fatigue and width. If P8.6 is too dry/internal or weak, P8.5 wins. Retain immediate A/B rollback. + +## Known limitations / non-goals + +No real head tracking from manual yaw. No personalized HRIR/headphone correction or measured BRIR. High music SIDE remains partly headphone-head-locked. Room reductions may improve directional prominence yet reduce natural externalization; this is why source-only CI does not establish success. No merge to main, no public release and no claim of dearVR parity before FAT. The branch is a quarantined stack on P8.5 research; after approved FAT, extract a clean production-safe patch without rejected P8.3 code ancestry. From 884e1440f2e415f8731113e912d636081db8a9d0 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Sun, 15 Nov 2026 09:03:00 +0700 Subject: [PATCH 8/8] ci(sonku): P8.6 source per-wall proof + real JUCE Windows portable FAT --- .github/workflows/sonku-p86-windows-field.yml | 279 ++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 .github/workflows/sonku-p86-windows-field.yml diff --git a/.github/workflows/sonku-p86-windows-field.yml b/.github/workflows/sonku-p86-windows-field.yml new file mode 100644 index 000000000..eccbfda9e --- /dev/null +++ b/.github/workflows/sonku-p86-windows-field.yml @@ -0,0 +1,279 @@ +name: SonKu P8.6 horizontal-focus native mixer portable FAT x64 +# Private JUCE app; no public release. Real v7 P8.2/P8.4/P8.5/P8.6 A/B. +on: + pull_request: + paths: + - '.github/workflows/sonku-p86-windows-field.yml' + workflow_dispatch: +permissions: + contents: read +concurrency: + group: sonku-p86-field-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true +jobs: + preflight: + name: Isolated fast PCM and GUI preflight + runs-on: ubuntu-latest + timeout-minutes: 8 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - name: Strict P8.4 PCM timbre and spatial source qualification + run: | + set -euo pipefail + FLAGS="-std=c++20 -O2 -Wall -Wextra -Werror -pedantic -DSONKU_P7_MEASURED_ELEVATION_RESEARCH=1 -DSONKU_P71_DIRECT_XYZ_RESEARCH=1 -DSONKU_P72_NATIVE_XYZ_RT=1 -DSONKU_P75_MUSIC_SAFE_RESEARCH=1 -DSONKU_P80_TRANSPARENT_BASS_RESEARCH=1 -DSONKU_P82_MULTIBAND_ROOM_RESEARCH=1 -DSONKU_P83_PHYSICAL_SPEAKER_RESEARCH=1 -DSONKU_P84_SINGLE_CORE_FUSION_RESEARCH=1" + g++ $FLAGS tests/sonku_p84_fused_single_core_test.cpp -o /tmp/p84-native + /tmp/p84-native | tee /tmp/p84-source.log + grep -q '^PASS P84 SINGLE CORE:' /tmp/p84-source.log + g++ $FLAGS tests/sonku_p84_spatial_impulse_evidence_test.cpp -o /tmp/p84-spatial + /tmp/p84-spatial | tee /tmp/p84-spatial.log + grep -q '^PASS P84 SPATIAL SOURCE:' /tmp/p84-spatial.log + g++ $FLAGS tests/sonku_p84_live_v5_modes_source_test.cpp -o /tmp/p84-live-mode + /tmp/p84-live-mode | tee /tmp/p84-live-mode.log + grep -q '^PASS P84 V5 NATIVE SOURCE:' /tmp/p84-live-mode.log + g++ $FLAGS -DSONKU_P85_WORLD_COHERENCE_RESEARCH=1 tests/sonku_p85_world_locked_source_test.cpp -o /tmp/p85-source + /tmp/p85-source | tee /tmp/p85-source.log + grep -q '^PASS P85 WORLD LOCK:' /tmp/p85-source.log + g++ $FLAGS -DSONKU_P85_WORLD_COHERENCE_RESEARCH=1 -DSONKU_P86_HORIZONTAL_FOCUS_RESEARCH=1 tests/sonku_p86_horizontal_focus_native_source_test.cpp -o /tmp/p86-source + /tmp/p86-source | tee /tmp/p86-source.log + grep -q '^PASS P86 HORIZONTAL FOCUS:' /tmp/p86-source.log + - name: Native JS and source GUI capability checks + run: | + set -euo pipefail + node --check site/preview-v2/assets/mixer-native-sonku.js + node tests/sonku_p73_gui_contract_test.js + grep -q "'FIELD_PREVIEW_FULL_CTEST_NOT_RUN'" scripts/m3e_fat_evidence_gate.mjs + python -m unittest discover -s tests -p native_peq_assembly_test.py + - name: 44.1 and 48 kHz prepared PCM source regression + run: | + set -euo pipefail + g++ -std=c++20 -O2 -Wall -Wextra -Werror -pedantic \ + -DSONKU_P7_MEASURED_ELEVATION_RESEARCH=1 \ + -DSONKU_P71_DIRECT_XYZ_RESEARCH=1 \ + -DSONKU_P72_NATIVE_XYZ_RT=1 \ + tests/sonku_p72_realtime_xyz_test.cpp -o /tmp/sonku-p75-pcm + /tmp/sonku-p75-pcm + g++ -std=c++20 -O2 -Wall -Wextra -Werror -pedantic \ + -DSONKU_P7_MEASURED_ELEVATION_RESEARCH=1 \ + -DSONKU_P71_DIRECT_XYZ_RESEARCH=1 \ + -DSONKU_P72_NATIVE_XYZ_RT=1 \ + -DSONKU_P75_MUSIC_SAFE_RESEARCH=1 \ + tests/sonku_p75_stereo_integrity_test.cpp -o /tmp/sonku-p75-music + /tmp/sonku-p75-music + g++ -std=c++20 -O2 -Wall -Wextra -Werror -pedantic \ + -DSONKU_P7_MEASURED_ELEVATION_RESEARCH=1 \ + -DSONKU_P71_DIRECT_XYZ_RESEARCH=1 \ + -DSONKU_P72_NATIVE_XYZ_RT=1 \ + -DSONKU_P75_MUSIC_SAFE_RESEARCH=1 \ + -DSONKU_P80_TRANSPARENT_BASS_RESEARCH=1 \ + tests/sonku_p80_tonal_room_evidence_test.cpp -o /tmp/sonku-p80-evidence + /tmp/sonku-p80-evidence | tee /tmp/sonku-p80-acoustic-evidence.csv + grep -q '^PASS P8:' /tmp/sonku-p80-acoustic-evidence.csv + g++ -std=c++20 -O2 -Wall -Wextra -Werror -pedantic \ + -DSONKU_P7_MEASURED_ELEVATION_RESEARCH=1 \ + -DSONKU_P71_DIRECT_XYZ_RESEARCH=1 \ + -DSONKU_P72_NATIVE_XYZ_RT=1 \ + -DSONKU_P75_MUSIC_SAFE_RESEARCH=1 \ + -DSONKU_P80_TRANSPARENT_BASS_RESEARCH=1 \ + -DSONKU_P82_MULTIBAND_ROOM_RESEARCH=1 \ + tests/sonku_p82_sixsurface_multiband_room_test.cpp -o /tmp/sonku-p82-room + /tmp/sonku-p82-room | tee /tmp/sonku-p82-room-evidence.csv + grep -q '^PASS P8.2:' /tmp/sonku-p82-room-evidence.csv + windows-field: + name: Actual full Windows JUCE executable and verified portable field ZIP + needs: preflight + runs-on: windows-2022 + timeout-minutes: 55 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - name: Verify immutable PR head and physical candidate identity + shell: pwsh + env: + EXPECTED_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + run: | + $actual = (& git rev-parse HEAD).Trim() + if ($LASTEXITCODE -ne 0 -or $actual -ne $env:EXPECTED_SHA -or $actual -notmatch '^[0-9a-f]{40}$') { + throw "SONKU_P83_SOURCE_MISMATCH:$actual" + } + Write-Host "SONKU_P84_EXACT_SOURCE=$actual" + - uses: actions/checkout@v4 + with: + repository: juce-framework/JUCE + ref: 8.0.15 + path: third_party/JUCE + persist-credentials: false + - name: Obtain pinned WebView2 compilation SDK + shell: pwsh + run: | + nuget install Microsoft.Web.WebView2 -Version 1.0.3485.44 -OutputDirectory .deps -NonInteractive + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + - name: Configure full native app with research XYZ explicit ON + shell: pwsh + run: | + cmake -S . -B build -G "Visual Studio 17 2022" -A x64 ` + -DJUCE_ROOT="$env:GITHUB_WORKSPACE/third_party/JUCE" ` + -DJUCE_WEBVIEW2_PACKAGE_LOCATION="$env:GITHUB_WORKSPACE/.deps" ` + -DARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT=ON ` + -DARMIX_SONKU_EXPERIMENTAL_MUSIC_SAFE=ON ` + -DARMIX_SONKU_EXPERIMENTAL_P8_TRANSPARENT_BASS=ON ` + -DARMIX_SONKU_EXPERIMENTAL_P82_ROOM=ON ` + -DARMIX_SONKU_EXPERIMENTAL_P83_NATIVE_RT=ON ` + -DARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT=ON ` + -DARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT=ON ` + -DARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT=ON ` + -DBUILD_TESTING=ON + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + $cache = Get-Content -LiteralPath build/CMakeCache.txt -Raw + if ($cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT:BOOL=ON' -or + $cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_MUSIC_SAFE:BOOL=ON' -or + $cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_P8_TRANSPARENT_BASS:BOOL=ON' -or + $cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_P82_ROOM:BOOL=ON' -or + $cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_P83_NATIVE_RT:BOOL=ON' -or + $cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_P84_NATIVE_RT:BOOL=ON' -or + $cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_P85_NATIVE_RT:BOOL=ON' -or + $cache -notmatch 'ARMIX_SONKU_EXPERIMENTAL_P86_NATIVE_RT:BOOL=ON') { + throw "SONKU_P83_RESEARCH_NOT_ENABLED" + } + $tests = (& ctest --test-dir build -C Release --show-only=json-v1 | Out-String | ConvertFrom-Json) + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + $required = @('NativeSonKuP72AtomicXyzLiveEditSource', + 'NativeSonKuP72JuceV3XyzLiveAckV1V2Restore', + 'NativeSonKuSessionV1V2AndAudioAppliedAck', + 'NativeSonKuP75MusicStereoPhaseNoNullAndChunkParity', + 'NativeSonKuP80TransparentBassStereoPhaseAndRoomDiagnostic', + 'NativeSonKuP82SixWallThreeBandRoomTimingDecayAndParity', + 'NativeSonKuP83RealtimeModeSourceAndMusicIntegrity', + 'NativeSonKuP83JuceV4AudioAckLegacyRestoreAndHeadYaw', + 'NativeSonKuP84SingleCoreMusicFidelityAndWorldYaw', + 'NativeSonKuP84JuceV5AudioAckLegacySafeRestore', + 'NativeSonKuP85WorldCoherentMidYawSourceAndFidelity', + 'NativeSonKuP85JuceV6AudioAckLegacySafeRestore', + 'NativeSonKuP86SixWallHorizontalFocusAndMusicIntegrity', + 'NativeSonKuP86JuceV7AudioAckAndV6Restore') + $available = @($tests.tests | ForEach-Object { $_.name }) + foreach ($test in $required) { + if ($test -notin $available) { throw "SONKU_P82_MISSING_CTEST:$test" } + } + - name: Fail fast — compile and execute real JUCE v5 state + PCM ACK first + shell: pwsh + run: | + cmake --build build --config Release --parallel 2 --target ARMixSonKuP86NativeTests + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + ctest --test-dir build -C Release --output-on-failure -R '^NativeSonKuP86JuceV7AudioAckAndV6Restore$' + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + - name: Compile actual ARMixConsole Windows GUI and focused real JUCE tests + shell: pwsh + run: | + cmake --build build --config Release --parallel 2 --target ` + ARMixConsole ARMixSonKuP72SourceTests ARMixSonKuP72NativeTests ARMixSonKuNativeStateTests ARMixSonKuP75MusicIntegrityTests ARMixSonKuP80TonalEvidenceTests ARMixSonKuP82RoomTests ARMixSonKuP83LiveSourceTests ARMixSonKuP83NativeTests ARMixSonKuP84LiveSourceTests ARMixSonKuP84NativeTests ARMixSonKuP85WorldSourceTests ARMixSonKuP85NativeTests ARMixSonKuP86FocusSourceTests ARMixSonKuP86NativeTests + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + $exe = 'build/ARMixConsole_artefacts/Release/AR MIX Studio.exe' + if (-not (Test-Path -LiteralPath $exe -PathType Leaf)) { throw "SONKU_P83_NO_GUI_EXE" } + if ((Get-Item -LiteralPath $exe).Length -lt 4MB) { throw "SONKU_P83_WRONG_GUI_TARGET" } + - name: Scoped native XYZ state, callback ACK and legacy restoration + shell: pwsh + run: | + ctest --test-dir build -C Release --output-on-failure ` + -R '^NativeSonKu(P72AtomicXyzLiveEditSource|P72JuceV3XyzLiveAckV1V2Restore|SessionV1V2AndAudioAppliedAck|P75MusicStereoPhaseNoNullAndChunkParity|P80TransparentBassStereoPhaseAndRoomDiagnostic|P82SixWallThreeBandRoomTimingDecayAndParity|P83RealtimeModeSourceAndMusicIntegrity|P83JuceV4AudioAckLegacyRestoreAndHeadYaw|P84SingleCoreMusicFidelityAndWorldYaw|P84JuceV5AudioAckLegacySafeRestore|P85WorldCoherentMidYawSourceAndFidelity|P85JuceV6AudioAckLegacySafeRestore|P86SixWallHorizontalFocusAndMusicIntegrity|P86JuceV7AudioAckAndV6Restore)$' + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + - name: Package real native portable mixer, never an installer + shell: pwsh + run: | + & ./scripts/package_native_windows.ps1 -BuildDir build -OutputDir dist + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + python scripts/factoryfx_release_bundle.py stage --lock config/factoryfx-approved-releases.json --output dist --best-effort + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + - name: Record exact experiment and physical qualification pending + shell: pwsh + run: | + $path = 'dist/BUILD_PROVENANCE.json' + $p = Get-Content -LiteralPath $path -Raw -Encoding utf8 | ConvertFrom-Json + $sha = (& git rev-parse HEAD).Trim() + if ($p.sourceCommit -ne $sha) { throw "SONKU_P83_ARTIFACT_SHA_MISMATCH" } + $p.fatStatus = 'FIELD_PREVIEW_FULL_CTEST_NOT_RUN' + $p | Add-Member -NotePropertyName sonkuExperiment -NotePropertyValue @{ + enabled = $true + nativeXYZ = $true + musicSafeStereo = $true + p8TransparentBass = $true + p82MultibandRoom = $true + p83NativeSpeakers = $false + p84FusedNative = $true + p85WorldLockedMid = $true + p86HorizontalFocus = $true + p84RenderModes = @('MusicBedP82','MusicSpatialP84','MusicSpatialP85','MusicSpatialP86') + p83HeadYaw = 'DETERMINISTIC_MANUAL_NO_SENSOR' + p84FusionDifferenceHighpassHz = 750 + p84MeasuredHrirContrast = 0.12 + legacyP83V4Migration = 'OLD_SPEAKER_TO_P82' + p83AudioAppliedAck = $true + p83RealtimeModeCrossfade = '12ms_OUT_AND_IN_NATIVE_SINGLE_PCM_GRAPH' + p82RoomBandsHz = @(250,4800) + p82MaterialCalibration = 'ORIGINAL_ILLUSTRATIVE_NOT_MEASURED_RIR' + p82Rt60StudioSeconds = @(0.717,0.392,0.231) + p82Rt60ChamberSeconds = @(0.933,0.802,0.483) + p82Rt60HallSeconds = @(1.716,1.219,0.650) + p8LowBandCrossoverHz = 220 + musicSafeAlgorithm = 'MEASURED_CENTER_MID_PLUS_UNCONDITIONAL_STEREO_SIDE_RESEARCH' + stateSchema = 7 + fullWindowsExecutable = $true + publicRelease = $false + physicalAsioQualified = $false + dearVrPerceptualParityProven = $false + qualification = 'SONKU_P86_SCOPED_NATIVE_PCM_JUCE_14_CTESTS_HEADPHONE_FAT_PENDING' + licenseRedistributionApproval = $false + mitKemarNoticeSha256 = (Get-FileHash -LiteralPath docs/THIRD_PARTY_8D_SONKU_HRTF.md -Algorithm SHA256).Hash.ToLowerInvariant() + fieldFatGuideSha256 = (Get-FileHash -LiteralPath docs/SONKU_P86_HORIZONTAL_SPEAKER_FOCUS_20261115.md -Algorithm SHA256).Hash.ToLowerInvariant() + } -Force + $p | ConvertTo-Json -Depth 20 | Set-Content -LiteralPath $path -Encoding utf8 + - name: Independent GUI PE, approved resources, provenance and ZIP verification + shell: pwsh + run: | + & ./scripts/verify_native_windows_artifact.ps1 -OutputDir dist + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + $p = Get-Content -LiteralPath dist/BUILD_PROVENANCE.json -Raw | ConvertFrom-Json + if (-not $p.sonkuExperiment.enabled -or + -not $p.sonkuExperiment.musicSafeStereo -or + -not $p.sonkuExperiment.p8TransparentBass -or + -not $p.sonkuExperiment.p82MultibandRoom -or + -not $p.sonkuExperiment.p84FusedNative -or + -not $p.sonkuExperiment.p85WorldLockedMid -or + -not $p.sonkuExperiment.p86HorizontalFocus -or + $p.sonkuExperiment.stateSchema -ne 7 -or $p.sonkuExperiment.publicRelease) { + throw 'SONKU_P86_WRONG_FIELD_ARTIFACT' + } + - name: Include mandatory MIT KEMAR notice and physical FAT guide + shell: pwsh + run: | + # Standard distribution allowlist was verified above. Field-only notice. + Copy-Item -LiteralPath docs/THIRD_PARTY_8D_SONKU_HRTF.md -Destination dist/THIRD_PARTY_8D_SONKU_HRTF.md + Copy-Item -LiteralPath docs/SONKU_P86_HORIZONTAL_SPEAKER_FOCUS_20261115.md -Destination dist/SONKU_P86_FIELD_FAT.md + $p = Get-Content -LiteralPath dist/BUILD_PROVENANCE.json -Raw | ConvertFrom-Json + $checks = @{ + 'THIRD_PARTY_8D_SONKU_HRTF.md' = [string]$p.sonkuExperiment.mitKemarNoticeSha256 + 'SONKU_P86_FIELD_FAT.md' = [string]$p.sonkuExperiment.fieldFatGuideSha256 + } + foreach ($item in $checks.GetEnumerator()) { + $file = Join-Path dist $item.Key + if ($item.Value -notmatch '^[0-9a-f]{64}$' -or + -not (Test-Path -LiteralPath $file -PathType Leaf)) { + throw "SONKU_P83_FIELD_NOTICE_MISSING:$($item.Key)" + } + $actual = (Get-FileHash -LiteralPath $file -Algorithm SHA256).Hash.ToLowerInvariant() + if ($actual -ne $item.Value) { throw "SONKU_P83_FIELD_NOTICE_HASH_MISMATCH:$($item.Key)" } + } + if (Test-Path -LiteralPath dist/Studio) { throw 'SONKU_FIELD_USER_DATA_MUST_NOT_SHIP' } + Write-Host 'SONKU_P86_FIELD_READY: GUI EXE + verified MIT notice + FAT guide' + - uses: actions/upload-artifact@v4 + name: Upload isolated SonKu Windows x64 field candidate + with: + name: ArSonMix-SonKu-P86-Horizontal-Focus-Windows-x64-${{ github.run_id }} + path: dist/ + if-no-files-found: error + retention-days: 21 + compression-level: 0