aqua-feel: diff faustwasm against the native libfaust path (unheard) #20

Merged
aqua merged 4 commits from aqua/aqua-feel-native-diff into main 2026-11-10 14:01:40 +00:00
Member

Nothing here was heard. Offline buffers only: same Faust source on both sides, 48 kHz, mono, 512-frame blocks.

What this is

A tool (tools/aqua-feel/native-diff.mjs plus tools/FaustNativeRender) that renders a Faust source through aqua-feel's faustwasm path and through the daemon's native libfaust path (AquaSynthPatchCompiler), then compares the buffers (max error, relative RMS error, LUFS, true peak, centroid, gate flags). The report is docs/renders/aqua-feel-native-diff-2026-11-10.md with raw JSON beside it.

What it found

  • The two sides compile against different standard-library text. The wasm bundle's si.smooth is *(1.0 - s) : + ~ *(s), which stalls in float32 (the thruster's rpm freezes at 4796.632 for a target of 4800). The sandbox's faustlibraries master uses imp(3), which does not stall. Starfire's Faust 2.85.5 has the old form; I read only that file's smooth line over ssh and did not render there.
  • 13 sources that call si.smooth/si.smoo (12 plus the tract vowel): with the imp(3) form pinned on both sides they agree to -75 dB or better. As shipped (each side's own stdlib), nine of the 13 differ at waveform level by -16 to -50 dB. Level, true-peak, centroid and gate-flag deltas stay small in every condition (max |LUFS| 0.017 dB, |true peak| 0.152 dB, centroid 0.16 %), and no gate flag differs.
  • Unexplained: dx7-algorithm-32-additive-organ sits at -79.3 (library), -79.5 (old) and -79.5 dB (imp3), so its residual is not the pinned smoother. Pinning rewrites si.smooth/si.smoo in the source text only, so a smoother inside a library function is a candidate. Not isolated.
  • AquaSynth does not pin faustlibraries. The daemon compiles against whatever share/faust the host has. A pin is proposed in the report; it is not made here and is the owner's call.

Honest limits

  • The tolerances in native-diff.mjs are tripwires fit to these 13 sources, not taste.
  • The isolation probes (Soul pass) are scratch scripts under /var/lib/mind-aqua-self/soul-nd-1, not committed; the cause numbers are not reproducible from this repo alone.
  • Not tested: aqua-feel items that do not call a smoother, the Ding event mixes, block sizes other than 512, live hosts, any render on Windows.
  • The tract row's FAIL onsetMs is the patch-group rule applied by the script, on both sides; it is not a repo gate result. The tract source is not in the repo.

Base

Retargeted to main after review: aqua/store-filename-ipa (5a77dc8) is already an ancestor of main, so the diff is the three commits plus a doc fix (46188d1).

Drive: node tools/aqua-feel/native-diff.mjs <FaustNativeRender dir> --items smoother --smoother old|imp3.

🤖 Generated with Claude Code

**Nothing here was heard.** Offline buffers only: same Faust source on both sides, 48 kHz, mono, 512-frame blocks. ## What this is A tool (`tools/aqua-feel/native-diff.mjs` plus `tools/FaustNativeRender`) that renders a Faust source through aqua-feel's faustwasm path and through the daemon's native libfaust path (`AquaSynthPatchCompiler`), then compares the buffers (max error, relative RMS error, LUFS, true peak, centroid, gate flags). The report is `docs/renders/aqua-feel-native-diff-2026-11-10.md` with raw JSON beside it. ## What it found - The two sides compile against different standard-library text. The wasm bundle's `si.smooth` is `*(1.0 - s) : + ~ *(s)`, which stalls in float32 (the thruster's rpm freezes at 4796.632 for a target of 4800). The sandbox's faustlibraries master uses `imp(3)`, which does not stall. Starfire's Faust 2.85.5 has the old form; I read only that file's `smooth` line over ssh and did not render there. - 13 sources that call `si.smooth`/`si.smoo` (12 plus the tract vowel): with the imp(3) form pinned on both sides they agree to -75 dB or better. As shipped (each side's own stdlib), nine of the 13 differ at waveform level by -16 to -50 dB. Level, true-peak, centroid and gate-flag deltas stay small in every condition (max |LUFS| 0.017 dB, |true peak| 0.152 dB, centroid 0.16 %), and no gate flag differs. - **Unexplained:** `dx7-algorithm-32-additive-organ` sits at -79.3 (library), -79.5 (old) and -79.5 dB (imp3), so its residual is not the pinned smoother. Pinning rewrites `si.smooth`/`si.smoo` in the source text only, so a smoother inside a library function is a candidate. Not isolated. - **AquaSynth does not pin faustlibraries.** The daemon compiles against whatever `share/faust` the host has. A pin is proposed in the report; it is not made here and is the owner's call. ## Honest limits - The tolerances in `native-diff.mjs` are tripwires fit to these 13 sources, not taste. - The isolation probes (Soul pass) are scratch scripts under `/var/lib/mind-aqua-self/soul-nd-1`, not committed; the cause numbers are not reproducible from this repo alone. - Not tested: aqua-feel items that do not call a smoother, the Ding event mixes, block sizes other than 512, live hosts, any render on Windows. - The tract row's `FAIL onsetMs` is the patch-group rule applied by the script, on both sides; it is not a repo gate result. The tract source is not in the repo. ## Base Retargeted to main after review: `aqua/store-filename-ipa` (5a77dc8) is already an ancestor of main, so the diff is the three commits plus a doc fix (46188d1). Drive: `node tools/aqua-feel/native-diff.mjs <FaustNativeRender dir> --items smoother --smoother old|imp3`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add FaustNativeRender and native-diff.mjs; render thruster, two sfxr
patches and a tract vowel through both and record the numbers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A Soul pass found the two sides compile against different stdlib text:
the wasm bundle's si.smooth stalls in float32, the sandbox's faustlibraries
master does not. Reword the report, README and render.js; fail on length
mismatch and render errors; check output count; match controls exactly;
default output under the temp dir.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Record which faustlibraries text each host compiles against (Starfire
2.85.5 has the stalling smooth; the sandbox master has imp(3)). Add
--items smoother and --smoother old|imp3 (same rewritten source on both
sides) and limits fit to the measured deltas; control matching normalises
the leading slash. Report extended; faustlibraries pin proposed, not made.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
aqua changed target branch from aqua/store-filename-ipa to main 2026-11-10 14:01:30 +00:00
Author
Member

Maintainer review (Soul pass by a separate agent, then my fixes). Nothing was heard.

Claims checked against the committed JSON and code

  • 13 sources (12 + tract) at -75 dB or better with imp(3) pinned: confirmed, worst advanced-bird-syrinx-graph -75.4 dB.
  • dx7-algorithm-32-additive-organ: -79.3 (library), -79.5 (old), -79.5 (imp3). The description said -79.5 under all three; corrected in the report. Still unexplained.
  • Limits in native-diff.mjs (0.1 dB, 0.5 dB, 1 %, -60 dB imp3) match the report; metric maxima (LUFS 0.017, true peak 0.152, centroid 0.16 %) match; no gate flag differs in any of the 39 rows.
  • No faustlibraries pin (.gitmodules, NativeFaustRuntime.cs:530, :651): confirmed.
  • node tools/aqua-feel/test.mjs: 26 passed (scratch worktree).

Unproven (could not run): Starfire's signals.lib (read once, not re-read); the isolation probes (soul-nd-1, uncommitted) and the thruster stall numbers 4796.632 / 4797.657; the +1 dB / one-sample-shift mutation check and the "byte for byte" rerun (need dotnet FaustNativeRender, libfaust 2.90.20, faustlibraries 3d8c6ef); native-diff.mjs has no test coverage of LIMITS.

Defects fixed in 46188d1 (docs/comments only): the report preamble said the script has no tolerance (it exits 1 on a LIMITS violation); the script header said "19 sources" (13) and had a garbled dx7 aside; the 13-row table carried stray | ; | ; cells.

Base: 5a77dc8 is already an ancestor of main, so main..head is the three feature commits plus this fix. Retargeted to main.

Maintainer review (Soul pass by a separate agent, then my fixes). Nothing was heard. **Claims checked against the committed JSON and code** - 13 sources (12 + tract) at -75 dB or better with imp(3) pinned: confirmed, worst `advanced-bird-syrinx-graph` -75.4 dB. - `dx7-algorithm-32-additive-organ`: -79.3 (library), -79.5 (old), -79.5 (imp3). The description said -79.5 under all three; corrected in the report. Still unexplained. - Limits in `native-diff.mjs` (0.1 dB, 0.5 dB, 1 %, -60 dB imp3) match the report; metric maxima (LUFS 0.017, true peak 0.152, centroid 0.16 %) match; no gate flag differs in any of the 39 rows. - No faustlibraries pin (`.gitmodules`, `NativeFaustRuntime.cs:530`, `:651`): confirmed. - `node tools/aqua-feel/test.mjs`: 26 passed (scratch worktree). **Unproven (could not run)**: Starfire's `signals.lib` (read once, not re-read); the isolation probes (`soul-nd-1`, uncommitted) and the thruster stall numbers 4796.632 / 4797.657; the +1 dB / one-sample-shift mutation check and the "byte for byte" rerun (need dotnet `FaustNativeRender`, libfaust 2.90.20, faustlibraries 3d8c6ef); `native-diff.mjs` has no test coverage of `LIMITS`. **Defects fixed in 46188d1 (docs/comments only)**: the report preamble said the script has no tolerance (it exits 1 on a LIMITS violation); the script header said "19 sources" (13) and had a garbled dx7 aside; the 13-row table carried stray `| ; | ;` cells. **Base**: `5a77dc8` is already an ancestor of main, so `main..head` is the three feature commits plus this fix. Retargeted to main.
aqua merged commit 8744975094 into main 2026-11-10 14:01:40 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/AquaSynth!20
No description provided.