From 778c9bdd4d62ac455c2539abb63fcdfa4085f636 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 27 May 2026 00:22:43 +0100 Subject: [PATCH] Add live acoustic path area control --- docs/pink-trombone-dsl-parity-plan.md | 13 ++- docs/pink-trombone-parity.md | 38 ++++----- src/AquaSynth.Core/FaustExport.cs | 53 ++++++++++-- src/AquaSynth.Core/Model.cs | 14 +++- src/AquaSynth.Core/PatchScript.cs | 81 ++++++++++++++++++- .../PinkTromboneParityFixtures.cs | 2 +- state/evidence.jsonl | 1 + state/spine.yaml | 4 +- tests/AquaSynth.Dsl.Tests/PatchScriptTests.cs | 3 + 9 files changed, 175 insertions(+), 34 deletions(-) diff --git a/docs/pink-trombone-dsl-parity-plan.md b/docs/pink-trombone-dsl-parity-plan.md index fdbae95..25dfd3b 100644 --- a/docs/pink-trombone-dsl-parity-plan.md +++ b/docs/pink-trombone-dsl-parity-plan.md @@ -214,10 +214,10 @@ question is whether graph-authored PT compatibility can beat the current weak The parity report now renders the graph lane only. The latest static fixture evidence is useful instead of decorative: open/front/nasal/ma/sibilant/closure -cosine is 0.6015/0.6358/0.6851/0.5988/0.3836/0.4606. The useful levers so far +cosine is 0.6252/0.6576/0.6893/0.6550/0.4166/0.5554. The useful levers so far are source semantics, radiation impedance, terminal-specific admittance, -frication injection, and cutting stale first-frame morphology from generated -graph paths. +frication injection, cutting stale first-frame morphology from generated graph +paths, and live path-area control at graph sample points. The nasal branch pressure exposed the next graph-law issue. The graph now uses terminal-specific admittance in connection pressure instead of collapsing every @@ -232,6 +232,13 @@ injection/source terminals transmit pressure between adjacent segments instead of acting as dead boundaries; latest utterance cosine is `mama` 0.3365, `papa` 0.8264, and `thrombosis` 0.3874. +Live graph morphology now has a path-level owner. `AcousticPath.AreaControl` +turns tongue, constriction, and lip controls into live diameter/area expressions +at generated graph terminals, and generated `tract propagation=graph` paths +insert neutral area terminals along the oral tract so those live areas actually +scatter waves. This is still sampled continuous morphology, not a resurrection +of PT's fixed cell module. + Frication also had a low-level ownership bug: generated graph `TurbulenceJet` ports were using burst as source pressure, so sustained sibilants were choked by a transient control. They now use `max(turbulence, burst)` as pressure while diff --git a/docs/pink-trombone-parity.md b/docs/pink-trombone-parity.md index 217d418..9413304 100644 --- a/docs/pink-trombone-parity.md +++ b/docs/pink-trombone-parity.md @@ -76,6 +76,8 @@ Current AquaSynth can express: reflections; - typed acoustic paths, terminals, connections, source ports, branch/radiation ports, and wave-clock policies; +- optional acoustic path `AreaControl` fields that turn tongue, constriction, + and lip gestures into live diameter/area expressions at graph sample points; - graph lowering that splits paths at terminals, injects typed sources, scatters connection groups, and radiates from typed terminal ports; - oscillator/noise sources; @@ -87,11 +89,10 @@ Current AquaSynth can express: Current AquaSynth cannot exactly express: -- fractional-delay tract propagation whose clock derives from physical length, - propagation speed, and sample rate; -- live continuous area modulation along each acoustic path segment. Generated - graph paths currently keep the authored rest morphology while live controls - own source pressure, branch coupling, and radiation apertures. +- exact Pink Trombone wall update timing and obstruction history; +- fully continuous area modulation inside a delay segment between graph sample + points. Generated tract graphs now sample live area along the path, but the + delay segment between two sampled nodes remains uniform. - exact Pink Trombone block timing and source/noise/transient behavior inside the Faust-lowered Aqua graph. @@ -130,17 +131,17 @@ Trombone anatomy: - The `tract` DSL command parses into an ordinary `Voice` with `Voice.Tract`, and generates the same acoustic graph records used by explicit graph authoring. -- `tract_shape` owns reusable continuous diameter/area functions. The current - graph uses the authored rest morphology as the compiled path and leaves - moving apertures to typed terminals and ports. +- `tract_shape` owns reusable continuous diameter/area functions. Generated + graph paths now attach `AcousticAreaControl`, so tongue, constriction, and lip + gestures alter live node areas and therefore scattering along the oral tract. - `glottis` and `tract_injection` own excitation and positioned noise/burst controls consumed by tract voices. - `nasal_branch` adds a second diameter/area tube and generated oral/nasal connection terminals. Velum owns branch coupling and nasal aperture; the first nasal tube sample is not allowed to masquerade as the velum opening. - generated graph records mirror live `tract` parameter bindings into acoustic - source, terminal, connection, and radiation fields so `/pink/...` controls - exercise the actual graph. + source, terminal, connection, radiation, and path-area fields so `/pink/...` + controls exercise the actual graph. - accepted utterance parity lowers the surviving PT control-point sketches into Faust `age` curves over ordinary `/pink/...` parameters and compares the Aqua graph render against the source-ported PT renderer. @@ -153,12 +154,12 @@ Trombone anatomy: writes listening WAV/report artifacts under `artifacts/parity/pink-trombone-logmel/`, and reports only the graph lane. - Latest static graph fixture evidence after cutting the old parity lane: - open vowel cosine 0.6015, front vowel 0.6358, nasal 0.6851, - bilabial-nasal-ma 0.5988, sibilant 0.3836, closure-release 0.4606. + open vowel cosine 0.6252, front vowel 0.6576, nasal 0.6893, + bilabial-nasal-ma 0.6550, sibilant 0.4166, closure-release 0.5554. - Latest graph utterance smoke evidence: - `mama` cosine 0.3365 / RMS 1.2421, `papa` 0.8264 / 0.3149, - `thrombosis` 0.3874 / 2.0519 under - `artifacts/parity/pink-trombone-utterance-logmel/20260526T230028874`. + `mama` cosine 0.3354 / RMS 1.0698, `papa` 0.8162 / 0.1815, + `thrombosis` 0.3584 / 1.9499 under + `artifacts/parity/pink-trombone-utterance-logmel/20260526T232106458`. This is still not final speech parity; it is the first honest graph-only moving-utterance rung. - `tools/vocal-tract-playground` exposes the same control surface for fast @@ -176,11 +177,10 @@ sound like an actual mouth. Do not add another formant workaround. The next coherent implementation is one of these: -1. Add live path-area modulation to graph segments so tongue and constriction - controls alter scattering along the tract instead of only source/radiation - apertures. -2. Give plosive/closure release a graph-native transient owner instead of +1. Give plosive/closure release a graph-native transient owner instead of smearing burst pressure through the turbulence port. +2. Improve graph source/radiation level normalization so `papa` is not + under-driven while `thrombosis` is hot. 3. Use the log-mel artifact loop to golf `mama`, `papa`, and `thrombosis` against the source-ported PT renderer without reintroducing a parallel PT-shaped backend. diff --git a/src/AquaSynth.Core/FaustExport.cs b/src/AquaSynth.Core/FaustExport.cs index f7564f1..32d84f8 100644 --- a/src/AquaSynth.Core/FaustExport.cs +++ b/src/AquaSynth.Core/FaustExport.cs @@ -633,7 +633,7 @@ public static class FaustEmitter { var terminalIndex = AcousticTerminalIndex(patch, terminal); var terminalPath = $"/acoustic/terminals/{terminalIndex}"; - source.AppendLine($"{name}_graph_terminal_area_{SafeIdentifier(terminal.Name)} = max(0.000001, {F(TerminalArea(paths, terminal))} * max(0.0, {parameters.Expression(OwnerField(terminalPath, "area_scale"), terminal.AreaScale)}));"); + source.AppendLine($"{name}_graph_terminal_area_{SafeIdentifier(terminal.Name)} = max(0.000001, {TerminalAreaExpression(patch, paths, parameters, terminal)} * max(0.0, {parameters.Expression(OwnerField(terminalPath, "area_scale"), terminal.AreaScale)}));"); source.AppendLine($"{name}_graph_terminal_reflection_{SafeIdentifier(terminal.Name)} = {parameters.Expression(OwnerField(terminalPath, "reflection"), terminal.Reflection)};"); } foreach (var node in graphNodes) @@ -1360,15 +1360,44 @@ public static class FaustEmitter : 0; } - private static float TerminalArea(IReadOnlyDictionary paths, AcousticTerminal terminal) + private static string TerminalAreaExpression( + SynthPatch patch, + IReadOnlyDictionary paths, + ParameterMap parameters, + AcousticTerminal terminal) { if (!paths.TryGetValue(terminal.Path, out var path)) { - return 1; + return "1.0"; } - var diameter = path.AreaFunction.DiameterAt(Math.Clamp(terminal.Position, 0, 1)); - return Math.Max(0.000001f, diameter * diameter); + var position = Math.Clamp(terminal.Position, 0, 1); + var restDiameter = path.AreaFunction.DiameterAt(position); + if (path.AreaControl is not { } area) + { + return F(Math.Max(0.000001f, restDiameter * restDiameter)); + } + + var pathIndex = AcousticPathIndex(patch, path); + var areaPath = $"/acoustic/paths/{pathIndex}/area"; + var sections = Math.Max(2, path.AreaFunction.Sections); + var index = F(position * (sections - 1)); + var tongueIndex = ScaledAreaIndex(parameters.Expression(OwnerField(areaPath, "tongue_index"), area.TongueIndex), area.IndexScale); + var tongueDiameter = parameters.Expression(OwnerField(areaPath, "tongue_diameter"), area.TongueDiameter); + var tongueWidth = $"max(0.001, {F(area.TongueWidth)} * {F(sections)})"; + var constrictionIndex = ScaledAreaIndex(parameters.Expression(OwnerField(areaPath, "constriction_index"), area.ConstrictionIndex), area.IndexScale); + var constrictionDiameter = parameters.Expression(OwnerField(areaPath, "constriction_diameter"), area.ConstrictionDiameter); + var constrictionWidth = $"max(0.001, {F(area.ConstrictionWidth)} * {F(sections)})"; + var lipOpening = parameters.Expression(OwnerField(areaPath, "lip_opening"), area.LipOpening); + var lipWeight = MathF.Exp(0 - MathF.Pow((1 - position) / Math.Max(0.001f, area.LipWidth), 2)); + var tongueWeight = $"exp(0.0 - pow(({index} - ({tongueIndex})) / ({tongueWidth}), 2.0))"; + var constrictionWeight = $"exp(0.0 - pow(({index} - ({constrictionIndex})) / ({constrictionWidth}), 2.0))"; + var baseDiameter = $"({F(restDiameter)} + (({tongueDiameter}) - {F(restDiameter)}) * ({tongueWeight}) + (({lipOpening}) - {F(restDiameter)}) * {F(lipWeight)})"; + var diameter = $"max(0.0, min({baseDiameter}, ({constrictionDiameter}) + max(0.0, ({baseDiameter}) - ({constrictionDiameter})) * (1.0 - ({constrictionWeight}))))"; + return $"(({diameter}) * ({diameter}))"; + + static string ScaledAreaIndex(string expression, float scale) => + scale == 1 ? expression : $"(({expression}) * {F(scale)})"; } private static WaveClockPolicy ResolveWaveClock( @@ -1492,6 +1521,20 @@ public static class FaustEmitter return 0; } + private static int AcousticPathIndex(SynthPatch patch, AcousticPath path) + { + for (var i = 0; i < patch.AcousticPaths.Count; i++) + { + if (ReferenceEquals(patch.AcousticPaths[i], path) || + patch.AcousticPaths[i].Name.Equals(path.Name, StringComparison.OrdinalIgnoreCase)) + { + return i; + } + } + + return 0; + } + private static int AcousticBranchIndex(SynthPatch patch, AcousticBranch branch) { for (var i = 0; i < patch.AcousticBranches.Count; i++) diff --git a/src/AquaSynth.Core/Model.cs b/src/AquaSynth.Core/Model.cs index b701b19..9a6f0f4 100644 --- a/src/AquaSynth.Core/Model.cs +++ b/src/AquaSynth.Core/Model.cs @@ -284,7 +284,19 @@ public sealed record AcousticPath( string Name, TractAreaFunction AreaFunction, float PropagationSpeedMetersPerSecond = 343, - float Loss = 0.999f); + float Loss = 0.999f, + AcousticAreaControl? AreaControl = null); + +public sealed record AcousticAreaControl( + float TongueIndex = 12.9f, + float TongueDiameter = 2.43f, + float TongueWidth = 0.18f, + float ConstrictionIndex = 32, + float ConstrictionDiameter = 1, + float ConstrictionWidth = 0.09f, + float LipOpening = 1.5f, + float LipWidth = 0.04f, + float IndexScale = 1); public sealed record AcousticSourcePort( string Name, diff --git a/src/AquaSynth.Core/PatchScript.cs b/src/AquaSynth.Core/PatchScript.cs index bfdd181..b6fed76 100644 --- a/src/AquaSynth.Core/PatchScript.cs +++ b/src/AquaSynth.Core/PatchScript.cs @@ -511,10 +511,48 @@ public static class PatchScript name, ParseTractAreaFunction(fields, line, 17), GetBoundFloat(fields, line, 343, $"/acoustic/paths/{_acousticPaths.Count}/speed", "speed", "wave_speed", "propagation_speed"), - GetBoundFloat(fields, line, 0.999f, $"/acoustic/paths/{_acousticPaths.Count}/loss", "loss")); + GetBoundFloat(fields, line, 0.999f, $"/acoustic/paths/{_acousticPaths.Count}/loss", "loss"), + ParseAcousticAreaControl(fields, line, _acousticPaths.Count)); AddAcousticPathRecord(path); } + private static bool HasAcousticAreaControl(IReadOnlyDictionary fields) => + HasAny( + fields, + "area_control", + "morph", + "tongue_index", + "tongue", + "ti", + "tongue_diameter", + "td", + "constriction_index", + "ci", + "constriction_diameter", + "cd", + "lip", + "lip_opening", + "mouth"); + + private AcousticAreaControl? ParseAcousticAreaControl(IReadOnlyDictionary fields, int line, int pathIndex) + { + if (!HasAcousticAreaControl(fields)) + { + return null; + } + + return new AcousticAreaControl( + GetBoundFloat(fields, line, 12.9f, $"/acoustic/paths/{pathIndex}/area/tongue_index", "tongue_index", "tongue", "ti"), + GetBoundFloat(fields, line, 2.43f, $"/acoustic/paths/{pathIndex}/area/tongue_diameter", "tongue_diameter", "td"), + GetBoundFloat(fields, line, 0.18f, $"/acoustic/paths/{pathIndex}/area/tongue_width", "tongue_width", "tw"), + GetBoundFloat(fields, line, 32, $"/acoustic/paths/{pathIndex}/area/constriction_index", "constriction_index", "ci"), + GetBoundFloat(fields, line, 1, $"/acoustic/paths/{pathIndex}/area/constriction_diameter", "constriction_diameter", "cd"), + GetBoundFloat(fields, line, 0.09f, $"/acoustic/paths/{pathIndex}/area/constriction_width", "constriction_width", "cw"), + GetBoundFloat(fields, line, 1.5f, $"/acoustic/paths/{pathIndex}/area/lip_opening", "lip", "lip_opening", "mouth"), + GetBoundFloat(fields, line, 0.04f, $"/acoustic/paths/{pathIndex}/area/lip_width", "lip_width", "lw"), + GetBoundFloat(fields, line, 1, $"/acoustic/paths/{pathIndex}/area/index_scale", "index_scale")); + } + private void AddAcousticSourcePort(IReadOnlyDictionary fields, int line) { var name = Required(fields, "name", line); @@ -1234,11 +1272,32 @@ public static class PatchScript var primaryPathName = $"{prefix}_oral"; var baseOralArea = tract.AreaFunction ?? new TractAreaFunction([0.6f, 0.8f, 1.2f, 1.5f, 1.5f, 1.2f, 0.8f, 0.6f], 17); var oralArea = baseOralArea; - AddAcousticPathRecord(new AcousticPath(primaryPathName, oralArea, 343, tract.WaveguideLoss)); + var primaryPathIndex = _acousticPaths.Count; + AddAcousticPathRecord(new AcousticPath( + primaryPathName, + oralArea, + 343, + tract.WaveguideLoss, + new AcousticAreaControl( + tract.TongueIndex, + tract.TongueDiameter, + 0.18f, + tract.ConstrictionIndex, + tract.ConstrictionDiameter, + 0.09f, + tract.LipOpening, + 0.04f, + tract.IndexScale))); + MirrorParameterBinding(OwnerField(tractPath, "tongue_index"), $"/acoustic/paths/{primaryPathIndex}/area/tongue_index"); + MirrorParameterBinding(OwnerField(tractPath, "tongue_diameter"), $"/acoustic/paths/{primaryPathIndex}/area/tongue_diameter"); + MirrorParameterBinding(OwnerField(tractPath, "constriction_index"), $"/acoustic/paths/{primaryPathIndex}/area/constriction_index"); + MirrorParameterBinding(OwnerField(tractPath, "constriction_diameter"), $"/acoustic/paths/{primaryPathIndex}/area/constriction_diameter"); + MirrorParameterBinding(OwnerField(tractPath, "lip_opening"), $"/acoustic/paths/{primaryPathIndex}/area/lip_opening"); var sourceNames = new List(); var branchNames = new List(); var radiationNames = new List(); + var terminalNames = new List(); var sourceName = string.IsNullOrWhiteSpace(tract.Glottis?.Name) ? $"{prefix}_source" : $"{prefix}_{tract.Glottis!.Name}"; var source = new AcousticSourcePort( @@ -1265,6 +1324,21 @@ public static class PatchScript MirrorParameterBinding(OwnerField(tractPath, "glottal_reflection"), $"/acoustic/terminals/{_acousticTerminals.Count - 1}/reflection"); sourceNames.Add(sourceName); + for (var section = 1; section < Math.Max(2, tract.Sections - 1); section++) + { + var position = section / (float)Math.Max(1, tract.Sections - 1); + var terminal = new AcousticTerminal( + $"{prefix}_area_{section}", + primaryPathName, + position, + AcousticTerminalKind.Junction, + "", + 1, + 0); + AddAcousticTerminalRecord(terminal); + terminalNames.Add(terminal.Name); + } + if (tract.Injection is { } injection) { var injectionName = string.IsNullOrWhiteSpace(injection.Name) ? $"{prefix}_injection" : $"{prefix}_{injection.Name}"; @@ -1388,7 +1462,8 @@ public static class PatchScript clockName, sourceNames, branchNames, - radiationNames); + radiationNames, + terminalNames); var graphNetwork = ExpandNetworkGraphSugar(network); AddAcousticNetworkRecord(graphNetwork); return graphNetwork; diff --git a/src/AquaSynth.Core/PinkTromboneParityFixtures.cs b/src/AquaSynth.Core/PinkTromboneParityFixtures.cs index f03a83f..5c908dc 100644 --- a/src/AquaSynth.Core/PinkTromboneParityFixtures.cs +++ b/src/AquaSynth.Core/PinkTromboneParityFixtures.cs @@ -122,7 +122,7 @@ public static class PinkTromboneParityFixtures { return $$""" - patch gain=0.02 soft_clip=true + patch gain=0.018 soft_clip=true tract_shape name=human diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 2f50402..eba7a99 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -166,3 +166,4 @@ {"evidence":"Focused tests PinkTromboneFixturesReportLogMelParityWhenFaustIsInstalled, PinkTromboneAcceptedUtterancesReportWaveguideLogMelParityWhenFaustIsInstalled, and PinkTromboneUtteranceFixturesWriteReferenceWavs passed with disabled build servers. Latest accepted utterance artifact artifacts/parity/pink-trombone-utterance-logmel/20260526T222603297: mama cosine 0.7098 RMS 1.0177; papa 0.8545 RMS 1.0043; thrombosis 0.5729 RMS 1.0186.","claim":"Listening described the Aqua PT utterance candidate as trying with a mouth full of cotton. The accepted waveguide lane now adds a small high-passed lip-radiation emphasis after the bidirectional tube output, keeping gross log-mel similarity stable while adding edge to the radiated signal. Static graph fixture gain was reduced because source-ported PT references exposed the old graph lane as over-loud; graph remains pressure, not the accepted moving-utterance lane.","timestamp":"2026-05-26T23:27:15+01:00","topic":"pink-trombone-cotton-mouth-radiation"} {"evidence":"Cut `PinkTromboneParityFixture.GraphAquaScript` and the accepted waveguide utterance test; PT parity tests now render graph candidates only. Focused tests passed with disabled build servers. Latest static graph artifact artifacts/parity/pink-trombone-logmel/20260526T225434227 reports open/front/nasal/ma/sibilant/closure cosine 0.6035/0.6932/0.6814/0.6239/0.3428/0.4135. Latest graph-only utterance artifact artifacts/parity/pink-trombone-utterance-logmel/20260526T225509931 reports mama cosine -0.0657 RMS 1.0484; papa 0.8253 RMS 0.8651; thrombosis 0.2533 RMS 3.2917.","claim":"PT accepted parity must exercise the typed acoustic graph, not the old waveguide path. Generated tract graphs now mirror live tract parameter bindings into acoustic records, use rest morphology instead of baking the first utterance frame into the path, treat velum as branch aperture/coupling rather than nasal tube sample area, and radiate a raw/high-passed pressure blend. Mama remains a concrete graph-parity failure; the next coherent cut is live segment-area modulation and graph-native closure/transient ownership.","timestamp":"2026-05-26T23:50:00+01:00","topic":"pink-trombone-graph-only-parity"} {"evidence":"After adding ordinary internal-node scatter, focused graph parity tests passed. Latest static graph artifact artifacts/parity/pink-trombone-logmel/20260526T225955955 reports open/front/nasal/ma/sibilant/closure cosine 0.6015/0.6358/0.6851/0.5988/0.3836/0.4606. Latest graph utterance artifact artifacts/parity/pink-trombone-utterance-logmel/20260526T230028874 reports mama cosine 0.3365 RMS 1.2421; papa 0.8264 RMS 0.3149; thrombosis 0.3874 RMS 2.0519.","claim":"Internal source/injection terminals in the acoustic graph must transmit pressure between adjacent path segments unless an explicit connection or boundary law says otherwise. Treating an unconnected internal terminal as independent reflective boundaries split the tract and made moving utterances fail. Ordinary multi-port graph nodes now scatter incident pressure across ports, which moved mama from negative cosine to a usable graph-only smoke rung.","timestamp":"2026-05-26T23:02:00+00:00","topic":"acoustic-graph-internal-node-scatter"} +{"evidence":"Added `AcousticAreaControl` to acoustic paths, generated neutral oral area terminals for `tract propagation=graph`, and mirrored tract tongue/constriction/lip parameters into path-area fields. Focused graph parity tests passed. Latest static artifact artifacts/parity/pink-trombone-logmel/20260526T232021742 reports open/front/nasal/ma/sibilant/closure cosine 0.6252/0.6576/0.6893/0.6550/0.4166/0.5554. Latest utterance artifact artifacts/parity/pink-trombone-utterance-logmel/20260526T232106458 reports mama cosine 0.3354 RMS 1.0698; papa 0.8162 RMS 0.1815; thrombosis 0.3584 RMS 1.9499.","claim":"The typed acoustic graph now has live sampled morphology. Path rest shape remains the continuous owner, while `AcousticAreaControl` evaluates tongue, constriction, and lip gestures at graph sample terminals so scattering changes over time. This is the missing PT-class moving-tube primitive without preserving a PT-shaped waveguide backend.","timestamp":"2026-05-26T23:20:00+00:00","topic":"acoustic-path-live-area-control"} diff --git a/state/spine.yaml b/state/spine.yaml index 542f255..2014321 100644 --- a/state/spine.yaml +++ b/state/spine.yaml @@ -119,8 +119,8 @@ live_invariants: - The physical voice research packet now includes a practical implementation/researcher map (`research/physical-voice-modeling/PEOPLE.md`) and talk/transcript ledger (`research/physical-voice-modeling/talks/TALKS.md`). Birkholz/VocalTractLab pressures multi-level articulatory control and gestures; Story/TubeTalker pressures continuous parametric area functions and length/coupling; Smith pressures bidirectional delay-line scattering and fractional-delay waveguides; Fels/ArtiSynth pressures separation between biomechanics, acoustics, timeline controls, and diagnostics. These are reusable DSL semantics, not modules to clone. - Physical voice implementation has started moving PT pressure into neutral acoustic owners: `AcousticPath`, `AcousticTerminal`, `AcousticConnection`, `AcousticSourcePort`, `AcousticBranch`, `AcousticRadiationPort`, `WaveClockPolicy`, and `AcousticPortNetwork`. Parser commands `path`, `terminal`, `connect`, `source_port`, `branch`, `radiation_port`, `wave_clock`, and `acoustic_network` now exist. Existing `tract_shape`, `glottis`, `tract_injection`, `nasal_branch`, and `tract` commands populate acoustic records as compatibility aliases while the current `Voice.Tract` Faust renderer still owns audio. - `acoustic` / `acoustic_voice` can now render an `AcousticPortNetwork` through a compact Faust response proxy or, when typed terminals are present, a compiled bidirectional Faust segment graph. Graph lowering splits paths at terminal positions, aggregates co-located terminals into graph nodes, orders connection ports deterministically, scatters area-weighted/pressure/bypass connection groups, injects source terminals even at connected nodes, and sums radiation terminals. Segment delay follows physical segment length and the network `wave_clock` strategy through unit-grid, half-sample, linear fractional, Lagrange, or Thiran/allpass Faust delay primitives. Source, branch, radiation, terminal, and connection controls can bind through ordinary Aqua parameters into emitted Faust. PT-shaped `tract` authoring now routes accepted parity through `propagation=graph`; the old waveguide parity lane is not a comparison baseline or historical pressure lane. - - Pink Trombone log-mel parity now writes graph candidates only. Generated tract graphs mirror live `/pink/...` tract bindings into acoustic source, terminal, connection, and radiation fields. Graph generation stopped baking first-frame tongue/constriction/lip morphology into the path; the authored rest path is the compiled tube until live segment-area modulation exists. Velum owns nasal branch coupling/aperture, and the first nasal tube sample is no longer allowed to decide the velum opening. Graph radiation now blends raw pressure with high-passed pressure instead of throwing away body energy. Latest static graph evidence: open/front/nasal/ma/sibilant/closure cosine 0.6015/0.6358/0.6851/0.5988/0.3836/0.4606. - - PT expressive parity should decompose into reusable Aqua primitives before audio golf: `tract_shape` owns continuous diameter/area geometry over normalized position, physical length (`length_cm`), interpolation/resampling, derived reflection coefficients, and per-cell acoustic delay; `glottis` owns excitation controls; `tract_injection` owns positioned frication/burst controls; `nasal_branch` owns a second diameter/area tube and branch aperture; `tract_motion` owns control slew and obstruction threshold; `AcousticPortNetwork` owns graph lowering. `PinkTromboneReferenceRenderer` ports the pinned MIT `chdh/pink-trombone-mod` DSP source (`external/pink-trombone-mod` at 359c2d3b42b10280404c1650dc601902112b4c90), and reference WAVs before `artifacts/parity/pink-trombone-utterances/20260526T211902375` are invalid. The accepted PT utterance curriculum is mama, papa, and thrombosis; lulek was cut because its control sketch taught a bad artifact. Latest graph-only utterance smoke under `artifacts/parity/pink-trombone-utterance-logmel/20260526T230028874`: mama cosine 0.3365 / RMS 1.2421, papa 0.8264 / 0.3149, thrombosis 0.3874 / 2.0519. The internal-node scatter fix made unconnected injection/source terminals transmit pressure between adjacent segments instead of acting as dead boundaries. Next pressure is live graph segment-area modulation and graph-native closure/transient ownership, not reviving the old PT-shaped waveguide path. + - Pink Trombone log-mel parity now writes graph candidates only. Generated tract graphs mirror live `/pink/...` tract bindings into acoustic source, terminal, connection, radiation, and path-area fields. Graph generation stopped baking first-frame tongue/constriction/lip morphology into the path; `AcousticPath.AreaControl` now turns tongue/constriction/lip controls into live area expressions at graph sample points. Velum owns nasal branch coupling/aperture, and the first nasal tube sample is no longer allowed to decide the velum opening. Graph radiation now blends raw pressure with high-passed pressure instead of throwing away body energy. Latest static graph evidence: open/front/nasal/ma/sibilant/closure cosine 0.6252/0.6576/0.6893/0.6550/0.4166/0.5554. + - PT expressive parity should decompose into reusable Aqua primitives before audio golf: `tract_shape` owns continuous diameter/area geometry over normalized position, physical length (`length_cm`), interpolation/resampling, derived reflection coefficients, and per-cell acoustic delay; `AcousticAreaControl` owns live sampled morphology controls on a path; `glottis` owns excitation controls; `tract_injection` owns positioned frication/burst controls; `nasal_branch` owns a second diameter/area tube and branch aperture; `tract_motion` owns control slew and obstruction threshold; `AcousticPortNetwork` owns graph lowering. `PinkTromboneReferenceRenderer` ports the pinned MIT `chdh/pink-trombone-mod` DSP source (`external/pink-trombone-mod` at 359c2d3b42b10280404c1650dc601902112b4c90), and reference WAVs before `artifacts/parity/pink-trombone-utterances/20260526T211902375` are invalid. The accepted PT utterance curriculum is mama, papa, and thrombosis; lulek was cut because its control sketch taught a bad artifact. Latest graph-only utterance smoke under `artifacts/parity/pink-trombone-utterance-logmel/20260526T232106458`: mama cosine 0.3354 / RMS 1.0698, papa 0.8162 / 0.1815, thrombosis 0.3584 / 1.9499. The internal-node scatter fix made unconnected injection/source terminals transmit pressure between adjacent segments instead of acting as dead boundaries. Next pressure is graph-native closure/transient ownership and source/radiation level normalization, not reviving the old PT-shaped waveguide path. - If dotnet builds hang in this workspace, stop orphan dotnet workers and retry with `--disable-build-servers -p:UseSharedCompilation=false -p:BuildInParallel=false`; plain parallel/shared builds can stall without useful diagnostics. - eSpeak NG is an early parity reference for timing, IPA coverage, and log-mel pressure, not an anatomy oracle or final target. - Do not expand into prosody, emotional context, personality, or broad Weksa expressivity until the tiny IPA utterance harness can show useful loss movement. diff --git a/tests/AquaSynth.Dsl.Tests/PatchScriptTests.cs b/tests/AquaSynth.Dsl.Tests/PatchScriptTests.cs index 9b6370a..37c14df 100644 --- a/tests/AquaSynth.Dsl.Tests/PatchScriptTests.cs +++ b/tests/AquaSynth.Dsl.Tests/PatchScriptTests.cs @@ -628,7 +628,10 @@ public sealed class PatchScriptTests Assert.NotEmpty(patch.NasalBranches); Assert.NotEmpty(patch.TractMotions); Assert.Equal(TractPropagationMode.Graph, voice.Tract.Propagation); + Assert.Contains(patch.AcousticPaths, path => path.Name == "voices_0_oral" && path.AreaControl is not null); + Assert.Contains(patch.AcousticTerminals, terminal => terminal.Name.StartsWith("voices_0_area_", StringComparison.Ordinal)); Assert.Contains("acoustic_graph_radiated", export.Source); + Assert.Contains("graph_terminal_area_voices_0_area_", export.Source); Assert.DoesNotContain("wg_diameter_target_", export.Source); Assert.NotEmpty(fixture.ReferenceFeatures); }