bake
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
bake
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2audio.bake — renders the Nine Bells sound bank into `.soundClip` assets. This is an AUTHORING module, not a runtime one. Nothing in the game requires it; the game resolves the clips it produced. It exists so the bank is reproducible: every sound in Ashcross is a few lines of arithmetic here, and re-running a builder re-renders that clip byte for byte (the noise is a seeded LCG, so a bake is deterministic). Run it from an execute call, never from a component or a scene entrypoint — an `asset.create` made from either of those writes to the copy-on-write runtime store instead of `/zero/source`, and the clip would not survive a reload. local B = require("audio.bake") B.bakeSfx() -- every one-shot B.bakeBells(1, 9) -- the nine tolls B.bakeMusic() -- the beds B.bakeAmbience() -- the air of the district Every clip lands at /zero/source/audio/<name>.soundClip, identity `audio.<name>`. `audio.info` is run on each payload before it is written and the returned report carries the frames / duration / channels, so a clip that came out empty is visible at bake time rather than silent at play time.
put(name: string, pcm: string, channels: number, settings: { [string]: any }?) → void
indices a loop point uses survive encoding unchanged. Writing a clip
| arg | type | description |
|---|---|---|
| name | string | |
| pcm | string | |
| channels | number | |
| settings | { [string]: any }? |
putMono(name: string, t: S.Track, peak: number, settings: { [string]: any }?) → void
A mono track, finished and written.
| arg | type | description |
|---|---|---|
| name | string | |
| t | S.Track | |
| peak | number | |
| settings | { [string]: any }? |
putWide(name: string, t: S.Track, peak: number, delaySec: number, settings: { [string]: any }?) → void
A mono track widened into stereo by a short wrapped delay on the right — enough width to sit around the listener without smearing the centre.
| arg | type | description |
|---|---|---|
| name | string | |
| t | S.Track | |
| peak | number | |
| delaySec | number | |
| settings | { [string]: any }? |
bakeBells(from: number?, to: number?) → void
| arg | type | description |
|---|---|---|
| from | number? | |
| to | number? |
step_stone(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
step_stone_b(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
step_wood(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
step_wood_b(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
step_water(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
jump(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
land(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
land_hard(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
ledge(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
vault(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
cane_probe(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
probe_sound(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
probe_rotten(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
board_crack(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
board_break(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
puff(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
censer_chain(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
brazier_refill(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
tincture(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
tincture_theriac(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
tincture_aquavitae(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
tincture_vinegar(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
pickup(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
shutter(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
treat_tick(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
treat_done(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
lantern_light(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
gate(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
hurt(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
contagion_warn(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
infected_moan(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
infected_lunge(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
infected_ward(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
infected_calm(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
cough(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
ui_click(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
ui_hover(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
ui_confirm(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
ui_back(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
ui_page(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
dash(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
climb(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
bonk(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
censer_empty(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
belt(t: ?) → void
| arg | type | description |
|---|---|---|
| t | ? |
sfxNames( ) → void
bakeSfx(only: { string }?) → void
| arg | type | description |
|---|---|---|
| only | { string }? |
bowed(t: S.Track, freq: number, amp: number, start: number, dur: number, period: number, seed: number) → void
THE SCORE Every bed is one exact loop period long, every sustained frequency is snapped to a whole number of cycles inside it, and everything is rendered into a wrapping track, so a decay that runs past the end comes back in at the start. That is what makes the loop point inaudible. A bowed voice: three saws a hair apart through a low pass. Detuning by a multiple of 1/period keeps the chorus seamless across the loop.
| arg | type | description |
|---|---|---|
| t | S.Track | |
| freq | number | |
| amp | number | |
| start | number | |
| dur | number | |
| period | number | |
| seed | number |
bedRound(period: number) → S
| arg | type | description |
|---|---|---|
| period | number |
bedLate(period: number) → S
| arg | type | description |
|---|---|---|
| period | number |
bedTitle(period: number) → S
| arg | type | description |
|---|---|---|
| period | number |
bakeMusic(which: string?) → void
| arg | type | description |
|---|---|---|
| which | string? |
emit(name: string, t: S.Track, peak: number, looped: boolean) → void
| arg | type | description |
|---|---|---|
| name | string | |
| t | S.Track | |
| peak | number | |
| looped | boolean |
bakeAmbience(which: string?) → void
THE AIR OF ASHCROSS
| arg | type | description |
|---|---|---|
| which | string? |
treat(t: S.Track, ch: Character) → S
| arg | type | description |
|---|---|---|
| t | S.Track | |
| ch | Character |
decodeMp3(path: string) → S
Decode an mp3 the service wrote, by way of a throwaway container.
| arg | type | description |
|---|---|---|
| path | string |
bakeLine(id: string, who: string, text: string) → void
Generate, wait, re-voice and cache one line. Returns a report; a line that could not be generated reports `spoken = false` and keeps its text, which is the whole point of `say` emitting whether or not there is audio.
| arg | type | description |
|---|---|---|
| id | string | |
| who | string | |
| text | string |
bakeVoice(from: number?, to: number?) → void
Bake a slice of the canonical script. Keep the slice small: each line is a network round trip and the frame loop is shared with seven other agents.
| arg | type | description |
|---|---|---|
| from | number? | |
| to | number? |
Character = {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.