Skip to content

feat(player): pro-grade KEY/TEMPO transitions, complete song tails and music-quality DSP - #675

Closed
masarray wants to merge 14 commits into
mainfrom
feat/player-key-musical-quality-and-hot-prime-20261114
Closed

masarray wants to merge 14 commits into
mainfrom
feat/player-key-musical-quality-and-hot-prime-20261114

Conversation

@masarray

@masarray masarray commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Mission

Bring ArSon Player music KEY (±6 semitones) and independent TEMPO (80–120%) toward professional live backing-track quality while preserving the single native JUCE PCM / ASIO audio authority. No Vocal Harmony plugin changes, no UI regressions, no license-risky SDK swaps.

Global audio-DSP comparison (official sources)

Reference Relevant lesson Applied ArSon Player decision
Signalsmith Stretch Higher-overlap default vs cheaper preset; stereo processing, separate input/output latency, recommended input-side zero drain at EOF Vendored MIT Signalsmith default 120/30ms preset + split computation; worker-only re-entry, properly drained song tail
Ableton Live 12 Complex/Complex Pro Whole songs require polyphonic processing; transient preservation, formant behavior, and CPU all matter Optimize for full-band music; avoid claiming zero artifacts or blindly enabling vocal-style formant changes
Rubber Band R3 Finer real-time pitch/time processing can cost substantially more CPU than R2 Benchmark against a licensed-compatible engine before proposing replacement
zplane élastique Pro/efficient modes and polyphonic formants have deliberate cost/quality tradeoffs Commercial-license option, not bundled and not asserted equivalent

Native implementation

  1. Polyphonic fidelity: stereo-linked, higher-overlap presetDefault with split computation (FFT entirely on decoder worker).
  2. Smooth live control: gradual semitone transposition (~60ms) and sample-rate-independent TEMPO changes (~80ms) using a fractional source-sample accumulator.
  3. Click safety: bounded 5ms C1-smooth seam correction only at KEY/TEMPO change boundaries. No limiter/clipping, no per-block cost at steady parameters.
  4. Neutral integrity: KEY=0, TEMPO=100 is bit-exact stereo copy with no FFT; warm spectral re-entry after bypass via bounded recent-source history + outputSeek.
  5. Complete song ending: account for both Signalsmith input and output latency; pad inputLatency() source frames at EOF before flush(), retaining final instrumental/vocal tail.
  6. Efficient history: contiguous stereo ring slice copying and redundant frequency-map computation avoidance. No new allocations, file I/O or mutex in the ASIO callback.

Objective test evidence — latest code SHA 193388045ca5e43f335b7eea9926d88d03941a04

  • Dedicated Linux C++ KEY/TEMPO and gesture suite: PASS — 44.1k/48k/96k, KEY ±, tempo 80/100/120, 5-step hot gestures, stereo L/R, bypass bit identity, monotonic tempo ramp, final-tail audio presence, bounded silence and finite values.
  • Gesture-boundary one-sample discontinuity: synthetic test previously worst 0.470 FS at 48k; now 0.000 FS (in test output precision). This is seam continuity evidence, not proof of full musical naturalness.
  • Worker DSP process only, Linux CI (different shared-runner conditions): 44.1k 18.8ms / 2.23s audio, 48k 17.3ms / 2.05s audio, 96k 20.1ms / 1.02s audio. Benchmarks are indicative, not Windows/ASIO CPU budgets.
  • EOS spectral tail recovered nonzero synthetic energies at all three sample rates. Synthetic results alone must not substitute for real-file listening or full native Windows tests.

Professional quality acceptance still required

  • Controlled listening A/B: license-cleared full-band tracks with solo vocals, dense chords, acoustic piano/guitar, bass/kicks and sharp drum transients at KEY -6/-3/0/+3/+6 and TEMPO 80/90/100/110/120.
  • Verify timbre/formants, transient smearing, chorus/stereo stability and mono fold-down; compare old preset with this branch and, where licensed, Rubber Band R3/élastique. No unsupported assertion of parity.
  • Windows JUCE native build + physical ASIO trial: player + live MIC / VST FX / routed BUS / MAIN; rapid KEY/TEMPO changes, device reopen, 30-min stream, key-change audibility and underrun monitoring.
  • Do not merge as a subjective top-global sonic quality certificate or publish a release until the required hands-on tests are collected. The code milestone and fast standalone suite are already available for evaluation.

This PR remains draft while genuine Windows and listening evidence is absent; focused CI avoids extra installer and complete 90+ CTest runs.

Same-runner preset A/B cost (non-gating)

Linux standalone C++ quality + cheaper reference run, same test vectors and build flags; the cheaper variant is a temporary checkout-only test substitution and is not shipped:

Rate High-overlap DSP Cheaper DSP Relative processing cost
44.1k 13.7ms / 2229ms audio 9.1ms / 2229ms 1.51x
48k 13.0ms / 2048ms audio 8.3ms / 2048ms 1.57x
96k 14.4ms / 1024ms audio 9.4ms / 1024ms 1.53x

Both preset variants pass the same functional waveform tests; this comparison is CPU cost evidence, not proof of better perceived music, lower aliasing or transient handling. Real song audition and Windows physical ASIO CPU qualification remain necessary.

Final automated checks on head 0d40354238084f19d0d40851873739a912fc3d24: focused native DSP PASS, fast project native contracts PASS on immediately preceding identical production source. Latest commit changes only the optional reference benchmark workflow.

@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: 0d40354
Status: ✅  Deploy successful!
Preview URL: https://c30c3fe2.arsonmix.pages.dev
Branch Preview URL: https://feat-player-key-musical-qual.arsonmix.pages.dev

View logs

@masarray masarray changed the title feat(player): musical-quality KEY and warm hot-gesture DSP with focused native test feat(player): pro-grade KEY/TEMPO transitions, complete song tails and music-quality DSP Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Superseded by merged #682 (M5) at main@28cffcfc4ae595c1cf3b8447b79e0fc67cab2fb7. The professional worker-only KEY/TEMPO DSP and synthetic test suite were integrated selectively with the newer M4 cue/OUT, waveform and native dual-deck code, not by merging this older decoder. Four exact-source checks succeeded (Linux DSP, player show, fast native, Windows MSVC JUCE real WAV); physical ASIO/music-listening QA remains open as #680. Closing this divergent draft to prevent accidental M4 rollback; it is preserved as research history.

@masarray masarray closed this Nov 14, 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