A labs.llc instrument · every sound generated, none recorded
White, pink and brown noise,
shaped on ten sliders.
A noise machine that runs in the browser. Press Play and it makes white noise, pink noise or brown noise; ten sliders, one to an octave from 32 Hz to 16 kHz, shape it; and six more sounds — rain, wind, surf, a stream, a fan and an aircraft cabin — can be laid over it, each on a slider of its own. A sleep timer fades the whole mix out after 15, 30, 60 or 90 minutes.
Every sound here is synthesised as you hear it. There is no recording behind any of them and no audio file to download: the page draws random numbers, filters them and sends the result to your speakers. On a current browser the noise is new every second and does not loop; the method section says exactly how each sound is made, and what a browser that cannot do that gets instead.
People put steady noise on for sleep, for focus, and for masking the sounds of a room, a street or an open office. This page makes the noise and claims nothing for it: what helps is for your own ears to say.
The desk
One button, ten sliders
Nothing sounds until you press Play: a browser does not let a page start audio by itself, and this one does not try. Stop fades out instead of cutting off, and every slider glides to its new place, so nothing clicks.
The desk
Stopped. Nothing sounds until you press Play.
The mix as it sounds now, low notes on the left and high on the right. White noise draws level; pink falls 3 dB with each octave, brown 6.
Presets — a colour and a curve
Ten bands — an octave each, 12 dB up or down
Sleep timer
No timer: it plays until you stop it.
Animate
Each band wanders up to 3 dB either side of its slider, slowly, at a pace of its own.
The layers
Seven sliders that add up
The noise is one layer and each scene is another. Bring up as many as you like: they are added together ahead of the ten bands, so the bands shape the whole mix, the rain included.
The layers
The colour of the noise
This mix: brown noise
The mix is kept in two places: after the # in this page’s address, so a copied link carries it, and in this browser, so it is here next time. The volume and the timer are yours and are never put in a link. A link sets the sliders and waits; it cannot start the sound.
The method
Random numbers, filtered
The three colours
Noise is named after light. White light holds every colour in equal measure, and white noise holds equal power in every hertz: the stretch from 100 to 200 Hz carries as much as the stretch from 10,000 to 10,100. Ears do not count in hertz, though. They hear in octaves, and each octave is twice as wide as the one below it, so white noise puts twice the power into every octave going up. That is the hiss.
Pink noise takes exactly that away. Its power falls 3 dB with each octave, which leaves the same power in every octave, and it sounds even from bottom to top. Brown noise — also called red noise, and named for Brownian motion, not for the colour — falls 6 dB with each octave and is mostly rumble.
| Colour | Slope | How it is made here |
|---|---|---|
| White | 0 dB per octave | A stream of evenly spread random numbers: an xorshift generator with a period of 2128−1, seeded from the browser’s cryptographic one. |
| Pink | −3 dB per octave | That stream through Paul Kellett’s pink filter — six simple one-pole filters, a delayed tap and the raw stream, added together — which by his figures holds the slope within 0.05 dB from about 10 Hz up. |
| Brown | −6 dB per octave | That stream integrated — a running sum that leaks, with its corner at 16 Hz — and then high-passed at the same 16 Hz, so nothing is spent below hearing. |
Measured, not assumed: a twelve-second render of each colour, fitted across the octaves from 63 Hz to 8 kHz, comes out at 0.0, −3.0 and −6.0 dB per octave at a 48 kHz sample rate. The random numbers are new every time you press Play, so a measurement of your own will differ by a few hundredths.
The ten sliders
Ten peaking filters in a row, centred an octave apart from 31 Hz to 16 kHz (the labels are the customary 32 and 63), each an octave wide and each good for 12 dB up or down. With all ten at zero they do nothing at all, and what you hear is the colour as it was generated. Neighbours overlap, so two sliders raised together lift the notes between them by more than either does alone.
A preset is a colour and a curve. White, Pink and Brown are the three colours with the sliders flat. Deep is brown noise with the top taken off; Bright is white noise with the bottom taken off. Speech blocker is pink noise leaning on 250 Hz to 4 kHz — roughly the band a telephone carries, where the parts of a voice that make words intelligible sit. The name is the usual one and it overstates: it covers speech, and no noise blocks it. Shuffle picks a colour and a curve with the browser’s cryptographic random numbers.
How each scene is made
The six scenes are impressions built by rule from the same three noises, with filters and slow movement. None of them was recorded anywhere, and their settings were arrived at by measuring what the rules produce, not copied from a recording.
- Rain
- Pink noise kept to the band from 450 Hz to 7.5 kHz, with a lift around 2.6 kHz, is the sheet of rain. About 220 random impulses a second in each ear, ringing two band-pass filters at 2.8 and 5.6 kHz, are the drops. Brown noise under 220 Hz is the wash beneath, and the sheet swells and eases by a decibel or so over a quarter of a minute.
- Wind
- Pink noise through a band-pass filter that a slow random signal carries between about 310 and 870 Hz, louder as it rises: the gusts. A second, much narrower filter near 1.3 kHz is the whistle, and it only speaks at the top of a gust. Brown noise under 160 Hz is the bed.
- Surf
- Two trains of waves, one every 9.7 seconds and one every 14.3, so the pattern takes about twenty-three minutes to come round. Each wave is pink and brown noise through a low-pass filter that opens from 380 Hz to about 2.5 kHz as the swell rises and closes as it drains, with white noise above 3.2 kHz for the foam at the crest.
- Stream
- White noise in a broad band around 1.8 kHz is the run of the water. Four narrow band-pass filters between 500 Hz and 2.3 kHz, their pitch shaken a few times a second by random signals, are the gurgle.
- Fan
- Pink noise under 1.4 kHz is the moving air, fluttering by under a decibel 12.5 times a second. The motor is three very narrow bands of noise at 118, 236 and 354 Hz: narrow enough to sound as a hum, and never perfectly steady, as a real one is not.
- Cabin
- An airliner in the cruise: brown noise under 210 Hz, a broad resonance near 150 Hz, a band of rush around 600 Hz, a quiet hiss between 1.6 and 5.2 kHz for the air vents, and two narrow drones at 86 and 172 Hz, the whole drifting by about a decibel over half a minute.
There is no café and no crowd. A room full of voices cannot be made convincingly out of filtered noise, and this page will not pass a recording off as something else, so it is left out.
The timer, and Animate
The sleep timer runs on the audio clock, not the page’s. The fade is scheduled the moment the timer starts, so it happens on time even when the tab is in the background and the browser has slowed everything else in it down. The last minute is the fade; then the sound stops and the page says when it did.
Animate adds a very slow sine wave to each of the ten bands, each with a period of its own between 37 and 113 seconds, moving that band up to 3 dB either side of where its slider sits. The sliders stay where you put them; the spectrum shows the movement.
How loud it is
The page cannot know. It sets a level between nothing and full scale, and how loud that is in the room depends on your device’s volume, its amplifier and its speakers or headphones, none of which a web page can measure. So there is no loudness figure anywhere here: the decibels on the sliders are differences between bands, not sound levels. A soft limiter sits last in the chain: up to six-tenths of full scale it does nothing at all, and above that it rounds the peaks off, so that many sliders pushed up together do not clip.
For hours of listening, and above all for sleep, keep it low. About as loud as quiet talk is plenty; if you would have to raise your voice to speak over it, it is too loud. Start with your device’s volume down and bring it up.
On a phone
Where the browser allows it, the sound carries on with the screen locked and the lock screen offers a pause button. Some phones stop a web page’s audio when the screen locks whatever the page asks for, and an iPhone’s ring/silent switch may mute it; those are the phone’s decisions and the page cannot overrule them. If the system does pause the sound, the desk says so and waits for Play.
What the page loads, sends and keeps
The sound is made by three scripts of this page’s own:
assets/js/noise-core.js (the generators and the mixer),
assets/js/noise-worklet.js (the same generators, run on the browser’s
audio thread and loaded when you first press Play) and assets/js/noise.js (this
desk). No audio file is requested, and these three scripts send nothing: the only requests
they cause are for that second script and, while something is playing, for the site’s
own icon, which the browser shows on its media controls. A browser without an audio
worklet, or one in which that second script fails to load, gets the same generators run
once into buffers of 524,288 samples — 10.9 seconds at a 48 kHz sample rate, 11.9
at 44.1 kHz — and looped. The desk says so, and which of the two it was, beside the Play button
when that is the case; after a failed load, reloading the page puts it right.
The desk keeps one entry in this browser, labs.noise.v1: your
mix, your volume and your timer choice. The mix is also written after the # in the
address, a part a browser never sends to a server with the page request. The site’s
shared furniture — the menu’s search, the assistant, the analytics every
labs.llc page carries — loads as it does everywhere else, and that is the one way a
setting can leave this browser: the analytics, on labs.llc only, may record the address as it
stands, mix included. A set of slider positions is all that is in it; the volume and the
timer never are. Questions and corrections: labs@labs.llc.
About
A noise machine, and nothing it is not
This is a generator of steady sound with a mixer in front of it. It is the kind of thing people leave running to fall asleep to, to work beside, or to take the edge off a neighbour’s television. White noise, pink noise and brown noise are the three best-known kinds, and brown noise, the deepest of them, is what the desk opens on.
It makes no promise about any of that. Whether noise helps you sleep or concentrate is a question about you, not about the noise, and this page has measured its own output and nothing else. Masking is the one effect that is plain arithmetic: a steady sound raises the floor that other sounds have to rise above, so a door or a voice stands out less. It does not cancel them, and it is not hearing protection.
It is not a library of recordings either. Everything is made by rule in the page, which is why there are six scenes and not sixty: a scene is only here if it can be built honestly out of noise, filters and slow movement. Elsewhere in the Sound room there is a tuner, a drum machine whose voices are synthesised the same way, and a live equaliser for the sound around you.