Skip to content

P6 SonKu: opt-in prepared realtime directional KEMAR in native JUCE PCM - #678

Closed
masarray wants to merge 7 commits into
feat/sonku-music-integrity-p0-20261113from
feat/sonku-music-integrity-p6-rt-20261114
Closed

masarray wants to merge 7 commits into
feat/sonku-music-integrity-p0-20261113from
feat/sonku-music-integrity-p6-rt-20261114

Conversation

@masarray

Copy link
Copy Markdown
Owner

Outcome

Convert proven P2+P3+P4 directional KEMAR reflections into one native prepared realtime profile on the existing SonKuSpatialProcessor::prepareToPlay path. Preserve alpha.23/public installer, default-light PCM, 8D-SonKu catalog, .smix, FX ACK, WIRE and UI. No parallel engine.

Core design

  • New validated enum SonKuReflectionProfile with fail-closed invalid values. Prepare-time selection only; native quality changes cannot occur in an audio callback.
  • DirectionalKemar enables original full measured horizontal HRIR P2, P3 exact zero-spread fusion, and P4 contiguous 140-tap FIR in the native ROOM scene. P5 history epoch guard retained.
  • Compiled into JUCE app only with -DARMIX_SONKU_EXPERIMENTAL_DIRECTIONAL_RT=ON. Default OFF; no release or promotion until hardware and human A/B qualification.
  • One atomic commit; scoped existing SonKu audio-only CI, avoids unrelated Chromium, Windows installer and Vocal Harmony tests.

Source verification

  • New tests/sonku_p6_realtime_quality_test.cpp: invalid profile rejection, immutable profile, active-room PCM comparison to legacy, headroom, 44.1/48k, 64/128/257 PCM chunk parity, accepted scene re-prepare after device restart.
  • New SONKU_P6_RT benchmark covers actual native ROOM path at 48k/128 both 0° and 60° spread, with p99 and block budget ratio. Hosted-runner only, not Windows ASIO evidence.
  • P0–P5 A/B and deterministic regressions continue to gate SonKu.

Exclusions and release veto

No six-surface/multi-elevation BRIR, head tracking, individualized HRTF, dearVR parity, Windows ASIO/XRUN/perceptual qualification or production enablement. Human headphone listening, matrix CPU/ASIO, Windows JUCE compile and owner approval remain mandatory. PR stacked on #674 and intentionally draft.

Details: docs/SONKU_P6_PREPARED_REALTIME_DIRECTIONAL_20261114.md.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: f8151d5
Status: ✅  Deploy successful!
Preview URL: https://e2178619.arsonmix.pages.dev
Branch Preview URL: https://feat-sonku-music-integrity-p-7mx5.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

P6 engineering checkpoint — 2026-11-14 (verified, draft / NOT released)

Head: 23bd400fddda0c1eab82c2a0adbbc93365a7a03a (5 commits, stacked on P0–P5 #674; does not touch main or alpha.23). Exact scoped CI #43553424173 SUCCESS, source SHA confirmed by job. Original P6 native ROOM A/B + P0–P5 artifacts — eight new 3s 48k/16-bit stereo WAVs for LIGHT versus DIRECTIONAL (FRONT/REAR, 0°/60° spread), PCM metrics and headphone guide, plus earlier exact-source fixtures.

Actual milestone delivered

  • P2 full 140-tap measured horizontal KEMAR reflections + P3 exact 0° spread fusion + P4 contiguous FIR selected once at prepare time as an immutable SonKuReflectionProfile::DirectionalKemar on the original native PCM graph. P5 OFF→ON ring-history guard remains. Reject invalid profiles/mid-run/offline toggles; no dynamic allocation, callback clock, extra thread or competing WebAudio route.
  • Real SonKuSpatialProcessor::prepareToPlay connection and CMake ARMIX_SONKU_EXPERIMENTAL_DIRECTIONAL_RT flag OFF by default. Default LIGHT, native ACK, .smix v1/v2, WIRE, GUI and public installer unchanged.
  • Dedicated focused portable CTest and real-JUCE native-state test assertions for opt-in build, regression at 44.1/48 kHz and near-rate tolerance (fixed inconsistent 44100 exact check), prepared active ROOM, moving orbit, 64/128/257 chunk parity, accepted scene restart, musical phase and limiter bound.
  • P6 four pairs of native SQUARE ROOM WAVs pass strict causal direct-prefix identity, audible-reflection-output numerical difference, finite/unclipped samples, and matched sample rate/frame count. P0–P5 source tests, KEMAR 380-point audit and baseline-vs-candidate music integrity still PASS.
  • Current same-runner hosted Linux 48k/128/3s native ROOM: 0° spread LIGHT 65.240ms vs directional 279.585ms, directional p99 298.007µs / 11.2% of nominal block; 60° LIGHT 65.134ms vs directional 423.829ms, directional p99 456.414µs / 17.1%. No physical Windows ASIO, concurrent-insert, XRUN or human naturalness claims. Full directional quality is 4.3–6.5× more CPU costly than lightweight; this justifies keeping default OFF.
  • Forward-ported main's plugin-scoped Vocal Harmony CI workflow and changed-file classifier: only SonKu native fast lane runs for P6; unrelated Harmony is not retriggered. The Windows built-in preset workflow checks may skip as unrelated; do not call that a real P6 JUCE/ASIO Windows qualification.

Open blockers / NO automatic merge

  1. Compile the exact opt-in P6 commit on Windows JUCE with -DARMIX_SONKU_EXPERIMENTAL_DIRECTIONAL_RT=ON and execute NativeSonKuSessionV1V2AndAudioAppliedAck plus NativeSonKuP6PreparedRoomDirectionalAndChunkParity CTests.
  2. Actual ASIO/WIRE/VST3 concurrent-insert callback p95/p99, XRUN and device-restart field measurements at 64/128/256; do not optimize to guessed CPU budgets.
  3. Owner headphone blind same-source dearVR A/B: musical tonal integrity, front/rear externalization, distance, spatial stability and ROOM edits; no claims of dearVR parity or real-3D elevation.

Decision: P6 native integration and source-level qualification completed, but public enablement and perceptual qualification remain deliberately blocked. Keep draft. Details: docs/SONKU_P6_PREPARED_REALTIME_DIRECTIONAL_20261114.md.

Copy link
Copy Markdown
Owner Author

P6 hardware-independent Windows JUCE gap CLOSED — 14 Nov 2026

Exact Windows Actions #43554868473 SUCCESS at source ac9330178f69bd734e5400efcf972627bc5642a0, on Windows 2022 / MSVC / pinned JUCE 8.0.15 with ARMIX_SONKU_EXPERIMENTAL_DIRECTIONAL_RT=ON. The actual SonKu adapter was compiled, no full mixer build or installer.

Both native Release CTests passed:

  • NativeSonKuP6PreparedRoomDirectionalAndChunkParity
  • NativeSonKuSessionV1V2AndAudioAppliedAck

2/2 tests passed; 0 failed. This verifies real Windows JUCE adapter opt-in compilation, PCM, accepted-settings ACK, v1/v2 state compatibility and chunk parity. It is not a Windows ASIO device callback, XRUN or headphones proof. Keep P6 draft and its production default OFF.

For development efficiency, focused Windows workflow now includes a fail-open exact-commit-delta classifier. P7-only measured data and docs do not trigger redundant MSVC recompilation; real SonKu adapter/core changes still require Windows tests. No Vocal Harmony, Chromium or installer dependencies.

Copy link
Copy Markdown
Owner Author

MILESTONE A — archived historical P6/P7 experimental SonKu stage (CLOSED UNMERGED). The original measured-KEMAR/XYZ study remains traceable and is not authorized as a product change. Listening-approved SonKu P9.9 was integrated to main through selective PR #733; older geometry research was never to be bulk-merged. Source branch feat/sonku-music-integrity-p6-rt-20261114 and exact SHA f8151d521f9ce9208ff4b342fa66f1422882e06e; original PR target feat/sonku-music-integrity-p0-20261113. Registry: docs/governance/MILESTONE_A_PR_BRANCH_RECONCILIATION_20261117.md on chore/milestone-a-pr-history-20261117. This closure does not delete source, alter checkpoint refs, merge code, retune audio, or change release. Reopen only for a separately approved verified feature.

@masarray masarray closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant