IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Spectrograph Seekbar?
Innomen
post Apr 24 2013, 03:16
Post #1





Group: Members
Posts: 9
Joined: 14-January 10
Member No.: 77109



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.)



Thanks for your time smile.gif
Go to the top of the page
+Quote Post
Aldem
post Apr 24 2013, 03:50
Post #2





Group: Members
Posts: 53
Joined: 8-March 13
From: Québec
Member No.: 107103



I don't think there's one, but you might want to check into the visualizations, maybe there's somthing close to it.

http://wiki.hydrogenaudio.org/index.php?ti...s#Visualisation
Go to the top of the page
+Quote Post
EpicForever
post Apr 24 2013, 17:43
Post #3





Group: Members
Posts: 706
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



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

This post has been edited by EpicForever: Apr 24 2013, 17:44
Go to the top of the page
+Quote Post
kode54
post Apr 24 2013, 17:53
Post #4





Group: Admin
Posts: 4578
Joined: 15-December 02
Member No.: 4082



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.
Go to the top of the page
+Quote Post
marc2003
post Apr 24 2013, 20:00
Post #5





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



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.
Go to the top of the page
+Quote Post
EpicForever
post Apr 24 2013, 20:25
Post #6





Group: Members
Posts: 706
Joined: 14-September 11
From: Szczecin, PL
Member No.: 93712



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...
Go to the top of the page
+Quote Post
marc2003
post Apr 24 2013, 20:59
Post #7





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



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. tongue.gif
Go to the top of the page
+Quote Post
lvqcl
post Apr 24 2013, 22:26
Post #8





Group: Developer
Posts: 3327
Joined: 2-December 07
Member No.: 49183



AFAIK SoX uses libmad.dll to decode MP3 files.
Go to the top of the page
+Quote Post
Dario
post Apr 24 2013, 22:56
Post #9





Group: Members
Posts: 158
Joined: 20-September 11
Member No.: 93842



QUOTE (marc2003 @ Apr 24 2013, 21:59) *
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. tongue.gif

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.

This post has been edited by Dario: Apr 24 2013, 22:56
Go to the top of the page
+Quote Post
marc2003
post Apr 24 2013, 23:37
Post #10





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



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.
Go to the top of the page
+Quote Post
romor
post Apr 25 2013, 01:53
Post #11





Group: Members
Posts: 668
Joined: 16-January 09
Member No.: 65630



Welcome to the club of frustrated users by SoX parameters biggrin.gif

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
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
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
neroaacdec -if <input-file> -of - -chapter <sub>

where <sub> is foobar %subsong% plus 1

Similarly for other decoders.


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
marc2003
post Apr 25 2013, 02:30
Post #12





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



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.
Go to the top of the page
+Quote Post
marc2003
post Apr 25 2013, 09:45
Post #13





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



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. tongue.gif

@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
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 + "\"\"";


This post has been edited by marc2003: Apr 25 2013, 10:08
Go to the top of the page
+Quote Post
Innomen
post Apr 25 2013, 11:12
Post #14





Group: Members
Posts: 9
Joined: 14-January 10
Member No.: 77109



QUOTE (EpicForever @ Apr 24 2013, 11:43) *
Interesting idea...
You can try request it in waveform seekbar thread, maybe Zao will try to make it...


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

QUOTE (kode54 @ Apr 24 2013, 11:53) *
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. smile.gif

QUOTE (marc2003 @ Apr 24 2013, 14:00) *
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.


That is pretty much exactly what I had in mind. WTG!

QUOTE (marc2003 @ Apr 25 2013, 03:45) *
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. tongue.gif


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 smile.gif

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 smile.gif

This post has been edited by Innomen: Apr 25 2013, 11:24
Go to the top of the page
+Quote Post
marc2003
post Apr 25 2013, 11:25
Post #15





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



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.



This post has been edited by marc2003: Apr 25 2013, 11:34
Go to the top of the page
+Quote Post
Zao
post Apr 25 2013, 11:57
Post #16





Group: Members (Donating)
Posts: 899
Joined: 25-September 03
From: Umeå, Sweden
Member No.: 9001



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.


--------------------
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.
Go to the top of the page
+Quote Post
Brazil2
post Apr 30 2013, 09:04
Post #17





Group: Members
Posts: 143
Joined: 9-May 10
Member No.: 80499



QUOTE (marc2003 @ Apr 25 2013, 00:37) *
i couldn't find any version of libmad that would work.

The one from the DVDplayer folder of XBMC 9.11 works with SoX. You can extract it with 7zip.
And this one works too.
Go to the top of the page
+Quote Post
marc2003
post Apr 30 2013, 10:49
Post #18





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



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. tongue.gif
Go to the top of the page
+Quote Post
LifeH2O
post Jul 13 2014, 00:43
Post #19





Group: Members
Posts: 2
Joined: 13-July 14
Member No.: 116665



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.

QUOTE (romor @ Apr 25 2013, 05:53) *
Welcome to the club of frustrated users by SoX parameters biggrin.gif

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
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
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
neroaacdec -if <input-file> -of - -chapter <sub>

where <sub> is foobar %subsong% plus 1

Similarly for other decoders.


This post has been edited by LifeH2O: Jul 13 2014, 00:44
Go to the top of the page
+Quote Post
marc2003
post Jul 13 2014, 06:31
Post #20





Group: Members
Posts: 4439
Joined: 27-January 05
From: England
Member No.: 19379



i had a quick google and this seems to be relevant... http://sox.10957.n7.nabble.com/Spectrogram...ale-td1876.html
Go to the top of the page
+Quote Post
LifeH2O
post Jul 14 2014, 02:28
Post #21





Group: Members
Posts: 2
Joined: 13-July 14
Member No.: 116665



Someone patched SoX to support log scale, to me it is scaled image only, not the actual logrithmic graph. You can see the blocks at the bottom

http://sourceforge.net/p/sox/feature-requests/176/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th July 2014 - 09:11