bake
A module script.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2preseed/bake.module — offline pipeline that turns preseed/score into the shipped audio artifacts. Stages (each driven separately from execute): Bake.start() build + render the full score into a master buffer Bake.status() progress / stats snapshot (no buffers) Bake.stft(dir) 8-band STFT + flux → spectrum.bin, cues → cues.bin Bake.encodeZaud() Opus-encode the master into module state Bake.zaud() the encoded payload (written into the clip's data.zaud) Bake.writePcm(p) raw f32le PCM into the VFS (host verification / mux) Bake.free() release buffers Output binary formats are documented next to the readers in preseed/music.module. The clip container is created with a short placeholder payload and the real zaud is written into its data.zaud — data.zaud writes skip the soundClip type's re-encode hook.
status( ) → void
start( ) → void
writePcm(path: ?) → void
raw f32le interleaved-stereo PCM (a .bin so the importer never touches it; hosts read it with `ffmpeg -f f32le -ar 48000 -ac 2 -i …`)
| arg | type | description |
|---|---|---|
| path | ? |
installClip(name: ?) → void
Author the master into the score's soundClip. The asset is re-authored in place rather than having its `data.zaud` overwritten: the engine keeps the clip it loaded at boot resident, so bytes written straight into the payload file are never picked up and the film goes on playing the score it started with. `overwrite` keeps the asset's guid, so everything already referencing it keeps resolving, and the compression settings are given at create time because setting them afterwards re-encodes an already-encoded payload.
| arg | type | description |
|---|---|---|
| name | ? |
encodeZaud( ) → void
one long blocking FFI call (~35 s for the full six minutes)
zaud( ) → void
stft(dir: ?) → void
STFT: 4096 Hann, hop 1600 (30 fps). Writes spectrum.bin + cues.bin.
| arg | type | description |
|---|---|---|
| dir | ? |
p99(list: ?) → void
per-band 99th-percentile normalization, sqrt-compressed to 0..1
| arg | type | description |
|---|---|---|
| list | ? |
free( ) → void
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.