Skip to content

SonKu P9.0 (DRAFT): phase-coherent two-speaker HRTF with world-locked treble, native FAT - #717

Closed
masarray wants to merge 26 commits into
research/sonku-p89-stereo-room-depth-20261115from
research/sonku-p90-external-speaker-20261115
Closed

masarray wants to merge 26 commits into
research/sonku-p89-stereo-room-depth-20261115from
research/sonku-p90-external-speaker-20261115

Conversation

@masarray

Copy link
Copy Markdown
Owner

P9.0 acoustic milestone — isolated from production

Owner issue: P8.9 fuses measured HRTF speaker contrast at only 12%, then returns high-frequency stereo SIDE directly to the headphones. Thus treble and instruments remain head-locked and SOURCE DISTANCE/ROOM cannot externalize the whole stereo field. User rejected the P8.3 physical mode due to musical phase/tone damage.

Implemented C++ native single-graph candidate:

  • Opt-in MusicSpatialP90=9 with real measured left/right source-to-ear HRTF FIRs, world/head yaw and source elevation. Removes unpositioned headphone SIDE only for P9, preserving legacy modes 0/3–8.
  • SonKuP90StereoDecoder.h uses time-smoothed interchannel correlation to apply the same coherent-center FIR correction to both source HRIRs. Algebra: MID transfer interpolates between two measured HRTFs and measured center while SIDE differential transfer is invariant; full directional ITD/ILD/pinna treble remains in each measured speaker transfer. No second audio graph, no synthetic treble boost, no minimum-phase replacement, no heap in DSP callback.
  • Retains the P8.9 distance, LF body, directional early reflection + diffuse late FDN as provisional room model, preserving prior paths. P9 is not yet proven BRIR-quality; new P90 3D/phase-aware HRIR interpolation and truly calibrated DRR/IACC are further acoustic milestones.
  • GUI new mode only appears after native prepared-XYZ capability + schema-v11 readback, is native SPSC/ACK-powered, and does not change mixer chrome or routing. 63-byte SONK state layout preserved; v1–v10 session/mode migrations remain intact.

Validation added: tests/sonku_p90_true_external_source_test.cpp uses actual C++ SonKu PCM at 44.1/48k with 64/128/256 block parity, mono/anti-phase/correlated/left-only/right-only material, 60/104/180° speaker angle, yaw, distances 1.6/6.7/10m, output finite/peak checks and analytical SIDE invariant. tests/sonku_p90_native_juce_v11_test.cpp validates actual JUCE processBlock, ACK and v1–v10 restore. New scoped GitHub Actions sonku-p90-windows-field.yml runs fast Linux preflight and full Windows JUCE GUI + CTest + checked portable artifact ZIP.

Limitations: A pair of perfectly co-located physical speakers at spread 0° cannot preserve anti-phase sound (it cancels at source); choose nonzero speaker angle for anti-phase music. Numerical/CI tests do not prove sound equals dearVR; owner must do loudness-matched headphone FAT. No public release/merge. P0 Audio I/O continuity PR #713 was merged to main separately; do not merge this P8.9-ancestry experimental branch to main or overwrite #713.

See docs/SONKU_P90_TRUE_EXTERNAL_SPEAKER_FAT_20261115.md.

GitHub Actions must pass completely before sharing a verified Windows FAT candidate.

@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: cd85ffe
Status: ✅  Deploy successful!
Preview URL: https://7bbf688f.arsonmix.pages.dev
Branch Preview URL: https://research-sonku-p91-p92-fidel.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

GUI bugfix — P9.0 render-mode dropdown flicker (2026-11-16)

Root cause verified from the shipped P9 source + operator screenshots: Native schema v11 advertises both p90Capable and p89Capable. The render() menu builder had if(p90...) ... else if(p89...) without excluding P9 from the P8.9 branch. Each ~250ms native snapshot alternately replaced <select>.innerHTML with P9 and P8.9 options. With draft.renderMode=9, P8.9 option rebuilding also made the current value appear blank.

Fix: Gate P8.9 option reconciliation with !p90Capable, and only synchronize picker.value when the requested value actually differs. No native DSP, state schema, existing P8.9 options, or mixer routing changed.

Regression: tests/sonku_p90_dropdown_stability_test.cjs executes the actual source's menu-reconciliation branch with the real combined v11 capability flags. It holds a simulated dropdown open over 40 readbacks, fails on any option rewrite or programmatic selection write, and verifies single swaps for real P9→P8.9→P8.8→P9 capability transitions. The scoped Linux P9 exact-source/PCM preflight and fast UI checks have passed for commit cd85ffee054dad6b3b752b5351d34921ddc92717.

A rebuilt Windows portable FAT must be used to test the operator GUI, as the prior 43200daa executable embeds the uncorrected JS. Keep this PR draft while acoustic FAT is outstanding.

Copy link
Copy Markdown
Owner Author

P9 dropdown fix — exact-source Windows FAT verified

GitHub Actions run 43761359403 completed successfully for commit cd85ffee054dad6b3b752b5351d34921ddc92717. Scoped source preflight (including 40-readback actual dropdown reconciliation test), native JUCE v11 ACK/state, P8.9 regressions, Windows mixer GUI build, and portable package integrity passed. Published Windows x64 portable artifact #14180668007. BUILD_PROVENANCE.json inside ZIP matches commit cd85ffee...; external headphone listening FAT remains pending. Do not use the older 43200daa artifact for dropdown validation.

Copy link
Copy Markdown
Owner Author

MILESTONE A: historical research archived / CLOSED UNMERGED. P9.0 HRTF study is historical ancestry of later owner-approved P9.9 selected integration #733, not a new release candidate.

Source branch: research/sonku-p90-external-speaker-20261115; exact original head: cd85ffee054dad6b3b752b5351d34921ddc92717; target: research/sonku-p89-stereo-room-depth-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