Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 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
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 @@ -107,6 +107,7 @@ jobs:
node --check site/preview-v2/assets/gui-perf-probe.js
node --check site/preview-v2/assets/mixer-native-peq.js
node --check site/preview-v2/assets/mixer-native-compressor.js
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 @@ -126,6 +127,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' && github.head_ref == 'feature/arson-vocal-throw-native-20261108' }}
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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ if(BUILD_TESTING)
add_test(NAME NativeCompressorZeroLatencyAndLinkedStereoPCM COMMAND ARMixNativeCompressorTests)
add_dependencies(ARMixMixerRoutingTests ARMixNativeCompressorTests)

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(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
54 changes: 54 additions & 0 deletions docs/ARSON_VOCAL_THROW_NATIVE_20261108.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# ArSon Vocal Throw — native phrase-aware live delay

**Status: functional prototype on a separate feature branch; not a certified live-performance release.**

This is a first-class native ChannelId insert in ArSonMix's single JUCE PCM render graph, not a second audio callback, browser-generated sound or independent DAW.

## Implemented

- **Manual:** rolling ring buffer holds up to 1.5 seconds of the most recent vocal. THROW captures a word or phrase and schedules up to six decaying repeats. Two independent tail voices allow a subsequent phrase to overlap an existing echo instead of cutting it.
- **Auto:** energy envelope, minimum voice duration, silence threshold and cooldown detect the end of a sung phrase without letting the wet echo re-trigger itself.
- **Hybrid (default):** phrase-end automation and manual cue together, with manual-cue suppression of a subsequent auto event for the same phrase.
- **Tempo:** BPM entry (60-200), TAP BPM, quarter/eighth/dotted-eighth/half note subdivisions. Interval timing is in native samples at the actual device rate.
- **Mix:** direct dry input with zero added samples, stereo echo, decay, short fades, smoothed wet edits, and ducking while the singer is active. A bounded active-tap gain normalizer prevents dense repeats/overlapping phrases from amplifying the wet bus simply because taps stack; dry is never attenuated.
- **Real-time:** all rolling/frozen buffers are allocated off-callback; a fixed maximum 24-stereo-frame-per-sample capture copy budget per active tail avoids a single large callback memcpy. Contiguous copy chunks eliminate per-frame modulo, and the ring write cursor rolls over without division. A lock-free SPSC transfers host settings and manual cue to the audio callback. Callback never allocates/logs/locks.
- **Identity & persistence:** stable native catalog ID; ChannelId, device epoch, graph revision, and insert instance fencing. DSP completed ACK and later readback precede accepted display. Schema-versioned 48-byte AVTH settings blob validated during Show restore; audio capture and tails are not persisted.
- **UX:** a compact FX editor inside the exact approved /preview/ mixer; presets in header, uniform power/close, BPM/note/repeat, THROW, TAP and collapsible advanced controls. One shared FX stylesheet.

## Architecture

Hardware input → ChannelId mixer strip → upstream EQ/Compressor/VST3 → VocalThrowProcessor → downstream inserts → fader/pan → WIRE/BUS/MAIN → hardware output.

Core files: engine/builtin_fx/VocalThrow.h (DSP), VocalThrowProcessor.h (JUCE), src/LiveAudioEngine.h (graph install), src/Main.cpp (validated command/readback), src/NativeMixerSessionFxRestore.h (versioned state), scripts/compose_native_peq.py (one picker), web/approved-native-bridge.js (real insert), site/preview-v2/assets/mixer-native-vocal-throw.js (controls only).

## Tests / qualification

The ARMixNativeVocalThrowTests CTest covers zero-added-sample dry, tempo divisions, captured stereo echoes after manual cue, auto-end detection and no self-trigger, bad parameter rejection, 8/44.1/48 kHz sample rates and a global allocator guard around realtime processing. Additional deterministic tests cover 8/48/96 kHz two-tail preservation during a second cue, a full two-tail pool reporting cue refusal rather than overwriting a running phrase, suppression of manual/auto double-cues, and peak containment of dense six-tap echoes. Python native picker/compiled-gui tests enforce no extra mixer screen and real-ACK event names.

Before shipping: exact-SHA Windows MSVC + CTest, actual approved /preview/ Chromium screenshots, ASIO 64/128-frame stress at 44.1/48/96 kHz, live singer audition, device restart, bypass/tail behavior, and Show restore.

## Explicit limitations

1. **Automatic BPM analysis from the music/backing bus is not yet implemented.** Auto currently means automatic vocal phrase-end trigger, not auto-estimated music tempo. BPM is entered or TAP-derived. Full beat tracking requires an independent music-bus feed, beat confidence and phase tracking.
2. Voice end detector uses an adjustable energy-envelope heuristic, not linguistic speech recognition or a trained singing model. Breaths, falsetto and microphone bleed can cause false cues.
3. No MIDI footswitch binding, more than two simultaneous phrase layers, stretchable echo phrases, global music BPM transport integration, or direct song-snapshot binding in this milestone. When both frozen-tail slots are busy, further THROW requests are rejected (native ACK reports not applied) rather than cutting an existing musical phrase.
4. Green quick CI is not equivalent to real Windows native compilation or ASIO device certification. Zero reported PDC applies only to the FX DSP's dry path; end-to-end hardware/driver latency and callback CPU load still require ASIO measurements.
5. Existing channel routing and independent secondary audio clock remain authoritative; the FX insert makes no new claims about unresolved WIRE/SOURCE ONLY issues.

## Field test

Insert ID armix.builtin.vocal-throw.v1 into real ChannelId vocal strip; confirm graph ACK; sing “atau tidak” then press THROW at 72/95/120/160 BPM; try Auto with varying held notes and short breaths; toggle bypass while dry vocal remains direct; change device/quantum and reject stale instance requests. Compare physical ASIO callback xruns, stereo/feedback, click-free fades and singer subjective quality.

## 2026-11-08 — performance and musicality hardening audit

Audit of the first native revision identified these concrete risks:
- Triggering a second phrase reset `playing_` and overwrote the frozen buffer of the first tail; audible repeat discontinuity was possible.
- The original capture copied 24 frames via two per-frame ring modulo operations; this was an avoidable callback hot-path cost.
- Hybrid manual cues could be followed by auto-trigger of the same sung phrase, producing unintended double repeats.
- Wet level changed immediately on edits; close-spaced six-tap feedback-like echoes could produce unnecessarily high wet peaks.

Hardening: two independent frozen voices, bounded cue admission (explicit rejection if full), bulk contiguous ring capture, write cursor without modulo, continuous smoothing of wet/duck gain, current-phrase manual suppression of auto replay, and peak-aware wet overlap normalization. Silence counters are now saturating for multi-hour sessions.

**Realtime caveats:** No heap, locks, logging or file operations in `processStereo`, `throwNow`, or parameter application. Worst-case processing still includes two simultaneous 24-frame copy budgets, and an up-to-twelve-tap mix; on low-buffer ASIO that requires measured xrun and callback-duration evidence, not just source inspection. Extra frozen buffer memory is allocated only on channels with this effect. A full two-voice pool intentionally rejects a new cue, so polyphony and cue policies should be evaluated with vocalist/operator tests.

**Next release gates:** exact-SHA MSVC CTest and native JUCE compile, 64/128-frame ASIO at 44.1/48/96 kHz, overnight stability and lifecycle/device-rate restart, phrase-ending listening sessions including breath/bleed/falsetto, bypass/re-enable and FX graph routing, and latency/xrun baseline comparisons versus bypass. Beat tracking from an isolated backing/music bus (confidence, phase and half/double-time hysteresis) remains a separate architecture milestone, not an already delivered feature.
1 change: 1 addition & 0 deletions engine/builtin_fx/BuiltInFxCatalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace armix::builtin_fx {
inline constexpr std::string_view channelEqId = "armix.builtin.channel-eq.v1";
inline constexpr std::string_view channelCompressorId = "armix.builtin.channel-compressor.v1";
inline constexpr std::string_view vocalThrowId = "armix.builtin.vocal-throw.v1";

enum class FilterKind : std::uint8_t { highPass, lowShelf, bell, highShelf, lowPass };
enum class Slope : std::uint8_t { db12 = 12, db24 = 24 };
Expand Down
Loading
Loading