|
From: Ulrich K. <ul...@ch...> - 2013-01-01 01:32:18
|
Happy New Year to everyone! (I know, it's still 2012 in the Americas;
just re-read it later if you live there. ;-) )
Peter Shute <ps...@nu...>:
> but it might be more generally useful if it supported numbered
> spectrogram output files for use with trim and : newfile : restart
> like it does with audio files, or even if it simply created them if
> necessary.
> Are such future enhancements possible with SoX?
Possible, yes. This is a very specific task, however, and I doubt that
the added complexity is worth it.
But, a new approach to your problem recently crossed my mind:
Make a text file like the attached spsp.txt. You might need to add
more lines at the end if (some of) your audio files are longer than
30*3 = 90 minutes. Then, run SoX like this:
sox --effects-file spsp.txt test.wav -n
This is quite similar to the newfile-restart concept, just a little
less elegant, since the spectrogram file names aren't chosen
automatically. A particular advantage is that you can reuse the same
spsp.txt and the same command line for different audio files. If the
audio is only, say, 15 minutes long, the lines that aren't needed will
be ignored.
By the way, if you don't already know about it, you might be
interested in the -r option to the spectrogram effect ("raw"
spectrogram, no legend). This would need to be added to each line in
spsp.txt via search-and-replace.
[Imagemagick]
> That was my intention, although Ulrich has found it can't handle
> 100,000 pixels.
I can't promise that. :-) It didn't work for me, but it might have
been an uncaught out-of-memory situation (thus work OK on a system
with more memory), or a problem in the X display driver (thus work on
Windows, or work when the result is written to a file and not
displayed).
Ulrich
|