Skip to content

SonKu P8.9 (DRAFT): room-anchored stereo — protect music and reduce in-head far-field SIDE - #716

Closed
masarray wants to merge 11 commits into
research/sonku-p88-perceptual-height-distance-20261115from
research/sonku-p89-stereo-room-depth-20261115
Closed

masarray wants to merge 11 commits into
research/sonku-p88-perceptual-height-distance-20261115from
research/sonku-p89-stereo-room-depth-20261115

Conversation

@masarray

Copy link
Copy Markdown
Owner

Native real-audio headphone candidate — no merge/release until perceptual FAT

Source-rooted defect: P8.8 improves spectral HRTF ear-height and direct distance but returns >220Hz stereo SIDE directly to L/R headphones without any far-distance coupling. This preserves anti-phase stereo but is a plausible source of inside-head/too-near music at 7.3m. Prior P8.3 physical speaker full 2x2 mix was explicitly rejected due to music phase and sound degradation. This is NOT revived.

New opt-in mode8 P8.9, isolated on exact P8.8 FAT SHA, with all earlier modes unmodified. At 1.6m or ROOM OFF, exactly P8.8. At far distance only, preserve >=78% original high-SIDE headlocked energy, transfer up to +24% focus toward already measured directional four-horizontal-wall KEMAR early reflections, and up to -8% to diffuse FDN tail. At the user's 7.3m these adjust approx .804 SIDE, 1.214 ER, .929 diffuse. Measured wall directions/ITD/ILD/head yaw unchanged, floor/ceiling P8.6 suppressed, P8.7 musical air+LF body and P8.8 distance/height intact. No extra FIR, no new callbacks, no recording, no device graph changes, no added reverb blanket boost. This is a testable psychoacoustic hypothesis grounded in externalization research, not a guaranteed subjective improvement.

Native schema v10 maintains exact 63-byte v9 .smix state; P8.8 v9 restores mode7 and original HRTF trim, v1-v8 sessions/old P8.3 rejection unchanged. GUI selector capability-gated on actual v10 readback and ACK; P8.9 uses existing EAR HEIGHT ALIGN and scene controls, no GUI rollbacks or forced preset/session changes. Documented in docs/SONKU_P89_ROOM_ANCHORED_STEREO_20261115.md.

20 scoped native tests planned: original P8.4->P8.8 golden tests, new 44.1/48k P8.9 64/128 PCM parity, source ROOM OFF and near1.6 P8.8 bit-equality, 7.3m anti-phase music stays loud, increased directional early component, no new clipping, real JUCE v10 audio-applied ACK, legacy v9 P8.8 state, Windows PE/GUI provenance ZIP. Must pass successful Windows Actions run before a FAT download is promoted. Live device/ASIO/headphone hearing NOT yet physically proven.

DO NOT merge research branch ancestry into current main: it contains dormant user-rejected P8.3 code. Separate I/O sleep/wake P0 PR #713 and concurrent GUI work must remain untouched. No claim of achieving dearVR parity without user listening.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 036b7b5
Status: ✅  Deploy successful!
Preview URL: https://a913996b.arsonmix.pages.dev
Branch Preview URL: https://research-sonku-p90-external.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

P8.9 source test proof (branch commit 036b7b52b36c7b5ea95505feef6138531566abd5)

Actual native PCM + JS preflight SUCCESS run #43684210776, 44.1 and 48 kHz, 64/128 PCM chunk parity, stereo correlated and antiphase, room0 and close1.6m bit-exact P8.8, 7.3m LARGE far stage on measured KEMAR directional reflections, no zero output/NaNs/clipping. Logged:

P89_DEPTH_RATE,44100,anti_side_ratio=0.779518,ER_ratio=1.468137
P89_DEPTH_RATE,48000,anti_side_ratio=0.778507,ER_ratio=1.467432
PASS P89 ROOM ANCHOR: 44.1/48k exact P88 OFF and close-field, live far directional ER vs headphone SIDE, phase-safe MUSIC, 64/128
SONKU_P89_NATIVE_FUSED_FIR_DISPATCH_VERIFIED

The far stereo anti-phase total output retains ~78% energy compared with P8.8, not a mono collapse, while directional early-reflection component energy increases ~46.8% (gain amplitude ~21.4% at 7.3m). This is an acoustic-energy/relative-weight experiment, not proof of better perceptual externalization. Existing P8.2/P8.4/P8.5/P8.6/P8.7/P8.8 PCM remains unchanged in code. A core bug discovered by first failed test (mode8 missing from fused HRIR dispatch) was fixed in bcb07f8; a followup dry-mix assertion was corrected to test post-smoothing settled dry audio instead of comparing intentional startup transitions. Actual Windows JUCE v10 and 20-test/portable ZIP gate still required; no merge/release.

For owner FAT, ROOM OFF must sound identical P8.8->P8.9; ON with distance 7.3m should move part of horizontal stereo image toward room reflections without thinning bass or washing out highs. Since headphones/individual HRTF/audio routing are not connected to CI, no hearing/ASIO result is claimed.

Copy link
Copy Markdown
Owner Author

P8.9 native Windows FAT — FINAL VERIFIED ARTIFACT (no merge, no public release)

Source commit (exact): 036b7b52b36c7b5ea95505feef6138531566abd5. GitHub Actions run 43684210776 SUCCESS with 20/20 scoped Windows native CTests; real JUCE v10 audio-applied ACK and legacy v9 P8.8 save/restore PASS. Windows mixer AR MIX Studio.exe built; packaged ArSonMix-GUI10CH-P012-Windows-x64.exe is actual x64 PE (machine 0x8664; 15,067,136 bytes). Embedded /preview/ resource byte-for-byte verification PASS; MIT KEMAR notice and field guide included. No physical headphone/ASIO/audio device playback tested in CI.

Portable FAT artifact: ArSonMix-SonKu-P89-Room-Anchored-Stereo-Windows-x64-43684210776, artifact ID 14149927694, size 15,123,374 bytes, expires 2026-12-06. Independently downloaded/verified: ZIP CRC clean, 10 entries, win64 PE verified, BUILD_PROVENANCE.json sourceCommit equals exact SHA, stateSchema=10, p89StereoRoomDepth=true, p88PerceptualAlignment=true, publicRelease=false, preserved modes 0/3/4/5/6/7/8, portable_mode.txt, field FAT and license notice. Actual ZIP SHA256 bff3fa23263ddf9205ef6a595b11fd973577845550f36a1db5a052ceb7379078 matches Actions uploader log.

Scope qualification: 20 targeted native CTests PASS (the artifact's generic fatStatus=FIELD_PREVIEW_FULL_CTEST_NOT_RUN truthfully means the entire unscoped project CTest suite was not executed, not that the 20 SonKu tests failed). P8.9 room ON 7.3m measured horizontal ER component energy ≈1.468× P8.8, music anti-phase output energy ≈0.779× P8.8; ROOM OFF and 1.6m ROOM ON bit-identical P8.8. No claims of perceived immersion, correct head height, actual ASIO output, or dearVR parity before owner headphone FAT.

Owner A/B: new portable folder, retain portable_mode.txt; STATIC, head yaw0, 60° spread, SOURCE ELEVATION physical0°, HRTF EAR HEIGHT ALIGN same in P8.8/P8.9. ROOM OFF should be identical. With LARGE at 7.3m compare 100% ER and 47% then 100% reverb; use consistent gain and level-match; evaluate direct punch, bass, vocal image, stereo antiphase, height and in-head distance. Revert to P8.8 if front stage collapses or loses detail. Do not merge this historical P8.x research ancestry into latest main (includes dormant rejected P8.3); keep separate from P0 I/O continuity #713 and GUI release changes.

Copy link
Copy Markdown
Owner Author

Owner P8.9 headphone FAT: 6.7 m in SonKu sounds only about 3 m in dearVR (qualitative, not a universal conversion)

Owner screenshot: CHAMBER 14.4 m; source 6.7 m; stereo spread 104deg; physical elevation -0.2deg; KEMAR EAR HEIGHT ALIGN -19.4deg; head yaw 0; ORBIT active 10sec; reflections/reverb both 100%; spatial mix 100%; full-output gain +3.5 dB. This is a real perceptual gap despite improvement in externalization.

Verified code defects / limitations

  • Settings and JS defaults still start in renderMode=0 (P8.2), ROOM OFF, distance 1.6 m, moving=true, despite stored reflections 55%, reverb 30%. Useful legacy compatibility, poor default external speaker audition. Never overwrite existing .smix.
  • P8.9 current native distance law at 6.7 m: direct HRTF = 1/(1+0.275.1)=0.4207; LF direct = 1/(1+0.105.1)=0.6623. SIDE depth scaler = 1-0.22*5.1/6.4=0.8247 but 104deg WIDTH multiplies SIDE by 1.25, yielding 1.0309× headphone-headlocked SIDE relative to a 60deg/1.6m reference. Therefore SIDE is effectively not farther in this screenshot, while direct HRTF is already ~0.42. Global output gain +3.5dB amplifies all paths and is NOT the direct gain/DRR control dearVR uses. This is a strong source-derived explanation for proximity.
  • P8.9 only adds up to +24% measured directional early-reflection emphasis and subtracts up to 8% diffuse FDN; still no calibrated frequency-dependent direct/ER/tail ratio, measured DRR, or IACC constraints. Reverb 100% can wash out focus. CHAMBER at radius6.7m reaches within 0.5m of walls along axes; ORBIT makes reflections change.
  • KEMAR trim -19.4deg is generic spectral elevation lookup, not physical source height or distance. Externalization/distance are individual headphone/HRTF-dependent. Test static 60deg spread to isolate, keep speaker physical elevation around 0.
  • Screenshot includes dearVR PRO 2 preceding SonKu and active-looking MASTER inserts; verify bypass, one spatializer at a time, and level matching. No claim that gray dearVR power control is active.

External independent research

Effective engineering next step (not implemented yet)

  • Do not simply lower volume, widen reverb or add another HRTF; implement isolated opt-in distance-coherent headphone SIDE / LF / direct / directional ER balancing with strong phase/treble/bass guardrails.
  • Before algorithm edits measure band-limited DRR, IACC, first-arrival timing and each branch energy with real PCM at 1.6/3/6.7/10m, az 0/90/180, yaw 0/90/180, speaker spread60/104, 44.1/48k, buffers64/128, mono/correlated/antiphase. Require monotonic distance cues at matched loudness, no silence, LF punch or treble detail loss, realtime safety and old-mode bit parity.
  • Provide useful opt-in first-use 'Factory Music Stage' preset (STATIC, ~60deg, 0deg physical elevation, moderate ROOM wet, P8.9 if native v10 confirmed), without auto-mutating saved sessions/legacy modes/current GUI or P0 I/O continuity.

Evidence scope: read-only source audit, NOT a claimed repair, not a dearVR subjective parity claim. Keep PR #716 draft. Existing Windows run #43684210776 passed 20 scoped CTests for prior P8.9 candidate, not the yet-unimplemented calibration.

Copy link
Copy Markdown
Owner Author

Critical externalization architecture audit — owner P8.9 still weaker than dearVR PRO 2

Sources inspected directly: locked P8.9 head 036b7b52b36c7b5ea95505feef6138531566abd5; engine/builtin_fx/sonku/SonKuP84FusedMusicHrir.h, SonKuSpatialCore.h, SonKuMeasuredHrir3D.h, SonKuEarlyReflections.h, SonKuMusicalReverb.h; official dearVR PRO2 manual 2024 https://files.plugin-alliance.com/products/dearvr-pro-2/dearvr-pro-2_manual.pdf pp. 8-19; Sennheiser Clarity explainer https://help.sennheiser.com/hc/en-us/articles/27424692616594-How-to-produce-natural-immersive-music-with-the-CLARITY-modul-of-dearVR-PRO2 ; Trends Hear 2026 frontal BRIR https://pmc.ncbi.nlm.nih.gov/articles/PMC13451706/ .

Highest-confidence source-verified deficits

  1. Core architectural limiter: p84::FusedMusicHrir::prepare(rate, strength=.12, cutoffHz=750) and merge: each stereo speaker FIR Hspeaker_effective = Hcenter + 0.12 * HPF_750( Hspeaker_measured - Hcenter ) (conceptually; actual time-domain one-pole implementation). P8.9 still calls the same blend, which favors one central measured KEMAR source over direction-dependent L/R speaker localization. Increasing GUI spread to 104deg does NOT produce two fully directional virtual loudspeaker HRIRs. This .12 was intentional to protect music after rejected P8.3 phase/comb problems. A blind increase will repeat regression.
  2. Head-locked competing reference: high-passed stereo sideRescue is explicitly added as +L/-R AFTER the measured 2x2 HRIR render. At source distance 6.7m, p89SideGain=.8247 while width for 104deg gives factor1.25; product ~1.031, versus 0.421 direct-distance amplitude. A strong headphone-aligned SIDE can dominate the spatialized source. P8.9 only rebalances this .22 maximum and strengthens ER; root architecture still remains.
  3. Different distance/room controls: source-distance reduction in SonKuSpatialCore is disabled entirely when spacePreset=0. Bass, direct and SIDE use unrelated laws; wet values are a separate compensation chain. GUI GAIN outputTrim is full-output gain. Official dearVR manual p13 says Position Gain is DIRECT-only and independent of reflection/reverb; p14 Distance Scale multiplies internal processed distance; p15–17 provides real-time source-responsive six-wall ER plus separate HP/LP+gain for reflections and reverb. SonKu has neither independent direct-gain nor distance scale, and only three algorithmic FDN programs instead of 46 captured virtual acoustics. More reverb is not an externalization fix.
  4. Head-tracking: dearVR PRO2 manual p20 and Sennheiser official explain independent head tracking; SonKu headYawDegrees is only a manual setting while ORBIT animates source independently of actual head motion. This can affect world-locked externalization. Do not claim head tracking alone explains the user's static A/B.
  5. HRTF/timbre: SonKu uses generic MIT KEMAR compact 140-tap FIR and straightforward time-domain azimuth/elevation interpolation (no documented listener/headphone calibration). dearVR manual p19 states it uses several HRTFs, while its patented Sennheiser AMBEO CLARITY controls externalization vs HRTF spectral coloration, 0=max localization, 100=min coloration; exact proprietary HRTF weighting is undocumented. Do NOT claim or clone its internal implementation. The 2026 frontal NI-BRIR study shows calibrated binaural levels and early reflections can improve frontal externalization; requires careful direct/ER/late constraints, not 100% wet.

Engineering requirements before claiming externalization parity

P0: Build independently designed world-anchored spatial stereo decoder (true per-emitter direct HRIR; common-correlated MID maps to stable virtual center; decorrelated SIDE must acquire world-anchored binaural direction/distance while stereo anti-phase remains loud), with phase/arrival-time-aligned coherent filters, spectral regularization and bounded timbre preservation. No full unguarded P8.3 2x2 rollback, no 0.12-only directional filter trick, no head-locked SIDE leakage at far distance.
P1: One physical distance scene model for direct, LF, SIDE, early reflections and late tail with independent trim and distance scale; measured band-limited DRR/ILD/ITD/IACC/first 0–100 ms for 0/30/60/90/180 az, yaws, 1.6/3/6.7/10m, 44.1/48k, stereo correlated/opposite; avoid wall/room implausible geometry. Compare separate isolated stems on identical gain-matched music and impulses; optional black-box dearVR render from user's licensed plugin if available, without inspecting proprietary code.
P2: Real head yaw tracking capability + perceptually safe dynamic HRTF interpolation, listener-selectable open HRTF SOFA sets and optional headphone compensation. Offer tonal/spatial balance independently without claiming patent reproduction. Physically valid reflection geometry and optional early/late filtering/preset should follow room model.
P3: New-instance opt-in Factory External Speaker preset; do NOT change legacy P8.2 default, existing sessions, GUI style, P0 I/O work or old golden audio. Preserve mode-selection A/B; no merge/release without owner's headphone FAT.

Status: AUDIT/RESEARCH ONLY; no DSP implementation or subjective equivalence claimed by this comment. Existing 20/20 scoped CTests prove P8.9 software invariants but NOT binaural externalization quality.

Copy link
Copy Markdown
Owner Author

MILESTONE A: historical research archived / CLOSED UNMERGED. An earlier unqualified P8.x experimental candidate in the stacked SonKu research chain; current approved P9.9 production authority is selective integration #733, not this research ancestry.

Source branch: research/sonku-p89-stereo-room-depth-20261115; exact original head: 036b7b52b36c7b5ea95505feef6138531566abd5; target: research/sonku-p88-perceptual-height-distance-20261115. Frozen in docs/governance/MILESTONE_A_PR_BRANCH_RECONCILIATION_20261117.md on chore/milestone-a-pr-history-20261117. This closure does NOT import all commits, discard any work, delete any branch/checkpoint, alter audio, or authorize a public release. Future reactivation requires separately approved, scoped evidence.

@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