Articles‎ > ‎

Digital White Noise Machine

posted Aug 29, 2010 9:45 AM by Victor Simone   [ updated Oct 21, 2010 10:10 AM ]
In Linux, piping random data from /dev/urandom to the Digital Signaling Processor /dev/dsp produces a sound like static on the TV - a white noise. The benefit of white noise is it drowns out other disturbing sounds. This is great for sleep: blocking the sound of that muffler, motorcycle, airplane, honking geese, etc. that tends to jar me awake as I'm drifting to sleep.

Inspired by xkcd, I put together a bash script that starts the piping of random data to /dev/dsp but goes a bit further. Using aumix, the computer's volume is zeroed, and gradually increases over a period of time according to variables in the script. When the alarm time is reached the volume decreases again by 1% until silent. This lulls me to sleep, and wakes me up gently. No immediate blast of white noise.

Grab the white noise script in the downloads section!