Commit graph AquaSynth/src/AquaSynth.Faust
Author SHA1 Message Date
6e92e47115 Sample-rate pass-through, #18/#19 and #47 Lows (#49)
Shipped by Aqua (Self, steward) after Soul PASS-WITH-FINDINGS (cut-samplerate-passthrough.s1 and siblings).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 18:42:44 +00:00
5c49f2ae86 Pin CultLib abd1a92e; [CultRole] audit; ElementId on every list element type (#35) 2026-11-11 08:31:22 +00:00
5d4c367b94 Merge pull request 'Articulatory tract: Story vowels, nasal branch, stress cue, plosive burst, independent Burg check (unheard)' (#19) from aqua/tract-articulatory into main 2026-11-10 18:13:33 +00:00
6906ae590e Merge pull request 'Vowel gestures calibrated by measurement; exporter sample rate from callers' (#18) from aqua/tract-voice into main 2026-11-10 18:13:29 +00:00
Aqua
b14376906d Daemon: POSIX artifact URIs, and tests name store files through StoreFileName
ToArtifactUri prefixed a bare "file:///" so /tmp/x became file:////tmp/x, which Uri reads as a UNC host:
the render receipts' Float32Uri/WavUri pointed at nothing on Linux. Separately, session and live-session
receipts are written as StoreFileName.From(id).cc and the compile key is uppercase hex, so the name gains a
hash suffix; four native-Faust daemon tests still looked for the raw id. Both only show where native Faust
compiles (they return early when it does not), so they were red on every Linux host with Faust.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 18:12:21 +00:00
Aqua
67c1290589 Vowels are Story 2008 measured area functions blended in log-area, not Gaussian tongue deformations from a grid-searched table
StoryVowelAreas owns the 11x44 table (CSV is the cited copy, a test compares every cell) and the IPA/descriptor -> vowel id lookup. vowel_set attaches the shapes to a morphology and registers /vocal/areas/<i>/area/vowel_<id> weights; DeformedAreaExpression (still the one area owner) blends them as exp(sum w ln A / max(1e-3, sum w)), the geometric mean when weights vanish, and lip_opening caps the lip cells. Vowel gestures raise their vowel to 1 and the rest to 0; VowelShapes and its nearest-anchor logic are gone. The scaffold runs 17.52 cm at 350 m/s (24 cells); ɪ ʊ e ɛ ʌ ɔ o join the IPA table. Scripts without vowel_set emit byte-identical DSP.

Unheard. Against the tube chain only ɪ and ɛ are within 6 percent at the scaffold lip reflection (-.82); the other nine vowels' tests are skipped, with the measurements in docs/research (radiation-model question open).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 17:37:14 +00:00
Aqua
fd9b38416c ProbeTimelineReport takes the sample rate instead of hardcoding 48000: block times and delay_samples follow the rate the caller renders at
IpaTrialOrchestrator passes its options.SampleRate through IpaGestureExperiment.WriteRound; the default stays 48000. Test: a speed step lands in a different block at 44.1 kHz than at 48 kHz and delay_samples scale with the rate (re-hardcoding 48000 fails it).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 17:35:18 +00:00
Aqua
ec73200093 Callers of FaustEmitter that render at a known rate pass it: the ladder's cell length follows the sample rate
The vocal ladder has one cell per sample, so exporting at the 48 kHz default and rendering at 44.1 kHz (daemon, IPA trial, song worker, graph renderer) shifted every formant down 8%. Speech-loss surface and AquaLower still take the default; the wasm compile path has no rate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 03:41:20 +00:00
Aqua
840d95a092 vocal_network: Kelly-Lochbaum ladder replaces the per-path delay*loss primitive
Each waveguide path is a one-sample-per-cell ladder (N = round(L*SampleRate/c)) written as a Faust letrec; the glottal source
feeds cell 0 and the lip wave is the radiated signal. A branch port joining two paths of the network is a three-port velum
junction (Pink Trombone's), opening*coupling*0.4 cm wide. Lip reflection is the radiation load's live reflection.
The Gaussian area deformation of TerminalAreaExpression and SegmentAreaExpression is one helper, DeformedAreaExpression,
which the ladder cells also use. PrimitiveAreaExpression and PrimitiveDelayExpression are deleted. FaustExportOptions.SampleRate
(default 48000) is passed by the native runtime. Scaffold: contact opening 1, nostril radiation load.
Tests: F1/F2 of i, schwa, a, vowel ordering, stability with velum open, nasal exit with the mouth shut; the aliasing test
now measures the whole non-harmonic grid since the tract reshapes the harmonics.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 03:21:59 +00:00
Aqua
80ebf39033 StoreFileName.Combine: batch ids from the command line cannot leave the artifact root
IpaTrialWorker song-score took --batch-id raw into Path.Combine; the orchestrator
sites share the new Combine. Tests cover traversal and absolute batch ids and the
underscore on device stems (nul.x, LPT1.x); drop the double From on the emitter name.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 10:33:47 +00:00
Aqua
de754b5b8c StoreFileName: route IpaTrialOrchestrator and FaustCompiler through it; daemon test uses ".."
Nibu's review at abfc816: the daemon test passed against the old sanitizer
because "../../escape" never escaped there; the bare ".." did. IpaTrialOrchestrator
(SafeName, raw BatchId in Path.Combine) and FaustCompiler.SafeArtifactName were
second owners of the same decision.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 09:29:43 +00:00
Aqua
abfc816804 StoreFileName: close review findings (collisions, case, device stems, length, renderId)
- Pass-through ids may not end in "-<16 hex>", so a rewritten name fed back as an id cannot alias it; hash widened 32 -> 64 bits.
- Ids with uppercase are rewritten (case-insensitive filesystems).
- Windows device stems (CON PRN AUX NUL COM0-9 LPT0-9, any extension) are rewritten.
- Stem capped at 100 chars; longer ids carry the hash.
- Daemon samples/ write now goes through StoreFileName.From(renderId).
- Tests: rewritten-as-id, case-only, device stems, overlong; daemon test uses a compiling patch so the samples/ write is reached when Faust is present.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 20:00:30 +00:00
Aqua
396da106cd One StoreFileName in Core: no id collisions, no '..' escape
The daemon and native-runtime SafeFileName copies sanitised differently:
the daemon mapped a/b, a b, a:b and a-b to the same name (a later patch
overwrote an earlier artifact) and returned ".." unchanged, so a
sessionId or runId of ".." resolved one directory above the store.

Replace both with AquaSynth.Dsl.StoreFileName.From. Ids within
[A-Za-z0-9._-] pass through; any other id is sanitised and suffixed with
the first 8 hex of SHA-256 of the original. Empty, "." and all-dot ids
are refused (ArgumentException).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 18:29:25 +00:00
Aqua
aa45571b3a Faust SetControls: write control zones without allocating
Marshal.Copy([value], ...) allocated a float[1] per control and the
IReadOnlyDictionary foreach boxed an enumerator per call. Write the float
bits straight to the zone and use Dictionary's struct enumerator when the
caller passes one. 10000-block smoke on a 2-control patch: 120 B/block -> 0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 20:36:47 +00:00
Aqua
53f1f1b03e Faust loader: platform-aware library lookup and explicit path override
Find libfaust.so on Linux, libfaust.dylib on macOS, libfaust.dll/faust.dll on
Windows; join PATH with Path.PathSeparator; accept FaustLibraryPath or
AQUASYNTH_FAUST_LIBRARY as an explicit library file. Platform default homes
replace the unconditional C:\Program Files\Faust.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 09:14:08 +00:00
Meta Vens
c1399425eb Pin CultLib 2.0.0 for builds
Directory.Build.props names CultLibRoot (CULTLIB_ROOT, else the sibling checkout) and pins CultLibRevision to cultlib-unity-v2.0.0 (42dce361). Directory.Build.targets fails the build unless that checkout is at the pin and clean, as Aetheria's guard does. Project references use CultLibRoot.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 19:46:37 +02:00
Meta Vens
aed65255cc Follow CultLib Cut 3: opening hydrates, PullOnOpen is gone
CultLib's CultCacheMessagePack.Create and OpenAsync now always read the store,
and CultCacheOpenOptions.PullOnOpen no longer exists.

- CultCachePatchDocumentStore.WriteDefaultAsync and
  AquaSynthDaemonService.WriteReceiptAsync write single-document files. They
  open (which hydrates), remove every record other than the one they write,
  upsert, and flush; the flush replaces the file atomically. Before this,
  Create never pulled, so their PullOnOpen = false was already a no-op.
- IpaTrialResults and SpeechDistributedTraining passed File.Exists-style
  PullOnOpen values; hydrating a missing store is empty, so the option goes.
- AquaSynthDaemonServiceTests drops PullOnOpen = true.

Globals: nothing in CultLib invents a [CultGlobal] record any more. AquaSynth
never relied on that: its three global types are positional records with no
parameterless constructor, which the old invention skipped, and every one is
written explicitly and read back by explicit key or GetAll.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 17:59:48 +02:00
Meta Vens
e625283342 Stop each render from appending a dead tools path to the user PATH
Every Faust render, and every trial-loop lane, runs dotnet with a fresh
DOTNET_CLI_HOME under the temp directory. The SDK's first-run experience
appends "<home>\.dotnet\tools" to the persisted user PATH each time, and
DOTNET_SKIP_FIRST_TIME_EXPERIENCE does not stop that part. Seventy-nine
dead entries had accumulated (9,634 chars), past cmd's environment limit,
so anything spawned through cmd lost the tail of PATH — node included.

DOTNET_ADD_GLOBAL_TOOLS_TO_PATH=0 is the switch that governs the PATH
write. Set it everywhere a throwaway dotnet home is used; telemetry
opt-out rides along for the renderer since these homes never persist.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 20:49:46 +02:00
Meta Vens
a87e5aa4e0 Publish AquaSynth live session state 2026-06-15 03:33:03 +01:00
Meta Vens
0da43b9439 Add AquaSynth live session close command 2026-06-15 03:20:09 +01:00
Meta Vens
50ed85ae41 Add AquaSynth live instrument daemon sessions 2026-06-15 03:08:53 +01:00
Meta Vens
6e93513e8e Add AquaSynth local CultNet daemon 2026-06-15 01:45:01 +01:00
Meta Vens
8c5f6d604a Add AquaSynth automation stream receipts 2026-06-15 01:22:25 +01:00
Meta Vens
ee6501558c Add AquaSynth sample daemon 2026-06-15 01:07:56 +01:00
Meta Vens
16995891fd Harden song swarm rendering environment 2026-06-01 02:06:49 +01:00
Meta Vens
f16ea641af Embed primitive timeline facts in IPA trials 2026-05-31 00:41:28 +01:00
Meta Vens
d1789d6677 Automate IPA trial exploration loop 2026-05-29 23:13:34 +01:00
Meta Vens
05cf7d36d6 Add IPA trial render orchestration 2026-05-29 22:45:51 +01:00
Meta Vens
1bf220027d Expose public gesture timeline API 2026-05-29 20:21:16 +01:00
Meta Vens
d8a33f7e6b Bound PT utterance render diagnostics 2026-05-29 01:57:38 +01:00
Meta Vens
c1b653ed4c Sample Faust graph debug probes 2026-05-27 21:05:12 +01:00
Meta Vens
e1673aa2a2 Add native Faust streaming sessions 2026-05-27 18:54:58 +01:00
Meta Vens
bb94924f5c Route speech loss controls into audible DSP 2026-05-25 18:30:19 +01:00
Meta Vens
14b118ce86 Batch Faust speech loss through exported controls 2026-05-19 19:24:15 +01:00
Meta Vens
c58a708910 Add Faust rendered speech loss surface 2026-05-19 18:59:47 +01:00
Meta Vens
d7b49d7248 Add Faust WebAssembly compile lane 2026-05-18 12:20:32 +01:00
Meta Vens
90649b3de2 Add host-facing AquaSynth patch compiler 2026-05-18 10:11:00 +01:00
Meta Vens
ebda929804 Use SemVer prerelease package versions 2026-05-17 20:01:29 +01:00
Meta Vens
ae4abf32cc Add Faust render session boundary 2026-05-17 19:56:22 +01:00
Meta Vens
d04d87c643 Split Core and Faust packages 2026-05-17 19:17:59 +01:00