SoX Spectrum - a handy utility for creating graphic spectra of audio files

In connection with the preparation of a complete rare discography of a musical group known in narrow circles, exclusive not only for the Russian, but also for the global Internet, it became necessary to create high-quality frequency spectra of audio files. Several well-known tools were tried for such purposes, but they were either unreasonably cumbersome for such a procedure, or did not have the necessary settings for this.
As a result, quite unexpectedly, I came across a well-known in narrow circles utility for working with SoX audio files ( http://sox.sourceforge.net/ ).

image

She was long forgotten by me, but, as it turned out, unjustifiably. This is a console utility that has tremendous opportunities for working with sound and allows you to perform almost any operation with it. A kind of Swiss army knife for audiophiles. The official website has a very impressive list of its features. As already mentioned, the utility is console-based, which means it is supported by almost any device. Even in the repositories of my geek niksovy Nokia N900 I found a package for working with it (!). There are some adjustments on Android. This is already very interesting! But the most important thing is that an excellent spectrogram tool was discovered in itwhose main purpose is precisely the creation of graphic spectra of audio files in PNG format. Despite the very Spartan interface, or rather its complete absence, it also has a number of settings that can be specified as keys when performing this action. Excellent! Now the only thing left is to write for him a small bat-file that would carry out the procedure of creating audio spectra with ease for the user. This process did not cause any special problems, but unexpectedly a difficulty arose: by default, the tool works only with WAV. What a twist! You will have to build SoX with the libraries libmad (for FLAC) and libmp3lame (for mp3). Compiling is relatively straightforward, but describing it is beyond the scope of this article. Perhaps in the future I will describe this process. All is ready! The branch was created on Github from work. All changes and new versions will appear only there. While the utility supports only mp3 and FLAC, in the future it can add a monkey (APE) ...

Examples of spectra obtained:

FLAC:

image

mp3:

image

A small installation instruction:

1) Download the current version of the SoX package here: http://sourceforge.net/projects/sox/files/latest/download and install.
2) Download the current version of SoX Spectrum here: https://github.com/ointeractive-russia/sox-spectrum and unpack it into the folder with SoX installed (by default C: \ Program Files \ sox-14-4-1 ).

Installation completed!

Now just move the desired music file to the “SoX Spectrum” shortcut on the desktop. The utility itself will run on the command line and perform the necessary actions. A spectrum image in PNG format will appear in the folder with this audio file.

PSBy default, the utility creates spectra in the normal color rendering mode, but it is also possible to turn on the enhanced color rendering mode, which will allow for clearer and more visible spectra. To do this, open the sox-spectrum.bat file with any text editor and in the Settings section, correct the value of the HIGHT_COLOR variable by 1.

Also popular now: