Sound Generator
Quick Presets
Now Playing
Sound Library
Noise
Nature
How to use
- Pick a preset from the Quick Presets row (Sleep, Focus, Thunderstorm, Cafe, Ocean) and press Play. The engine starts the mix using your master volume.
- Tap any sound in the Library (Noise, Nature) to add it as a new layer. Layers are independent and can be volume-controlled separately.
- Pick a behavior per layer: Loop for steady sounds (rain, noise), Interval for periodic gusts (wind), Random for realistic events (thunder, lightning).
- For Random, tune Min, Max delay, and Probability — lower probability makes the event feel rarer.
- Turn on the sleep timer (15m / 30m / 1h) to auto fade-out at the end of your session.
- Hit Share to copy a link that restores your exact mix — volumes, modes, timer, and all.
FAQ
What makes this different from a normal sound player?
Every layer has its own behavior: loop, interval, or random. Thunder randomly cracks, wind gusts on an interval, rain loops in the background. Stack any of them together for realistic ambience.
Does it work offline or send data anywhere?
All scheduling runs in your browser via the Web Audio API. Noise is generated on the fly; nature samples are fetched once and cached. Nothing is uploaded.
Why does it only start after I press Play?
Modern browsers block autoplay until a user gesture. Pressing Play creates the AudioContext and starts every active layer.
What does Share encode?
The layers, their behaviors and volumes, master volume, and timer. Anyone opening the link sees the same mix when they press Play.
What the Sound Generator does
The sound generator is an ambient mixer that layers procedural noise with
nature samples and lets you control how each layer behaves over time. Instead
of picking one track and looping it, you stack a handful of short loops and
one-shots and the engine schedules them against each other.
Three scheduling modes cover every ambient pattern:
- Loop — plays continuously. Use for rain, noise, fire, ocean.
- Interval — fires a one-shot every N seconds. Use for wind gusts or
periodic city sounds. - Random — fires a one-shot at a random delay between Min and Max, with
an optional probability gate. Use for thunder, lightning, or bird calls.
Why per-layer behavior matters
A looped thunder file sounds fake fast — your ear learns the loop. Randomising
the delay and gating on probability makes thunder sound like weather: sometimes
you get two claps back-to-back, sometimes nothing for a minute. The same trick
works for wind (interval) and crickets (random).
Common use cases
- Sleep — rain + brown noise + low thunder random. The deep brown noise
masks household bumps, thunder adds variation without waking you. - Focus / deep work — pink noise + rain. Pink noise is flatter than
white and less fatiguing over long sessions. - Reading / winding down — fire + a whisper of rain. The warm crackle is
enough signal to relax without fighting the words on the page. - Writing in a cafe — coffee-shop ambience with a thin rain bed for
texture.
Behind the engine
Noise layers (white, pink, brown) are generated in-browser with the Web Audio
API — no files downloaded. Nature layers are short MP3 loops decoded once and
replayed from an AudioBufferSourceNode, so there are no stutters when you
change the volume.
The sleep timer schedules a linear gain ramp to zero over the final few
seconds before pausing, so your session ends without an abrupt cutoff.
Best practices
- Start with a preset, then adjust. Presets are calibrated so the layers sit
nicely without any one of them dominating. - Use brown noise instead of white for long sleep sessions — the
low-frequency emphasis is far less fatiguing. - Keep random Probability below 1.0. Fully deterministic events feel robotic;
even 0.7–0.8 reads as natural. - Pair loops with one randomised layer for realism. Pure-loop mixes sound
flat after a few minutes.