diff --git a/docs/pink-trombone-dsl-parity-plan.md b/docs/pink-trombone-dsl-parity-plan.md index 85882f8..9a72658 100644 --- a/docs/pink-trombone-dsl-parity-plan.md +++ b/docs/pink-trombone-dsl-parity-plan.md @@ -214,7 +214,7 @@ 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.5870/0.6632/0.6965/0.6598/0.4053/0.6137. The useful levers so far +cosine is 0.5827/0.6270/0.6342/0.5963/0.4496/0.5749. The useful levers so far are source semantics, radiation impedance, terminal-specific admittance, frication injection, cutting stale first-frame morphology from generated graph paths, and live path-area control at graph sample points. @@ -263,6 +263,17 @@ accepted utterance graph smoke is `mama` 0.3418, `papa` 0.8318, and `thrombosis` 0.4521 under `artifacts/parity/pink-trombone-utterance-logmel/20260527T111349174`. +The first listening-led anti-buzz cut changed the glottal source, not the tract +topology. A direct LF coefficient expression improved some cosine scores but +overdrove the recursive graph and broke the static open-vowel fixture, so it +was cut. The kept graph source adds a mild cubic waveshaping component to the +existing glottal primitive. Latest accepted utterance graph smoke is `mama` +0.4822, `papa` 0.8602, and `thrombosis` 0.5202 under +`artifacts/parity/pink-trombone-utterance-logmel/20260527T114901634`. The band +probe still shows weak 500-1000 Hz vowel-body energy, so this is not the final +answer to the smartphone-vibration complaint. It only proves source excitation +was part of the failure; tract scattering/radiation remains the live pressure. + ## Cut Line The current `Voice.Tract` scalar proxy may survive only as an adapter over real diff --git a/docs/pink-trombone-parity.md b/docs/pink-trombone-parity.md index c1fbb2b..3e9d727 100644 --- a/docs/pink-trombone-parity.md +++ b/docs/pink-trombone-parity.md @@ -83,6 +83,9 @@ Current AquaSynth can express: - aperture-normalized turbulent source lowering, where sustained jet noise is allowed only through a narrow-open constriction and closure release remains owned by the transient path; +- mildly shaped glottal source lowering, which adds harmonic drive to the + stable glottal primitive without adopting the unstable direct LF coefficient + port as the live graph source; - source-port `PositionControl`, which lets a bank of fixed graph terminals share one moving source gesture through differentiable runtime weights; - graph lowering that splits paths at terminals, injects typed sources, scatters @@ -165,14 +168,18 @@ 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.5870, front vowel 0.6632, nasal 0.6965, - bilabial-nasal-ma 0.6598, sibilant 0.4053, closure-release 0.6137. + open vowel cosine 0.5827, front vowel 0.6270, nasal 0.6342, + bilabial-nasal-ma 0.5963, sibilant 0.4496, closure-release 0.5749. - Latest graph utterance smoke evidence: - `mama` cosine 0.3418 / RMS 1.0295, `papa` 0.8318 / 0.1806, - `thrombosis` 0.4521 / 1.2855 under - `artifacts/parity/pink-trombone-utterance-logmel/20260527T111349174`. + `mama` cosine 0.4822 / RMS 1.7942, `papa` 0.8602 / 0.4354, + `thrombosis` 0.5202 / 1.6360 under + `artifacts/parity/pink-trombone-utterance-logmel/20260527T114901634`. This is still not final speech parity; it is the first honest graph-only moving-utterance rung. +- Listening pressure remains active: the latest band probe still shows too much + 80-200 Hz energy and too little 500-1000 Hz vowel body on `mama`/`papa`. + Source shaping helped, but the next architectural owner must be tract + scattering/radiation body, not another source-only compensator. - `tools/vocal-tract-playground` exposes the same control surface for fast knob-twiddling through a small WebAudio witness. - `PinkTromboneReferenceDeclaresMissingWaveguideAuthority` prevents graph @@ -191,9 +198,9 @@ of these: 1. Improve graph source/radiation impedance normalization so source injection and radiation read/write pressure through path admittance rather than raw per-node gain. -2. Improve plosive timing and source position distribution for moving - constrictions; a single compile-time source terminal is still too crude for - gestures that move along the tract. +2. Give ordinary path discontinuities a correct formant-producing scattering + owner. A naive midpoint admittance scatter was tested and cut because it + collapsed `mama`; the live graph still needs the right tube impedance law. 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 cb8eea4..148e198 100644 --- a/src/AquaSynth.Core/FaustExport.cs +++ b/src/AquaSynth.Core/FaustExport.cs @@ -812,7 +812,7 @@ public static class FaustEmitter return port.Kind switch { AcousticSourceKind.Glottal => - $"((select2({phase} < (0.42 + clip01({opening}) * 0.36), -0.28 * sin(ma.PI * ({phase} - (0.42 + clip01({opening}) * 0.36)) / max(0.001, 1.0 - (0.42 + clip01({opening}) * 0.36))), sin(ma.PI * {phase} / max(0.001, 0.42 + clip01({opening}) * 0.36))) - (0.12 + {tension} * 0.62) * sin(4.0 * ma.PI * {phase}) + 0.18 * (sin(2.0 * ma.PI * {phase}) - {tension} * 0.35 * sin(4.0 * ma.PI * {phase}))) * {pressure} * (0.45 + 0.75 * pow(max(0.0, {tension}), 0.35)) + no.noise * {noise} * {pressure} * (1.0 - sqrt(max(0.0, {tension})))) * {balance}", + $"{GlottalSourceExpression(phase, tension, opening, pressure, noise, balance)}", AcousticSourceKind.Labial => $"((sin(2.0 * ma.PI * {phase}) - {tension} * 0.35 * sin(4.0 * ma.PI * {phase})) * {pressure} * {opening} + no.noise * {noise} * {pressure} * (1.0 - {tension})) * {balance}", AcousticSourceKind.Reed => @@ -827,6 +827,22 @@ public static class FaustEmitter }; } + private static string GlottalSourceExpression( + string phase, + string tension, + string opening, + string pressure, + string noise, + string balance) + { + var legacy = LegacyGlottalExpression(phase, tension, opening); + var shaped = $"(({legacy}) + 1.4 * ({legacy}) * ({legacy}) * ({legacy}))"; + return $"(({shaped}) * {pressure} * 0.68 + no.noise * {noise} * {pressure} * (1.0 - sqrt(max(0.0, {tension})))) * {balance}"; + } + + private static string LegacyGlottalExpression(string phase, string tension, string opening) => + $"(select2({phase} < (0.42 + clip01({opening}) * 0.36), -0.28 * sin(ma.PI * ({phase} - (0.42 + clip01({opening}) * 0.36)) / max(0.001, 1.0 - (0.42 + clip01({opening}) * 0.36))), sin(ma.PI * {phase} / max(0.001, 0.42 + clip01({opening}) * 0.36))) - (0.12 + {tension} * 0.62) * sin(4.0 * ma.PI * {phase}) + 0.18 * (sin(2.0 * ma.PI * {phase}) - {tension} * 0.35 * sin(4.0 * ma.PI * {phase}))) * (0.45 + 0.75 * pow(max(0.0, {tension}), 0.35))"; + private static string SourcePositionWeightExpression( AcousticSourcePort port, string path, diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 516373d..a58c2e0 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -170,3 +170,4 @@ {"evidence":"Added `AcousticSourcePort.Transient`, parser support for `transient`/`burst` on source ports, graph lowering for turbulence release bursts, and tract injection mirroring from `tract/injection/burst` to generated source transient. Focused graph utterance and structural tests passed. Boosting the release multiplier worsened papa/thrombosis, so the transient remains a semantic source hook rather than a metric-forced gain hack.","claim":"Closure-release energy belongs to a typed source port, not a PT-specific backend or a hidden utterance compensator. The current transient hook is architecturally correct but not yet the main parity lever; next pressure is timing/normalization rather than brute-force burst gain.","timestamp":"2026-05-27T10:36:00+01:00","topic":"acoustic-source-transient-control"} {"evidence":"Changed graph `TurbulenceJet` sustained noise from a pure closedness gate to a normalized narrow-open aperture gate intersected with the previous upper constriction cap, leaving `AcousticSourcePort.Transient` as the closure-release owner. Focused graph utterance test passed with artifact artifacts/parity/pink-trombone-utterance-logmel/20260527T110608640: mama cosine 0.3339 RMS 1.0698, papa 0.8320 RMS 0.1806, thrombosis 0.3957 RMS 1.6144. Static graph test passed with artifacts/parity/pink-trombone-logmel/20260527T110649452: open/front/nasal/ma/sibilant/closure cosine 0.6252/0.6576/0.6893/0.6550/0.4389/0.5993.","claim":"Sustained frication is an aperture-window source law, not a reward for complete closure. Closed constrictions should not hiss; release energy belongs to the transient path. This improved papa, thrombosis, sibilant, and closure-release without disturbing vowel fixtures.","timestamp":"2026-05-27T11:08:00+01:00","topic":"acoustic-turbulence-aperture-normalization"} {"evidence":"Added `AcousticSourcePositionControl`, parser support for source position index/width/scale, Faust lowering as triangular source weights, and generated graph-tract injection source banks. Focused structural, utterance, and static graph parity tests passed. Latest utterance artifact artifacts/parity/pink-trombone-utterance-logmel/20260527T111349174: mama cosine 0.3418 RMS 1.0295, papa 0.8318 RMS 0.1806, thrombosis 0.4521 RMS 1.2855. Latest static artifact artifacts/parity/pink-trombone-logmel/20260527T111427660: open/front/nasal/ma/sibilant/closure cosine 0.5870/0.6632/0.6965/0.6598/0.4053/0.6137.","claim":"Moving constriction sources belong in graph-native source weighting, not in a PT-shaped moving backend. A fixed Faust graph can express moving frication/release by distributing one source gesture over fixed source terminals with live differentiable weights; this materially improves thrombosis because the b release no longer fires at the initial dental position.","timestamp":"2026-05-27T11:18:00+01:00","topic":"acoustic-source-position-control"} +{"evidence":"Added mild cubic shaping to graph glottal source lowering after listening/spectral probes showed candidates were dominated by 80-200 Hz motor buzz. A direct LF coefficient expression was tested and cut: it improved some utterance cosines but overdrove the recursive graph and failed the static open-vowel fixture. Kept waveshaping passes static and utterance graph tests. Latest utterance artifact artifacts/parity/pink-trombone-utterance-logmel/20260527T114901634: mama cosine 0.4822 RMS 1.7942, papa 0.8602 RMS 0.4354, thrombosis 0.5202 RMS 1.6360. Latest static artifact artifacts/parity/pink-trombone-logmel/20260527T114959007: open/front/nasal/ma/sibilant/closure cosine 0.5827/0.6270/0.6342/0.5963/0.4496/0.5749. Band probes still show weak 500-1000 Hz vowel-body energy, so tract scattering/radiation remains the next pressure.","claim":"The graph voice needed richer glottal excitation, but not a half-ported LF formula. Mild waveshaping is a reusable source primitive improvement; the remaining smartphone-vibration character comes from missing formant-producing tract/radiation behavior, not only source harmonic poverty.","timestamp":"2026-05-27T11:52:00+01:00","topic":"acoustic-glottal-harmonic-shaping"} diff --git a/state/spine.yaml b/state/spine.yaml index a6a3063..a963695 100644 --- a/state/spine.yaml +++ b/state/spine.yaml @@ -1,6 +1,6 @@ project: AquaSynth spine_version: 1 -updated: 2026-05-27T11:18:00+01:00 +updated: 2026-05-27T11:52:00+01:00 prime_directive: > Build coherent synth machinery. References exist to reveal missing structure, @@ -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, 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.5870/0.6632/0.6965/0.6598/0.4053/0.6137. - - 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; `AcousticSourcePort.Transient` owns graph-native release/click energy; sustained `TurbulenceJet` lowering owns a narrow-open aperture gate so closed constrictions no longer hiss; `AcousticSourcePositionControl` owns differentiable runtime weights over fixed source terminals so moving articulators can move source energy without recompiling the graph; `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/20260527T111349174`: mama cosine 0.3418 / RMS 1.0295, papa 0.8318 / 0.1806, thrombosis 0.4521 / 1.2855. The internal-node scatter fix made unconnected injection/source terminals transmit pressure between adjacent segments instead of acting as dead boundaries. Next pressure is source/radiation impedance normalization and plosive level recovery, 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.5827/0.6270/0.6342/0.5963/0.4496/0.5749. + - 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 with mild harmonic waveshaping for graph sources; `tract_injection` owns positioned frication/burst controls; `AcousticSourcePort.Transient` owns graph-native release/click energy; sustained `TurbulenceJet` lowering owns a narrow-open aperture gate so closed constrictions no longer hiss; `AcousticSourcePositionControl` owns differentiable runtime weights over fixed source terminals so moving articulators can move source energy without recompiling the graph; `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/20260527T114901634`: mama cosine 0.4822 / RMS 1.7942, papa 0.8602 / 0.4354, thrombosis 0.5202 / 1.6360. A direct LF coefficient source was tested and cut because it overdrove the graph and broke static open vowel. The internal-node scatter fix made unconnected injection/source terminals transmit pressure between adjacent segments instead of acting as dead boundaries. Next pressure is a correct formant-producing tract scattering/radiation law; a naive midpoint admittance scatter was tested and cut because it collapsed `mama`. - 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.