Sleep, waves, and why your brain likes surf

Ngủ, sóng, và vì sao não thích sóng biển

There is a reason people travel to the coast for rest. Ocean surf is loud in absolute terms yet feels calming to many listeners. Part of that paradox comes from statistics: natural surf approximates pink noise, sometimes called one-over-f noise because its power decreases predictably with frequency. Pink noise has equal energy per octave, which means low rumble carries weight without the harsh uniformity of white noise where every frequency band receives the same power. Estua synthesizes similar statistical textures in real time rather than replaying an eight-minute recording that your brain will detect by minute three.

We are an app studio, not a sleep clinic. We do not run EEG trials or publish medical claims. We read the psychoacoustics literature, dogfood nightly builds, and ship audio that avoids the perceptual traps loop-based apps fall into. This post explains why surf-like spectra matter for sleep onset and how Estua implements them without seams.

What pink noise is and why loops fail

White noise sounds like static on an untuned television — every frequency band contributes equally, which the ear experiences as bright and fatiguing over long exposure. Pink noise rolls off the highs so that each doubling of frequency carries less energy. Real rain on a roof and breaking waves share that gentle slope plus occasional transients: a louder swash, a gust against a window. Those transients are not evenly spaced; they arrive with rough randomness that keeps the soundscape alive.

Recorded loops fail because human hearing is exquisitely sensitive to periodicity. Autocorrelation — a measure of how much a signal resembles a delayed copy of itself — spikes at the loop period even when crossfades hide the audible click. Evolution favored detecting repeating patterns in rustling grass because repetition sometimes meant predators circling. Synthesis breaks that predictability by drifting phase relationships through uncorrelated low-frequency oscillators modulating filter cutoffs and gains.

How Estua shapes surf-like scenes

Typical ocean parameters combine amplitude modulation on a low band between eighty and four hundred hertz at rates around zero point zero five to zero point twelve hertz, a mid-frequency hiss band between one and four kilohertz filtered to pink and gently modulated, and optional high sparkle below eight kilohertz kept thirty decibels or more below full scale so it suggests air rather than needles. Rain scenes add band-passed noise bursts triggered with Poisson timing so drop clusters do not fall on a metronome. Each seed initializes independent random generators so two nights with the same scene name still diverge in detail unless you deliberately reuse a seed you liked.

All of this runs on the audio thread at forty-eight kilohertz in five-hundred-twelve-sample blocks, obeying the no-allocation rules documented in life on the audio thread. Implementation specifics of the synthesis chain — Paul Kellet pink filters, limiter placement, platform audio engines — live in sound that never repeats.

Domestic details that matter at two AM

Sleep audio is a shared environment problem. Estua's sleep timer begins fading volume twenty minutes before off, with the final three minutes ramping down roughly thirty decibels total so a partner is not startled when silence arrives. The wake alarm uses a separate synthesized scene rather than the same noise you slept to — a small choice that prevents the brain from associating the sleep sound with morning urgency.

If you want to explore noise colors interactively, Phyzix includes generators and meters that visualize white, pink, and brown spectra side by side. Sonarish is the wrong tool for sleep — it measures rather than soothes — but its FFT view is useful when verifying that Estua output truly lacks periodic peaks in autocorrelation.

Có lý do người ta ra biển nghỉ ngơi. Sóng biển to theo đo tuyệt đối nhưng nhiều người vẫn thấy êm. Một phần nghịch lý đến từ thống kê: sóng tự nhiên xấp xỉ pink noise, đôi khi gọi nhiễu một trên f vì công suất giảm dự đoán được theo tần. Pink noise có năng lượng đều mỗi octave — ù trầm có trọng lượng mà không gắt như white noise nơi mọi dải tần cùng công suất. Estua tổng hợp kết cấu thống kê tương tự real-time thay vì phát lại bản ghi tám phút mà não bạn sẽ bắt ra ở phút thứ ba.

Team là studio app, không phải phòng khám giấc ngủ. Không chạy thử EEG hay đưa claim y khoa. Team đọc tài liệu psychoacoustics, dogfood bản nightly, ship audio tránh bẫy cảm nhận mà app loop mắc phải. Bài này giải thích vì sao phổ kiểu sóng quan trọng cho vào giấc và Estua triển khai không seam.

Pink noise là gì và vì sao loop thất bại

White noise nghe như nhiễu tivi chưa dò kênh — mọi dải tần đóng góp như nhau, tai cảm thấy sáng và mỏi nếu nghe lâu. Pink noise giảm dần tần cao sao cho mỗi lần gấp đôi tần mang ít năng lượng hơn. Mưa thật trên mái và sóng vỡ chia sẻ độ dốc nhẹ đó cộng transient thoáng qua: một đợt swash to hơn, gió thối vào cửa. Transient không cách đều; chúng đến với ngẫu nhiên thô giữ soundscape sống.

Loop ghi hình thất bại vì thính giác cực nhạy với tính tuần hoàn. Autocorrelation — đo mức tín hiệu giống bản trễ của chính nó — spike ở chu kỳ loop dù crossfade che click nghe được. Tiến hóa ưu tiên phát hiện pattern lặp trong cỏ rustle vì lặp đôi khi nghĩa là predator quanh quẩn. Synthesis phá dự đoán đó bằng trôi quan hệ phase qua bộ dao động tần thấp không tương quan điều biến cutoff và gain bộ lọc.

Estua tạo hình scene kiểu sóng

Tham số biển điển hình kết hợp điều biến biên độ dải thấp tám mươi đến bốn trăm hertz ở rate khoảng 0,05 đến 0,12 hertz, dải hiss giữa một đến bốn kilohertz lọc pink và điều biến nhẹ, sparkle cao tùy chọn dưới tám kilohertz giữ dưới full scale ít nhất ba mươi decibel để gợi không khí không chọc tai. Scene mưa thêm burst nhiễu band-pass kích Poisson để cụm giọt không rơi theo metronome. Mỗi seed khởi tạo generator ngẫu nhiên độc lập — hai đêm cùng tên scene vẫn lệch chi tiết trừ khi bạn cố ý dùng lại seed ưa thích.

Tất cả chạy trên audio thread 48 kHz theo block 512 mẫu, tuân luật không allocate trong sống trên audio thread. Chi tiết chuỗi synthesis — filter pink Paul Kellet, vị trí limiter, engine audio nền tảng — nằm ở âm thanh không bao giờ lặp.

Chi tiết đời thường lúc hai giờ sáng

Audio ngủ là bài toán môi trường chung. Timer ngủ Estua bắt fade hai mươi phút trước khi tắt, ba phút cuối ramp xuống khoảng ba mươi decibel tổng để người bên cạnh không giật mình khi im lặng đến. Báo thức dùng scene tổng hợp riêng thay vì cùng noise đã ngủ — lựa chọn nhỏ ngăn não gắn tiếng ngủ với urgency buổi sáng.

Muốn khám phá màu nhiễu tương tác, Phyzix có generator và meter hiển thị white, pink, brown cạnh nhau. Sonarish sai công cụ cho ngủ — nó đo chứ không ru — nhưng view FFT hữu ích khi xác minh output Estua thật sự thiếu peak tuần hoàn trong autocorrelation.