Skip to main content

Crate auracle_wasm

Crate auracle_wasm 

Source
Expand description

§auracle-wasm

Thin wasm-bindgen bindings over auracle_session::Engine for the web app. Designed to run inside a Web Worker: all methods here can take seconds (rendering, MCMC); the main thread only plays transferred audio buffers and draws instrumentation.

Everything crossing the boundary is either JSON (structures) or a Float32Array (audio). Candidates are addressed by stable id — pool positions shift on eviction, ids never do. The engine is deterministic given the seed.

The workbench is the interactive-panel surface: edit_begin(id) clones a candidate’s tree; edit_param writes one knob (a trace-address edit) and re-renders; edit_commit inserts the result as a new candidate (optionally logging an “edited beats original” duel); refine_from(id, locks) evolves everything except the locked addresses.

Structs§

LivePoly
A polyphonic live instrument over one patch.
RenderJob
One farm result: a render + vet + featurize that happened with no Engine anywhere in sight.
WasmEngine
The session engine, wasm-side.

Functions§

cache_namespace
Render, vet and featurize one term under phrase_json — the farm worker’s entire job, and a pure function of its two arguments.
farm_key
The content address of (tree_json, phrase_json) without rendering it — what a caller asks the persistent cache about before paying for a render.
farm_render