Skip to content

Harmonice P0: stereo lead Pitch Tune, register-aware ensemble and compact switch - #529

Merged
masarray merged 28 commits into
mainfrom
integration/harmonice-lead-ensemble-20261111
Nov 11, 2026
Merged

masarray merged 28 commits into
mainfrom
integration/harmonice-lead-ensemble-20261111

Conversation

@masarray

@masarray masarray commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

November 11 integrated completion checkpoint — exact SHA d5e4387f44f07601c5530ad2de45ad445b5d2b8b

Implementation scope complete for software qualification; NOT a physical audio release certification. The current PR is clean and 0 commits behind main@fd2dd0c4. No second PCM authority or GUI implementation.

  • Harmonice stereo lead Pitch Tune, LOW/MID/HIGH register continuity, explicit two-voice Duo, and distinct native unison Doubler with versioned migration and compatible presets.
  • One reusable native My Presets bar and typed durable per-catalog .armixfx repository for Harmonice, Compressor, EQ, Vocal Throw; Save As / Overwrite / Rename / Delete / Recall; exact ChannelId/slot/instance/epoch/revision lease; accepted DSP settings only, no file I/O on callback.
  • EQ Recall 8-band serialization (one typed SPSC edit at a time) with actual AUDIO ACK + applied readback, wrong-catalog/stale response refusal, explicit partial-apply warning and 15s UI deadline vs native 12s batch watchdog; no false atomic rollback assertion.
  • Full exact-SHA native-assembled Chromium test PASS: #42994757894. Focused native contracts, Harmony DSP and per-PR UI tests PASS on this SHA.
  • Native .armixfx store + actual JUCE accepted DSP snapshot test for all four FX 2/2 PASS on #42972620482; current source-only tests scoped, not repeated for UI-only SHA.
  • One exact-SHA full Windows MSVC/FAT + Inno installer preview: #42995166158 (check final result/artifacts before upgrading this box).
  • Real user/vocal HIGH + Doubler A/B listening, physical ASIO 64/128/256 buffer/XRUN/device restart, preset cold-reopen on a different real ChannelId. Synthetic/UI transport ACK mocks do not prove acoustics, stability or audibility.

Merge decision: preserve Draft until latest Windows and the separate hardware listening gate are either evidenced or explicitly retained as a non-release qualification issue. Do not silently infer field acceptance from green CI. Cross-thread main work (multi-output and maintainability) must remain untouched. See M4.1 engineering note.


Implementation

  • Separate stereo lead resynthesis from the mono backing shifters. Shared fractional pitch marks and per-channel PCM preserve the lead's stereo content. Correction follows a slow note center with a deadband, bounded strength, voiced confidence and note acquisition. Pitch selection now uses the shortest strong correlation peak rather than its leading shoulder.
  • Stable LOW, MID and HIGH roles plus lower/upper support. A bounded diatonic planner retains common tones within noncrossing register bands. LOW and HIGH are present with two voices. Their presence is weighted before spatial rendering with normalized total channel-mix power. Independent sustain vibrato restarts its envelope on confirmed note changes.
  • Compact 32×16 Pitch Tune switch in the approved GUI. Native checked state follows matching APPLIED ACK and readback. Presets leave the operator's correction state intact. Same catalog ID, accepted settings schema, PCM owner, shared room and 1536-sample PDC at 48 kHz.
  • Offline runner adds dry, tuned lead, backing-only and mix renders. Rebased onto main@a07b16e1c6f04473d328ddd1deab607774375ee3; the intervening docs(architecture): executable maintainability workpack, ownership map and new-thread prompt #528 is a documentation change. DRAFT Harmonice P1 — nine-file offline study cleanly based on merged branded main #521 remains the separate 24/16 ms research branch.

Reference decisions

Reference Decision
Waves Tune Real-Time, Melodyne, AutoTune Adapt voiced gating, tolerance, transition handling and the distinction between note center and modulation. Offline per-note editing requires future context and is unsuitable for this callback.
TD-PSOLA Adapt the existing bounded overlap-add renderer to a stereo lead path. Approximate epochs and spectral envelope preservation require listening and measurement.
Antares Harmony Engine, Eventide MicroPitch Adapt independent modulation and timing using the existing singer profiles. Depth and singer identity require perceptual qualification.
Waves Harmony, Cubase VariAudio, TC-Helicon VoiceLive 3, SATB and embellishment Apply register separation, common tones and bounded motion. Chord voicing, suspensions, anticipations and passing notes require trustworthy chord/phrase context. Music Track supplies key/scale today.

Qualification

  • Local DSP, pitch-sync, spatial, Music Guide, offline render self-test, assembly contract and approved Pages build passed. New PCM tests exercise four registers, 48/96 kHz, stereo/mono, color and block parity, detune, wide vibrato and disable ramp.
  • Draft pending exact-SHA Windows/UI checks and singer listening on dry/main/candidate renders. Physical ASIO/XRUN/FAT, full-music qualification, chord input and advanced formant verification remain open. No release requested from this draft.

Exact-SHA evidence

  • Native DSP PCM, fast native and fast UI passed. Full Chromium passed with the OFF/ON captures in the Chromium artifact. Windows FAT package lane passed on the same SHA, with MSVC, 80/80 CTest (including legacy Harmony state and warm bypass/PDC), packaging verification, and historical installer upgrade/rollback. Installer preview and FAT preview ZIP are available for hardware qualification.
  • Three local Chromium viewports (1366×768, 720×600, 390×844) passed the assembled native editor tests with emulated JUCE transport. OFF and ON screenshots use the built editor. Keyboard activation, 32×16 geometry, preset independence, reopen, and ACK/readback fencing are exercised.
  • Synthetic stereo, Wet=0: +35 cents input settles at +14.3–14.6 cents across 82–1047 Hz. At 82 Hz prior main measured +101.9 cents. For this fixture side/mid stays around −9 dB vs about −105 dB in main. A ±55-cent 5 Hz vibrato retains about 104–105 cents P10–P90. Mid-glissando, sustained unvoiced noise and silence intervals were sample-exact to delayed dry in a separate synthetic probe.
  • Three VocalSet mono takes rendered through both versions. LOW/HIGH RMS relative to MID gained ~1.9–2.2 dB. Absolute LOW/HIGH dropped slightly on the soft vowel take. Matched-RMS WAVs permit listening comparisons, while intelligibility in a backing track and individual singer realism remain unqualified.
  • Linux single-engine, 48 kHz/64 samples/5 voices with active correction (µs, p50/p95/p99/max): main 26.24/92.56/200.31/337.65; candidate 25.63/61.19/137.03/214.94. Both had zero timed blocks over 1.333 ms there. At 96/192 kHz on this shared host both had occasional over-budget blocks. Hardware XRUN and full-mixer callback timing are separate gates.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui b582f2c

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat b582f2c

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Deploying arsonmix with  Cloudflare Pages  Cloudflare Pages

Latest commit: d5e4387
Status: ✅  Deploy successful!
Preview URL: https://5f42d59b.arsonmix.pages.dev
Branch Preview URL: https://integration-harmonice-lead-e.arsonmix.pages.dev

View logs

Copy link
Copy Markdown
Owner Author

Owner-reported UX parity addition to preserve in this active Harmonice P0 source branch:

Current main GUI has only VOICES 3/4/5 while factory Natural Duo selects voices=2. Native settings already support 2. Please include a first-class visually equal 2 button (or account for it in an immediate follow-on without overlapping this branch), match accepted DSP ACK/readback, keyboard/accessibility, show selected 2 on Natural Duo, and add desktop/compact Chromium regression/screenshots.

Do not confuse 2 harmony voices with a true unison Doubler; dedicated Doubler DSP mode needs separate versioned schema/milestone. A shared native user-preset feature for EQ/Compressor/Harmonice/Vocal Throw is likewise separate from P0 pitch-tune quality work.

Canonical owner execution spec: docs PR #532 · tracking issue #533. Keep #529's stereo lead, natural Pitch Tune, existing PDC, premium compact toggle, native ACK/readback and CI evidence intact.

* fix(harmony): keep stable signed epochs for quiet/high backing vowels

* fix(harmony): bridge brief pitch-confidence gaps and prevent PSOLA dropout noise

* test(harmony): cover soft soprano signed epochs and 64/257 block parity

* fix(harmonice-ui): expose supported two-harmony-voice Duo selector

* test(gui): exercise Natural Duo preset and direct two-voice native readback

* test(harmony): assert VOICES 2 and Duo preset parity in approved editor

* style(harmonice): fit four voice buttons on compact editor widths

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui a1ef226

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat a1ef226

* fix(harmony): smooth voiced and epoch handoffs on noisy long vibrato without callback allocation

* feat(harmonice): hard-pan LOW/HIGH roles and prioritize high-register audibility

* feat(harmonice): perceptual constant-power stereo width with Space zero preserved

* test(harmonice): long vibrato/noisy chorus 5-voice continuity, hard-pan level and PCM parity

* fix(harmony): sub-sample epoch alignment for mono HIGH/LOW backing voices

* feat(harmonice): directional HIGH intelligibility without added room or latency

* feat(harmonice): retain HIGH direct clarity inside wide spatial stage

* test(harmonice): verify HIGH direct focus at wide stage and Space0 neutrality
… renders

* test(harmony): render authentic LOW/MID/HIGH independent backing stems and verify linear recombination

* feat(harmony-ab): report independent register RMS for HIGH/MID/LOW diagnosis

* ci(harmony): qualify native offline register-stem A/B edits with inexpensive DSP lane

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 2a8c4e8

Copy link
Copy Markdown
Owner Author

2026-11-11 field retest → P0 M2 milestone integrated

Owner still reports very short crackle/stutter on loud/chorus/long singer vibrato, especially HIGH; LOW is already noticeable but wants harder left/right perceived depth. This is an acoustic blocker, regardless of past Windows 80/80 CTest or successful synthetic CPU profile.

Changes reconciled into this PR via merged #541 (engine continuity/role stereo) and #543 (isolated role-stem diagnostics). Current exact candidate: 2a8c4e82a149e160f02a7aa7687b06642882445f.

Engine: smooth PSOLA validity (5ms) and renderer transition (30ms) instead of immediate granular phase flip; tolerate up to 5 energetic uncertain F0 windows (~33ms) but still release real silence; 8ms amplitude gate rather than 2ms; bound/slew input F0 period between analysis hops; fractional peak refinement for mono LOW/HIGH; hard-width LOW/HIGH placement with prepared constant-power sqrt(Space) and high direct-position intelligibility gain. No extra plugin, no heap in PCM callback, unchanged 1536-sample PDC @48k, lead preserved at correction OFF and Wet0.

Tested on this exact SHA: Native DSP compile & PCM regression PASS, fast native PASS, fast UI PASS, and existing Windows PR quick lane PASS. Added deterministic synthetic 5.1Hz / 70-cent vibrato, high chorus level, repeated 14ms consonant/noise, 48k/64 vs 257 frame parity, 5-voice continuity/finite/mono; role stem A/B self-test verifies LOW+MID+HIGH recombine into the full wet-minus-dry backing.

Owner-directed single exact-source Windows FAT dispatched: run #42913531733. No public main merge yet.

Next real admission, not optional: adult singer lead (quiet, loud chorus, sustained vibrato) against dry, backing-only and isolated 14_low/15_mid/16_high recordings from the same source; compare artifact audibility, RMS, glitch boundaries and formants; physical ASIO 64/128/256 sample callback/XRUN/cpu evidence on the same PC. Do NOT claim crackle fully fixed solely from CTest. P1 true Doubler #537 and shared preset storage #539 remain isolated draft milestones.

Copy link
Copy Markdown
Owner Author

CI cost optimization merged into main via #544 and #546. Past Windows log proved default 80-target build ~18 min, 80 CTest execution 8.11 sec. Next owner-authorized /arsonmix-ci fat <NEW_EXACT_PR_SHA> on a Harmonice-only diff will now use trusted workflow YAML from main, checkout PR SHA exactly and build real ARMixConsole + 12 relevant native test targets, run 13 matched CTests and still package/verify installer, Windows GUI and historical Inno rollback. File allowlist for #529 currently passes (16/16 files), but mixed core/device/other changes fall back to full CTest. /arsonmix-ci native, main pushes and release verification retain complete 80+ test build and CTest. NO new costly Windows run requested for the already-qualified 2a8c4e82... SHA; its existing FAT #2113 passed with artifacts. Focused runtime speed-up remains a projection until a new distinct SHA is qualified.

* feat(harmony): bounded period tracker rejects one-off octave errors without resetting active PSOLA grains

* fix(harmony): preserve overlapping PSOLA grains through octave outliers and retune only confirmed leaps

* test(harmony): two-frame harmonic octave rejection, sustained transition and bounded PSOLA period slew

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat 7496fee

masarray commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner Author

Cross-thread maintainability integrated update (2026-11-11). #569 is now MERGED to main fd2dd0c4d9cb78abd34c6f12e28f33f0e8a55b74 (source head 798f3151ad728fded6af77e31a15396ad82cc95e), Windows MSVC 88/88 CTest PASS: https://github.com/masarray/arsonmix/actions/runs/42968789458. It tightens the existing shared CONTROL-thread NativeFxControlRequest to require native FX integer slot, string requestId and correctly typed optional workspaceToken while retaining logical epoch 0 and hpres- vs harm- separation. No Harmonice DSP, Main.cpp, editor JS, presets or callbacks changed in #569.

Rechecked latest #529 head 6548800cf708e5d7263e6e7986e69680432f6e34: its parser file is still historical blob 257a7a0eb0a8aa045c090ae87be05112aaa5a014; current main parser is 52d02ebab5d890605ed04b792e1679d49882168f. #529 does NOT change that file or tests/native_fx_registry_extension_test.cpp, so bringing main forward will provide the hardened parser rather than an FX host conflict. Its approved Harmony editor and user-preset payloads were checked: string requestId, numeric/integer slot, exact ChannelId/epoch/revision/instance and optional string workspaceToken. Do not treat the old standalone #529 Windows/Chromium success as qualification of its future combined final HEAD: reconcile current main and rerun relevant exact-SHA checks before merge/release. Hardware vocal/ASIO FAT still unproven; no new signoff gate or owner manual Actions request.

…d DSP snapshots for EQ, Compressor, Harmonice, Throw

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 6548800

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 831a312

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 0660032

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat ac5e6c1

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui 2a3673f

Copy link
Copy Markdown
Owner Author

M4 cross-thread checkpoint — one native My Presets service, 4 built-in FX

Verified and committed, without resetting other threads:

  • 7258712f: nativeBuiltinFxUserPreset reuses the .armixfx typed native store for EQ/Compressor/Harmonice/Vocal Throw, exact ChannelId/instance/slot/epoch/revision/catalog lease and actual CONTROL-thread accepted DSP parameters; legacy Harmonice contract preserved. List/read/rename/delete do not alter PCM; saves require quiescent DSP, never audio-thread file I/O.
  • 0057cc58 + 6548800: one compact reusable ArSonMixBuiltinFxPresetBar; Compressor Save As, Recall via unchanged native COMP SPSC -> AUDIO ACK -> matching accepted snapshot; CSS stays with 18 approved stylesheet owners, no extra GUI/PCM authority.
  • 92367d4 + 0660032: Vocal Throw uses same user bar, excludes session Music source/detected BPM/throw history; Compressor tests scoped to their own editor.
  • ac5e6c15: two-parent reconcile with main@fd2dd0c including the newer strict NativeFxControlRequest; behind=0 when inspected; future targeted Windows preset CI now has a cheap tip-delta scope gate, so UI-only commits do not rerun Windows CTest.

Measured CI: Real JUCE two-target Windows Release CTest 2/2 PASS run #42972620482: disk store + true accepted snapshots from four JUCE processors, cold reopen and wrong-catalog rejection. Full Chromium PASS on the three-editor candidate run #42974108206, including Compressor, Vocal Throw, Harmonice, WIRE, responsive mixer. All fast CI succeeded on ac5e6c15.

Parallel owner coordination: Another active agent added 2a3673f0 on top of ac5e6c15 with EQ's ordered eight-band ACK/readback and an explicit fail-closed partial-apply report. No overwriting or parallel reimplementation. Native/UI/Harmony quick checks are already PASS on 2a3673f0. A single exact-SHA UI FAT command /arsonmix-ci ui 2a3673f0b210e1e1988e49a72dbadaddb69a2387 was posted by the concurrent agent (comment 6789203672), so do not duplicate. My prior FAT command for ac5e6c15 may be rejected due to the newer head; do NOT interpret it as proof for EQ. Only request one new Windows FAT when the final EQ head stabilizes.

Open gates (not proven by synthetic/stub tests): full Windows host/installer FAT for final EQ-bearing SHA, real native cross-channel cold restart/disk UAT, physical ASIO at low buffers, human-singer HIGH continuity/crackles and Duo/Doubler listening A/B. Keep #529 Draft until qualified. User-presets M4 GUI is 4/4 implemented on latest branch but the EQ flow is sequential/ordered with explicit partial failure semantics, not an atomic PCM bank switch.

Copy link
Copy Markdown
Owner Author

Milestone M4 — native Parametric EQ My Presets (exact HEAD 2a3673f0b210e1e1988e49a72dbadaddb69a2387)

Commit: 2a3673f

  • Added compact My Presets select + Save As / overwrite / rename / delete using the existing shared mixer-builtin-fx-preset-bar.js and native .armixfx backend. No second renderer, no additional stylesheet owner; the styles live in mixer-fx-rack.css.
  • An 8-band preset cannot be applied atomically by the existing one-band native mailbox. The EQ editor therefore serializes only changed bands: exact eq- request -> AUDIO ACK -> exact accepted snapshot -> next band. Save/Recall never infers a live DSP change from disk or a browser control.
  • Each step validates ChannelId/slot/instance/epoch/revision via the existing owner; full Recall is reported only after all accepted 8-band settings match (with float32-safe numeric tolerances). Wrong instance, reject, timeout, or graph invalidation aborts with explicit partial-audio-state warning, not false success/rollback.
  • Shared bar has optional type-aware settings equivalence and explicit failed-recall cancellation. This also corrects the modified user preset still shown as selected UX after live edits.
  • approved_native_peq_smoke.py now covers real Chromium Save As -> 3 changed bands -> confirm Recall -> wrong-catalog refusal -> sequential ACKs + a mismatched appliedRequestId -> final verified selection -> disk-only Delete without new DSP edit.
  • One /preview/ GUI and native JUCE PCM authority unchanged. No realtime callback edits, new malloc, IO, or second audio renderer.

Evidence at commit: Harmony fast DSP https://github.com/masarray/arsonmix/actions/runs/42975433860 PASS, native fast contracts https://github.com/masarray/arsonmix/actions/runs/42975433509 PASS, UI fast contracts https://github.com/masarray/arsonmix/actions/runs/42975433663 PASS; native preset CTest workflow https://github.com/masarray/arsonmix/actions/runs/42975433616 PASS for the tip-diff skip gate (Windows two-target CTest intentionally skipped; last relevant native-source candidate 06600329 ran and passed). Exact-HEAD full Chromium run https://github.com/masarray/arsonmix/actions/runs/42975551635: the Native EQ real Chromium step PASS, remainder still in progress at checkpoint.

Not qualified: Windows physical ASIO playback, real singer HIGH robotic/stutter/crackle, and any claim of atomic all-eight DSP application. PR remains draft until broader evidence; no automatic main merge.

Copy link
Copy Markdown
Owner Author

/arsonmix-ci ui d5e4387

Copy link
Copy Markdown
Owner Author

/arsonmix-ci fat d5e4387

Copy link
Copy Markdown
Owner Author

M4.1 closeout: honest EQ partial-recall lifecycle — exact SHA d5e4387f44f07601c5530ad2de45ad445b5d2b8b

New commit: d5e4387

Issue corrected: the shared My Presets bar previously assumed every FX Recall completes within 5.5s, while Parametric EQ sends up to eight individually AUDIO-acknowledged band changes, and its own transaction deadline is 12s. It could drop the preset receipt early and then print "all bands verified" on a later acknowledgement without the user's saved selection being verified. The UI also used the false phrase "audio unchanged" following mismatched accepted readback.

Implementation: optional per-effect recall deadline (EQ 15s, existing single-ACK FX remain 5.5s), explicit persistent partial-audio-state diagnostic after EQ band reject, and nonmisleading shared readback mismatch text plus dirty-state recomputation. No changes to native DSP, callback, filesystem contract, 18 approved CSS owners, WIRE/PCM graph, or ASIO.

New real Chromium test: after successful all-band Recall, modify two bands, issue a second Recall, let band 1 pass exact AUDIO ACK/readback, reject band 2, confirm: no more band writes; user preset is not marked active; Save As re-enabled; partial-audio warning survives a later accepted DSP snapshot. Existing wrong-catalog, old applied-request ID, disk-only Delete and four viewport checks remain intact.

Current evidence: fast native contracts, Harmony DSP, fast UI PASS on exact HEAD; Native EQ real Chromium smoke including negative partial case PASS in exact-SHA Full UI https://github.com/masarray/arsonmix/actions/runs/42994757894 (other UI steps still in progress at comment). One owner-authorized, source-pinned full Windows FAT + Inno installer preview has been dispatched: https://github.com/masarray/arsonmix/actions/runs/42995166158 (currently in progress). No duplicated expensive FAT run.

Outstanding release gate: field listening with dry/lead/HIGH/DOUBLER A/B and actual ASIO interface (buffers 64/128/256, XRUN, device restart); portable preset reopen/recalled on another physical channel after restart. Software CI is not evidence of those physical observations. PR stays Draft until qualification; do not silently merge or claim sound issue resolved.

@masarray
masarray marked this pull request as ready for review November 11, 2026 09:58
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T09:59:31.516801Z d5e4387 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@masarray
masarray merged commit 1a3741a into main Nov 11, 2026
22 checks passed
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