sfx
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/v2Chain Reaction — procedural sound synthesizer. Generates every game cue as a 16-bit mono WAV under /zero/source/chain/audio/ via M.generateAll(). Sounds are deterministic (seeded LCG noise), so regeneration produces identical files.
bufCreate(n: number) → void
module-scope buffer.create dispatches to the wrong native fn (reported); allocate via fromstring
| arg | type | description |
|---|---|---|
| n | number |
srand(s: ?) → void
| arg | type | description |
|---|---|---|
| s | ? |
frand( ) → void
noise( ) → void
encodeWav(samples: buffer, nSamples: number) → buffer
WAV encoding (16-bit PCM mono)
| arg | type | description |
|---|---|---|
| samples | buffer | |
| nSamples | number |
track(seconds: number) → void
| arg | type | description |
|---|---|---|
| seconds | number |
add(self: ?, t0: number, f: (t: number, i: number) → void
| arg | type | description |
|---|---|---|
| self | ? | |
| t0 | number | |
| f | (t: number, i: number |
render(self: ?, gain: number) → buffer
| arg | type | description |
|---|---|---|
| self | ? | |
| gain | number |
decay(t: ?, rate: ?) → void
| arg | type | description |
|---|---|---|
| t | ? | |
| rate | ? |
partial(freq: ?, amp: ?, dec: ?, phase: ?) → void
damped sine partial
| arg | type | description |
|---|---|---|
| freq | ? | |
| amp | ? | |
| dec | ? | |
| phase | ? |
knock(tr: ?, t0: ?, base: ?, amp: ?) → void
wooden knock: few damped partials + noise transient
| arg | type | description |
|---|---|---|
| tr | ? | |
| t0 | ? | |
| base | ? | |
| amp | ? |
genClick( ) → void
the sounds
genClack( ) → void
genRumble( ) → void
genWhoosh( ) → void
genClatter( ) → void
genWhistle( ) → void
genThunk( ) → void
genTap( ) → void
genDing( ) → void
genFanfare( ) → void
genMusic( ) → void
gentle plucked arpeggio loop (~9.6s), two alternating chords
path(name: string) → string
| arg | type | description |
|---|---|---|
| name | string |
generateAll(force: boolean?) → void
generate every cue wav; skips files that already exist unless force
| arg | type | description |
|---|---|---|
| force | boolean? |
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.