Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld 0fc7535e-6…

audio

Procedural storm audio. The module computes rain and thunder samples in Luau and bakes them into `.soundClip` assets, so the storm has a voice made from code alone. Every sample comes from a small deterministic xorshift generator, so every bake of the same seed is identical. Samp…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 11d ago
What it does

audio

Procedural storm audio. The module computes rain and thunder samples in Luau and bakes them into .soundClip assets, so the storm has a voice made from code alone. Every sample comes from a small deterministic xorshift generator, so every bake of the same seed is identical. Samples are mono, 32-bit float, at 32000 samples per second.

bake() creates the clips storm_rain, storm_thunder_1, storm_thunder_2 and storm_thunder_3. The world holds soundClips under those names (the rain stored as PCM and the thunder as Opus, as bake sets them), and the fx_storm scene plays them: StormRain loops the rain, and StormDirector plays the thunder through Thunder1 to Thunder3.

Exports

  • M.thunder(seed, seconds): returns a buffer of seconds worth of rolling thunder: a sharp crack with three snaps, then a long low rumble that swells in seven bumps (distant reflections arriving over the first few seconds) and dies away. The result is normalised, soft-clipped with tanh, and fades out over its last 0.6 seconds so the clip ends silent.
  • M.rainBed(seed, seconds): returns a buffer of seconds worth of rain and wind: hiss, drops on the ground and roof, and a slow gusting low howl. It generates 0.8 seconds past the end and crossfades that tail into the start, so the clip loops cleanly. The result is normalised to a peak of 0.7.
  • M.bake(): bakes every storm clip that is missing and returns the names present afterwards, { "storm_rain", "storm_thunder_1", "storm_thunder_2", "storm_thunder_3" }. storm_rain is rainBed(7, 8.0) stored as PCM. storm_thunder_1 to storm_thunder_3 are thunder(100 + i * 17, 9 + i) for i from 1 to 3, stored as Opus. Each clip is created only when its name is free, so repeated calls are idempotent.

Usage

local StormAudio = require("storm.audio")

-- create any of the four storm clips that are missing
local names = StormAudio.bake()

-- or compute samples directly
local rain = StormAudio.rainBed(7, 8.0)
local thunder = StormAudio.thunder(117, 10)

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

Procedural storm audio: computed samples baked into .soundClip assets, so the storm has a voice with no external files and no generation credits. `bake()` is idempotent per clip name.

rng(seed: number) → void

Small deterministic PRNG (xorshift) so every bake is identical.

argtypedescription
seednumber

makeClip(name: string, samples: buffer, opus: boolean) → void

argtypedescription
namestring
samplesbuffer
opusboolean

slowNoise(seed: number, period: number) → void

A slow value-noise curve in [-1, 1], sampled at `t` seconds with features about `period` seconds long.

argtypedescription
seednumber
periodnumber

thunder(seed: number, seconds: number) → buffer

Rolling thunder: a sharp multi-part crack, then a long low rumble that swells in bumps and dies away.

argtypedescription
seednumber
secondsnumber

rainBed(seed: number, seconds: number) → buffer

Seamless rain and wind bed: hiss, drops on the ground and roof, and a slow gusting low howl.

argtypedescription
seednumber
secondsnumber

bake( ) → void

Bake every storm clip that does not exist yet. Returns the names present afterwards.

need(name: string) → boolean

argtypedescription
namestring
⌬ Metadata
descriptionProcedural storm audio: computes rolling thunder and a looping rain and wind bed in Luau and bakes them into soundClip assets.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

3items
This part has no composite children. See the Files segment for its leaf payloads.
backing path · storm/audio.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.