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: foo_wave_seekbar (Read 811226 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

foo_wave_seekbar

Reply #650
I have around 4500 mp3s on my computer (20GB). Not all of them already have seekbar waveforms but at least 50%, some of them are pretty long DJ mixes. And my wavecache-file weights 30MB at the moment. That's not much!

foo_wave_seekbar

Reply #651
I have around 4500 mp3s on my computer (20GB). Not all of them already have seekbar waveforms but at least 50%, some of them are pretty long DJ mixes. And my wavecache-file weights 30MB at the moment. That's not much!


I have around 270GB of music on my computer, which is admittedly quite a lot. I couldn't possibly have seekbar waveforms for anything approaching 50% of these - there's no way I've listened to that much of my music since installed this component. Nevertheless, my wavecache.db file is about 417MB, which is quite big... especially since I sync my foobar folder every day (in fact it's in my Dropbox folder, so I can have the same config at work and at home).

OK, I ran "Compact Waveform Database" and it's now 400MB

foo_wave_seekbar

Reply #652
If you're interested in exact metrics, you can open wavecache.db with the sqlite3.exe command line client and run the query select count(1) from wave;
That will give you the number of waveforms currently stored. The memory usage per waveform is roughly (channels * 5 * 2048 * 4), with compression on top.
If you've moved your music around, you might have a bunch of dead waveforms lying around. You can clean those out via the Remove Dead Waveforms command on the menu.
Stay sane, exile.

foo_wave_seekbar

Reply #653
On a somewhat related matter, would it be possible to add a %wave_seekbar% field? I'm not sure if there's anything useful which could be put in it, but it'd be nice to have so you could search for tracks without a signature.

foo_wave_seekbar

Reply #654
Quite probably technically possible 
Stay sane, exile.

foo_wave_seekbar

Reply #655
Hi, what an awesome component! There is any way i can set the resolution of teh waveform ? I mean, i use it but keep it very small, and i figure there is no need that the waveform to be rendered and stored at high resolution. Is there a setting for that ? If not, is it hard to implement ? Thanks.

foo_wave_seekbar

Reply #656
Each waveform is stored at a resolution of 2048x5 floating point numbers. As such, each waveform uses around 40 kilobytes prior to compression. That 2048 width is implicitly used all over the code base, as it's a very reasonable size.

The reason why I chose that size is on one side it's a texture dimension that is very commonly supported by even the worst graphics cards, while if I would go for 4096, there would be cards that would complain, while only providing any benefit at all to people with horizontal resolutions above 2048.

As for storing less, no, that will not happen.
Stay sane, exile.

foo_wave_seekbar

Reply #657
I've found a problem with the database. Paths are stored and selected case sensitive, but the remove dead waveforms command seems to be case insensitive.

To test:
Code: [Select]
CREATE TABLE file2 (fid INTEGER PRIMARY KEY NOT NULL,location TEXT NOT NULL COLLATE NOCASE,subsong INTEGER NOT NULL,UNIQUE (location COLLATE NOCASE, subsong))
INSERT OR REPLACE INTO file2 (location, subsong) SELECT location, subsong FROM file

In my foobar2000 library: 7775 items
In the file table: 8036 items
In the file2 table: 7741 items

I guess you could just make it clean up waveforms properly but it might be better to make the path case insensitive, although I think NOCASE only works for ascii so you'd have to make your own collation function. Now to find those missing 34 waveforms...

foo_wave_seekbar

Reply #658
I've got a %waveform_channel_count% in my trunk, sounds like a %waveform_channel_count% MISSING query would suit you well, if I ever get around making a release again.

As for the queries, a GET is:
Code: [Select]
        shared_ptr<sqlite3_stmt> stmt = prepare_statement(
            "SELECT w.min, w.max, w.rms, w.channels, w.compression "
            "FROM file AS f NATURAL JOIN wave AS w "
            "WHERE f.location = ? AND f.subsong = ?");

while a remove-dead is:
Code: [Select]
        sqlite3_exec(backing_db.get(), "DELETE FROM file WHERE file_exists(file.location) IS NULL", 0, 0, 0);

where file_exists uses the SDK filesystem::g_exists function.

As such, case semantics are all up to what g_exists does, as I treat locations as opaque things I can throw at fb2k to get files.
As such, I do indeed treat locations differing in case to be different locations, as they very well may be (consider case-sensitive filesystems).
If you've managed to get fb2k to mutate case for a location, then it's not the same file in my world.

I'm not going to use something else than g_exists to test for file existence, as that would just lead to not being able to support things like archives and all.
I'm reluctant to change my locations to ignore case, as down that line lies amusing horribleness with case-sensitive filesystems and collation breakage with oddball locales like the turkish one.
Stay sane, exile.

foo_wave_seekbar

Reply #659
Thank you very much for such a beutiful plugin like this!
This is the only Waveform viewer plugin for a player that I could found.

Strangely, I think some musics' waveform are shown as wrong. It's too high... I don't know how to explain it.
D2D mode shows more realistic... But it still has some problems. e.g @2:00,  music slows down but the plugin shows it almost the same speed.

How to make it more sensitive?

Trackitdown Waveform:


D3D:


D2D:


GDI:


Thanks...

foo_wave_seekbar

Reply #660
I have never heard of whatever program that is you showed an image from, but it might use some other metric than min/max amplitude. I compute some kind of RMS power as well, which there exists effect files to visualize in D3D mode.

Feel free to come up with some more mathemagically rigorous analysis. I've never had any need for anything else than amplitude, only adding RMS because some people wanted me to.
Stay sane, exile.

foo_wave_seekbar

Reply #661
Trackitdown is not a program, it's a music store website. In addition, you can listen to the track.
For me, the waveform feels like it doesn't fit.
Here's another example:

Trackitdown:


Foobar:


I think it needs to be resized :S

EDIT:

Nevermind, I solved the problem...

foo_wave_seekbar

Reply #662
What was the problem?
Some DSP or gain?

Could be good to know if someone else might have same issue in the future.

Thanks.
Windows 10 Pro x64 // foobar2000 1.3.10

foo_wave_seekbar

Reply #663
Could the 'Extract seekbar signature' command please remove any existing signature if found? Currently if it finds one it does nothing.

I produce music and mixes and use the seekbar to check peak levels etc. As a result I'll recreate an mp3 tens or hundreds of times as I develop the track or mix. Currently to get the signature extracted each time I have to give the file a different name, or the signature for the previous version of the track is used. It would be SO useful if 'Extract..' could replace any existing signature.

Or is there another way?

Thanks, brilliant brilliant extension!
Chris

 

foo_wave_seekbar

Reply #664
It could probably be added as an advanced setting, or possibly as some kind of media library monitoring hook.

Of course, that's rather moot, as the codebase is not in any shape suitable for a release, due to experimentation in the wrong branch.
Stay sane, exile.

foo_wave_seekbar

Reply #665
It could probably be added as an advanced setting, or possibly as some kind of media library monitoring hook.

Thanks. My need is so unusual I doubt it is worth the trouble of a setting, but would it need to be a setting? I can't think when someone would click 'Extract..' if the signature was already in the db.

experimentation in the wrong branch

Ouch! Pretend I didn't mention it then and good luck! Just realised I can delete the file, remove dead waveforms then re-add.

foo_wave_seekbar

Reply #666
Before I added the titleformatting hooks for testing if a waveform existed, my usual routine for adding any missing waveforms was to select a lot of tracks and Extract, knowing that it wouldn't do any excess work.

In the fabled Next Version, there'll be something like %waveform_channel_count% one can use to filter out any tracks missing waveforms.
Stay sane, exile.

foo_wave_seekbar

Reply #667
Before I added the titleformatting hooks for testing if a waveform existed, my usual routine for adding any missing waveforms was to select a lot of tracks and Extract, knowing that it wouldn't do any excess work.

In the fabled Next Version, there'll be something like %waveform_channel_count% one can use to filter out any tracks missing waveforms.

Of-course sorry you're right - I imagine plenty of people select a number of tracks and click 'Extract..' and wouldn't want it to re-scan everything. I'll go back to my corner.

Thanks HUGELY for this extension - there's nothing like it for super-fast reviews of mixes, tracks, etc.

foo_wave_seekbar

Reply #668
There seems to be something fishy with this code. According to my revision history, it should rescan any tracks if the user explicitly does an Extract action. Why this doesn't happen, time will hopefully explain.
Stay sane, exile.

foo_wave_seekbar

Reply #669
I support doubleclicking on the waveform starts playback from the clicked region.

But still it's perfect the way it is.

foo_wave_seekbar

Reply #670
first, thank you for this great component.

I've a problem.
I click too quickly on "extract seekbar signature" on all my collection.

Is there a way to stop this, my computer becomes crazy and very hot! Also "wavecache.db" start to be > 700,000 bytes...

thanks for help

foo_wave_seekbar

Reply #671
Exit foobar2000.
Download the sqlite3 shell, unpack somewhere.
Then drag the wavecache.db onto the sqlite3.exe to launch it.
Finally type the command DELETE FROM job;

That will purge all pending scan jobs from the seekbar.
Some day in the far future, I might add in that functionality into the GUI, but as it involves creating new UI, it's quite low priority. Something else I've been considering is adding a menu item to remove signatures.
Stay sane, exile.

foo_wave_seekbar

Reply #672
Thank you Zao, it works
Yes maybe when you'll have time you can add an entry like "Delete pending jobs" in the "Waveform seekbar" menu.
best

foo_wave_seekbar

Reply #673
When I listen to internet radio suddenly my custom background color turns to gray. How can I fix this?

foo_wave_seekbar

Reply #674
When I listen to internet radio suddenly my custom background color turns to gray. How can I fix this?

When a stream is playing, it shows an empty waveform of 1s duration. As such, it fills up quickly with shaded background colour. If you want to avoid that, you can disable the "shade background" setting.
Stay sane, exile.