synth
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
synth
<!-- 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/v2game.audio.synth — UNBROKEN FRONT's sound bank, computed rather than bought. Every clip in the game is synthesised here from arithmetic and baked into a `.soundClip` asset by `Synth.bake()`, which runs once at authoring time. The world then ships the baked bytes: nothing is synthesised during play, and nothing depends on a generation service, a credit balance or a network — a sound cannot fail to arrive because a request did. What each sound is made of: gunshot a very short bright transient, a low body note for the chest thump, and a filtered noise tail for the report. The three are mixed at different delays and decays, which is what separates a crack from a thud. A weapon's character is the body frequency, the tail length and the brightness — so seven weapons get seven sounds from one recipe rather than one sound at seven pitches. click a single short shaped impulse. Magazine catches, selectors and a trigger falling on an empty chamber are all this, at different pitches and decay times. action a scrape (bandpassed noise, slow attack) into a clack (impulse + short body) — a bolt or a charging handle. step a low thump with a surface-dependent top: bright grit on concrete, a ringing partial on metal, a dead thud on dirt. impact the same shape as a step but shorter and harder, and on metal it rings. Everything is mono and 24 kHz. These are short, percussive, and positional; stereo would double the bytes to place a click in the middle of the head.
makeNoise(seed: ?) → void
The bench Deterministic noise. Two different seeds give two different fields, so a transient and a tail do not correlate into a single obvious tone.
| arg | type | description |
|---|---|---|
| seed | ? |
lowpass(cut: ?, sr: ?) → void
A one-pole lowpass: the cheapest way to take the fizz off noise.
| arg | type | description |
|---|---|---|
| cut | ? | |
| sr | ? |
highpass(cut: ?, sr: ?) → void
A one-pole highpass, which with a lowpass makes a band.
| arg | type | description |
|---|---|---|
| cut | ? | |
| sr | ? |
bandpass(freq: ?, q: ?, sr: ?) → void
A Chamberlin state-variable bandpass: two poles, so it RINGS on an impulse rather than merely shaping it. This is what gives metal a pitch.
| arg | type | description |
|---|---|---|
| freq | ? | |
| q | ? | |
| sr | ? |
decay(t: ?, len: ?) → void
Exponential decay, 1 at the attack and approaching 0 across `len` seconds.
| arg | type | description |
|---|---|---|
| t | ? | |
| len | ? |
alloc(seconds: ?) → void
A buffer of `seconds` at the bank's rate.
| arg | type | description |
|---|---|---|
| seconds | ? |
put(buf: ?, i: ?, v: ?) → void
| arg | type | description |
|---|---|---|
| buf | ? | |
| i | ? | |
| v | ? |
read(buf: ?, i: ?) → void
| arg | type | description |
|---|---|---|
| buf | ? | |
| i | ? |
mixInto(dst: ?, src: ?, gain: ?, offset: ?) → void
| arg | type | description |
|---|---|---|
| dst | ? | |
| src | ? | |
| gain | ? | |
| offset | ? |
gunshot(seed: ?, body: ?, tail: ?, bright: ?, bodyGain: ?) → void
Recipes A gunshot. `body` is the chest-thump frequency, `tail` the report length, `bright` how much high noise sits on the front.
| arg | type | description |
|---|---|---|
| seed | ? | |
| body | ? | |
| tail | ? | |
| bright | ? | |
| bodyGain | ? |
click(seed: ?, freq: ?, len: ?, ring: ?) → void
A short shaped impulse. Every mechanical click in the game is this.
| arg | type | description |
|---|---|---|
| seed | ? | |
| freq | ? | |
| len | ? | |
| ring | ? |
action(seed: ?, scrapeLen: ?, freq: ?, clackAt: ?) → void
A scrape into a clack: a bolt, a charging handle, a magazine going home.
| arg | type | description |
|---|---|---|
| seed | ? | |
| scrapeLen | ? | |
| freq | ? | |
| clackAt | ? |
step(seed: ?, top: ?, ring: ?, len: ?) → void
A footfall. `top` shapes the surface: bright grit, a ringing partial, or a dead thud.
| arg | type | description |
|---|---|---|
| seed | ? | |
| top | ? | |
| ring | ? | |
| len | ? |
bake(root: ?) → void
Write every clip in the bank. It WRITES OVER an existing clip rather than leaving it alone. The bank is the source of truth for these sounds — they are computed here and nowhere else — so a clip that disagrees with the bank is a stale artifact, not an edit to be preserved. Leaving them alone is how this world ended up with nineteen `.soundClip` containers whose `data.zaud` had been written to the wrong identity and read back as "no readable bytes": every shot was silent and nothing said so.
| arg | type | description |
|---|---|---|
| root | ? |
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.