Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Spectrograph Seekbar? (Read 7907 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Spectrograph Seekbar?

If this is a search-fu fail on my part, my apologies.

Like the Waveform seekbar (which is awesome btw) located here: http://www.hydrogenaudio.org/forums/index....showtopic=77490

Has anyone made such a thing?

(Like in Audition, or the spectrograph visualization.)



Spectrograph Seekbar?

Reply #2
Interesting idea...
You can try request it in waveform seekbar thread, maybe Zao will try to make it...

 

Spectrograph Seekbar?

Reply #3
The thing is, storing spectrograph data for an entire track has significantly higher overhead than storing 4096 points worth of high/low/rms data. It would be doable, but expect your waveform cache database size to skyrocket by comparison to whatever it is now.

Spectrograph Seekbar?

Reply #4
a quick and dirty something i made with WSH panel mod:



it doesn't require any user interaction - it uses SOX to create the image. WSH panel mod then displays the image and does the seekbar stuff. i just need to do a bit more testing before i upload it.

Spectrograph Seekbar?

Reply #5
Fcuk !! WSH panel mod is amazing thing... But I will not try it. Never. If I do then probably I'll spend rest of my life on fine tuning my ideal layout or set of layouts for different purposes... DUI forever - just for my good health. Anyway - I must say that miss this kind of colour gradation in original foobar spectrogram... Something similar was available in old foobar 0.8.3 with option of counterclockwise HSV colour mixing...

Spectrograph Seekbar?

Reply #6
i've already run into a brick wall as i can't get it working with mp3 files. i think getting it to work with anything other than what SOX handles natively is going to be a world of pain for me.

Spectrograph Seekbar?

Reply #7
AFAIK SoX uses libmad.dll to decode MP3 files.

Spectrograph Seekbar?

Reply #8
i've already run into a brick wall as i can't get it working with mp3 files. i think getting it to work with anything other than what SOX handles natively is going to be a world of pain for me.

I use SoX in conjunction with foo_run to create spectrograms of files I want to check and am currently facing a similar problem. 99% of my library consists of TAK files, and I can pipe data from Takc to SoX just fine, but couldn't do it with any lossy decoder. Hoping to get somewhat of a universal foo_run option, I also tried FFmpeg... to no avail.

Spectrograph Seekbar?

Reply #9
i can't be bothered with it. i couldn't find any version of libmad that would work. then i tried ffmpeg and i thought i had that working but the images created look nothing like the originals when using SOX natively so i give up.

Spectrograph Seekbar?

Reply #10
Welcome to the club of frustrated users by SoX parameters

Marc, for libmad take a pick: https://www.google.com/search?q=libmad+filetype:dll
I believe you all got 8 sec spectrogram when piping data. If that's the case, then you need to use `-d` switch and tell SoX the length of the track. Here is template for example for M4A:

Code: [Select]
neroaacdec -if <input-file> -of - | sox -t raw -e signed -b 16 -c 2 -r 44100 - -n channels 1 spectrogram -d <track-length> -w k -z <dB-range> -y <y-range> -x <x-range> -r


or in action:

Code: [Select]
neroaacdec -if track01.m4a -of - | sox -t raw -e signed -b 16 -c 2 -r 44100 - -n channels 1 spectrogram -d 3:58 -w k -z 140 -y 257 -x 800 -r


Decoding M4A with chapters:

Code: [Select]
neroaacdec -if <input-file> -of - -chapter <sub>

where <sub> is foobar %subsong% plus 1

Similarly for other decoders.

Spectrograph Seekbar?

Reply #11
a huge thanks for that. the length thing was indeed my issue.

images created by piping in flacs with ffmpeg match what SOX made when handling them natively. i'd hope decoding all other ffmpeg supported codecs will be ok now as well.

Spectrograph Seekbar?

Reply #12
i've put up what i have here:

http://www.hydrogenaudio.org/forums/index....st&p=832277

the main setup instructions for WSH panel mod and importing the script are in the readme, additional instructions for setting up ffmpeg and sox are in the script file.

lastly there are a few limitations outlined in that forum post. i can totally understand people not wanting to use it and waiting for a proper component developer to make something more complete instead.

@Dario, you can use -f sox - to pipe out from ffmpeg. then simply use -p as the input for sox. my full command looks like this:

Code: [Select]
var cmd = "cmd /c \"\"" + ffmpeg_exe + "\" -i \"" + filename + "\" -f sox - | \"" + sox_exe + "\" -p -n channels 1 spectrogram -d " + length + " -Y 130 -r -o \"" + png_filename + "\"\"";

Spectrograph Seekbar?

Reply #13
Interesting idea...
You can try request it in waveform seekbar thread, maybe Zao will try to make it...


Done. Thanks  One can hope  I'm surprised really it didn't already exist at least in idea form, somewhere on this forum.

The thing is, storing spectrograph data for an entire track has significantly higher overhead than storing 4096 points worth of high/low/rms data. It would be doable, but expect your waveform cache database size to skyrocket by comparison to whatever it is now.


Why does it have to store it? PCs are only getting faster and code only gets better (in theory anyway) why not just generate it on the fly? If the delay is noticeable then it would seem it could load the next song in advance. But I'm no coder, I'm speaking from a logic/procedure/approach perspective only. But even if it did have to store it, that's no great worry for me. Free space just get's cheaper and cheaper as well.

a quick and dirty something i made with WSH panel mod:



I have no idea what "SoX/WSH panel mod" is but I'll do the relevant reading/installing/googling/tweaking. Thanks much!

You are all amazing

Edit: "waiting for a proper component developer to make something more complete instead"

From the download and a quick read of the install pdf it seems completion, but rather modularity. As is true with most foobar users I suspect, I already have my own array of tweaks and and customizations applied.

Your edit seems to in effect be its own player, at least judging from the install instructions. So yes I'll be waiting until wider spread interest (if ever) inspires the creation of a more modular and de-personalized solution comes along. Still, great work and thank you for if nothing else providing a better image of exactly what is sought

Spectrograph Seekbar?

Reply #14
well you shouldn't have to google anything. full instructions/links are included. it's a little more effort than installing a normal component but shouldn't take more than a few minutes.

edit: i'm not sure i understand your edit. the spectrogram is only the bottom panel of my screenshot. you can place it in any layout like you would with foo_wave_seekbar.


Spectrograph Seekbar?

Reply #15
Seekbars, everywhere!

The core problems would be storage (for persistent storage, many hundred times larger wavecache.db), analysis time (FFTs ain't cheap, compared to min/max/accum+sqrt), and UI complexity (my nemesis).

My current seekbar code is rather painfully hardcoded against arbitrary streams of data, as long as they're N-channel chunks of exactly 2048 data points.

Database storage might actually become smaller if compression can leverage the increased amount of data, but I wouldn't have my hopes up for that.
Stay sane, exile.


Spectrograph Seekbar?

Reply #17
thanks but you must have missed my subsequent posts where i have ffmpeg working. it's much easier using that because it supports mp3 and most other codecs. the one downside is the 22MB of disk space it takes up but i'll have to live with that.

Spectrograph Seekbar?

Reply #18
Is there a way to set the scale to logarithmic? Linear hides so much information and log view is easier to understand. I have tried parameters, they only scale the linear up and down but do not make it log.

Welcome to the club of frustrated users by SoX parameters

Marc, for libmad take a pick: https://www.google.com/search?q=libmad+filetype:dll
I believe you all got 8 sec spectrogram when piping data. If that's the case, then you need to use `-d` switch and tell SoX the length of the track. Here is template for example for M4A:

Code: [Select]
neroaacdec -if <input-file> -of - | sox -t raw -e signed -b 16 -c 2 -r 44100 - -n channels 1 spectrogram -d <track-length> -w k -z <dB-range> -y <y-range> -x <x-range> -r


or in action:

Code: [Select]
neroaacdec -if track01.m4a -of - | sox -t raw -e signed -b 16 -c 2 -r 44100 - -n channels 1 spectrogram -d 3:58 -w k -z 140 -y 257 -x 800 -r


Decoding M4A with chapters:

Code: [Select]
neroaacdec -if <input-file> -of - -chapter <sub>

where <sub> is foobar %subsong% plus 1

Similarly for other decoders.