-
-
Save hugs/898915 to your computer and use it in GitHub Desktop.
Soothing noise generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Jason Huggins (@hugs) | |
# | |
# Install: | |
# * Download http://sourceforge.net/projects/sox/files/sox/14.3.2/ | |
# * Unzip and the place "play" binary somewhere in your $PATH | |
# Explanation of settings: | |
# - Stereo (2 channels): -c 2 | |
# - 32k rate (high quality): -r 32k | |
# - Play for 8 hours (can also be set at the command line): 08:00:00 | |
# - Brown noise (Brown's the *best*! Suck it, white!): -n synth brownnoise | |
# - Slight oscillation in volume: tremelo .1 40 | |
# Example Usage: | |
# $ noise | |
# (plays noise for 8 hours) | |
# | |
# $ noise 00:01:00 | |
# (plays noise for 1 minute) | |
# $ noise 10 | |
# (plays noise for 10 seconds) | |
len='8:00:00' | |
if [ "$1" != '' ]; then | |
len=$1 | |
fi | |
play -c 2 -r 32k -n synth $len brownnoise tremolo .1 40 |
@rsvp, sorry, I don't know anything about that issue. In true empirical style, I know what works, and not much else. ;-)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
would you know why the sound gets overblown when "-r 44100"? That such a standard settings... anyways, had to omit that argument in my code https://gist.github.com/1209835 which at least reduces CPU usage by 95% :-)