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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 235 additions & 0 deletions .github/workflows/sonku-p82-acoustic-windows-field.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
name: SonKu P8.2 six-wall and three-band room acoustic native field candidate
# Isolated opt-in full JUCE app build; no public installer, tag or release.
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- '.github/workflows/sonku-p82-acoustic-windows-field.yml'
- 'src/Main.cpp'
- 'src/SonKuNativeBridgeContract.h'
- 'src/LiveAudioEngine.h'
- 'engine/builtin_fx/SonKuSpatialProcessor.h'
- 'engine/builtin_fx/sonku/**'
- 'site/preview-v2/assets/mixer-native-sonku.js'
- 'CMakeLists.txt'
- 'tests/sonku_p72_*'
- 'tests/sonku_p75_*'
- 'tests/sonku_p80_*'
- 'tests/sonku_p82_*'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: sonku-p82-physical-${{ 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: 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_P82_SOURCE_MISMATCH:$actual"
}
Write-Host "SONKU_P75_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 `
-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') {
throw "SONKU_P82_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')
$available = @($tests.tests | ForEach-Object { $_.name })
foreach ($test in $required) {
if ($test -notin $available) { throw "SONKU_P82_MISSING_CTEST:$test" }
}
- 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
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_P75_NO_GUI_EXE" }
if ((Get-Item -LiteralPath $exe).Length -lt 4MB) { throw "SONKU_P75_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)$'
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_P82_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
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 = 3
fullWindowsExecutable = $true
publicRelease = $false
physicalAsioQualified = $false
dearVrPerceptualParityProven = $false
qualification = 'SONKU_P82_FULL_JUCE_APP_6_SCOPED_CTEST_PASS_REAL_ASIO_LISTENING_PENDING'
licenseRedistributionApproval = $false
mitKemarNoticeSha256 = (Get-FileHash -LiteralPath docs/THIRD_PARTY_8D_SONKU_HRTF.md -Algorithm SHA256).Hash.ToLowerInvariant()
fieldFatGuideSha256 = (Get-FileHash -LiteralPath docs/SONKU_P82_ACOUSTIC_ROOM_FIELD_FAT_20261114.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
$p.sonkuExperiment.stateSchema -ne 3 -or $p.sonkuExperiment.publicRelease) {
throw 'SONKU_P75_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_P82_ACOUSTIC_ROOM_FIELD_FAT_20261114.md -Destination dist/SONKU_P82_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_P82_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_P75_FIELD_NOTICE_MISSING:$($item.Key)"
}
$actual = (Get-FileHash -LiteralPath $file -Algorithm SHA256).Hash.ToLowerInvariant()
if ($actual -ne $item.Value) { throw "SONKU_P75_FIELD_NOTICE_HASH_MISMATCH:$($item.Key)" }
}
if (Test-Path -LiteralPath dist/Studio) { throw 'SONKU_FIELD_USER_DATA_MUST_NOT_SHIP' }
Write-Host 'SONKU_P75_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-P82-Multiband-Room-Windows-x64-${{ github.run_id }}
path: dist/
if-no-files-found: error
retention-days: 21
compression-level: 0
32 changes: 31 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ if(ARMIX_SONKU_EXPERIMENTAL_P8_TRANSPARENT_BASS AND
NOT ARMIX_SONKU_EXPERIMENTAL_MUSIC_SAFE)
message(FATAL_ERROR "P8 requires the isolated P7.5 music-safe research profile")
endif()
# P8.2 six-wall frequency-dependent material + shared LF/MID/HF late RT60.
# Separate from the P8.1 listening checkpoint and always OFF publicly.
option(ARMIX_SONKU_EXPERIMENTAL_P82_ROOM
"Enable independently gated P8.2 six-surface 3-band research room"
OFF)
if(ARMIX_SONKU_EXPERIMENTAL_P82_ROOM AND
NOT ARMIX_SONKU_EXPERIMENTAL_P8_TRANSPARENT_BASS)
message(FATAL_ERROR "P8.2 room requires P8.1 transparent-bass experiment")
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Expand Down Expand Up @@ -227,7 +236,8 @@ target_compile_definitions(ARMixConsole PRIVATE
$<$<BOOL:${ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT}>:SONKU_P71_DIRECT_XYZ_RESEARCH=1>
$<$<BOOL:${ARMIX_SONKU_EXPERIMENTAL_NATIVE_XYZ_RT}>:SONKU_P72_NATIVE_XYZ_RT=1>
$<$<BOOL:${ARMIX_SONKU_EXPERIMENTAL_MUSIC_SAFE}>:SONKU_P75_MUSIC_SAFE_RESEARCH=1>
$<$<BOOL:${ARMIX_SONKU_EXPERIMENTAL_P8_TRANSPARENT_BASS}>:SONKU_P80_TRANSPARENT_BASS_RESEARCH=1>)
$<$<BOOL:${ARMIX_SONKU_EXPERIMENTAL_P8_TRANSPARENT_BASS}>:SONKU_P80_TRANSPARENT_BASS_RESEARCH=1>
$<$<BOOL:${ARMIX_SONKU_EXPERIMENTAL_P82_ROOM}>:SONKU_P82_MULTIBAND_ROOM_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.
Expand Down Expand Up @@ -374,6 +384,26 @@ if(BUILD_TESTING)
SONKU_P80_TRANSPARENT_BASS_RESEARCH=1)
add_test(NAME NativeSonKuP80TransparentBassStereoPhaseAndRoomDiagnostic
COMMAND ARMixSonKuP80TonalEvidenceTests)
if(ARMIX_SONKU_EXPERIMENTAL_P82_ROOM)
# This is the actual live JUCE SonKu instance, not an offline
# room-only approximation. Preserve P8.1 as an unmodified fallback.
target_compile_definitions(ARMixSonKuP72NativeTests PRIVATE
SONKU_P82_MULTIBAND_ROOM_RESEARCH=1)
target_compile_definitions(ARMixSonKuP80TonalEvidenceTests PRIVATE
SONKU_P82_MULTIBAND_ROOM_RESEARCH=1)
add_executable(ARMixSonKuP82RoomTests
tests/sonku_p82_sixsurface_multiband_room_test.cpp)
target_compile_features(ARMixSonKuP82RoomTests PRIVATE cxx_std_20)
target_compile_definitions(ARMixSonKuP82RoomTests 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)
add_test(NAME NativeSonKuP82SixWallThreeBandRoomTimingDecayAndParity
COMMAND ARMixSonKuP82RoomTests)
endif()
endif()
endif()
endif()
Expand Down
30 changes: 30 additions & 0 deletions docs/SONKU_P82_ACOUSTIC_ROOM_FIELD_FAT_20261114.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SonKu P8.2 — six-wall multiband acoustic research / physical FAT

2026-11-14. **Research only, not a public release.**

The owner reports that P8.1 audio quality is much better than P7.4/P7.5. The P8.1 tonal and LF preservation code is an immutable A/B checkpoint; the separate P8.2 build must not replace it without physical listening approval.

## Implementation

- Same full stereo L/R and measured KEMAR direct HRTF, P8.1 original bass retention, and bank-derived presence compensation. ROOM OFF must remain unchanged.
- Six physically delayed directional image paths: left, right, front, back, floor and ceiling. Each uses a separate three-band intensity absorption material. Pressure reflection = sqrt(1-alpha), with original two-ear HRTF interaural cues intact. The band crossovers are 250 Hz and 4.8 kHz, after each path's binaural HRTF.
- One shared original material model drives a cheap 8-line stereo FDN with prepared, per-delay LF/MID/HF feedback gain and the Eyring room-decay formula. All sqrt, log, exp and coefficient design occurs at prepare time, not inside the PCM callback.
- Mode is isolated under ARMIX_SONKU_EXPERIMENTAL_P82_ROOM=ON and requires the three previous XYZ, P7.5 and P8.1 research switches. All switches default OFF. No second PCM, worker, heap, mutex, GUI DSP authority, FX state schema change or session migration.
- The parameter tables are **illustrative**, not measured RIR or copies of dearVR. Estimated LF / MID / HF RT60 in seconds: Studio 0.717 / 0.392 / 0.231; Chamber 0.933 / 0.802 / 0.483; Hall 1.716 / 1.219 / 0.650. These are model predictions only, not verified measured T20/T30.

## Automated gates

1. Source P8.2 test checks material absorption and pressure identity, geometry, theoretical RT60 ordering, time-domain six-wall image reflections, early/late energy, LF/HF decay separation, and native dynamic Room + motion chunk parity at 44.1/48 kHz.
2. Existing P8.1 frequency/anti-phase/bypass evidence must PASS again under the P8.2 flag, plus previously passed XYZ/native ACK and v1/v2/v3 state CTests.
3. Full Windows JUCE executable, approved embedded GUI resource hashes, exact source commit, PE provenance, MIT KEMAR attribution notice and FAT guide checksum must match the uploaded portable artifact.
4. **Not yet passed:** real room impulse response EDC, measured DRR, IACC, T20/T30, blind loudness matched dearVR A/B, physical ASIO p95/p99/XRUN and real music listening. Synthetic tests alone cannot certify equivalent sound.

## Listening A/B (separate folders)

Keep the P8.1 artifact (Actions artifact 14117224898) in its own writable extracted folder; unpack P8.2 separately with portable_mode.txt. Low headphone volume, ASIO 48k/256, real stereo input, WIRE to MAIN, Master Mono OFF, one FX insert, ORBIT OFF, SIDE WIDTH 60 degrees, GAIN -6 dB. Compare direct and bass with ROOM OFF first: P8.1 and P8.2 must sound the same.

Then enable Square 7.2, Reflections 55%, Ambience 30%, source 1.6m; audition solo vocal, bass/drums, acoustic percussion and natural recorded room tails. Change room to 14.4 and 28.8 and move XYZ near each surface. ROOM ON should increase credible spaciousness, direction and decay without making center vocal hollow or bass thin.

For dearVR PRO 2 comparison, record actual Stereo Width, source XYZ, room reflection and late reverb settings, Clarity and Bass Boost OFF and ON separately. Match loudness and headphone/ASIO chain. If P8.2 sounds worse than P8.1, stop and reject this experimental build; do not increase blanket wet gain.

No release, merge, or 'dearVR-equivalent' claim until owner approval and objective/perceptual room tests. Architecture: docs/SONKU_P8_DEARVR_BENCHMARK_ACOUSTIC_ARCHITECTURE_20261114.md.
Loading
Loading