Help - Search - Members - Calendar
Full Version: [merged]Seekbar with time–frequency graph overlay
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
fireslug
Here's my little contribution to the foobar project: an idea for a simple seekbar & amplitude visualisation combo that would fit wonderfully in as a plugin to the default UI. Unfortunately my coding skills are practically nonexistent, so I'm hoping someone else will step up and implement it. I believe it would be quite easy for an experienced programmer.

I'm much better at Photoshop, so here's a mockup of what I mean:



The visualisation shows the entire currently playing song and is completely stationary, except for the moving orange seekbar (grabbable of course, like an ordinary seekbar).

I also imagine an option for nonsymmetric amplitudes (top half only). In this case, the whole thing could be resized to take no more space than the default seekbar, see here:



Feedback welcome! And drop a long here if you're a prospective coder!

[Moderators: I apologize if this is duped. I reposted when nothing appeared in the forum.]
JensRex
Technical obstacles causes your idea to fail right away, because you need to decode the entire file before you can display the graphics, which means a gigantic overhead, unless you cache the results. Even doing that means you have to store that somewhere, and the size of that data is probably non-trivial. So either you bloat your tags, or you have to manage possibly thousands of auxiliary files. It's a gigantic headache.
fireslug
QUOTE (JensRex @ Nov 26 2008, 18:14) *
Technical obstacles causes your idea to fail right away, because you need to decode the entire file before you can display the graphics, which means a gigantic overhead, unless you cache the results. Even doing that means you have to store that somewhere, and the size of that data is probably non-trivial. So either you bloat your tags, or you have to manage possibly thousands of auxiliary files. It's a gigantic headache.


Too bad. sad.gif Guess I'll have to wait until decoding an entire MP3 can be done in a millisecond (20 years or so I'd guess, since Audacity takes about a second now). Thank you for explaining.
JensRex
It's a shame really, because I think it's a decent idea. smile.gif
pyr0rrzzz
If you can store lyrics in your tags, why not a low resolution waveform with like one average amplitude per second? Only 60*5 integers for an average song. Of course the calculation would take some time but it would only need to be done once.
JensRex
I'm not saying it can't be done. I'm just saying it isn't straight forward, and it poses some technical challenges, for something that's essentially just eye candy.
pyr0rrzzz
Well, it could also help to navigate in long songs.
fireslug
So this could actually work if all songs are pre-scanned to store amplitude data in the tags? I suppose the amplitude pre-scanner could be combined with replay-gain tagging, so no additional processing time would be required.

I think storing even a high-resolution (say 5 samples per second) version would be feasible, and it would certainly look much better when stretched over a 1000 pixel foobar window. One byte per sample or 256 levels is more than enough vertical/amplitude resolution. A typical 5 minute song would then require 5*60*5 = 1500 bytes of extra data in the tags (assuming efficient storage), which is nothing compared to the size of the MP3. Anyway, the resolution parameter could be an option for the end user.

Total storage aside, is bloating tags by 1.5 - 2 kbytes bad in any other way?

Could all this be done as a plug-in without changes to the foobar core?
odyssey
Forget about developing for DUI, the SDK is not available for 3rd party apps (yet).

But I think it's a very good idea and it could easily be done in ColumnsUI. It could eventually be coupled with the moodbar source from Amarok wink.gif
Dandruff
QUOTE (JensRex @ Nov 26 2008, 18:14) *
Technical obstacles causes your idea to fail right away, because you need to decode the entire file before you can display the graphics, which means a gigantic overhead, unless you cache the results. Even doing that means you have to store that somewhere, and the size of that data is probably non-trivial. So either you bloat your tags, or you have to manage possibly thousands of auxiliary files. It's a gigantic headache.


I wouldn't call it a gigantic headache. Just look at all those audio editors and -> they also don't have headaches with it.



My ideas for this would be:

1. build the peaks live in a background process (so that you don't have to wait for whole display but see it build up)
2. automatically "normalize" the display of those peaks (so that it's also useful for quiet music)
3. an option to save those peaks into a dedicated "Peak" folder so that they don't get saved in the music folders
4. an option to show these peaks in Comparisonics colors: See http://www.comparisonics.com/gallery.html or http://media.freesound.org/files/newplayer


Here some technical information on how this is done in REAPER: http://www.reaper.fm/sdk/reapeaks.txt



Would be a KILLER feature in foobar2000! Basically the only thing I really miss.
4nt1
this functionality is already in native instruments traktor 3 / pro
all the stuff is stored in the tags
Dandruff
I wouldn't like to have it stored in the tags. I would prefer some sort of external database or external peak-files in a separate folder.
threEchelon
Amarok does something like this, but adds colors somehow, and the colors aren't just related to amplitude.

Anyway, this seems like a great idea and would definitely be doable.
Dandruff
QUOTE (threEchelon @ Mar 21 2009, 20:36) *
the colors aren't just related to amplitude


They are not related to amplitude at all. Different frequencies is what you need colored! Then you really can see where certain passages or instruments start playing! Great thing to have!
Dandruff
Any opinions from the developer(s)?
odyssey
Any developer can pick up this idea smile.gif It should be possible to create it as a 3rd part component through the SDK smile.gif (At least for CUI. Are SDK for DUI released yet?)
randal1013
i've wondered about this from time to time. the idea that i had went a step further and incorporated a more intricate rating system. i think it would be interesting to highlight a portion of the waveform visual and rate it. so you could rate the song intro, the verse, the chorus, the solo, the outro and whatever else separately, then have a component calculate an average rating for the whole song. however, that would probably end up being too much work for the average end-user.
odyssey
Yeah, I have trouble enough tagging all my music alone wink.gif
foorious
QUOTE (odyssey @ May 1 2009, 11:25) *
Any developer can pick up this idea smile.gif

Yes, and it's sad to see that nobody has started working on it since more than 6 months, though it has been proven that this is definitely not eye-candy but a very useful (easier to find a part of a song) and powerful (with the comparisonic colors) feature.

If I remember well, we have the same problem with another interesting component project : an integrated BPM calculator. Canar was interested in the idea 6-9 months ago, but he didn't have enough time (and probably still doesn't have).

QUOTE (odyssey @ May 1 2009, 11:25) *
(Are SDK for DUI released yet?)

No, and honestly, I don't think it will ever be publicly. Apparently Peter doesn't want any 3rd party components for DUI, except the very few developed by his trusted developers (foosion, Frank...).
More about it : http://www.hydrogenaudio.org/forums/index....showtopic=73144
ukpat
Hello

Does Foobar have a waveform display like those of an audio editor?

What I'm thinking is something like the soundcloud.com player or a standard audio editor waveform view where one can simply click on any point on the waveform and automatically play from that point.

Reaper has this in the media browser view, and it loads really really quickly. Unfortunately, Reapers media browser isn't designed to be a media player in the sense of winamp/foobar etc.

I know that foobar already has an oscilloscope, but thats not what I'm looking for.

Does Foobar have this feature already or are there any 3rd party plugins that add this feature?

Thanks
Yotsuya
This has been asked before but the search function isn't being very helpful for me today. I remember from earlier discussions that this sort of thing is not currently possible because it would require foobar to buffer the entire file and perform an analysis to generate the waveform. The current foobar decoder works more in a streaming fashion and to change it to accommodate a feature like this would require significant changes to foobar at its core and would lead to significant increases in resource consumption, particularly when you consider long lossless files.
Liquid Blasted
With such feature as waveform seekbar, f2k can be completely used as very nice, flexible and FREE sfx database finder - it's my dream as a sound designer.
Foobar is amazing for that.

You can add all your sfx libraries to f2k database;
You can do a fast search by tags or by filenames - VERY fast;
You can drag-n-drop files from search results's playlist to your audio editor / DAW;
You can convert your libraries right here and right now to any formats - it is FOOBAR;
You can tag it, copy, rename, remove as you wish on-the-fly - it is FOOBAR;

The only thing I can't do - to see waveform of played files... very need... especialy with long files consisting of multiple sounds recorded in one track

Canar
QUOTE (Dandruff @ Mar 18 2009, 04:35) *
QUOTE (JensRex @ Nov 26 2008, 18:14) *
Technical obstacles causes your idea to fail right away, because you need to decode the entire file before you can display the graphics, which means a gigantic overhead, unless you cache the results. Even doing that means you have to store that somewhere, and the size of that data is probably non-trivial. So either you bloat your tags, or you have to manage possibly thousands of auxiliary files. It's a gigantic headache.


I wouldn't call it a gigantic headache. Just look at all those audio editors and -> they also don't have headaches with it.
You're missing the point. This feature would require full-file decode before it would work properly, which would be I/O and CPU intensive. Audio editors are a different story: they'll usually decode the whole file anyhow.

I second what JensRex said: this would be a neat feature. It's just hard to make work well. The only way that I can see to make it work effectively would be to save this data to the tag (resulting in minor, perhaps negligible tag-bloat), and that would require pre-processing every file. If we're doing that, the various "comparisonics" analyses and whatnot would be great, as you're running a full-file analysis anyhow. Might as well toss in ReplayGain while you're at it.
Zao
As for extracting a suitable (2k data points or so) signature, it's not too horribly expensive. On my machine it takes about a second per track and should be trivially parallelizable if more than one core is available.
In any way, you could always do it in advance and store the data for later consumption.
Grunpfnul
Maybe a dumb idea, but why not ouput of the waveform as an jpg/svg graphic (must not be scalable, just for a fixed size and you could use 1px as a estimated timestamp, e.g.), which would be created at first startup of the file and saved in the tags, like a ordinary cover art? So you had the load just for the first time, and never again when you play the file.
The problem would be to synchronize the image with the playtime.
odyssey
QUOTE (Grunpfnul @ Aug 19 2009, 22:47) *
Maybe a dumb idea, but why not ouput of the waveform as an jpg/svg graphic (must not be scalable, just for a fixed size and you could use 1px as a estimated timestamp, e.g.), which would be created at first startup of the file and saved in the tags, like a ordinary cover art? So you had the load just for the first time, and never again when you play the file.
The problem would be to synchronize the image with the playtime.

Not a dumb idea - What do you think I was trying with this? wink.gif It can be implemented through (and in existing) Panel Stack Splitter setups - It can even be scaled with no problems! It should however be implemented in a way as the replaygain-scanner.

QUOTE (Zao @ Aug 19 2009, 22:38) *
As for extracting a suitable (2k data points or so) signature, it's not too horribly expensive. On my machine it takes about a second per track and should be trivially parallelizable if more than one core is available.
In any way, you could always do it in advance and store the data for later consumption.

Do you have any code to produce a proper image?

Personally I was thinking about doing images of moodbar and spectrograms and possibly different variations of a waveform display (e.g. a mono-representation and/or an upper-half representation). My idea was to store a unique identifier in tags, unless it becomes possible use images stored in tags.
Zao


*whistles innocently and disappears from the face of the earth*
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.