Skip to content

Instantly share code, notes, and snippets.

@mschuetz
Created January 11, 2012 12:42
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mschuetz/1594482 to your computer and use it in GitHub Desktop.
Save mschuetz/1594482 to your computer and use it in GitHub Desktop.
pink noise or space using sox
#!/bin/bash -e
function die() {
echo $1 >&2
exit 0
}
[[ -x $(which play) ]] || die "sox must be installed"
if [ $# -gt 0 ]; then
if [ $1 == "pink" ]; then
play -t sl -r48000 -c2 - synth -1 pinknoise .1 40 < /dev/zero
exit 0
elif [ $1 == "space" ]; then
play -c2 -n synth whitenoise band -n 100 24 band -n 300 100 gain +30
exit 0
fi
fi
echo "Usage: $0 (pink|space)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment