Sleep Sound Generator
Click Start to allow audio. Volume and presets are live.
Preset: {{ presetLabel }} Vol {{ master_volume_percent }}% Pan {{ (+pan).toFixed(2) }} Timer {{ Math.max(0, Number(sleep_min)||0) }} min Ends ~ {{ finish_time_local }} Live
Space: start/pause · S: stop · F: fullscreen
{{ master_volume_percent }}%
{{ (+pan).toFixed(2) }}
min
/ s
Rate Hz
{{ lfo_depth_percent }}%
Low shelf {{ eq_low_db }} dB
High shelf {{ eq_high_db }} dB
Band Hz
Q
Gain dB
{{ spectrum_smoothing }}
Field Value Copy
{{ row.label }} {{ row.value }}

                

Introduction:

Colored noise is a random sound shaped across frequency to emphasize or soften parts of the spectrum. Many people talk about these soundscapes as white, pink, or brown noise, and the same idea extends to ambiences such as ocean, rain, fan, fire, and forest. You use them to mask distractions and build a steady acoustic floor that supports sleep, calm, and focused work without sudden spikes taking your attention away.

You provide a few ingredients and receive continuous stereo sound plus a live view of its spectrum. The ingredients are a preset, an overall level, left–right balance, short fades at the start and end, and optional gentle motion and equalization. The result is generated on the fly and shaped in real time by filters and slow modulation, so the texture adapts smoothly as you fine‑tune it.

For example, choose pink noise, set volume to 35 percent, keep pan centered, and add a 1.5 second fade‑in with a 2.0 second fade‑out. Add a sleep timer for 30 minutes to ramp down automatically just before the end. Interpretation stays simple: a steady hiss masks nearby activity and helps your brain settle. Keep levels modest and comfortable to avoid fatigue during long sessions.

Pick a color for the task: darker tilts feel warmer, brighter tilts feel crisper. Ambience presets add slow motion to a shaping filter so the texture breathes without looping. Equalization trims rumble or hiss to match your headphones or room, and balance helps favor one ear when sharing space. Fades keep starts and stops gentle, and the timer prevents unintended overnight playback.

Technical Details:

At heart you are listening to a random signal being shaped in frequency. Two gentle shelves tilt the low and high ends, then a single “shape” filter (low‑pass, band‑pass, or high‑pass) defines the core texture while equalization refines edges. A slow low‑frequency oscillator (LFO) can modulate the shape filter’s cutoff for natural motion. Master level uses a perceptual curve so small adjustments near quiet feel smoother, and a sleep timer fades out before pausing.

The chart shows level in decibels relative to full scale (dBFS) versus frequency on a logarithmic axis. Smoothing controls visual steadiness only; it does not change audio. Presets set filter type, center or cutoff frequency, quality factor, and built‑in LFO rate and depth. Continuous controls include volume in percent, pan from left to right, fade durations in seconds, equalizer gains in decibels, a parametric band’s frequency and Q, and LFO rate and depth.

Processing pipeline:

  1. Create a noise source that outputs independent random samples each frame.
  2. Apply low and high shelves to tilt bass and treble according to the selected color.
  3. Route through a “shape” filter to focus energy (low‑pass, band‑pass, or high‑pass).
  4. Apply user equalization: low shelf, peaking band, then high shelf.
  5. Set stereo balance with a pan stage.
  6. Control output gain with a perceptual volume curve and optional fades.
  7. Analyze the signal for a log‑spaced spectrum and render the chart.

Core formula:

g= (V100) 2   Perceptual volume mapping

Symbols & Units:

Symbols and units for core formula
Symbol Meaning Unit/Datatype Source
V Master volume setting percent Input
g Linear output gain dimensionless Derived

Preset profiles (shape & motion):

Filter type, frequency, Q, and motion per preset
Preset Shape Type Freq Q LFO Rate LFO Depth Color Tilt
White/Pink/Brown/Blue/VioletLow‑pass18 000 Hz0.70.0 Hz0 %Flat / ±3–6 dB tilt
OceanLow‑pass600 Hz0.90.12 Hz38 %Low +6 dB / High −6 dB
RainBand‑pass1 700 Hz0.80.28 Hz10 %Low +3 dB / High −3 dB
FanBand‑pass220 Hz2.10.8 Hz12 %Low −3 dB / High +3 dB
FireplaceHigh‑pass550 Hz0.90.6 Hz10 %Low +6 dB / High −6 dB
Forest nightBand‑pass3 500 Hz3.00.22 Hz7 %Low +3 dB / High −3 dB

Units, precision & rounding:

  • Inputs use decimal point notation; values are continuous where sliders allow.
  • Displayed pan rounds to two decimals; other labels show whole numbers where relevant.
  • Internally, calculations use standard floating‑point arithmetic.
  • No special tie‑breaking rules are applied; fades are linear ramps.

Validation & bounds:

Inputs with types, ranges, and steps
Field Type Min Max Step/Pattern Error Text Placeholder
Presetselectenumeratednonenone
Volumerange01001nonenone
Panrange−110.01nonenone
Sleep timernumber01nonenone
Fade innumber00.1nonenone
Fade outnumber00.1nonenone
LFO ratenumber00.01nonenone
LFO depthrange01001nonenone
EQ low shelfrange−18181nonenone
EQ high shelfrange−18181nonenone
EQ band freqnumber2020 0001nonenone
EQ band Qnumber0.1200.1nonenone
EQ band gainnumber−18180.5nonenone
Spectrum smoothingrange00.990.01nonenone

I/O formats & encoding:

Inputs and outputs with encoding
Input Accepted Families Output Encoding/Precision Rounding
ParametersEnumerated preset; numeric valuesAudio playbackReal‑time generatedContinuous
TableCSV exportComma‑separated with headerLabels rounded for display
SettingsJSON exportPretty‑printed, 2‑space indentNo extra rounding
SpectrumChartLog‑spaced binsSmoothing visual only

Randomness, seeds & reproducibility:

The noise source uses an unseeded pseudo‑random generator. Individual samples differ between runs, while spectral shape remains consistent for the same controls. There is no seeding switch, and exports reflect settings, not waveform data.

Time & calendrics:

The sleep timer measures minutes from start or resume and schedules a fade‑out just before the deadline. The displayed end time uses your local time format. Pausing preserves the remaining time; resuming continues the countdown.

Networking & storage behavior:

Audio is generated client‑side. A charting layer may load from a public content network during page load. Clipboard copies and downloads happen on your device; settings are not sent to a server.

Performance & complexity:

Signal processing runs in real time with a fixed‑size spectrum analysis window. The visualizer samples ~log‑spaced points from the analyzer buffer for responsiveness. Performance depends on device capability; older hardware may prefer lower activity in other tabs.

Diagnostics & determinism:

Given the same controls, filters and envelopes behave deterministically. The noise stream itself remains nondeterministic by design. The spectrum view reflects the immediate output after all processing stages.

Security considerations:

Inputs are numeric or enumerated and are not executed as code. Exports contain only settings. Avoid excessive playback levels on shared devices, and be mindful of headphone safety.

Worked example:

Scenario: Pink noise, volume 35 %, centered pan, fade‑in 1.5 s, fade‑out 2.0 s, sleep timer 30 min.

V=35percent g= (35100)2 =0.1225

The output ramps to a gentle gain of 0.1225, holds steady, then fades to silence just before 30 minutes.

Long listening at high levels may cause fatigue. Start low and increase gradually.

How‑to · Step‑by‑Step Guide:

Use colored noise or ambience to create a steady sound bed for sleep or focus.

  1. Choose a preset that matches your goal.
  2. Set Volume to a comfortable level.
  3. Center or adjust Pan as needed.
  4. Add short Fade in/out to smooth edges.
  5. Optionally set a Sleep timer in minutes.
  6. Fine‑tune EQ or add gentle LFO motion.
  7. Open the spectrum tab to check balance visually.

Example: Ocean preset, 30–45 % volume, pan centered, 2 s fades, 45 min timer.

  • Aim for “barely enough” level; masking should feel effortless.

Features:

  • Colored noise and ambience presets with natural motion.
  • Perceptual volume curve with smooth fade‑in and fade‑out.
  • Stereo pan for left–right balance.
  • Three‑band EQ: low shelf, parametric band, high shelf.
  • Sleep timer with predicted local end time.
  • Live spectrum view with adjustable smoothing.
  • Quick copy or download of current settings as CSV or JSON.
  • Keyboard shortcuts: Space to start/pause, S to stop, F for fullscreen.

FAQ:

What is “colored noise”?

A random signal whose spectrum is shaped by filters to emphasize or reduce certain frequency regions, producing distinct textures like white, pink, or brown.

Is my data stored?

No. Audio is generated on your device and settings are not sent to a server. Copies and downloads save locally.

How accurate is the spectrum?

It samples the post‑processing signal on a logarithmic axis. Smoothing improves readability but does not alter audio, so use it as a qualitative guide.

What units does it use?

Seconds for fades and timers, hertz for frequencies, decibels for gains, percent for volume, and dBFS for spectrum level.

Does it work offline?

Yes after the page has loaded. A charting component may require a fresh connection if you hard‑refresh without a network.

Which noise is best for focus?

Start with pink noise for balance. If you prefer warmth, try brown‑tilted options. For extra crispness, try blue‑tilted options. Adjust EQ to taste.

Can I export my settings?

Yes. You can copy or download a summary table as CSV and a structured settings file as JSON for reuse.

How does the timer stop playback?

It schedules a fade‑out that ends near the deadline, then pauses the engine. Pausing preserves any remaining time, so you can resume later.

Troubleshooting:

  • No sound: click Start to grant audio permission, then raise volume slightly.
  • One ear only: check pan is centered and your device’s balance settings.
  • Harsh or dull tone: adjust the parametric band frequency and gain gently.
  • Choppy playback: close heavy tabs or reduce background CPU load.
  • Chart not moving: open the spectrum tab after starting playback.
  • Timer did not stop: ensure a non‑zero timer and allow fade‑out time.
Blocked playback? Some environments require a user gesture before sound. Click Start again after interacting with the page.

Advanced Tips:

  • Tip Use small LFO depth with slow rate to add life without audible pumping.
  • Tip Nudge the high shelf down a few dB to tame hiss on bright headphones.
  • Tip Place the band around 1–3 kHz to shape presence without muddying bass.
  • Tip Favor one ear with pan when sharing a room to reduce spill.
  • Tip Short fades prevent clicks when starting, pausing, or changing presets.

Glossary:

Colored noise
Random sound shaped in frequency to create a specific texture.
Low/High shelf
Filters that tilt bass or treble broadly by fixed gain.
Band‑pass
Filter that emphasizes a region around a center frequency.
Q (quality factor)
Narrowness or sharpness of a filter’s peak or cut.
LFO
Slow oscillator used to modulate another parameter smoothly.
dBFS
Decibels relative to full‑scale digital level.
Pan
Stereo balance control between left and right channels.
Fade
Gradual change in level over a set time.