Terminal white-noise generator for Linux

I'm a fan of the Pomodoro Technique, which breaks down work into intervals that are separated by short breaks. I'm also a fan of using white-noise generators for concentration.

I wanted to find something that would combine these two techniques. I found a very simple solution using the play command that comes from the sox package.

Get it!

Add the following to your .bashrc:

wnoise_function () {  
play -n synth "$2":00 brownnoise -65 tremolo .20  vol "$1"db  
alias whitenoise=wnoise_function  

Run source:

$ source ~/.bashrc

Now you can run your white noise generator by running whitenoise -15 20 - where the first argument is the volume and the second is the duration of time.

$ whitenoise -15 20

 File Size: 0
  Encoding: n/a
  Channels: 1 @ 32-bit
Samplerate: 48000Hz  
Replaygain: off  
  Duration: unknown

In:0.00% 00:00:01.71 [00:00:00.00] Out:67.4k [    ==|==    ]        Clip:0  

Note: Ok, its actually brown-noise :) The play command does offer more options; [white]noise, tpdfnoise, pinknoise, brownnoise, pluck.

Tagged under: white noise, noise generator, terminal service, pomodoro, Pomodoro Technique