GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
SOX |
$ sox -t ossdsp -w -s -r 44100 -c 2 /dev/dsp recording.wav |
Creating sounds with play and saving the sound to file with sox:
$ play -n synth 1 sin 234 $ play -n synth 1 sin 234 sin 345 $ sox -n sample.mp3 synth 1 sin 234 sin 345 $ play -n -c1 synth sin %-12 sin %-9 sin %-5 sin %-2 fade h 0.1 1 0.1 |
Here's a guessing game one liner, asking you to guess the frequency, courtesy of the Twitter account for Command Line Magic.
$ f=$(($RANDOM%5900+100));play -qn synth sin $f trim 0 0.75 vol .1;read -p "Hz(100-6000)? " g;printf "Hz=$f; Off by %d\n" $((f-g)) |