|
From: Peter S. <ps...@nu...> - 2012-12-30 21:32:33
|
I need to generate a spectrogram for some wav files, but sox only allows a maximum spectrogram width of 5000 pixels. The horizontal scale I need means that this will only be good for about 3 minutes, but my files are much longer than that. I've been generating spectrograms with commands like: sox test.wav -r 16k -n rate remix 1 spectrogram -S 0:00 -d 3:00 -m -l -x 5000 -y 642 -o spectrogram1.png sox test.wav -r 16k -n rate remix 1 spectrogram -S 3:00 -d 3:00 -m -l -x 5000 -y 642 -o spectrogram2.png sox test.wav -r 16k -n rate remix 1 spectrogram -S 6:00 -d 3:00 -m -l -x 5000 -y 642 -o spectrogram3.png (I've cobbled those together from examples I've found. The intention is to resample the 44.1kHz file to 16kHz because I only want the spectrograms to show up to 8kHz, and I only want the left channel. Are my commands correct?) I'll join these images together to form one long one. I.e. I have to manually create a command per 3 minute segment. Is there a better way? It ought to be faster if I only resample the file once, and I suspect it's not efficient to select the segment with -S compared to splitting the file. Can I use the newfile and restart effects to do it in one command without generating intermediate files? I'm afraid I just don't understand the syntax enough to see if I can do this or not. |