Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
e74b622
feat(vocal-throw): implement bounded zero-added-latency phrase captur…
masarray Nov 8, 2026
070ed0c
feat(vocal-throw): add native JUCE insert, lock-free DSP commands and…
masarray Nov 8, 2026
e13c3fc
feat(vocal-throw): install real native FX node on authoritative Chann…
masarray Nov 8, 2026
29ab439
feat(vocal-throw): restore schema-validated native FX settings in sav…
masarray Nov 8, 2026
56b5cca
feat(vocal-throw): catalog stable native effect identity
masarray Nov 8, 2026
f8917ec
test(vocal-throw): include deterministic RT-safe DSP tests in existin…
masarray Nov 8, 2026
07ae515
fix(vocal-throw): validate exact 48-byte settings state
masarray Nov 8, 2026
080bd84
feat(vocal-throw): route native insert and lifecycle through approved…
masarray Nov 8, 2026
b47fe83
feat(vocal-throw): expose accepted FX settings, capture activity and …
masarray Nov 8, 2026
8729862
feat(vocal-throw): validate tempo/settings/trigger commands at native…
masarray Nov 8, 2026
b9ecd8a
feat(vocal-throw): compact approved FX editor with TAP BPM, phrase se…
masarray Nov 8, 2026
6043d30
feat(vocal-throw): expose native effect in same FX picker and compile…
masarray Nov 8, 2026
49034ce
feat(vocal-throw): open approved native editor for exact ChannelId FX…
masarray Nov 8, 2026
40621bd
test(vocal-throw): verify manual and phrase-aware echo, BPM grid, dry…
masarray Nov 8, 2026
4fc0de8
fix(vocal-throw): use faster vocal-end envelope for responsive phrase…
masarray Nov 8, 2026
d37aa3a
perf(vocal-throw): amortize frozen phrase copy with fixed RT work budget
masarray Nov 8, 2026
04d8dc7
fix(vocal-throw): share approved 24px close-button chrome and red pre…
masarray Nov 8, 2026
7475cf6
test(vocal-throw): guard single approved picker, editor, DSP ACK and …
masarray Nov 8, 2026
4d6e677
style(vocal-throw): integrate compact editor in existing FX CSS owner
masarray Nov 8, 2026
1fdb7c2
refactor(vocal-throw): remove runtime CSS injection, reuse canonical …
masarray Nov 8, 2026
a493896
docs(vocal-throw): live DSP architecture, acceptance test and auto-BP…
masarray Nov 8, 2026
d240148
ci(vocal-throw): verify native FX editor syntax in existing cheap UI …
masarray Nov 8, 2026
c035f40
fix(vocal-throw): bound compact editor to mobile viewport and allow v…
masarray Nov 8, 2026
62edf74
test(vocal-throw): Chromium native FX insertion, manual cue ACK and c…
masarray Nov 8, 2026
32e1cc4
ci(vocal-throw): one scoped Chromium FAT for actual approved editor a…
masarray Nov 8, 2026
3a00451
test(vocal-throw): increment graph revision when simulating FX-instan…
masarray Nov 8, 2026
1bf4290
fix(vocal-throw): manual throw rejects stale silence instead of repor…
masarray Nov 8, 2026
a5e2565
test(vocal-throw): reject long-after-singing manual cue
masarray Nov 8, 2026
bb9ed6b
perf(vocal-throw): keep overlapping tails and optimize RT capture copy
masarray Nov 8, 2026
bbe0e86
test(vocal-throw): assert overlapping tails, bounded cues and manual-…
masarray Nov 8, 2026
5cc4400
audio(vocal-throw): contain dense multi-tap wet peak without touching…
masarray Nov 8, 2026
29b92b7
test(vocal-throw): bound dense overlap level at full wet
masarray Nov 8, 2026
63d8618
docs(vocal-throw): qualification evidence and RT/musical hardening co…
masarray Nov 8, 2026
b2657cd
test(vocal-throw): clear dry fixture between PCM comparison blocks
masarray Nov 8, 2026
2a7c6a6
test(vocal-throw): account for envelope release in hybrid rearm gate
masarray Nov 8, 2026
f6ad2d6
fix(vocal-throw): reject late manual duplicate of auto-triggered voca…
masarray Nov 8, 2026
4db3848
test(vocal-throw): manual-after-auto idempotence and next-phrase rearm
masarray Nov 8, 2026
f95b748
feat(vocal-throw): bounded native music-channel onset monitor and con…
masarray Nov 8, 2026
3c52659
feat(music-tempo): tap exactly one accepted ChannelId pre-FX inside n…
masarray Nov 8, 2026
c7c62bb
feat(music-tempo): source/epoch admission and control-only insert tra…
masarray Nov 8, 2026
853785f
feat(music-tempo): expose verified native tempo tap to existing JUCE …
masarray Nov 8, 2026
d8ce4db
feat(vocal-throw): consume precomputed native music BPM interval with…
masarray Nov 8, 2026
014c83a
feat(vocal-throw): consume precomputed native music BPM interval with…
masarray Nov 8, 2026
91bfdca
feat(vocal-throw): native music-source selector, tempo polling and DS…
masarray Nov 8, 2026
f11b0b5
ui(vocal-throw): compact native music source and lock status controls
masarray Nov 8, 2026
1339cb6
ui(vocal-throw): verified backing-source selection, ACK and real BPM …
masarray Nov 8, 2026
00a16e2
style(vocal-throw): compact source and auto BPM state in approved FX …
masarray Nov 8, 2026
920d949
test(music-tempo): real PCM tap, BPM rhythm, holdover and stale-graph…
masarray Nov 8, 2026
2254afc
build(music-tempo): register deterministic native CTest in existing W…
masarray Nov 8, 2026
699a0e0
fix(music-tempo): rebind valid source safely across native graph revi…
masarray Nov 8, 2026
ad599a8
fix(music-tempo): preserve validated music ChannelId across WIRE/FX c…
masarray Nov 8, 2026
7e80f00
test(vocal-throw-ui): native music-source ACK and live BPM readback d…
masarray Nov 8, 2026
d6daf5d
test(vocal-throw): verify tempo ACK before exercising stale FX instance
masarray Nov 8, 2026
9906d9a
style(test): normalize native music tempo smoke fixture indent
masarray Nov 8, 2026
1576c23
perf(music-tempo): deduplicate control BPM packets and avoid repeated…
masarray Nov 8, 2026
9662de5
ci(vocal-throw): run focused Chromium FAT for native and music tempo …
masarray Nov 8, 2026
cce6323
test(music-tempo): prove actual accepted graph PCM tap and revision f…
masarray Nov 8, 2026
2376345
fix(vocal-throw): read music tempo before same-block throw and reset …
masarray Nov 8, 2026
88af4f4
test(vocal-throw): auto music BPM freeze, no tail retime, Manual/TAP …
masarray Nov 8, 2026
632cb47
test(music-tempo): use valid 180 BPM interval vs 120 BPM fallback
masarray Nov 8, 2026
39ba9a4
docs(music-tempo): architecture, evidence and explicit live-qualifica…
masarray Nov 8, 2026
3a06a0e
feat(vocal-throw-m3): callback-scoped authoritative native sample-fra…
masarray Nov 8, 2026
194357d
feat(m3): timestamp music onsets in authoritative native callback sam…
masarray Nov 8, 2026
6ccb678
feat(m3): share per-render sample origin with vocal FX inside one nat…
masarray Nov 8, 2026
4f84261
feat(m3): quantize only new echo starts to frozen native music sample…
masarray Nov 8, 2026
7c94ae7
feat(m3): epoch-fenced atomic phase transport to JUCE vocal echo proc…
masarray Nov 8, 2026
f5821a6
feat(m3): deliver measured beat onset grid to native vocal inserts wi…
masarray Nov 8, 2026
338b974
test(m3): exact native sample-grid delay onset and frozen-tail stabil…
masarray Nov 8, 2026
fe188e0
test(m3): correct manual quarter-note baseline at 120 BPM in 48k PCM …
masarray Nov 8, 2026
ea4d86b
test(m3): valid 180 BPM quarter grid anchored to earlier native music…
masarray Nov 8, 2026
ca8dc05
test(m3): timestamp real music onsets and assert one scoped native sa…
masarray Nov 8, 2026
719be4a
feat(m3): independent beat-phase confidence gate, safely retain BPM-o…
masarray Nov 8, 2026
ff6b30d
fix(m3): retain detected BPM when phase ambiguous, fail closed on sta…
masarray Nov 8, 2026
d60a44e
feat(m3): distinguish reliable Auto BPM from confidence-qualified nat…
masarray Nov 8, 2026
9e710a1
ui(m3): show distinct confidence-qualified beat-grid vs BPM-only states
masarray Nov 8, 2026
6d522e1
test(m3-ui): visual BPM-only vs native beat-grid readback in desktop/…
masarray Nov 8, 2026
e229496
test(m3): genuine PCM sample clock survives graph revision; confidenc…
masarray Nov 8, 2026
2dea914
docs(m3): sample-clock musical echo grid, no-RT-work contract and fie…
masarray Nov 8, 2026
07b6162
fix(m3-ui-test): tolerate legacy BPM-only native readbacks without gr…
masarray Nov 8, 2026
433109b
test(m3-ui): wait for a fresh native snapshot request before phase-lo…
masarray Nov 8, 2026
33364fe
test(m3): no-heap callback frame epoch reset and nested render-scope …
masarray Nov 8, 2026
fe6801a
dsp(tempo): incumbent octave hysteresis and strongest coherent beat-p…
masarray Nov 8, 2026
1b5a1c3
ui(vocal-throw): precision LCD, native readback status and exact shar…
masarray Nov 8, 2026
cbc07f1
style(vocal-throw): premium calm VST face with native LCD; delegate C…
masarray Nov 8, 2026
d85a520
test(vocal-throw): exact shared EQ/Compressor 24/26px Power/Close and…
masarray Nov 8, 2026
80fcc4e
dsp(tempo): conservative beat-grid lock under competing offbeat accents
masarray Nov 8, 2026
5097d42
test(tempo): strong offbeats never certify ambiguous phase; sustained…
masarray Nov 8, 2026
fd33e36
ui(fx): common semantic Power/Close chrome across EQ, Compressor and …
masarray Nov 8, 2026
52d1da3
ui(fx): common semantic Power/Close chrome across EQ, Compressor and …
masarray Nov 8, 2026
86bc2eb
ui(fx): common semantic Power/Close chrome across EQ, Compressor and …
masarray Nov 8, 2026
b920a3c
ui(fx): common semantic Power/Close chrome across EQ, Compressor and …
masarray Nov 8, 2026
6b48071
style(fx): one shared 24px Close / 26px Power chrome for all native b…
masarray Nov 8, 2026
8dbf6d5
test(fx): shared Power and Close class contract across EQ Compressor …
masarray Nov 8, 2026
414f9fc
design(vocal-throw): extract supplied Illustrator kit rotary language…
masarray Nov 8, 2026
ef1efbf
design(vocal-throw): compact hardware controls based on supplied vect…
masarray Nov 8, 2026
c46fced
design(vocal-throw): compact hardware controls based on supplied vect…
masarray Nov 8, 2026
f7c2319
design(vocal-throw): compact hardware controls based on supplied vect…
masarray Nov 8, 2026
4c2ea32
feat(vocal-throw-ui): replace web-form layout with real hardware rota…
masarray Nov 8, 2026
c8d1f63
feat(vocal-throw-ui): accessible physical rotary drag/wheel/keyboard …
masarray Nov 8, 2026
8f74354
style(vocal-throw): full hardware VST chassis using supplied rotary/p…
masarray Nov 8, 2026
f21578a
test(vocal-throw): hardware rotary interactive native ACK and respons…
masarray Nov 8, 2026
747fe47
test(vocal-throw): assert authoritative hardware SVG styles without b…
masarray Nov 8, 2026
42e3b7d
polish(vocal-throw): remove crowded dial microcopy and mirror native …
masarray Nov 8, 2026
ab6170d
style(vocal-throw): native-readback bypass dimming and mobile rotary …
masarray Nov 8, 2026
530fc8f
design(vocal-throw): source-faithful dark play trigger with neon icon…
masarray Nov 9, 2026
a7de773
design(vocal-throw): center singer THROW performance switch, demote W…
masarray Nov 9, 2026
482c915
ux(vocal-throw): silent-ready performance controls, terse factual clo…
masarray Nov 9, 2026
aeb5093
style(vocal-throw): source-inspired centerpiece neon play trigger, se…
masarray Nov 9, 2026
5afebbf
test(vocal-throw): icon-only singer trigger 160px+ CTA, quiet face an…
masarray Nov 9, 2026
226218b
design(vocal-throw): embed exact illuminated play artwork cropped fro…
masarray Nov 9, 2026
cb8187b
fix(vocal-throw): face status follows actual native bypass, rack off …
masarray Nov 9, 2026
6e6477d
polish(vocal-throw): enlarge original Illustrator neon icon within si…
masarray Nov 9, 2026
e719967
test(vocal-throw): verify user Illustrator artwork embedded and nativ…
masarray Nov 9, 2026
86ec17b
design(vocal-throw): remove four directional markers; clean round sin…
masarray Nov 9, 2026
7ffd018
ui(vocal-throw): align LCD next to TAP and unify seven rotary faces w…
masarray Nov 9, 2026
8915bff
style(vocal-throw): rebuild aligned performance deck, oversized tempo…
masarray Nov 9, 2026
89bdf7c
test(vocal-throw): measure symmetry, LCD↔TAP proximity, seven identic…
masarray Nov 9, 2026
8af6491
test(vocal-throw): assert symmetric desktop encoder banks and clean s…
masarray Nov 9, 2026
54f9ed9
test(vocal-throw): parse computed SVG dash offset as a numeric length…
masarray Nov 9, 2026
3ed70c5
test(vocal-throw): six parameter dials plus seventh identical MIX dial
masarray Nov 9, 2026
2018d55
ux(vocal-throw): inline manual BPM entry inside large tempo LCD; remo…
masarray Nov 9, 2026
86bd71e
style(vocal-throw): seamless editable BPM LCD, no duplicate number or…
masarray Nov 9, 2026
5f6b1b0
test(vocal-throw): LCD edits BPM without duplicate field; mobile foot…
masarray Nov 9, 2026
151601d
merge(vocal-throw): reconcile M1–M4 with latest compressor and harmon…
masarray Nov 9, 2026
141be94
ci(vocal-throw): run real desktop/mobile FAT on consolidated main-int…
masarray Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ui-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
node --check site/preview-v2/assets/mixer-native-compressor.js
node --check site/preview-v2/assets/mixer-native-harmony.js
python tests/native_harmony_assembly_test.py
node --check site/preview-v2/assets/mixer-native-vocal-throw.js
python tests/native_peq_assembly_test.py
python tests/approved_operator_ux_smoke.py
python scripts/build_ui_css.py --check
Expand All @@ -128,6 +129,32 @@ jobs:
- name: Block incomplete product release only when preparing product review
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft && startsWith(github.head_ref, 'integration/product-') }}
run: node scripts/check_console_puzzle.mjs --release
vocal-throw-preview:
name: Vocal Throw native editor desktop/mobile Chromium FAT
needs: quick
if: ${{ github.event_name == 'pull_request' && (startsWith(github.head_ref, 'feature/arson-vocal-throw-') || startsWith(github.head_ref, 'integration/vocal-throw-')) }}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Chromium for targeted Vocal Throw UI
run: |
python -m pip install playwright
python -m playwright install --with-deps chromium
- name: Check exact mixer picker, native ACK and editor in desktop/mobile
run: python tests/approved_native_vocal_throw_smoke.py
- name: Keep compact editor screenshot evidence
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ArSonMix-Vocal-Throw-Desktop-Mobile-${{ github.run_id }}
path: arsonmix-vocal-throw-*.png
if-no-files-found: ignore
retention-days: 7

operator-ux-fat:
name: Operator UX real Chromium / native-assembled GUI (5 viewports)
needs: quick
Expand Down
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,18 @@ if(BUILD_TESTING)
COMMAND ARMixNativeCompressorLifecycleTests)
add_dependencies(ARMixMixerRoutingTests ARMixNativeCompressorLifecycleTests)

add_executable(ARMixNativeVocalThrowTests tests/builtin_vocal_throw_test.cpp
engine/builtin_fx/VocalThrow.h)
target_compile_features(ARMixNativeVocalThrowTests PRIVATE cxx_std_20)
add_test(NAME NativeVocalThrowPhraseCaptureManualAutoAndNoHeap COMMAND ARMixNativeVocalThrowTests)
add_dependencies(ARMixMixerRoutingTests ARMixNativeVocalThrowTests)
add_executable(ARMixNativeMusicTempoTests tests/native_music_tempo_test.cpp
engine/core/NativeMusicTempoMonitor.h)
target_compile_features(ARMixNativeMusicTempoTests PRIVATE cxx_std_20)
add_test(NAME NativeMusicTempoSourceOnsetsAndFallback COMMAND ARMixNativeMusicTempoTests)
add_dependencies(ARMixMixerRoutingTests ARMixNativeMusicTempoTests)


add_executable(ARMixNativeMasterLoudnessTests tests/native_master_loudness_test.cpp engine/dsp/NativeMasterLoudness.h)
target_compile_features(ARMixNativeMasterLoudnessTests PRIVATE cxx_std_20)
add_test(NAME P1KMeasuredNativeBS1770StereoAnd4xTruePeak COMMAND ARMixNativeMasterLoudnessTests)
Expand Down
45 changes: 45 additions & 0 deletions docs/ARSON_VOCAL_THROW_BEAT_GRID_M3_20261109.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# ArSon Vocal Throw M3 — native music beat-phase quantized echo

**Branch:** `feature/arson-vocal-throw-phase-grid-m3-20261109`; builds on draft M2 PR #474 (which builds on M1 PR #469). Product issue #473. **Not a hardware-certified stage release.**

## What changed

A stable BPM alone cannot locate the *beat boundary*. M3 shares the existing native ChannelId audio renderer's monotonically increasing callback frame counter with its built-in FX processing, then quantizes **only the newly scheduled echo** when the selected MUSIC ChannelId has a credible beat-phase estimate.

```
ONE native ASIO/JUCE ChannelId render (epoch + graph revision)
beginAudioBlock(frames) -> monotonic native sample-frame start
NativeBeatFrameScope (thread-local, callback-only and restored on exit)
pre-FX MUSIC ChannelId -> 10ms nonmutating energy frames
each summary carries its exact observed audio end-frame (within 10ms)
SPSC -> existing control timer -> BPM, onset anchor, phase confidence
CONTROL publishes BPM + sample-frame anchor + epoch/revision to FX
-> atomic version-fenced snapshot (one read attempt per callback)
VOICE FX on SAME callback/thread
-> read versioned tempo + scoped native frame origin
-> if source/epoch/revision invalid: accepted Manual/TAP
-> if BPM stable, beat phase weak: BPM-derived interval, NO grid
-> if BPM and phase credible: snapshot anchor & interval at THROW
-> freeze voice with existing two-tail bounded PCM
-> schedule next echo at FIRST native music grid point >=
intended (phrase end + musical subdivision), with correction
bounded to ONE subdivision and zero change to dry PCM
-> already sounding echo tails retain frozen timing across BPM/graph edits
```

### Realtime invariant
No new audio callback, dynamic allocation, model inference, FFT, lock, waiting, JS audio, logging or file I/O from the callback. Channel PCM enters one mixer graph and is never processed twice. The timing scope is a trivially copied thread-local struct, no global audio clock thread. Tempo/phase inference (up to 121 BPM candidates) is CONTROL-only. Packed atomic scalar fields are protected by an even/odd version; the audio callback makes **one** bounded read attempt and immediately falls back on inconsistency.

### Confidence and fallback
- BPM confidence and beat-phase confidence are independent. A musical onset beat grid is used only if a majority of percussive onset strength agrees on a single pulse lattice.
- Ambiguous rhythmic patterns remain **AUTO BPM · BPM only**, not a speculative grid. A missing source or stale graph becomes **Manual / TAP** without losing the accepted preset.
- A 10ms analysis window means onset time has approximately up to one window of inherent beat-position uncertainty, even though *subsequent scheduling* uses exact callback sample indices. This is not sample-perfect transient detection.
- Phase quantization is measured against **pre-FX** selected music PCM, not against a fully latency-compensated external performance clock. Vendor VST3 latency, off-beat percussion, compressed music, drift, sample-rate changes, ASIO callback reentrancy and sparse backing must still pass field tests.

### Automated acceptance
- Native DSP unit test verifies an actual frozen phrase's first echo is scheduled on the music frame lattice and remains there after transport disappears, compared with Manual/TAP quarter-note fallback; repeats at 64/128-frame PCM chunks with callback heap forbidden.
- Native graph PCM test stamps the selected music ChannelId from one authoritative callback at variable 64+36 sample chunks, verifies anchored BPM/phase confidence at 72/95/120/160 BPM, one block-clock scope, frame counter continuity after a graph revision, and restoration of callback-only context.
- Desktop/mobile Chromium smoke explicitly distinguishes a native ACKed source's **BPM only** from **BEAT GRID** status. No user-facing opt-in or extra monitor/arm step.

### Deferred release qualification
Physical ASIO 64/128 frame loops at 44.1/48/96 kHz; on-stage singer/backing leakage, syncopated 4/4 and half/double-time, large FX PDC, dropout/replug, fade/no-click audition, real CPU/xrun vs bypass, and sustained stress still require field evidence. Do not merge while the PR chain and these safety gates remain unresolved.
25 changes: 25 additions & 0 deletions docs/ARSON_VOCAL_THROW_M1_M4_MAIN_CONVERGENCE_20261109.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Vocal Throw M1–M4 × current main — exact-ancestry integration

**Parent 1:** protected main `381c140200d2f4ecb965183a2da1ba1e46d5d9c2` (Compressor restart #489, Harmony #467, other merged improvements).
**Parent 2:** unmodified M4 branch head `5f6b1b01ba41a5cc559f0335d38b052967949f55` (includes native M1/M2/M3 and approved hardware faceplate M4).
**Delivery branch:** `integration/vocal-throw-m1-m4-main-20261109`. An actual two-parent integration commit retains both histories; neither parent was rebased or force-pushed.

## Merge discipline

Three-way diff from shared ancestor `8accbc4af3391efc8c3bd8f2c99feb955e8f69db` identified 31 Vocal Throw-specific changed files, 10 of which were also modified on main. Merged all ten **semantically**, using the current main tree as the starting point. Files unique to M4 are copied from verified exact M4 tree. In particular:

- `src/Main.cpp`: both Harmony and Vocal Throw install paths/command ACK, exact-instance gate, FX snapshot, music-clock service, pending-command service and all newer Compressor meters survive.
- `src/LiveAudioEngine.h`: Harmony and Vocal Throw both use one authoritative JUCE native PCM callback and their accepted FX lease bank, not parallel engines.
- `src/NativeMixerSessionFxRestore.h`: EQ, Compressor, Harmony and Vocal Throw restore their own validated native state; external VST3 state is applied only to actual VST3 inserts, all on CONTROL before graph publication.
- `scripts/compose_native_peq.py`: the only approved GUI/picker injects all **four** native built-in FX exactly once and preserves the browser-preview-only fallback when not hosted inside JUCE.
- `web/approved-native-bridge.js`: both Harmony and Vocal Throw have distinct native editor actions and catalog identities; no browser-generated audio/DSP.
- `site/preview-v2/assets/mixer-contextual-buttons.css`: preserves Harmony CSS plus the EQ/Compressor/Vocal Throw shared Power/Close family, including accepted bypass/readback colors and geometry.
- `site/preview-v2/assets/mixer-fx-rack.css` and `mixer-native-compressor.js`: retain newer compressor/harmony improvements with M4 hardware face added, no regression to older compressor JS.
- `CMakeLists.txt`, `.github/workflows/ui-smoke.yml`: union of native realtime and visual checks; don't replace latest main CI policy.
- `tests/native_peq_assembly_test.py`: extends existing mandatory quick test to enforce Harmony + Vocal Throw in a single GUI, native catalog/restore paths, and same CSS Power/Close owner.

## Release gates (not waived)

The previous green M1 63/63 and M2/M3 64/64 MSVC CTest apply to **old source SHAs**, not this merged commit. The M4 Chromium GUI PASS also predates integration. This new merge requires exact-SHA native Windows compile + CTest, UI assembly/Chromium desktop+mobile, and end-to-end native driver/source tests. On real ASIO hardware, test input→FX→BUS/MAIN, SOURCE ONLY and WIRE retarget, Vocal Throw tail, device changes, music beat detection and xrun metrics; simulated tests do not certify stage performance. Do not merge/ship without the gates. Preserve existing M1–M4 PRs Draft as recovery anchors.

**Reference:** https://github.com/masarray/arsonmix/issues/473#issuecomment-6737134260
45 changes: 45 additions & 0 deletions docs/ARSON_VOCAL_THROW_MUSIC_TEMPO_M2_20261108.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# ArSon Vocal Throw M2 — Native Music Channel Tempo Detection

**Status:** implementation and qualification draft, stacked on Vocal Throw M1 PR #469. M1 green head `4db384851e6f6378cca4fd037b744c98bd1f0ba3`; M2 is PR #474 and tracks issue #473.

## Signal authority

```
Authoritative ChannelId native PCM graph, single JUCE / ASIO callback
MUSIC ChannelId selected explicitly by singer/operator
-> PRE-FX non-mutating read-only music tap
-> 10ms stereo absolute-energy summary, bounded SPSC<Frame,2048>
-> existing 12Hz JUCE control timer: onset search + BPM confidence
-> accepted tempo precomputed into sample intervals, CONTROL only
-> per-VocalThrow atomic pending interval
-> next dry/vocal PCM callback copies interval BEFORE any THROW
-> new frozen vocal echo gets music interval, old tails keep prior schedule
VOICE ChannelId -> VocalThrow (no added dry PCM delay) -> WIRE/BUS/MAIN
```

**AUDIO callback contract:** no memory allocations, FFT, file I/O, logging, locks, networking, JS DSP, or new audio threads. Only the explicitly selected source channel's input stereo samples are summarized; every other channel skips the per-sample music tap. Existing JUCE callback remains the only audio authority. Core audio buffers and retained FX leases remain with the native graph.

**CONTROL contract:** only an accepted `ChannelId` with input / GROUP / FX_RETURN role and an actually scheduled PCM lane is a permissible tempo source. The native FX editor validates both its own vocal insert instance and source identity, device epoch and graph revision. Monitor/MAIN and the vocal channel itself are not accepted. On a valid structural graph recompile, an existing source ID is rebound with a new analysis generation; if absent or stale, the music clock is disabled, and Vocal Throw falls back to its saved BPM or TAP tempo.

## Detector

- A 10ms energy onset, 80ms transient refractory and adaptive floor reject a simple repeated rise from a sustained note.
- Bounded pairwise onset-period candidate scoring (60–180 BPM), with penalty for octave half/double candidates, three consistent estimates and confidence threshold.
- Native readback distinguishes **AUTO BPM locked**, **Listening**, and **Manual/TAP fallback**. A silence period exceeding 3.2s resets lock.
- UI conveys confidence as measured by estimator; this number is not field-certified reliability.

**Explicit limitations:** Music/onset BPM estimation does not provide sample-perfect beat-phase grid alignment. A recent transient anchor is retained for diagnostics only; it is not used as a globally compensated sample clock. Syncopated and heavily compressed music, live mic bleed, time-signature changes, half/double-time ambiguity and device-specific ASIO timing remain hardware field gates. Tempo selection is ephemeral song-wide, not yet persisted per Show. The fallback path always remains audible on the singer's dry stream.

## Qualification evidence

- Prior M1 Windows MSVC/JUCE: 63/63 CTest on exact SHA `4db384851e6f6378cca4fd037b744c98bd1f0ba3`.
- M2 Windows MSVC/JUCE: 64/64 CTest, including `NativeMusicTempoSourceOnsetsAndFallback`, on exact SHA `cce63231da52f69e6789873ecc406adba69aa1cb`. See [Actions run 42498186748](https://github.com/masarray/arsonmix/actions/runs/42498186748).
- Chromium FAT M2 native Vocal Throw picker, music source ACK, BPM readback and stale instance handling passed on same SHA.
- Later hardening: inbound tempo sampled before same-callback THROW and reset on plugin audio reprepare; corresponding regression checks for manual fallback and active tail interval stability. Qualification on the later SHA must be checked independently.
- Deterministic PCM: 72, 95, 120, 160 BPM; non-vocal source, stale revision, source change, dropout, default fallback. The CTest calls the *actual* native publisher to verify a music signal traverses the accepted graph, not only the isolated estimator.

**Not qualified:** physical ASIO 64/128 frame load at 44.1/48/96 kHz; prolonged simultaneous singer/backing test; live beat-grid sync / stereo echo hearing test; WASAPI secondary stream callback load; long-run xrun/restart and voice-music bleed reliability. Green CI is necessary but not sufficient for release.

## Next DSP/UX milestone

Prove stable beat phase with a source-specific latency-compensated anchor; handle half/double-time ambiguity with confidence floor and long-window hysteresis; permit song/Show fallback preference; add footswitch mapping and live capture metrics without callback work. Until then label UI as estimated **AUTO BPM** rather than **sample-accurate beat quantization**.
Loading
Loading