Listen & Download
🌊 Ocean Wave Sound
Original volume: — adjust the slider to change playback volume
Ad Space
What Is This Sound?
This is a synthesized ocean wave sound created entirely using the Web Audio API — no recordings of real oceans involved. The rhythmic surge, crashing foam, and deep undertow you hear are all generated mathematically by your browser in real-time.
Ocean waves are among the most powerful natural sounds for relaxation and sleep. The rhythmic, cyclical nature of waves has been shown to slow heart rate and promote a parasympathetic nervous system response. This version captures the full wave cycle — approach, crest, crash, and recede — in a seamless loop.
How Is Ocean Wave Sound Created with Code?
Ocean waves require asymmetric modulation — the wave builds slowly, crashes quickly, then recedes gradually. This is achieved through three noise layers, each shaped to represent a different part of the wave cycle.
Layer 1: Wave Surge (Brown Noise + Lowpass 500Hz + Sawtooth LFO)
The main body of the wave — the deep, rolling surge — is brown noise through a lowpass filter. A sawtooth LFO creates the characteristic asymmetry: fast attack as the wave approaches and breaks, then slow decay as it pulls back:
// Brown noise → lowpass filter for deep wave body
const lowpass = audioContext.createBiquadFilter();
lowpass.type = "lowpass";
lowpass.frequency.value = 500;
lowpass.Q.value = 0.7;
// Sawtooth LFO for wave cycle asymmetry
const lfo = audioContext.createOscillator();
lfo.type = "sawtooth";
lfo.frequency.value = 0.1; // ~10 second wave cycle
Layer 2: Foam & Spray (White Noise + Bandpass 2000Hz)
The bright, hissing texture of foam at the wave crest uses white noise filtered around 2000Hz. This layer activates primarily at the peak of each wave cycle:
const foamFilter = audioContext.createBiquadFilter();
foamFilter.type = "bandpass";
foamFilter.frequency.value = 2000;
foamFilter.Q.value = 1.0;
Layer 3: Deep Undertow (Brown Noise + Lowpass 150Hz)
The low, rumbling presence of deep water movement beneath the surface is a separate brown noise layer filtered at a very low 150Hz:
const undertow = audioContext.createBiquadFilter();
undertow.type = "lowpass";
undertow.frequency.value = 150;
undertow.Q.value = 0.5;
The Wave Cycle
The sawtooth LFO on the main surge layer is the critical element. Unlike a sine wave LFO, a sawtooth ramps up quickly and falls slowly (or vice versa), creating the natural asymmetry of a wave that builds, crashes, and recedes:
// Sawtooth wave: fast rise → slow fall = wave approach → recede
const lfoGain = audioContext.createGain();
lfoGain.gain.value = 0.3;
lfo.connect(lfoGain);
lfoGain.connect(masterGain.gain);
Ad Space
The Science Behind Ocean Wave Sound
Why Does Modulated Noise Sound Like Waves?
Ocean waves produce sound through a complex chain of physical events. As a wave approaches shore, the rising water column generates low-frequency broadband noise. At the crest, trapped air pockets compress and burst, creating high-frequency foam noise. As the wave recedes, the draining water produces a gradual fade of mid-range noise.
The key acoustic feature of waves is temporal asymmetry — the approach and crash happen faster than the recession. A sawtooth LFO models this far better than a symmetric sine wave, which is why our synthesized version sounds recognizably wave-like rather than just “pulsing noise.”
Frequency Spectrum
| Parameter | Value |
|---|---|
| Layer 1 Noise | Brown noise, lowpass 500Hz, Q 0.7 |
| Layer 2 Noise | White noise, bandpass 2000Hz, Q 1.0 |
| Layer 3 Noise | Brown noise, lowpass 150Hz, Q 0.5 |
| LFO Type | Sawtooth (asymmetric cycle) |
| LFO Rate | 0.1Hz (~10s per wave) |
| Output Level | -10dB (comfortable listening) |
Common Uses
- Sleep Aid — The rhythmic wave cycle entrains breathing patterns and promotes deep sleep
- Focus & Study — Waves mask distracting conversation and irregular noise effectively
- Meditation & Yoga — Ocean sounds create a natural, expansive soundscape for mindfulness practice
- ASMR & Relaxation Apps — A staple ambient sound for wellness applications
- Film & Video — Layer over coastal footage for believable ambient sound design
- Game Development — Environmental audio for beach, ocean, or coastal game environments
Technical Details
| Property | Value |
|---|---|
| Format | WAV (PCM 16-bit / 24-bit / 32-bit float) |
| Sample Rate | 44,100 Hz / 48,000 Hz |
| Channels | Mono / Stereo |
| Duration | 3 seconds (loopable) |
| Generation | Web Audio API |
| License | Free for personal and commercial use |
Ad Space
Frequently Asked Questions
Can I use this sound in my project?
Yes. The sound is generated by code in your browser. The output WAV file is yours to use freely in any personal or commercial project.
Why do the waves sound rhythmic rather than random?
Real ocean waves are periodic — they arrive at roughly regular intervals determined by wind speed and fetch distance. The sawtooth LFO at 0.1Hz creates a ~10-second wave cycle, which falls within the typical range of real ocean swell periods.
How do I make it loop seamlessly?
The downloaded 3-second WAV file can be looped in most audio software or game engines. For seamless looping, import it into a DAW and apply a short crossfade at the loop point.
Can I make bigger or smaller waves?
Yes. Slow the LFO rate (e.g., 0.05Hz) for large, slow swells. Increase it (e.g., 0.2Hz) for choppy, frequent waves. You can also raise the foam layer’s gain for stormier seas or reduce it for calm conditions.