I have the following SoX command that generates a nifty 'spacecraft' sound:
play -n -c1 synth whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1 864000 1
How could I output about 10 seconds of this to a sound file? Thanks!
play -n -c1 synth 10 whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1 10 1
Insert the total duration after synth (in this case 10 seconds )
Also supply the duration to fade so this function can apply the fade-out time (1 second in this example) at the right moment (i.e. at the ending of the track)
If you want to record this, just do:
sox -c1 -n result.wav synth 10 whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1 10 1
This will dump the resulting sound in result.wav.