Rename project to AquaSynth

This commit is contained in:
Meta Vens 2026-05-16 05:49:44 +01:00
commit 64d0a6bf4f
47 changed files with 516 additions and 515 deletions

View file

@ -1,8 +1,8 @@
# Aquarium Synth Audio Doctrine
# AquaSynth Audio Doctrine
## Mission
AquariumSynthCSharp is the authoring and compiler surface for Aquarium synth
AquaSynth is the authoring and compiler surface for AquaSynth
patches. It should let us sketch sound quickly, compile to Faust, inspect the
graph, compare results, and hand stable contracts to the C#/Vortice side.
@ -64,7 +64,7 @@ That separation is the model for this repo:
- The Faust emitter owns pure signal expression.
- The engine owns scheduling, buffers, device I/O, threading, and presentation.
- Patch parameters are runtime controls, not compile-time constants. A compiled
DSP must be able to expose stable parameter paths so Aquarium can vary a sound
DSP must be able to expose stable parameter paths so AquaSynth can vary a sound
without recompiling the patch.
- Host parameters should be smoothed where they cross into signal-rate behavior.
@ -110,7 +110,7 @@ authorities.
as a general envelope field.
- Host/MIDI note mode should expose stable note frequency and note gate controls
that the engine can wire to MIDI note-on/note-off behavior.
- Faust-managed polyphony is the preferred MIDI path. Aquarium should describe a
- Faust-managed polyphony is the preferred MIDI path. AquaSynth should describe a
single voice graph and emit Faust's standard `freq`, `gain`, and `gate`
controls with `[midi:on][nvoices:n]` options, leaving MIDI decoding and voice
allocation to Faust architectures unless a concrete target proves that
@ -122,7 +122,7 @@ authorities.
## Metrics
Analysis exists to catch regressions and support search, not to crown winners.
Aquarium Faust output can be rendered through Faust-generated C# in authoring
AquaSynth Faust output can be rendered through Faust-generated C# in authoring
tests, which gives us candidate audio buffers without depending on the old Rust
renderer. That is only half of parity: reference targets still need a real
external render or a captured, lawful fixture before the comparison means

View file

@ -2,7 +2,7 @@
## Objective
Make DX7 reference rebuilds prove Aquarium can emulate the machine, not merely
Make DX7 reference rebuilds prove AquaSynth can emulate the machine, not merely
draw a similar operator graph. The hard `PRC SYNTH1` target showed the current
DSL surface is expressive enough to describe the topology, but the importer
math is still fake in the places that matter perceptually.
@ -10,7 +10,7 @@ math is still fake in the places that matter perceptually.
## Current Mechanism
- `dexed-py` renders lawful public-domain or project-authored DX7 references.
- Aquarium renders candidate patches through Faust-generated C#.
- AquaSynth renders candidate patches through Faust-generated C#.
- Tests compare rendered audio with log-mel, envelope, duration, RMS,
zero-crossing, centroid, and listening WAV artifacts.
- `OperatorGraph` owns topology: operators, routes, carriers, feedback, and
@ -33,11 +33,11 @@ math is still fake in the places that matter perceptually.
- Render project-authored DX7 algorithm-32 patches with one audible carrier.
- Sweep operator output levels.
- Fit output level to linear carrier amplitude.
- Verify Aquarium single-carrier renders match relative RMS.
- Verify AquaSynth single-carrier renders match relative RMS.
2. **Two-operator modulation index**
- Render a carrier plus one modulator across modulator output levels.
- Fit DX7 output level to Aquarium route/index scaling using log-mel and
- Fit DX7 output level to AquaSynth route/index scaling using log-mel and
harmonic energy, not RMS.
- Keep carrier amplitude fixed while calibrating modulation index.
@ -46,7 +46,7 @@ math is still fake in the places that matter perceptually.
- Fit feedback amount separately from route/index scaling.
4. **Ratio detune**
- Lower DX7 ratio-mode detune into Aquarium operator ratios.
- Lower DX7 ratio-mode detune into AquaSynth operator ratios.
- Keep detune as frequency behavior, not a modulation or chorus feature.
5. **Algorithm output compensation**
@ -70,14 +70,14 @@ math is still fake in the places that matter perceptually.
unlike the current linear `env=rl` approximation.
- Dexed's rendered audio does not hear that raw state directly. The operator
path samples EG once per 64-sample block and linearly interpolates the
applied gain across the block, so a DX7-capable Aquarium envelope must
applied gain across the block, so a DX7-capable AquaSynth envelope must
model both the rate/level state machine and its block-interpolated output.
- Aquarium staged operator envelopes now support per-segment curves, e.g.
- AquaSynth staged operator envelopes now support per-segment curves, e.g.
`env=rl rates=.00145,.0508,.5268,.35 levels=2,.297,.0156,0 curves=lin,exp,exp,exp`.
This is a general staged-contour feature, not a DX7-specific syntax escape.
- `Dx7SysEx.ApproximateAppliedRateLevelEnvelope` lowers a DX7 EG into a
curved staged contour by tracing Dexed-style block-interpolated applied
gain and normalizing it against Aquarium's separate operator-output level.
gain and normalizing it against AquaSynth's separate operator-output level.
On `PRC SYNTH1`, this improves log-mel from `0.24476814` to `0.17186502`,
envelope distance from `0.43700194` to `0.13057204`, and zero-crossing
ratio from `0.7931764` to `0.7815517` while keeping RMS at unity.
@ -117,11 +117,11 @@ math is still fake in the places that matter perceptually.
envelope distance at `<= 0.14`, zero-crossing ratio in `0.8..1.11`, and
score at `>= 0.6`.
- `Piano Bass` exposed a real pitch bug: the candidate ignored the DX7 voice
transpose byte, so `transpose=12` rendered one octave too high. Aquarium
transpose byte, so `transpose=12` rendered one octave too high. AquaSynth
now uses `Dx7SysEx.NoteFrequencyHz(midiNote, transpose)`, where `24` is
neutral.
- `ANLGSYN 1` exposed a second real pitch/frequency bug: DX7 fixed-frequency
operators were being lowered as fake note ratios. Aquarium now maps fixed
operators were being lowered as fake note ratios. AquaSynth now maps fixed
operators through the Dexed log-frequency formula and divides the absolute
Hz by the graph base frequency. This restores the low fixed-frequency
carrier/modulation buzz for op1/op3 instead of flattening the voice into
@ -129,13 +129,13 @@ math is still fake in the places that matter perceptually.
- Community listening then exposed two note-dependent lowering gaps:
operator key-scaling was computed against hardcoded MIDI note 60, and DX7
operator rate scaling was parsed but not applied to the block-interpolated
envelope trace. Aquarium now lowers both against the effective played
envelope trace. AquaSynth now lowers both against the effective played
MIDI note after voice transpose. This makes `RES SYNTH1` attack much
closer and improves `Piano Bass` log-mel, with graph gain rebalanced to
`0.72` for `Piano Bass`.
- `ANLGSYN 1` also exposed that the previous max-feedback value was too tame
for audible community patches. DX7 feedback value `7` now lowers to
Aquarium feedback `2.2`, while feedback value `5` remains at `0.19` for
AquaSynth feedback `2.2`, while feedback value `5` remains at `0.19` for
the hard PRC target. The hotter value restores much more of the 1.2-5 kHz
buzzing-harmonic band, with envelope/RMS still imperfect.
- Listening then caught that the max-feedback candidate still lost punch
@ -145,7 +145,7 @@ math is still fake in the places that matter perceptually.
gates `ANLGSYN 1` with a sustained 2.5-5 kHz band-energy check so the
old drifting version cannot pass by global log-mel score alone.
- Later listening caught `ANLGSYN 1` and `RES SYNTH1` blowing out into a
drone at the modulator peak. Until Aquarium has a more exact DX7 EG/output
drone at the modulator peak. Until AquaSynth has a more exact DX7 EG/output
model, algorithm-2 non-carrier applied envelopes cap only the first staged
peak at `0.92`. This leaves `Piano Bass` unchanged, improves `RES SYNTH1`,
and keeps `ANLGSYN 1` judged primarily by log-mel plus sustained high-band

View file

@ -1,7 +1,7 @@
# Migration Checklist
This repo is now the authoring-side home for Aquarium Synth patch scripts and
Faust generation. The Rust crate remains useful as a reference lab, but the
This repo is now the authoring-side home for AquaSynth patch scripts and
Faust generation. The AquaSynth-rs crate remains useful as a reference lab, but the
current C# surface should not depend on somebody remembering what got built
there.
@ -21,7 +21,7 @@ there.
classic 808, FM bell, wobble bass, and advanced layered patches.
- Abstract SFXR reference script using defaults and templates.
- SFXR parameter presets, mutation, shorthand atoms, and SFXR-to-patch mapping.
- Aquarium preset patches: pluck, heartbeat, voice, and SFXR named bridge.
- AquaSynth preset patches: pluck, heartbeat, voice, and SFXR named bridge.
- Patch script scoring: terse, readability, and balanced metrics.
- Audio analysis and comparison: envelope, log-mel spectrogram, spectral
features, distance metrics, and score.

View file

@ -1,10 +1,10 @@
# Reference Synth Roadmap
AquariumSynthCSharp needs external synthesis references for the same reason the
AquaSynth needs external synthesis references for the same reason the
SFXR path was useful: a real target prevents the DSL from becoming a pile of
locally plausible knobs. The goal is not to clone every synth's internals. The
goal is to use known engines and patch formats as pressure tests, then rebuild
selected sounds through Aquarium's own graph until the missing abstractions are
selected sounds through AquaSynth's own graph until the missing abstractions are
obvious.
## Objective
@ -13,18 +13,18 @@ Build a reference-driven synth library workflow:
- Parse or describe external synth patches as structured reference models.
- Render references when legally and technically practical.
- Rebuild selected references in Aquarium patch DSL.
- Rebuild selected references in AquaSynth patch DSL.
- Compare audio with analysis metrics and listening notes.
- Promote only the abstractions that make repeated reference rebuilds simpler.
- Reject reference targets we cannot turn into parity tests. Parsing a format is
inventory; proving Aquarium can reproduce the behavior is the point.
inventory; proving AquaSynth can reproduce the behavior is the point.
The DSL should grow because a reference target demanded a missing invariant, not
because a field name seemed maybe useful at 2 AM.
## Live Invariants
- Aquarium owns its patch graph. External synths are reference targets, not
- AquaSynth owns its patch graph. External synths are reference targets, not
runtime dependencies.
- Expressive parameters are part of the patch contract. Callers must be able to
change exposed values at runtime through the hosted DSP parameter API instead
@ -32,10 +32,10 @@ runtime dependencies.
- Reference importers must preserve source provenance, license status, and the
source format hash.
- Tests must compare against rendered fixtures, extracted parameter topology, or
known structural expectations that prove Aquarium can express the same behavior.
known structural expectations that prove AquaSynth can express the same behavior.
Weak "it parsed" tests do not prove expressivity, and references without a
credible parity test path should not be consumed.
- Aquarium Faust output can be rendered through Faust-generated C# for candidate
- AquaSynth Faust output can be rendered through Faust-generated C# for candidate
audio comparison. Reference audio still needs a real source fixture or renderer;
do not compare a rebuild only against itself and call that parity.
- DX7 reference audio uses `dexed-py` when available, with public-domain SysEx
@ -43,7 +43,7 @@ credible parity test path should not be consumed.
package content.
- ZynAddSubFX source is pinned under `external/zynaddsubfx` as GPL
test/development material. It may be compiled or wrapped only for parity
tests; Aquarium must not ship, link, or runtime-depend on it.
tests; AquaSynth must not ship, link, or runtime-depend on it.
- Do not add a generic graph escape hatch until a specific family of references
forces it.
- When a reference target exceeds the current voice-centric DSL, document the
@ -62,7 +62,7 @@ the Yamaha DX7 and accepts SysEx cartridge data. Its `msfa` synth engine remains
Apache-2.0, which may matter if we use code as a reference rather than only
format notes.
Pressure on Aquarium DSL:
Pressure on AquaSynth DSL:
- Operator graph representation.
- Multi-stage envelopes beyond ADSR.
@ -76,9 +76,9 @@ First deliverable:
- Add a `Dx7SysEx` parser for single voice and cartridge payloads.
- Convert one or two public-domain or project-authored DX7-style voices into
`ReferencePatch` records.
- Build an Aquarium DSL approximation using explicit FM templates.
- Build an AquaSynth DSL approximation using explicit FM templates.
- Add mel/envelope/spectral comparison against rendered Dexed output from the
public-domain fixture. Aquarium candidate rendering and `dexed-py` reference
public-domain fixture. AquaSynth candidate rendering and `dexed-py` reference
rendering exist, and `analog1.syx` voice 13 has the first thresholded parity
rebuild. The next pressure is a harder voice that actually needs audible
operator routing rather than a sine-like behavioral match. Staged operator
@ -103,7 +103,7 @@ synthesis engines. It ships a large instrument library and exposes formant
filters, state-variable filters, free envelope shapes, layered kits, modulation,
and effects routing.
Pressure on Aquarium DSL:
Pressure on AquaSynth DSL:
- Additive harmonic banks.
- Non-ADSR envelope curves.
@ -131,7 +131,7 @@ First deliverable:
The upstream ZynAddSubFX engine source is pinned as `external/zynaddsubfx`
for parity tests, currently at `3ab608c432996ba4d582176572c0b0f82328c825`.
That checkout is GPL reference machinery, not Aquarium implementation. Do not
That checkout is GPL reference machinery, not AquaSynth implementation. Do not
vendor the upstream Zyn instrument-bank submodule until its preset
license/provenance is explicit enough for this repo. Use project-authored
fixtures for parser shape and only promote external fixtures with clean source
@ -144,7 +144,7 @@ PAD, additive banks, or formant motion.
The first language-golf response is `layer`: a named layer declaration owns
engine tags, optional MIDI key range metadata, default gain, and an effect-send
label while lowering to ordinary Aquarium voices. It is intentionally only an
label while lowering to ordinary AquaSynth voices. It is intentionally only an
ownership/routing scaffold for now; it does not add PAD synthesis, free
envelopes, or effect buses by stealth.
@ -184,7 +184,7 @@ PAD engine parity across all harmonic profiles, randomness controls, or
multi-table pitch-zone behavior. `root`, `spread`, and `partials` are
authoring-time table shape, not runtime controls.
The canonical Aquarium spelling for richer spectral-table shaping is neutral:
The canonical AquaSynth spelling for richer spectral-table shaping is neutral:
`pad_mode`, `pad_bandwidth`, `pad_bwscale`, `pad_profile`, and `pad_position`.
The Zyn importer may populate those fields from Zyn's PAD controls, and the
parser still accepts older `zyn_*` names in generated parity artifacts, but
@ -204,7 +204,7 @@ repo contains categorized examples, and the standard libraries include
oscillators, filters, delays, reverbs, physical models, DX7, virtual analog
effects, wave-digital models, spatialization, and more.
Pressure on Aquarium DSL:
Pressure on AquaSynth DSL:
- General signal graph expression.
- Multichannel routing.
@ -219,7 +219,7 @@ First deliverable:
license/provenance, graph family, and expected compile behavior.
- Select small fixtures from official examples first: comb string, additive
drum, stereo reverb, physical model, WDF filter.
- Use Faust references to decide whether Aquarium needs a lower-level graph DSL
- Use Faust references to decide whether AquaSynth needs a lower-level graph DSL
beneath the current instrument patch surface.
Sources:
@ -235,7 +235,7 @@ Sources:
Surge XT is a modern GPL-3.0 hybrid synth with a large real-world patch corpus.
It is a strong long-term target, but it is too broad for the first import pass.
Pressure on Aquarium DSL:
Pressure on AquaSynth DSL:
- Multi-scene patch structure.
- Multiple oscillator algorithms.
@ -256,10 +256,10 @@ Source: [Surge XT](https://github.com/surge-synthesizer/surge)
### Tier 5: Cardinal/VCV-Style Modular Patches
Cardinal is a GPL-3.0 self-contained open-source modular synth based on VCV Rack
code. It is the right target once Aquarium needs to prove arbitrary modular graph
code. It is the right target once AquaSynth needs to prove arbitrary modular graph
expression.
Pressure on Aquarium DSL:
Pressure on AquaSynth DSL:
- Module graph representation.
- Cables as first-class edges.
@ -288,7 +288,7 @@ public sealed record ReferencePatch(
ReferenceSource Source,
IReadOnlyList<ReferenceFeature> Features,
IReadOnlyList<PatchParameter> Parameters,
string? AquariumScript);
string? AquaSynthScript);
public sealed record ReferenceSource(
string Kind,
@ -310,8 +310,8 @@ public sealed record PatchParameter(
```
This keeps source authority and runtime control authority visible. A reference
can be "known target, not yet translated" without pretending it is an Aquarium
patch, and an Aquarium patch can say which values callers may vary without
can be "known target, not yet translated" without pretending it is an AquaSynth
patch, and an AquaSynth patch can say which values callers may vary without
changing graph shape.
## Runtime Parameter Surface
@ -319,10 +319,10 @@ changing graph shape.
Faust supports this directly through UI controls such as `hslider`, `vslider`,
`nentry`, `button`, and `checkbox`. Hosted DSP code can expose a parameter map
and update control zones with `setParamValue`/`getParamValue` style APIs, so
Aquarium should compile once for a graph shape and then push parameter values at
AquaSynth should compile once for a graph shape and then push parameter values at
runtime.
Aquarium DSL needs an explicit parameter declaration surface, likely separate
AquaSynth DSL needs an explicit parameter declaration surface, likely separate
from modulation buses:
```text
@ -346,7 +346,7 @@ Lowering rules:
1. Create reference model contracts, parameter contracts, and tests.
2. Add explicit patch parameter declarations and Faust parameter emission.
3. Add DX7 SysEx parser and feature extraction.
4. Add two DX7-derived Aquarium DSL rebuilds with exposed macro controls.
4. Add two DX7-derived AquaSynth DSL rebuilds with exposed macro controls.
5. Add audio fixture workflow for rendered references.
6. Add Zyn XML feature extraction.
7. Add Faust reference catalog entries and compile checks.
@ -361,7 +361,7 @@ Lowering rules:
of fields.
- Do not compare only parse success. That proves the parser is lenient, not that
the DSL can express the sound.
- Do not use Faust as a hidden escape hatch for Aquarium patches. If a reference
- Do not use Faust as a hidden escape hatch for AquaSynth patches. If a reference
requires raw Faust, the DSL is missing an abstraction or the reference belongs
in a lower-level graph layer.
@ -370,5 +370,5 @@ Lowering rules:
- A new agent can pick one target family and know where to start.
- Every reference fixture says what feature pressure it applies.
- The DSL roadmap is driven by reference failures, not taste fumes.
- Aquarium can keep using readable reference patches while the synth library
- AquaSynth can keep using readable reference patches while the synth library
grows toward serious DSP graph expression.

View file

@ -2,13 +2,13 @@
## Objective
Find the ZynAddSubFX instruments most likely to break Aquarium's current patch
Find the ZynAddSubFX instruments most likely to break AquaSynth's current patch
language before spending time on syntax polish.
This is a feature-pressure survey, not an audio parity claim. The upstream Zyn
instrument bank is GPL reference feedstock through the pinned Zyn submodule
tree. It is development/test material only: useful for reports, parity renders,
and pressure selection, never package content or Aquarium patch-library stock.
and pressure selection, never package content or AquaSynth patch-library stock.
## Source Checked
@ -53,7 +53,7 @@ GPL PAD batch through the real Zyn oracle when the renderer is built:
Each render lands in a per-synth timestamped folder under
`artifacts/parity/zyn-upstream-pad-fixtures/`, with Zyn reference WAVs, source
table WAVs, `report.txt`, and `candidate.aqua`. The candidate is now generated
per preset by `ZynInstrumentReader.RebuildFirstPadAsAquariumScript`: first
per preset by `ZynInstrumentReader.RebuildFirstPadAsAquaSynthScript`: first
enabled PAD kit item, OSCIL harmonic magnitudes, oracle-reported table
basefreq, and basic volume/envelope scaffolding. The report names missing
semantics such as Zyn harmonic profile shaping, bandwidth/profile behavior, and
@ -62,7 +62,7 @@ library candidates.
## Pressure Conclusions
- **Named layers are real.** Anonymous Aquarium voices can sketch small Zyn
- **Named layers are real.** Anonymous AquaSynth voices can sketch small Zyn
layers, but drum kits and clonewheel-style instruments need stable layer names,
key ranges, engine identity, and per-layer routing.
- **Free envelopes are not optional forever.** Zyn's worst cases use dozens of
@ -86,7 +86,7 @@ next abstractions risk becoming loose fields on anonymous voices.
## First Responses
Aquarium now has a minimal `layer` command:
AquaSynth now has a minimal `layer` command:
```text
layer name=pad_low engine=pad min_key=36 max_key=84 gain=.07