Skip to content

P0 SonKu native audio: prevent anti-phase stereo cancellation + dearVR quality-gap research - #674

Closed
masarray wants to merge 44 commits into
mainfrom
feat/sonku-music-integrity-p0-20261113
Closed

masarray wants to merge 44 commits into
mainfrom
feat/sonku-music-integrity-p0-20261113

Conversation

@masarray

@masarray masarray commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Owner field problem

8D-SonKu lacks dearVR-style externalization, apparent distance and musical tonal integrity. Owner reports extensive audio cancellation. The public alpha.23 is the unaffected baseline; do not alter its tag or user installer.

Root cause proven in source

SonKuSpatialCore accumulates two directional measured KEMAR HRIR-filtered source channels into each ear: ears[0] += L*H0L + R*H1L, similarly right. At 0° stereo spread the filters match; any anti-phase stereo L=-R cancels exactly, even when neither input is silent. At nonzero spread similar low-frequency responses still permit partial cancellation. Not a CSS/PNG problem.

Implemented P0 experiment

  • New SonKuStereoIntegrity.h fixed-state per-instance correlation gate: ~20ms evidence, -0.78/-0.55 hysteresis, 15ms slew, silence reset, bounded inputs. Inject a bounded side = (L-R)/2 after binaural/room summing only when strongly negatively correlated. Audio PCM remains one native JUCE callback. No third-party code or impulse response copied.
  • ROOM OFF and native ROOM ON share the guard. Gain/mix scaling and existing scene limiter apply. Exact L=R source impulse and spatialMix=0 preserve previous path; v1/v2 .smix, identity, GUI bridge, native SPSC ACK and WIRE untouched.
  • C++ test at 44.1/48k: KEMAR center impulses, FRONT/RIGHT/REAR/LEFT anti-phase ear RMS threshold, peak bound, chunk parity, ordinary positive stereo no-op, silence fade and restart.
  • Three exact-core original lossless 48k/16-bit stereo WAVs: positive FRONT, anti-phase FRONT and anti-phase REAR for headphone A/B, with identical 4s synthesised input level. These are not real copyrighted music.
  • Scoped native audio / benchmark CI only, no unrelated Chromium, Windows installer, SDK download, or release. The existing SonKu GUI branch gate is preserved for future GUI work.
  • Research/quality roadmap: official dearVR PRO 2 manual, Sennheiser Clarity, peer-reviewed externalization and 3D/BRIR/head tracking. Our own algorithm, not AMBEO patented implementation.

Deliberate limitations

This is a protective stereo bed, not a magic externalized BRIR; by itself it can sound partly head-locked and does not fix all HRTF coloration or distance perception. Do not say dearVR-quality or merge into public main without user headphone listening, matched-source subjective tests, normal-music tonal verification and ASIO CPU/field approval. Subsequent P1 spectral compensation and P2 directional reflection/HRTF personalization require separate evidence.

Acceptance

Exact-source Fast UI native PCM, targeted audio WAV output, deterministic waveform parity, same-runner informational CPU benchmark, and source/regression CI. Never rewrite licensed HRIR or control ABI.

P0.2 objective comb-filter repair (implemented + tested)

  • A second deterministic failure is in-phase L=R stereo through two offset HRTFs at 60° spread. HRIR 48k DFT from the actual published KEMAR bank yields ~7.2 dB FRONT and ~11.6 dB REAR comb losses at 2 kHz versus the single center-angle KEMAR.
  • Per-processor coherence detector (positive >.80 engage, <.55 release; 20ms evidence/15ms slew) steers the audio MID toward a measured centered HRIR by correcting only the four existing per-source FIR coefficient targets every 16 frames. Precisely H_L'=H_L+mu*(H_center-(H_L+H_R)/2) and same for H_R'; the side difference H_L'-H_R' remains unchanged. No third per-sample convolution, extra audio graph, ABI/state/GUI change. The P0 negative-coherence stereo side rescue remains separate.
  • Actual same-compiler same-source alpha.23 baseline vs candidate PCM A/B (Action #43446354590), immutably pinned to main predecessor 4a6e47e2905a4aa995f879045a907abee8b1aae5: FRONT coherent/spread60 +7.19 dB at 2kHz; REAR coherent/spread60 +11.64 dB at 2kHz. Anti-phase FRONT and REAR/zero spread recover RMS 0.04922 each ear from a near-zero prior output. Original coherent center/spread0 byte-exact. Native C++ 44.1/48k tests and PCM chunk parity PASS, plus original 5×4s generated sample matched 48k/16bit WAV per version and 10 WAVs + objective metrics artifact.
  • Native audio-only CI (no unnecessary Chromium or Windows installer) and informational runner-local CPU Action #43446354590 PASS. This is mathematical music preservation, NOT proven dearVR externalization or physical ASIO parity.
  • Roadmap + evidence in docs/SONKU_DEARVR_QUALITY_GAP_AND_MUSIC_INTEGRITY_20261113.md; further HRTF/BRIR, DRR, spectral calibration, head motion and human blind A/B remain explicit release blockers. Keep this PR draft until owner headphone/Windows tests.

P1.0 analytical frequency coverage (follow-up checkpoint)

Added tests/sonku_hrir_spectral_audit.cpp and an audio-only CI step. It analyzes published KEMAR coefficients at 380 combinations (44.1/48 kHz × five azimuths × two ears × 19 frequencies from 125–8000 Hz); reports original coherent MID coloration and verifies exactly centered response and unchanged stereo-SIDE transfer after algebraic correction. The Action artifact includes a downloadable KEMAR-SPECTRAL-AUDIT.csv. No realtime FFT, extra convolution, GUI control, state ABI change or patented code. This is not externalization qualification; blind headphone/dearVR matched A/B remains necessary. This checkpoint must pass before merge.

…red HRTF + room authority

Add callback-owned hysteretic energy/cross-correlation recovery of input M/S difference after binaural convolution, never mono-summing that content. Active only for strongly negative correlation, gain-slewed, finite/RT-safe; zero for correlated source and spatialMix=0. Apply to ROOM-OFF, experimental distance and native SPACE branches with consistent output trim, reuse scene limiter, preserve JUCE state/ACK ABI.
…PCM chunk parity at 44.1/48k

Numerical tests exercise native impulse, FRONT/RIGHT/REAR/LEFT collapse rescue, independent L/R, 128-frame chunk parity, finite peak guard, positive-correlation no-op, silence reset, device prepare and spatialMix=0 dry identity.
…evidence

Render original harmonic material at matched time/level as coherent front, anti-phase front and anti-phase rear with exact native core. Do not normalize WAVs or claim dearVR externalization.
…, not Chromium/Windows FAT

Use existing native core fixture in Fast UI plus a separate original three-WAV evidence and same-runner CPU benchmark. Full UI runner still protects GUI-changing SonKu branches. No network HRTF fetch or slow native installer blocks.
@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5ae4d88
Status:⚡️  Build in progress...

View logs

…ase side

Use the existing per-sample 20ms correlation evidence for complementary positive-coherence hysteresis; no extra buffering, allocation, or new thread. Expose coefficient correction target strength to native FIR scheduler.
Prevent coherent stereo comb nulls by steering common L/R content toward measured center HRIR, while algebraically preserving left-minus-right directional transfer. Hysteretic coherent evidence ramps weights; coefficient updates remain on existing 16-frame cadence and 6ms per-tap slew. Reuse same two native source convolutions, SPSC/graph and state ABI.
…comb notch

Assert per-ear 48k KEMAR spectrum old 60-degree stereo sum has a deep notch; coherent native FIR now converges to center HRIR within 14%, retaining side difference and preserving partition/phase/mono guards at 44.1/48k.
…23 baseline

Use compile-time pinned baseline include only in the offline tool (never native JUCE) and add 2k harmonic plus 60-degree coherent FRONT/REAR cases. Existing full listening suite remains supported.
…3 in 5 matched WAVs

Sparse checkout only immutable baseline SonKu headers; compile both native cores and assess exact coherent center, directional 2kHz comb recovery, anti-phase L/R RMS and peak safety. Keep benchmark same runner and upload both sides without Windows/Chromium rebuild.
…-FIR Mid/Side correction

Document exact-phase cancellation, frequency-domain KEMAR comparison, invariant side transfer, bounded coherence ramps, matched baseline native WAV evidence and explicit limits beyond a real BRIR.
…itrary PCM block splits

Assert native Chamber 5m reflection+FDN still preserves both ears, phase/finiteness, bounded peak and exact 16k-sample 256-frame partition parity.

Copy link
Copy Markdown
Owner Author

SonKu P1.1 mixed-frequency music integrity — verified engineering checkpoint (2026-11-14)

Current draft head: ba11faf82e1b1d484b7a818825f86be3dba90328. This is continuation of PR #674, not a merge or public release.

Actual source-level change

  • SonKuStereoIntegrity.h: keep P0 broadband anti-phase/coherent MID behavior; add three complementary prepared analysis bands (260 / 2600 Hz) and independent 20ms correlation evidence / -0.78:-0.55 hysteresis / 15ms smoothing. This protects frequency-local stereo phase when a louder coherent instrument masks it in a full-band correlation score. No JUCE graph, IR, FIR convolution, .smix, FX ID, or GUI change.
  • Regression caught by the real CI on first commit: filtering memory emitted a tiny protected side signal on exact zero PCM; corrected to retain state while returning exactly 0 when both input samples are digital silence. Existing native test now passes.
  • New isolated 44.1/48k C++ regression for coherent bass + inverted treble, and reverse polarity. Sixth original 48k/16bit WAV pair uses coherent 220Hz and inverted 3200Hz instruments. Baseline/candidate source and compiler are matched.
  • ADR: docs/SONKU_ADR_P1_1_MULTIBAND_PHASE_INTEGRITY_20261114.md.

Evidence: PASS

  • Run #43524526143 success, all scoped native test/PCM/380-point KEMAR/CPU artifact steps pass.
  • Mixed-polarity high-band 3200Hz: baseline near-zero (<0.0002 amplitude), candidate >0.006 (both ears); coherent 220Hz bass delta <0.25 dB. These are verified test thresholds, not unreported exact values or perceptual ratings.
  • Existing P0 results retained: FRONT +7.19 dB and REAR +11.64 dB 2kHz coherent response versus baseline, anti-phase FRONT/REAR RMS 0.04922 per ear, central coherent 0° spread byte-exact.
  • Six candidate + six alpha.23 baseline WAVs, numeric objective JSON and the 380-row spectral CSV: artifact #14083314097.
  • CPU in runner Linux at 48k/128 frames: HRTF-only 55.211ms for measured benchmark window, early-room 61.395ms, late-room 67.335ms. These are same-runner informative benchmarks, not physical ASIO p95/p99 or musical quality.

Gate NOT YET MET

The recovered side may remain head-locked; cross-band changes may affect width/tonality. No blind matched-level SonKu vs dearVR listening, personalized licensed HRTF, real BRIR/elevation, verified physical FRONT/REAR externalization or ASIO XRUN measurements. Keep PR draft. No main merge, release or claim of dearVR equivalence.

Independent science/vendor context: official dearVR PRO 2 manual; SOFA/AES69; 2026 BRIR/externalization study; Steam Audio documentation; ITU-R BS.1116. The algorithm in this PR is independent SonKu work, not reverse-engineered proprietary dearVR/AMBEO code.

Copy link
Copy Markdown
Owner Author

P1.1 Final verified CI + callback percentiles (2026-11-14)

Head a1e6a124e0290e2aba2615fbcd66daf22f894ab5 · scoped CI success #43525395200 · 12 native baseline/candidate WAVs + metrics + KEMAR CSV artifact.

  • Six exact-source original 48k/16bit A/B fixture pairs PASS against immutable public alpha.23. In mixed-polarity fixture, inverted 3200Hz part is exactly null in baseline (0.000000) but candidate amplitude is 0.018293 each ear. Coherent 220Hz bass difference reported 0.0dB; interaural treble phase -180.0deg; sample peak -22.86dBFS. All are numerical PCM measurements, not listening quality scores.
  • Existing P0 coherent 2kHz repair preserved (+7.19dB FRONT and +11.64dB REAR at 60deg stereo spread). KEMAR audit 380 source-transfer points PASS. Existing positive-center and digital silence behavior PASS. Fast UI/native source tests PASS.
  • New informational per-block measurements, 48kHz Linux hosted runner, native SonKuSpatialCore 3 virtual sec, using per-callback time from outside process:
Block HRTF-only p50 / p95 / p99 (microseconds) HRTF+early-room p99 (us) HRTF+ER+late FDN p99 (us)
64 18.547 / 23.304 / 26.942 29.324 36.696
128 36.329 / 51.134 / 54.817 66.495 69.510
256 69.665 / 94.220 / 103.450 116.824 115.922
512 147.161 / 214.057 / 233.907 231.108 234.821

These are isolated runner samples, not ASIO callback deadlines, Windows XRUN counts, performance comparison to the same-runner previous alpha.23, or full WIRE+VST3 graph proof. The benchmark adds no callback allocation. CPU estimates are informational, not a release gate pass.

Technical honesty / next gate

Current protective stereo side remains partly head-locked. The room model is four-wall planar reflection with an ITD/ILD approximation, not multi-elevation, HRTF-convolved directional BRIR. dearVR PRO 2 manual documents directional early reflections incl. floor/ceiling and separate dry/reflections/reverb, while Sennheiser discloses proprietary Clarity as a timbre/externalization tradeoff; no proprietary code/data has been copied. New 2026 NI-BRIR human listening research (Shen & Wang, Trends in Hearing, doi:10.1177/23312165261468752) also supports treating frontal externalization and early-reflection balance as a separately measured challenge, not a generic reverb increase.

Next acceptance gate should evaluate licensed 3D SOFA/AES69 HRTFs and directional reflection/BRIR candidate in isolated A/B with HRIR ITD/ILD, binaural phase, DRR, loudness/headroom, crossfade continuity and CPU p99, followed by matched-level, blinded human headphone comparison SonKu/dearVR/original stereo. Leave #674 draft; do not merge or release on synthetic PCM CI alone.

Copy link
Copy Markdown
Owner Author

P2.0 Directional early reflections — independently derived, implemented, tested (2026-11-14)

Active draft head: 395e2fbad2e4dc368600ad47d452e0bfab3bfc09.
Exact CI: Audio native + WAV + KEMAR audit #43529789147 SUCCESS.
Evidence: candidate WAV, full objective JSON and unchanged P0/P1 reference WAV artifact #14085884839.

Verified source root cause

SonKuEarlyReflections modeled first-order image-source wall paths, but sent room audio to ears using only a synthetic 0.31ms ITD and simple ILD ratio. Real reflection-arrival directions did not impart the measured KEMAR spectral/phase response, a plausible reason for weak FRONTAL/REAR room cues. Existing SonKu HRIR bank is 0° horizontal only and thus does not justify claiming floor/ceiling/elevation.

Actual DSP implementation

  • engine/builtin_fx/sonku/SonKuEarlyReflections.h: optional/offline image-direction HRIR renderer within the SAME native SonKu room instance, reusing the existing four-wall geometry, two image-source emitters, source distance, pressure law, 64-frame geometry clock, fractional room delay, ring memory, and prepared smoothing. Each image-source arrival angle is converted to a measured 5° KEMAR horizontal HRIR (left/right mirrored as appropriate), with full 140 tap (128 at 44.1k zero padded) convolution. Existing fake ear ITD/ILD are not added again. Default lightweight path remains unchanged.
  • SonKuSpatialCore.h: offline-only setDirectionalEarlyReflectionsHrir pass-through; no JUCE plugin/GUI/session/ACK/smix schema or routing change.
  • tests/sonku_directional_reflections_test.cpp: 44.1/48k measured HRIR mirror, causal first arrival, ROOM OFF, active-mode switch rejection, moving-orbit PCM 64/256 chunk parity with opposing high notes, and physical near/far wall-arrival ordering all PASS.
  • tools/sonku_offline_listening.cpp / tests/sonku_directional_reflections_audio_audit.py: four lossless 2s A/B WAVs FRONT/REAR, same synthesized four-tone source and unchanged direct KEMAR. They verify bit-identical PCM before the first reflection and measure ear RMS, sample peak and 165/660/2200/4700Hz harmonic transfer changes.
  • Architecture, research provenance, and performance decision: docs/SONKU_ADR_P2_DIRECTIONAL_REFLECTIONS_20261114.md.

Objective facts, not subjective claims

  • All six existing music-integrity alpha.23-vs-candidate WAV tests PASS. KEMAR 380-source-frequency audit PASS. P2 four new A/B WAVs, mirror/orbit/near-far regressions PASS.
  • FRONT output RMS light 0.040785 → directional 0.039434; REAR light 0.032748 → directional 0.031777. This is a DIFFERENT room transfer, NOT a proven externalization improvement.
  • Four source-harmonic amplitude changes in FRONT: 165Hz -0.753dB, 660Hz -0.101dB, 2200Hz -0.239dB, 4700Hz -0.073dB; REAR: -0.819, -0.083, -0.128, +0.085dB (both ears nearly symmetric for mono FRONT/REAR). 1.5dB engineering review heuristic did not flag this synthetic case, but that is NOT tonal transparency for actual music.
  • Linux hosted runner 48k/128 / 3s source: light ER 50.034ms vs measured reflected HRIR 295.553ms, ratio 5.907; candidate callback p99 301.443µs. Earlier same design runs produced ratios 4.634 and 4.447. These are host-local, noisy, not exact Windows ASIO or complete ArSonMix WIRE+VST3 CPU.
  • A doubled mirrored-ring optimization only changed a same-runner ~4.634x→4.614x comparison while requiring +64KiB/instance: rejected and reverted, not presented as a performance improvement.

Research-grounded basis and explicit limitations

  • dearVR PRO 2 official manual §§2.1/3.2 documents six-surface early reflections and externalization relevance, but not proprietary algorithms/IR. No copied dearVR/AMBEO code/coefficients.
  • Steam Audio official documents directional HRTF and geometry reflections, with CPU costs.
  • Meta spatial audio guide explains spectral pinna front/back cues, and head-motion disambiguation.
  • SOFA/AES69 for future licensed multi-elevation HRTF/BRIR datasets.
  • This is horizontal first-order reflected HRIR, NOT physically complete 3D BRIR, six-wall image acoustics, head-tracked, individualized, truly measured live headphone externalization or dearVR parity. Output A/B listening tests have not been performed by a human.

Decision

KEEP PR #674 DRAFT; no main merge, public release or default GUI activation. P2 is an actual source-level engineering milestone but the ~4–6x CPU cost versus the light mode is a real release blocker. Next: independently validate lower-cost directional convolution (with same PCM/spectral/ITD/ILD transfer and moving source fidelity), bring licensed multi-elevation SOFA HRTF and six-surface BRIR where permitted, and perform matched-loudness blinded headphones with dearVR PRO 2 and original stereo, followed by Windows ASIO p50/p95/p99 + XRUN and actual native graph WIRE/VST3 FAT. Only publish after audible preference and reliable hardware proof.

Copy link
Copy Markdown
Owner Author

P3.0 SonKu source-direction fusion — VERIFIED native DSP and exact PCM (2026-11-14)

GitHub SHA: 96763f014ae9fff8c6169b056e4261417b82ac21
Actions: #43533851250 SUCCESS, including scoped native regression, CPU, KEMAR spectral 380, prior P0/P1 baseline-vs-candidate native WAVs and P2 room tests.
Evidence: Download four P3 reference/fused FRONT/REAR WAVs, phase-integrity files and per-harmonic JSON.

Science / operator context

  • Official dearVR PRO 2 user manual §§2.1,3.2 specifies moving-image geometric early reflections and six boundaries, not a published algorithm. Steam Audio hybrid/convolution/parametric guidance shows CPU–quality tradeoffs and optional binaural reflections. NO proprietary IR, code or unaudited claimed parity used here.
  • The incumbent approved GUI already has position source markers, SPREAD, SPATIAL MIX, Gain, ROOM OFF/SQUARE/CHAMBER/LARGE, distance, independent reflections and reverb and native per-edit ACK/readback. Do not add a fake “dearVR quality” or P3 toggle to the UI: the mode is OFFLINE only.
  • In zero stereo spread, two room image paths and the measured 140-tap KEMAR HRIR are exactly identical for any input stereo channels, including independent and anti-phase. By convolution linearity, one reflected-source FIR on L+R replaces two; direct HRTF and upstream P0/P1 side integrity unchanged. For spread != 0, fall back to original two independent HRTFs and disarm until reset. No FFT, heap, unsafe data races, device callback, .smix schema or routing authority changes.

Reproducible objective findings

  • Four native 2s FRONT/REAR P2-vs-P3 WAVs: 0 PCM sample LSB difference, 0.0 RMS difference, 0.0dB amplitude difference at 165, 660, 2200, 4700Hz on both ears. This is exact source PCM identity for these fixtures, not universal precision or psychoacoustic proof.
  • At both 44.1k and 48k, moving azimuth from 0 through 360, pure mono, independent L/R, L=-R, coherent bass with inverted treble, plus an active 0°→60°→0° spread edit, bounded P3 wet-output difference < 3e-6 RMS and < 2e-5 peak (source-level C++ tests). The L=-R zero-spread reflected wet field correctly vanishes; upstream P0/P1 stereo protection is independent and continues to PASS.
  • Same-runner native 48k/128/3s benchmark initial run #43533510068: P2 full 0° 263.289ms vs P3 fusion 0° 178.636ms, ratio 1.474×, per-block p99 250.590us → 176.808us. Latest #43533851250: P2 0° 305.067ms vs P3 215.946ms = 1.413×, p99 287.974us → 208.577us. Not a Windows ASIO or complete WIRE/FX session measurement. P3 60° unchanged full mode, ~306.021ms on latest host runner.
  • P0/P1 music-integrity 6 fixtures, P2 four room A/B, 380-point 44.1/48k KEMAR audit: all PASS. Build route for current GUI fast contracts also PASS. main/alpha.23 unchanged; PR remains draft.

Next actual barriers, not marketing

  1. Continuous native source-spread 60° reflections still ~4–6× lightweight ER; investigate preserving full measured transfer while accelerating independent 8-path FIR (prepared filter banks / optimized vectorized convolution), not tail truncation: analysis of licensed MIT KEMAR bank reveals large spectral errors (frequently >1.5dB) if blindly shortening 140 taps.
  2. No licensed multi-elevation HRIR/BRIR implemented: horizontal KEMAR cannot legitimately simulate floor/ceiling pinna signatures or true 3D elevation. Research and license-check SOFA/AES69 set first, then add actual six-wall geometry only when datasets support it.
  3. Headphone matched-loudness blinded FRONT/REAR and distance ordering, timbre/sibilance/noise and complete Windows ASIO p99/XRUN/fader/WIRE tests remain prerequisites for default enabling. P3 work does NOT justify merging/releasing.

Decision: maintain draft #674 and published public alpha.23 intact. P3 is tested native optimization of P2 for zero source spread, not proof that SonKu now equals dearVR PRO 2.

Copy link
Copy Markdown
Owner Author

2026-11-14 P4 / P5 verification — native 60° HRIR CPU optimization and no-ghost room reactivation

Verified draft HEAD: 5ae4d8889618c893a8b90a67ad627a6190f782e8; exact full scoped run #43537831749 SUCCESS, with reproducible 14+ WAV baseline and P2/P3/P4 evidence, metrics and KEMAR 380 audit.

Implemented native DSP, not cosmetic progress

  1. P4: SonKuEarlyReflections.h optionally selects a contiguous single-span 140-tap FIR history read in (write-integerDelay)&8191 >= 140, the ~98.3% common case. The remaining wrap region stays on the original masked ring loop. Both ears' exact measured KEMAR HRIR tap set, per-sample smoothing, physical image-source delays and first-reflection level law remain. It uses neither a 2× delay-ring copy nor a shortcut/tap-truncation. One native PCM authority, no second WebAudio engine or plugin UI/state/ACK/WIRE change.
  2. P5: setRealtimeRoom previously reset validFrames_ when ROOM OFF→ON, but experimental directional convolution ignored freshness and could revive old audio in the uncleared ring. The new fractional-delay-aware per-tap guard uses freshTaps=clamp(validFrames-integerDelay,0,140) only during the input-history warmup; it still advances all ear filter smoothers. Thus ROOM reactivation with silence emits exact silence without a 64KiB ring clear on callback; new impulses generate causal reflections. tests/sonku_p5_room_reactivation_test.cpp PASS for 44.1/48k, spread 0/60/120, P2/P4, true ON→OFF fade→ON. Existing P0/P1/P2/P3/P4 regression remains PASS.

Measured evidence: stereo spread 60°, 48k/128, same-runner, 3 seconds

Three independent GitHub Actions hosted-Linux comparisons:

  • #43536803506: P2 723.042ms, P4 437.188ms = 1.654×, p99 666.749→470.390µs.
  • #43537446588: P2 542.471ms, P4 359.446ms = 1.509×, p99 524.302→383.519µs.
  • #43537831749: P2 627.221ms, P4 315.156ms = 1.990×, p99 613.428→370.849µs.
    Host variance is substantial: never label these as Windows ASIO deadlines or universal speedups.

Native C++ 44.1/48k, 0/60/120° stereo spread, moving HRIR, independent input channels, transient source and three delay-ring wraps: PASS, maximum absolute P2-vs-P4 wet-signal difference <2e-6. P0/P1 old six native PCM music A/B and 380-point KEMAR broad frequency checks still PASS.

Original source 48k/16-bit eight-WAV A/B: FRONT/REAR, 60°/120°, four P2 reference vs four P4 contiguous renderings with genuinely different L/R harmonics. Numeric evidence: maximum difference 1 PCM 16bit LSB, at most 0.00104% interleaved samples differed (worst REAR 120°: 0.0000104167 fraction); stereo five-harmonic spectral change at 165/940/2200/4700/5100Hz <0.00002dB. This is not bit-identical WAV in all scenes. The initial bit-identity gate intentionally failed and was corrected into strict measured 1-LSB/0.01dB tolerance, not waived. See tests/sonku_p4_contiguous_audio_audit.py.

What research does / does not justify

  • Official dearVR PRO 2 manual pp.9,15 explains reflected source directions, source/listener relative wall distances and externalization, as well as six room planes. No reverse-engineered dearVR code/coefficients/IR.
  • Steam Audio reflected effect documentation explicitly discusses detailed convolution versus parametric or hybrid reflections as CPU/quality trade-offs; this does not establish dearVR parity.
  • Licensing finding for next multi-elevation milestone: SONICOM synthetic HRTF database #20 lists 793 directions, 320 samples in 48k SOFA but database metadata says “Rights: All rights reserved.” Repository Terms of Use has a default open-content CC BY 4.0, with the explicit caveat that per-content rights apply. Do not bundle or convert SONICOM IRs for public ArSonMix without verifying datafile license / written redistribution rights. SOFA is a format, not a license.
  • Present SonKu KEMAR is horizontal-only at elevation 0°; no valid top/bottom HRTF, personal ear model, true 6-wall 3D BRIR or dynamic head tracking is implemented. Do not claim dearVR-equivalent immersive externalization until actual headphone blind A/B proves it.

Product and release decision

Current /preview/ SonKu editor already provides source drag, spread, room type, distance, separate early/late and gain with native ACK. Do not expose a fake “Performance” switch, optional P4, speculative elevation dial or new preset now. Integrate only after matched-level double-blind headphone perception checks (FRONT/REAR, distance ranking, timbre, wide-stereo preservation), actual Windows/ASIO+FX-rack/WIRE p99/XRUN, and source/license checks for 3D SOFA.
Leave PR #674 draft. Main 4a6e47e and public release v0.5.0-alpha.23 untouched.

Copy link
Copy Markdown
Owner Author

MILESTONE A — archival closure WITHOUT MERGING. This older P0/P6/M4 SonKu native-space/room/stereo experimental PR is now historical research. The actual owner-listening-approved P9.9 production integration is merged #733; this earlier research chain is not a product release or safe merge source. Source branch: feat/sonku-music-integrity-p0-20261113 at exact original SHA 5ae4d8889618c893a8b90a67ad627a6190f782e8, original base main. Ledger: docs/governance/MILESTONE_A_PR_BRANCH_RECONCILIATION_20261117.md on chore/milestone-a-pr-history-20261117. All original code/refs/checkpoints are preserved. No branch deletion, code merge, GUI/PCM change, or release mutation. A new scoped task may reopen it after validation.

@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