• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required as is 20 years of participation in forums (not all true). Come here to have fun, be ready to be teased and not take online life too seriously. We now measure and review equipment for free! Click here for details.

Simple app to visualize the spectrum of a whole song - or many songs in batch mode - from start to end in one image. Bonus: remember "Why So Serious?"

Joined
Feb 21, 2019
Messages
24
Likes
30
#1
https://github.com/FlorinAndrei/soundspec

I wrote the app over the week-end, more like a hobby. No fancy GUI, sorry, but I do provide an .exe for non-technical Windows users (Mac version soon, I hope, once I fix the issues with pyinstaller - feel free to send me pull requests if you have a fix).

The single-file version (soundspec.exe, or the Python script soundspec.py) can only do one file at a time, and only works with WAV files. Use VLC, ffmpeg, etc to convert your file to WAV.

The batch mode versions (soundspec-batch.bat for Windows, soundspec-batch.sh for Mac/Linux) require ffmpeg, can do many, many files in one command, and support any sound file format you've heard of - if ffmpeg can parse it, it will probably work.

The project page on GitHub has examples, and some simple instructions for non-technical users.

If things don't work as they should, open an issue on GitHub (don't forget to share with me the file where it fails) - or, better yet, send me pull requests with code fixes.

This is a hobby thing, so I probably won't add a lot of features, but for a basic app it should work as intended.

BTW, the Batman song - if you read the reviews, you'd think that's some infrasound stuff - people saying "my ears are bleeding", etc. Yeah, not really. Yet another example of imagination / placebo at work in this hobby. The numbers don't lie; most energy in that bass line is between 30 Hz and 40 Hz; pretty low for sure, but not super-low. The music is pretty good though, like most things issued by Zimmer and Howard.
 
OP
Florin Andrei
Joined
Feb 21, 2019
Messages
24
Likes
30
Thread Starter #4
OMG, look at that bass! That's, what, 19 Hz or so?
And you can see the ascending / descending movements of the fugue.
I have the same piece interpreted by Marie-Claire Alain on the main organ at Grote of Jacobijnerkerk in Netherlands, built in the 1700s. This is the spectrogram:

01_Toccata_con_Fuga_in_d_BWV_565.wav.png


I think I'll do a batch processing of that whole CD set. :) I bet there are all kinds of fascinating things in there.
 
OP
Florin Andrei
Joined
Feb 21, 2019
Messages
24
Likes
30
Thread Starter #6
Hah! I knew it! There had to be something similar out there.

Obviously Spek has a GUI, while my app doesn't. I don't see batch mode with Spek.

Spek displays the spectrum on a linear scale; I've tried to find an option to change that but I failed. This is not optimal; most of the information becomes "compressed" at the bottom end. It needs to be represented on a logarithmic scale. I haven't looked at the code, but it shouldn't be a huge change; depends on how they do the FFT.

See here, same song - it's hard to tell anything that happens below 2 kHz:

01_Toccata_con_Fuga_in_d_BWV_565.wav.png
 

kirkw

New Member
Joined
Aug 17, 2019
Messages
3
Likes
2
#7
I liked your visual presentation on the sample image. Provides a visual overview, can see patterns. Interesting to be able to see differences in the two J.S. Bach performances. As an aside, the pattern reminds me of the falling characters screen from The Matrix.

This one is Collective Soul "Run". I've long wondered how low the low single bass note was - It is higher freq. than I imagined. I never heard it until I got my first sub woofer. Since then I've used this track to test low end sound- if I can hear that low note, and its quality or character of sound.

Collective Soul_Run.png


Great work Florin! Thanks.
 
OP
Florin Andrei
Joined
Feb 21, 2019
Messages
24
Likes
30
Thread Starter #9
I've released a new version (0.1.1). It contains a fix for time resolution - very short files (under 1 min) should be somewhat less blurry now; some blurriness will persist, as it's inherent to the windowed Fourier transform. Things will always be somewhat smeared over an interval of about 1 second, but it's less sharp now. In other words, the algorithm has a time resolution of about 1 second (events shorter than that will be smeared), but I made it look less bad.

I've long wondered how low the low single bass note was - It is higher freq. than I imagined.
Exactly.

This app is basically a reflection of my quest for truth in audio. I thought I was seeing that truth in my Stax headphones. Of course I got fooled by their extraordinary transparency, and I thought, like many others - "oh, bass is just a bit tight, but it's not too quiet".

Yeah, no. :)

I've played a video game one day while using the Stax for audio. I was familiar with the sound of the game, having played it before on the Audeze LCD-2. There's a space travel sequence that uses a pretty low-frequency bass drop effect. That was played flawlessly by the Audeze (duh). On Stax... it was missing completely!

And then I saw frequency response lab measurements for Stax. And I've started playing with EQ. And finally I made it sound like the Audeze below 100 Hz.

But I was still nagged by the question - how low is that bass drop after all? Well, this is the sequence:


And this is the spectrogram:

me4.wav.png

Pretty low actually. No wonder Stax was missing that part entirely - before applying EQ. Now it's linear.
 
Last edited:

LTig

Major Contributor
Forum Donor
Joined
Feb 27, 2019
Messages
2,342
Likes
3,556
Location
Europe
#11
Pretty deep bass here: Daft Punk - Tron Legacy (Soundtrack) - Disc Wars

Despite having a sub with 19 Hz @ -3dB I cannot hear the deepest tone. Just a slight hint that there could be something when it starts.

17 - Disc Wars.flac.png
 

LTig

Major Contributor
Forum Donor
Joined
Feb 27, 2019
Messages
2,342
Likes
3,556
Location
Europe
#12
This bass I can hear: Beatrix Players - Magnified - Not for the first time
04 - Not For the First Time.flac.png
 

LTig

Major Contributor
Forum Donor
Joined
Feb 27, 2019
Messages
2,342
Likes
3,556
Location
Europe
#13
Nice bass line: London Grammar - If You Wait - Hey Now (heard it on Highend 2019 in Munich)

01 - Hey Now.flac.png

BTW there was a warning:
soundspec.py:251: RuntimeWarning: divide by zero encountered in log10
plt.pcolormesh(t, f, np.log10(Sxx))
 
OP
Florin Andrei
Joined
Feb 21, 2019
Messages
24
Likes
30
Thread Starter #16
Pretty deep bass here: Daft Punk - Tron Legacy (Soundtrack) - Disc Wars

Despite having a sub with 19 Hz @ -3dB I cannot hear the deepest tone. Just a slight hint that there could be something when it starts.

View attachment 35701
Yeah, there's the three bass notes that go high - mid - low, over and over again during the whole song. The low note requires some pretty insane sound levels to hear, because of the equal-loudness contour, which rises a lot at that frequency. What's easily heard is the upper harmonics of that note - but the fundamental is hidden except on good gear and very high volume.

There's one repeat of the high - mid - low theme at the end, when most other instruments are quiet, and you can crank up the volume without fear of destroying your eardrums. That's the best place to try and hear it.

On my SVS PB-1000 subwoofer, which is also 19 Hz @ -3 dB (and I do full room correction with Dirac Live on miniDSP), it's at the edge of perception. I can definitely feel it as a vibration.

I quite clearly hear it on the Audeze LCD-2 headphones, which have linear response down to 10 Hz. But the volume knob is at the upper extreme and most of the song (except the end part) is unbearably loud at that level.

Those frequencies are not easy to hear. But they're very impressive when you do hear them.
 

KozmoNaut

Active Member
Joined
Sep 28, 2019
Messages
299
Likes
544
#18
The Tron Legacy soundtrack is great for big powerful bass that still manages to not outstay its welcome.

Here's "Necropolis" from the Quake (1996) soundtrack, which has a pronounced low-frequency rumble, Trent Reznor was really going for an unsettling ambience. For a mid-90s game sound track, it goes absurdly deep. Very few people had anything hooked up to their PCs that could do it justice.
 

Attachments

OP
Florin Andrei
Joined
Feb 21, 2019
Messages
24
Likes
30
Thread Starter #19
Very few people had anything hooked up to their PCs that could do it justice.
Yeah, not me. For some reason, it did not occur to me to hook up the line output from my PC to the line input on my homebrew amp. Necropolis has a peak just above 30 Hz, should have been doable on my old speaker boxes.

Anyway, glad I could hear it now, brought back some memories, thanks!
 

KozmoNaut

Active Member
Joined
Sep 28, 2019
Messages
299
Likes
544
#20
Yeah, I'm also kind of embarrassed at how long it took for me to realize that I could connect my PC to my stereo.
 
Top Bottom