8.4 KiB
Pink Trombone DSL Parity Plan
Objective
Cover Pink Trombone's useful pipeline with AquaSynth language constructs, then use Pink Trombone as an audio parity target. Do not build a PT clone with Aqua paint on it. The primitives must compose with ordinary Aqua voices, envelopes, LFOs, parameters, layers, learned speech controls, filters, and future morphologies.
Current Mechanism
tract currently lowers into Voice.Tract: a voice-local scalar control bundle
with a Faust source/filter proxy and an early waveguide backend. It is useful as
a playground surface and as a named failure against Pink Trombone, but the
remaining anatomy ownership is still too discrete:
- authored tract shapes now own physical length and continuous interpolation, and a tract voice may resample them to a chosen compiled grid;
sections,nose_sections, and integer junction indices still leak lowering grid choices into the script surface;substepsstill exists as compatibility clock intent, but it should be demoted in favor of acoustic length, propagation speed, and fractional delay;- topology changes can recompile, but morphology motion must remain runtime control data.
Invariants
- PT pressure must become Aqua DSL vocabulary, not a bespoke PT mode.
- A tract voice remains a voice. Tract primitives are treatments, sources, curves, junctions, and event lanes that can be combined with the rest of the patch graph.
- Diameter/area functions own continuous tract shape over normalized position, physical acoustic length, derived areas, reflection coefficients, and resampling. Tongue and constriction gestures deform that shape; they do not replace the owner.
- PT's 44 oral cells and 28 nasal cells are a reference discretization, not an Aqua morphology model.
- Reflection coefficients derive from adjacent areas. Caches and summaries may observe that derivation, but must not become independent truth.
- Waveguide clock derives from acoustic length, propagation speed, sample rate,
and delay approximation. A user-facing
substepscount is only legacy pressure until the fractional-delay waveguide owns this cleanly. - Waveguide state owns delay-line propagation once it exists. Formant filters may remain cheap approximations, but they must be named as approximations.
- Expressive parity comes before audio golf. Audio parity claims require rendered PT fixtures, Aqua renders, and log-mel cosine similarity.
Primitive Decomposition
-
tract_shape: reusable section diameter/area function.- Owns sampled diameters or areas over normalized continuous tract position.
- Owns physical acoustic length through
length_cm. - Emits interpolated diameters, resampled grids, areas, reflection coefficients, per-cell acoustic delay, and shape summaries.
- Feeds
tractvoices and later morphology/gesture planning.
-
glottis: reusable excitation primitive.- Owns frequency, intensity, tenseness, aspiration, and reflection intent.
- Can feed tract voices or other voice treatments.
- Implemented as a named source primitive consumed by
tractvoices.
-
tract_injection: positioned noise/burst excitation.- Owns constriction position, diameter/opening, turbulence, and release transient behavior.
- Can be driven by envelopes, LFOs, learned speech controls, or consonant gestures.
- Implemented as a named injection primitive consumed by
tractvoices and distributed into waveguide section updates by position and width.
-
nasal_junction: velum-controlled branch primitive.- Owns nasal opening and branch shape.
- Derives the three-way junction coefficients from local areas.
- Implemented as
nasal_branchplus generated three-way junction equations when a waveguide tract references the branch.
-
waveguide_tract: propagation primitive.- Owns right/left traveling-wave state, acoustic wave clock, fractional delay/loss approximation, and radiation.
- Consumes area/reflection fields and source/injection events.
- First oral-tube lowering exists: generated right/left section equations
consume
tract_shapereflection coefficients and boundary reflections. - Waveguide lowering now derives live per-section diameter targets, areas, and reflection coefficients from the tract shape plus tongue, constriction, and lip controls before scattering. Legacy substep clock intent is represented and lowering consumes it for drive/loss scaling, but exact fractional-delay propagation remains missing.
-
tract_motion: control-rate slew and obstruction history.- Owns diameter/constriction/velum slew rates and obstruction threshold.
- Feeds smoothed target controls and release-transient detection.
- Implemented as
tract_motion; waveguide lowering uses it for control slew and stateful obstruction-opening burst pressure.
-
PT parity harness.
- Renders fixed PT references for vowels, nasals, fricatives, closures, and moving tongue/constriction gestures.
- Renders Aqua DSL reconstructions.
- Scores log-mel cosine similarity plus targeted feature probes.
- First fixture catalog exists in
PinkTromboneParityFixtures. PinkTromboneReferenceRenderernow renders deterministic test-only traveling-wave references for the fixture controls.PinkTromboneLogMelParityTestswrites reference/candidate WAVs and report artifacts underartifacts/parity/pink-trombone-logmel/.
First Cut
Implemented owners: tract_shape, glottis, tract_injection,
nasal_branch, tract_motion, and first-pass propagation=waveguide.
tract_shape owns section diameter/area fields and reflection derivation.
glottis owns excitation quality. tract_injection owns positioned
frication/burst pressure. The current Faust proxy consumes these primitives
through shape summaries, reflection energy, glottal shaping, and injection
pressure instead of silently inventing all of them inside one helper. The
waveguide lowering consumes the derived oral reflection field as right/left
section state equations.
The first log-mel rung is now real but not flattering. The first compileable Aqua proxy baseline against the deterministic PT-style renderer landed around cosine 0.51 open vowel, 0.54 front vowel, 0.39 nasal, 0.12 sibilant, and -0.18 closure-release. That negative closure score correctly exposed the wrong machine.
The waveguide backend now uses a Faust-friendly state owner:
wg_loop ~ si.bus(...). One feedback component owns the right/left oral and
nasal traveling-wave state instead of hundreds of named recursive equations.
The backend now resamples continuous geometry to an acoustic unit-delay grid
when a waveguide tract does not explicitly request sections=...; a 17 cm oral
tract renders as 22 compiled sections at the current 44.1 kHz target instead of
leaking PT's 44 half-sample cells into Aqua as anatomy. Current waveguide
baseline: open vowel 0.6143, front vowel 0.6349, nasal 0.5425, sibilant
0.3744, closure-release -0.0820. Those are pressure readings, not parity. The
vowel/nasal/sibilant cases now respond to the physical clock correction and
runtime index scaling; the closure fixture remains an exposed failure.
The continuous morphology cut has started. tract_shape length_cm=... is now
physical geometry, not just a list length. TractAreaFunction can interpolate
diameter over normalized position, resample to an arbitrary grid, and derive
per-cell acoustic delay. A tract voice may choose a different sections=...
lowering grid without requiring the named shape's authoring samples to match.
For a human-length 17 cm tract sampled at PT's 44 oral cells at 44.1 kHz, that
delay is about 0.5 samples per cell. That makes PT's two tract updates per
output sample look like a discretization strategy for a half-sample cell grid,
not a reusable Aqua language concept.
Exact Pink Trombone timing still needs pressure, but the next backend cut is no longer "add more substeps." The current Faust-friendly compromise chooses a unit-delay scattering grid from physical length. The deeper target remains fractional-delay waveguide lowering whose clock comes from physical length, propagation speed, and sample rate while morphology moves through runtime controls without recompiling the patch.
Cut Line
The current Voice.Tract scalar proxy may survive only as an adapter over real
tract primitives. If a future change adds PT behavior that cannot be described
as a reusable Aqua primitive, cut it or keep it in the reference harness instead
of promoting it to the public DSL.