• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

soundspec: create the spectrogram of any audio file, or collection of files

Florin Andrei

Member
Joined
Feb 21, 2019
Messages
40
Likes
44
Years ago, I posted here an app I wrote, called soundspec, that could take an audio file, or many files, and creates a spectrogram PNG image from each file. That app is old, and was never very portable.

I re-wrote that app recently in Go. It now runs on many operating systems (macOS, Windows, Linux) and CPU architectures (Intel-compatible AMD64, ARM64). You may find it here:


The Go version is quite fast. It spawns a worker for each CPU core you have (you can optionally dial that down), and processes files in parallel. ffmpeg is a prerequisite (install it first), the app uses it to convert any file format to a PCM stream, which then gets processed via the Fourier transform, and the spectrogram PNG file is generated. No temporary files are ever made.

Using the app is dead simple. When in doubt, generate the help text via soundspec -h

Single file mode:

soundspec -i file.mp3

Recursive mode (many files):

soundspec -i /path/to/music/folder

And here's the spectrogram of the song 'Why So Serious?' by Hans Zimmer and James Newton Howard, from the movie 'The Dark Knight':

serious.mp3.png


It is sometimes believed that this song has some "very deep bass", etc. People hear the sound, and begin guessing. But this is the objective reality check. The song has a powerful bass line in the middle, but it's mostly 30 ... 40 Hz, which is not really that deep. Any decent subwoofer will crank it out, no problem.

Trying it out with your favorite songs is quite addictive. Post spectrograms here if you find something interesting!
 
Last edited:
Back
Top Bottom