Repository navigation
feat(player): independent KEY/TEMPO with real native worker DSP and per-song stage controls - #496
Conversation
…rker DSP and per-song controls
|
/arsonmix-ci ui 4a1550f |
|
/arsonmix-ci fat 4a1550f |
Deploying arsonmix with
|
| Latest commit: |
30de4b8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://59d61fad.arsonmix.pages.dev |
| Branch Preview URL: | https://feature-arson-player-m2-inde.arsonmix.pages.dev |
…inuous native playback
|
/arsonmix-ci fat 7aa8846 |
|
/arsonmix-ci ui 30de4b8 |
|
/arsonmix-ci fat 30de4b8 |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30de4b81e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if(!active()) { | ||
| if(nInput!=nOut)return false; | ||
| std::copy_n(in[0],nOut,out[0]); | ||
| std::copy_n(in[1],nOut,out[1]); | ||
| } else { | ||
| stretch_.process(in,nInput,out,nOut); |
There was a problem hiding this comment.
Synchronize DSP history when entering or leaving neutral bypass
When a performer resets KEY/TEMPO to 0/100 during playback, this branch stops advancing the stretcher but leaves its buffered audio intact. Applying another non-neutral setting later resumes that old history rather than the current song position, replaying earlier audio; entering DSP from an initially neutral song also starts with an unprimed buffer. A standalone reproduction using this processor produced substantial old-tone output after processing one second of silence through neutral bypass. Keep the DSP history synchronized or explicitly re-prime it and handle the latency transition when switching paths.
Useful? React with 👍 / 👎.
| const int tail=pitch.outputLatency(); | ||
| if(tail>0 && tail<deviceHz*2) { | ||
| juce::AudioBuffer<float> ending(2,tail); | ||
| float* const ends[]={ending.getWritePointer(0), | ||
| ending.getWritePointer(1)}; | ||
| pitch.flush(ends,tail); |
There was a problem hiding this comment.
Include analysis latency when draining the song ending
For non-neutral playback, the stretcher is fed from its initial empty state without an outputSeek pre-roll, so pending audio includes both input analysis latency and output synthesis latency. Draining only outputLatency() truncates the ending before setting EOF. At 48 kHz the configured library reports 2,400 input-latency frames and 4,320 output-latency frames; a reproduction at 80% tempo with audio confined to the last 512 source frames yielded energy of only 0.67 with this drain, versus 51.90 when the additional 3,000 tempo-adjusted input-latency frames were drained. Account for the full processing delay, or prime and compensate it explicitly, so backing tracks retain their final notes.
Useful? React with 👍 / 👎.
ArSon Player M2 — independent music KEY + TEMPO (native worker DSP)
M1 is already merged: #486, main
d46aaa6b18ce94f5908c5db4f33ccba7d69947b4, with exact-SHA Windows FAT and Chromium PASS. This PR is a separate real product milestone, based on that verified main.User workflow: open original compact ♫ Player drawer in the one approved
/preview/mixer; use tinyKEY −/+semitone andTEMPO −/+5% controls, or Reset. Music playback follows those native commands while microphones, FX, device clock and mixer WIRE/MAIN are untouched. Per-song values survive reopen in atomicplayer-library.jsonv2, with safe migration from M1 v1. No Lab/checkbox/second audio engine or UI-only pitch sliders.Native architecture
NativePlayerDeckdecoder worker, never inside JUCE device callback.Tests included
tests/player_pitch_tempo_test.cpp: sine 440Hz, +3st/80%, -2st/120%, output-duration ratio, opposite-phase stereo coherence, invalid control rejection and neutral bypass.tests/player_native_decode_test.cpp: real JUCE WAV→device resampler→M2 Signalsmith→ring→audio pull, worker readback, fail-closed control ranges, stop/restart and unchanged device rate.tests/approved_preview_mobile_navigation_smoke.py: compact controls at multiple phone widths, public preview never pretends it has an audio backend.Status: implementation commit
4a1550f5f0f088ffd84669823771d5b48cb2d2a7; DRAFT pending exact-SHA selective Chromium and Windows MSVC/CTest verification. Physical ASIO/OBS listening and precise quality on real songs remain PENDING. Do not claim released M2 until tests and user FAT pass.CI cost discipline: fast Linux checks on PR push; then one
uiplus onefatrun (fat already includes native). Never auto-merge or deliver an unverified installer.Selective verification checkpoint
d46aaa6b18ce94f5908c5db4f33ccba7d69947b4), no regression to the previous live player.M2.1 audit: live-control response —
7aa88469dfda710df0e1dc1903ac4d5bb0b9d19a4a1550fqualified 71/71 MSVC CTest, exact Chromium full GUI PASS and both Windows artifacts; those artifacts are not the new source. On7aa88469dfda710df0e1dc1903ac4d5bb0b9d19a, fast native PASS, one Windows FAT requalification run #42632644114 in progress; full Chromium not re-run because approved GUI/CSS/JS unchanged.M2.2 — singer-ready queued-song presets (30de4b8)
SetlistPolicy::pitchTempoTargetdistinguishes selected next song from the active native deck. A queued B adjustment updates only B's versioned, crash-safe saved preset; it cannot retune CURRENT A. Switching to B later installs B's controls before decode; selecting CURRENT A applies changes to A's live worker.7aa88469run #42632644114 is already building Windows. Do not trigger an overlapping FAT. The NEW source30de4b81e697eeea0c2548e7fb7757ddd650e33drequires one additional exact-SHA Windows qualification after the former run completes; prior artifacts do NOT qualify this commit.Exact-SHA M2 final qualification — 30de4b8
30de4b81e697eeea0c2548e7fb7757ddd650e33d— source contains M2.1 live change and M2.2 NEXT song preset isolation.7aa88469source.30de4b81e697eeea0c2548e7fb7757ddd650e33donce; job is IN PROGRESS. It replaces (not duplicates) a native MSVC lane. No merge until exact source has completed SUCCESS and installer/FAT artifact integrity is verified.src/Main.cpp,src/LiveAudioEngine.h,CMakeLists.txt; no blind overwrite.