Hydrogenaudio Forums

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: Zao on 03 January, 2010, 02:20:53 PM

Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 02:20:53 PM
Changelog:
Component release changelog (https://github.com/zao/foo_wave_seekbar/wiki/Changelog)

Description:
It's an UI element for both the Default UI and Columns UI that provides seekbar functionality (seeking, position indicator) on top of a pretty image of the waveform of the currently playing song, drawn using either Direct3D 9.0c, Direct2D 1.0 or GDI.
The Direct3D 9.0c mode requires a PS2.0 capable card, and has some support for strange cards like the Intel 945. The HLSL effect can be modified with the embedded text editor to further customize the look.
To avoid having to scan tracks on the fly, the component can extract the waveform signature of a song in advance through a context menu item. The process works in the background and resumes after closing foobar2000. It will automatically analyse the currently playing song and other tracks that are likely to be used soon, which should give an appearance of always having the visuals available.
The seekbar has three frontends and some per-instance customizable settings accessible through the UI element context menu, as well as seeking functionality if you click and drag, like the regular seekbar.
If your machine is not capable of running the Direct3D9 or Direct2D modes, the GDI mode should work as a fallback on any machine that foobar2000 can run on, as it only requires Windows XP and GDI.

Links:
foo_wave_seekbar component page (http://www.foobar2000.org/components/view/foo_wave_seekbar)

The Direct3D 9.0c mode requires the DirectX end-user runtime dated earliest February 2010, which can be installed through use of the DirectX end-user Runtime Web Installer (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en) (make sure to not accidentally install the Bing Bar they try to force on you).
Note that the DirectX redistributable is required on all OSes no matter whether you think you "have DirectX installed already, lol" or not.

The Direct2D 1.0 mode requires either Windows Vista SP2 or Windows 7 and up. For Vista SP2 it requires installation of the Platform Update (http://support.microsoft.com/kb/971644).

Versions above 0.2.45 require the Visual Studio 2010 SP1 (x86) runtime once again as I value XP and Wine compatibility. From 0.2.45.3 and onward, I attempt to bundle it in the component to avoid upgrades causing the component to stop working due to added requirements.

Installation:
- Download the .fb2k-component file from the components page.
- Install the dependencies needed as per the Links section above.
- Doubleclick the file or drag it onto the foobar2000 components pane in the preferences or navigate to it with the Install button as with any other component.

Usage:
- Highlight one or more files in your playlist. Rightclick on them and use the context menu items to "Extract Seekbar Signature"
- Add UI element to the Default UI or Columns UI as normal (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Layout_Editing_Mode)
- The backing storage does not know or care about file operations like moving, renaming and such. In order to remove dead items from the storage or compact the storage, there are menu items for that under the Library main menu.

Future changes:
- Lots.

Bio:
I'm a software developer in northern Sweden. I like electronic cats and writing software that occasionally does what it should.
If all you want to do is shout good or bad things at me about this component, there's always this thread to post in.
If you for some reason feel a reason to give me money I can spend irresponsibly on beer and Red Bull, you can use this shiny PayPal button - (https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif) (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KUXVUBSGQVJPG)
Title: foo_wave_seekbar
Post by: Jens Rex on 03 January, 2010, 02:23:18 PM
Fix 120 DPI mode!
Title: foo_wave_seekbar
Post by: yandexx on 03 January, 2010, 02:24:11 PM
BIG UP
Title: foo_wave_seekbar
Post by: bb10 on 03 January, 2010, 02:26:20 PM
Yaay!
Title: foo_wave_seekbar
Post by: StuPC on 03 January, 2010, 02:55:25 PM
It doesn't seem to like Windows 7, presumably because it's on DX 10 -

"Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000."

And I was looking forward to seeing this, too :-(
Title: foo_wave_seekbar
Post by: Andreasvb on 03 January, 2010, 02:59:37 PM
Works fine for me on Windows 7, and it's DX 11.

One question. Where's the database kept?

Thanks.
Title: foo_wave_seekbar
Post by: Bollerkopp on 03 January, 2010, 03:00:12 PM
"Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000."


The same here on XP incl. SP3 (beta 6).
Title: foo_wave_seekbar
Post by: wojtek on 03 January, 2010, 03:01:56 PM
Quote
"Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000."


same here, win7 x64
Title: foo_wave_seekbar
Post by: Andreasvb on 03 January, 2010, 03:02:43 PM
Try this runtime and see if it works: http://www.microsoft.com/downloads/details...;displaylang=en (http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en)
Title: foo_wave_seekbar
Post by: 2E7AH on 03 January, 2010, 03:04:18 PM
Thanks for horrible Intel on-board support 
I sent crash report and back to fast 0.27
Title: foo_wave_seekbar
Post by: The Link on 03 January, 2010, 03:04:42 PM
@people getting "Failed to load DLL: foo_wave_seekbar.dll"
The Direct3D 9.0c mode requires a PS2.0 capable card, and has some hacks to support horrible cards like the Intel 945. The HLSL effect (in the effects directory) can be modified using any text editor to customize the look further. Furthermore, it requires installation of the DirectX August 2009 runtime redistributable (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en).
Title: foo_wave_seekbar
Post by: Chaser on 03 January, 2010, 03:12:17 PM
Could somebody please post a screenshot?
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 03:13:05 PM
It doesn't seem to like Windows 7, presumably because it's on DX 10 -

"Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000."

And I was looking forward to seeing this, too :-(

The D3D9 mode works on all OSes, albeit a silly typo may prevent the component from loading in XP currently.
Ensure that you have the August 2009 DXredist installed.

One question. Where's the database kept?

The database is stored in your foobar2000 profile directory as wavecache.db.

Could somebody please post a screenshot?

(https://hydrogenaud.io/imgcache.php?id=f5f568ce44ff27d2e856d73b3d5f89da" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar19.png)
Title: foo_wave_seekbar
Post by: saivert on 03 January, 2010, 03:13:46 PM
If you were one of the beta testers prior to the public release you must also remove foo_wave_cache.dll from your components directory as this is no longer needed and will conflict with the built-in wave cache component of foo_wave_seekbar.dll.
Title: foo_wave_seekbar
Post by: bb10 on 03 January, 2010, 03:23:10 PM
Could somebody please post a screenshot?

D3D:
(https://hydrogenaud.io/imgcache.php?id=779a50d4d5332c493a0f6ff93627ea88" rel="cached" data-warn="External image, click to view at original size" data-url="http://bb10x.org/temp/D3D.png)

D2D:
(https://hydrogenaud.io/imgcache.php?id=01a451ee0fab289081d5684b125d6859" rel="cached" data-warn="External image, click to view at original size" data-url="http://bb10x.org/temp/D2D.png)
Title: foo_wave_seekbar
Post by: 2E7AH on 03 January, 2010, 03:28:11 PM
thanks saivert, that was it
looks great
Title: foo_wave_seekbar
Post by: rol on 03 January, 2010, 03:35:26 PM
awesome, thanks so much but "extrack seekbar signature" should be automatic.
Title: foo_wave_seekbar
Post by: bb10 on 03 January, 2010, 03:37:57 PM
awesome, thanks so much but "extrack seekbar signature" should be automatic.

It is, it extracts the track you play and the next track too.
Title: foo_wave_seekbar
Post by: rol on 03 January, 2010, 03:39:45 PM
oh right my bad, sorry.
Title: foo_wave_seekbar
Post by: marc2003 on 03 January, 2010, 03:39:51 PM
thanks for this. i'll have to switch to DUI to use it though. it looks totally out of place in my CUI config.
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 04:07:08 PM
Note that you can customize the colors used in the configuration dialog from the context menu, if the global ones are not suitable.
Title: foo_wave_seekbar
Post by: skelly831 on 03 January, 2010, 04:14:48 PM
This is really nice, works smoothly on my old Pentium D machine. I just want to ask for a tooltip that shows the bars' time when I drag it, like the standard seekbar so I can replace it completely.

Great component, thanks Zao

Quick thing I noticed: when in Direct3D mode, if I maximize the window, the played part of the waveform is no longer highlighted.
Title: foo_wave_seekbar
Post by: bb10 on 03 January, 2010, 04:22:48 PM
Quick thing I noticed: when in Direct3D mode, if I maximize the window, the played part of the waveform is no longer highlighted.

The "shade played" feature has known bugs.
Title: foo_wave_seekbar
Post by: Gapkiller on 03 January, 2010, 04:23:48 PM
Thank You for this awesome component.
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 04:29:02 PM
Shade played will stick properly when resizing in next version.
Title: foo_wave_seekbar
Post by: wojtek on 03 January, 2010, 04:30:02 PM
Works beautifully after Direct upgrade.
Title: foo_wave_seekbar
Post by: Jack Schmaltz on 03 January, 2010, 04:39:35 PM
dont know if im missing something here but i can not get this to load.
keep getting this:

Failed to load DLL: foo_wave_seekbar.dll
Reason: Wrong version number; this component appears to have been built with a newer version of the foobar2000 SDK, please download latest version of foobar2000 in order to use it.

i have installed the DirectX August 2009 runtime redistributable & already had the Microsoft Visual C++ 2008 Redistributable Package installed.
running v0.9.6.9 on Vista Ultimate SP2, any ideas? thanks
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 04:49:04 PM
I would guess that the SDK most probably has 1.0 as a minimum version by default.
Also, it does not require the VC++ redist as it's statically linked against VC10's CRT.
Title: foo_wave_seekbar
Post by: Jack Schmaltz on 03 January, 2010, 04:54:42 PM
fair enough, at least i know its not me being a numpty then.
so this is only for v1.0 of foobar then? will it be staying like this or will it be made compatible with the current stable version?
thanks for your time
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 05:16:08 PM
The baseline will most probably be 1.0 as I cannot see any smooth way to support older ones except for modifying the SDK (would probably backfire horribly) or downgrade the SDK (no thanks).
Title: foo_wave_seekbar
Post by: ExtremeHunter on 03 January, 2010, 05:53:36 PM
Thanks alot for this component!! 

Works fine on Windows 7 64bit.
Title: foo_wave_seekbar
Post by: dubpistol on 03 January, 2010, 05:54:58 PM
Brilliant component.

Thank you!
Title: foo_wave_seekbar
Post by: insnowflakes on 03 January, 2010, 06:25:28 PM
Great mod, thanks a lot.
Title: foo_wave_seekbar
Post by: mudlord on 03 January, 2010, 06:32:52 PM
Thanks alot for this component!! 

Works fine on Windows 7 64bit.


Have to echo those sentiments. Works great on 64bit Win7 and with the Direct2D renderer.
Title: foo_wave_seekbar
Post by: Horst Fux on 03 January, 2010, 06:54:26 PM
Just awesome, works perfect.

But needs a little bit time to analyse the song, though. It's great anyways.

One request:

In the normal seekbar I can abort the seeking by pressing Esc while holding the bar; would it be possible?

It's not like I need this feature everyday but sometimes.
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 07:06:02 PM
You can abort seeking by moving your cursor far enough away from the bar while dragging, much like scrollbars in Windows in general.
Title: foo_wave_seekbar
Post by: mudlord on 03 January, 2010, 08:08:09 PM
Quote
But needs a little bit time to analyse the song, though.


Thats expected, as it needs to do a FFT on the stream to get the spectrum readout.
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 08:19:05 PM
No FFT needed, as it's min/max/rms amplitude over time. I haven't profiled it, but there's not much to improve; most of the cost is in IO, which I guess could be serialized to get sequential disk reads.
It already runs up to three concurrent worker threads for the scan jobs, so it's already taking advantage of multiple cores if available.
Title: foo_wave_seekbar
Post by: randal1013 on 03 January, 2010, 08:50:07 PM
crashes my foobar when i try to place the component.

win7 x64, foobar 1.0 beta6



will directx 9.0c co-exist peacefully with directx 11?
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 09:00:16 PM
Yes, they coexist perfectly fine.
What kind of graphics hardware do you have? The crash is when trying to load the effect. Try 0.1.3.
Title: foo_wave_seekbar
Post by: NullString on 03 January, 2010, 09:35:17 PM
works like a charm  gj
Title: foo_wave_seekbar
Post by: Zao on 03 January, 2010, 09:42:45 PM
how does the db cope with moving of files, or tag modifications?
the scanning of tracks is fast and all that, but takes its time when considering lots of albums.

As mentioned in the first post, it doesn't track moved or renamed files. It associates the scanned data with the location (path + subsong) of the track.
Removing dead items and rescanning tends to be feasible, but I realize that things like moving your whole music library to a different drive or portable installs could be painful.
It is possible to change the locations in the storage database, but currently one has to resort to the standalone sqlite3 client as the component does not expose any such functionality yet.
Title: foo_wave_seekbar
Post by: NullString on 03 January, 2010, 10:50:26 PM
how does the db cope with moving of files, or tag modifications?
the scanning of tracks is fast and all that, but takes its time when considering lots of albums.

It is possible to change the locations in the storage database, but currently one has to resort to the standalone sqlite3 client as the component does not expose any such functionality yet.

thanks, sounds interesting, maybe to make some reports with the data in the db, I'll give it a look
Title: foo_wave_seekbar
Post by: Snowknight26 on 03 January, 2010, 11:18:20 PM
If only you could replace the toolbar's seekbar with this one..
Title: foo_wave_seekbar
Post by: midkay on 03 January, 2010, 11:27:48 PM
this is awesome, thanks for the great work!
Title: foo_wave_seekbar
Post by: mudlord on 04 January, 2010, 01:36:49 AM
No FFT needed, as it's min/max/rms amplitude over time. I haven't profiled it, but there's not much to improve; most of the cost is in IO, which I guess could be serialized to get sequential disk reads.
It already runs up to three concurrent worker threads for the scan jobs, so it's already taking advantage of multiple cores if available.


Thanks for the correction.
Title: foo_wave_seekbar
Post by: (Sly) on 04 January, 2010, 02:28:07 AM
Works fine with Windows XP SP3, DirectX 9.0c latest and crappy Intel Mobile 965.

Nice component !!

I have 3 requests:

1. What about decentralized wavecache.db, as is thumbs.db for picture thumbnails. Every folder has it's own Database. Or even to write to ID3 tag in something like WAVEFORM.

2. A scanning engine like replaygain or foo_bpm.

3. For Default UI make it available as toolbar element, too.
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2010, 02:46:27 AM
1. Per-folder databases could technically be possible, but they would interfere with things like the renamer deleting/moving old folder contents. As for storing them in tags, it too is technically possible.
2. Elaborate. Are you referring to some kind of progress bar? That is planned eventually.
3. There exists no SDK interface to make non-button toolbar elements.
Title: foo_wave_seekbar
Post by: dubpistol on 04 January, 2010, 03:35:31 AM
I just want to ask for a tooltip that shows the bars' time when I drag it, like the standard seekbar

I follow up this question.
Title: foo_wave_seekbar
Post by: (Sly) on 04 January, 2010, 04:23:26 AM
2. Yes. And a scan results window showing if some files failed to scan for example.

For big files like comedy shows (60min+) it should display intermediate results of the on-the-fly scanning. like Virtual DJ does.
Title: foo_wave_seekbar
Post by: ojdo on 04 January, 2010, 05:01:58 AM
Thank you very much for this very promising component!

Bugs:
Feature request:
Title: foo_wave_seekbar
Post by: NullString on 04 January, 2010, 05:26:59 AM
storing the data in the file tags would be awesome, besides it would take advantage of the compression of the fb2k database
Title: foo_wave_seekbar
Post by: fuflo on 04 January, 2010, 06:08:50 AM
thanks for this great component. and well, since everybody's asking questions, i'll ask this - where are the settings saved? i don't see a separate config file in config dir. also checked registry - nothing's there. the settings are kept after deleting wavecache.db, so it's not there. also removing the component and then restoring it ( removing foo_wave_seekbar.dll ) doesn't remove the settings. where are they?
Title: foo_wave_seekbar
Post by: (Sly) on 04 January, 2010, 06:14:38 AM
In the directory where foobar2000.exe is in file "wavecache.db"

There is no config file because it does need to save any configuration right now.
Title: foo_wave_seekbar
Post by: TomBarlow on 04 January, 2010, 07:00:15 AM
Looks like a nice component, but it doesn't work for me. I guess it's my 5 year old laptop not having good enough hardware. I get this in the console:

Seekbar: taking Direct3D9 path.
Seekbar: frontend creation failed: Direct3D9: could not create texture.

The panel draws whatever was on the screen previously, but it still acts as a seekbar. It seems to process the songs properly as well (i.e. create the waveforms). Is there anything I can do?
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2010, 07:46:10 AM
I just want to ask for a tooltip that shows the bars' time when I drag it, like the standard seekbar

Planned eventually.

Bugs:
  • The panel is not correctly redrawn when switching (CUI) layouts: the waveform disappears and the whole panel is filled with the highlight colour. Correct appearance is restored when starting playback on a new song. Addition: The behaviour is equivalent to the second bug. The panel only visualises the song's first second.
  • When adding a second panel instance to the same or another layout, both panels stop working properly. No waveform is visible and the panel seems only to visualise the first second of the song, so the selection bar quickly "runs" through the panel and vanishes.

Feature request:
  • Allow mouse wheel to seek (just like the default seekbar does).

Those aren't bugs, those are features:
Things I didn't know existed:

storing the data in the file tags would be awesome, besides it would take advantage of the compression of the fb2k database

The foobar2000 database has compression? I do not believe so. I do need to look into whether it's feasible to compress this data.

thanks for this great component. and well, since everybody's asking questions, i'll ask this - where are the settings saved? i don't see a separate config file in config dir. also checked registry - nothing's there. the settings are kept after deleting wavecache.db, so it's not there. also removing the component and then restoring it ( removing foo_wave_seekbar.dll ) doesn't remove the settings. where are they?

The only settings it has currently is per instance of the UI panel/element, which are stored using the DUI/CUI configuration framework.

Looks like a nice component, but it doesn't work for me. I guess it's my 5 year old laptop not having good enough hardware. I get this in the console:

Seekbar: taking Direct3D9 path.
Seekbar: frontend creation failed: Direct3D9: could not create texture.

The panel draws whatever was on the screen previously, but it still acts as a seekbar. It seems to process the songs properly as well (i.e. create the waveforms). Is there anything I can do?

Ooh, fun.

I have a fallback path that is good enough for the horrible Intel cards, but apparently not horrible enough.
What kind of graphics hardware do you have?
The fallback path uses an A2R10G10B10 (2 bits alpha, 10 bits for each of red, green, blue) for the waveform data, but I suppose one might try A8R8G8B8 if that fails.
Title: foo_wave_seekbar
Post by: randal1013 on 04 January, 2010, 07:49:42 AM
crashes my foobar when i try to place the component.

win7 x64, foobar 1.0 beta6



will directx 9.0c co-exist peacefully with directx 11?

i ended up having other windows problems to deal with last night. the seekbar works fine and looks cool.
Title: foo_wave_seekbar
Post by: 2E7AH on 04 January, 2010, 07:59:01 AM
I guess zooming (middle scroll) is out of question? (in case some time grid is added as requested)
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2010, 08:15:00 AM
The data set used is rather sparse, just 2048 data points. You'd just be looking at interpolation when zooming or with a large enough window.
Title: foo_wave_seekbar
Post by: 2E7AH on 04 January, 2010, 08:23:07 AM
I wouldn't mind seeing large blocks if it is feasible 
It's CEP/AU behavior I'm used to, scroll to zoom or middle click then slide to go right/left
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2010, 08:27:35 AM
I'll put that under the category »maybe if I'm horribly bored some day«.
Title: foo_wave_seekbar
Post by: 2E7AH on 04 January, 2010, 08:28:39 AM
deal
Title: foo_wave_seekbar
Post by: Hengest on 04 January, 2010, 09:20:05 AM
Well just to say thankyou for this component - it's really great .

Also, would it be possible to scale the waveform according to replaygain values for each track/album?
Title: foo_wave_seekbar
Post by: ojdo on 04 January, 2010, 10:33:42 AM
Bugs: [...] The panel is not correctly redrawn when switching (CUI) layouts. [...]

Those aren't bugs, those are features: CUI probably does horrible things to my window when mangling layouts.

So this should be reported in the foo_ui_columns thread, right?
Title: foo_wave_seekbar
Post by: bbt-hh on 04 January, 2010, 11:17:04 AM
Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)
Title: foo_wave_seekbar
Post by: rol on 04 January, 2010, 11:57:44 AM
Can u fix high CPU usage? On Win7 and Pentium 4 i have ~20%, without plugin 0%
Title: foo_wave_seekbar
Post by: TomBarlow on 04 January, 2010, 12:09:57 PM
What kind of graphics hardware do you have?

I have an Intel 82852/82855 GM/GME Graphics Controller: http://www.intel.com/support/graphics/intel852gm/index.htm (http://www.intel.com/support/graphics/intel852gm/index.htm)

I'll update my driver and see if that makes a difference.
Title: foo_wave_seekbar
Post by: bb10 on 04 January, 2010, 12:22:54 PM
I have an Intel 82852/82855 GM/GME Graphics Controller: http://www.intel.com/support/graphics/intel852gm/index.htm (http://www.intel.com/support/graphics/intel852gm/index.htm)

I'll update my driver and see if that makes a difference.

I'm afraid you're out of luck.

Can u fix high CPU usage? On Win7 and Pentium 4 i have ~20%, without plugin 0%

Are you using D2D?
Title: foo_wave_seekbar
Post by: rol on 04 January, 2010, 12:49:31 PM
DX 9.0c
Title: foo_wave_seekbar
Post by: Horst Fux on 04 January, 2010, 01:00:11 PM
If only you could replace the toolbar's seekbar with this one..


You mean like this?


[a href="http://img527.imageshack.us/i/afsafs.jpg/" target="_blank"](https://hydrogenaud.io/imgcache.php?id=d31262e393276aa144713b657819cc18" rel="cached" data-warn="External image, click to view at original size" data-url="http://img527.imageshack.us/img527/7393/afsafs.th.jpg) (http://www.abload.de/image.php?img=fbarqaav.jpg)
Title: foo_wave_seekbar
Post by: NullString on 04 January, 2010, 01:40:39 PM
storing the data in the file tags would be awesome, besides it would take advantage of the compression of the fb2k database

The foobar2000 database has compression? I do not believe so. I do need to look into whether it's feasible to compress this data.

right, some compression would be appreciated. The .db file weights 730MB, and the compression ratio is like 75% (using rar). not that it matters, because the indexing of the data and the requirement of secuential reading to decompress the whole db would make it not feasible.

although these sqlite extensions might point you to a better approach, compressing each row with zlib:
http://www.mail-archive.com/sqlite-users@s...g/msg17018.html (http://www.mail-archive.com/sqlite-users@sqlite.org/msg17018.html)
(which is wrapped in a better way here)
http://geomapx.blogspot.com/2009/11/fts3-compression.html (http://geomapx.blogspot.com/2009/11/fts3-compression.html)
or an alternative,
http://lserinol.googlepages.com/sqlitecompress (http://lserinol.googlepages.com/sqlitecompress)
Title: foo_wave_seekbar
Post by: TomBarlow on 04 January, 2010, 02:01:32 PM
I'll update my driver and see if that makes a difference.

I've updated my driver, problem still exists
Title: foo_wave_seekbar
Post by: bb10 on 04 January, 2010, 02:23:09 PM
I'll update my driver and see if that makes a difference.

I've updated my driver, problem still exists

A driver update won't resolve the non-existent DirectX 9 support of your GPU.
Title: foo_wave_seekbar
Post by: Andreasvb on 04 January, 2010, 02:29:05 PM
I'll update my driver and see if that makes a difference.

I've updated my driver, problem still exists

A driver update won't resolve the non-existent DirectX 9 support of your GPU.

It says it's DX 9.0.
Quote
The Intel® 82830M and Intel® 82852/82855 GM/GME graphics controllers are compatible with versions of Microsoft* DirectX* up to 9.0.
Title: foo_wave_seekbar
Post by: TomBarlow on 04 January, 2010, 02:51:54 PM
A driver update won't resolve the non-existent DirectX 9 support of your GPU.

ok, I missed your reply. I think I have DirectX 9, it must be pixel shader support that I need. That was a problem for me with Shpeck+Milkdrop, I could only run a handful of presets.  (I didn't realise what PS meant in the OP )
Title: foo_wave_seekbar
Post by: bb10 on 04 January, 2010, 02:56:26 PM
It says it's DX 9.0.
Quote
The Intel® 82830M and Intel® 82852/82855 GM/GME graphics controllers are compatible with versions of Microsoft* DirectX* up to 9.0.


Compatible != compliant.

ok, I missed your reply. I think I have DirectX 9, it must be pixel shader support that I need. That was a problem for me with Shpeck+Milkdrop, I could only run a handful of presets.  (I didn't realise what PS meant in the OP )

Yes, it has no pixel shaders which it needs to be fully directx9 compliant.
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2010, 03:49:23 PM
I have an Intel 82852/82855 GM/GME Graphics Controller: http://www.intel.com/support/graphics/intel852gm/index.htm (http://www.intel.com/support/graphics/intel852gm/index.htm)

The Direct3D9 mode will not work on your hardware, as it's much like the Matrox Parhelia, having drivers built against the DX9 SDK but no real DX9 capabilities. For instance, querying the caps database shows a lack of both the A2R10G10B10 texture format and a supported pixel shader level of 0.0.

Also, would it be possible to scale the waveform according to replaygain values for each track/album?

In the Direct3D version, the effect has a variable that exposes the album gain/peak and track gain/peak. Some trivial math in the shader will do what you want, I haven't been bothered to look into what's in the ReplayGain values myself.
As for Direct2D, it requires explicit support from my side, as it doesn't have programmable shaders.

CUI probably does horrible things to my window when mangling layouts.

So this should be reported in the foo_ui_columns thread, right?

No. They're not Columns UI bugs, they are me not knowing about intended Columns UI behaviour and not testing much in it. musicmusic is not at fault here.

Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)

Anything interesting in your console?

Can u fix high CPU usage? On Win7 and Pentium 4 i have ~20%, without plugin 0%

The component has a fixed update rate of 60Hz or so, which produces neglible CPU usage on my machine and GPU. I suppose it should probably be tunable.
Title: foo_wave_seekbar
Post by: StuPC on 04 January, 2010, 03:56:46 PM
OK, here's a weird bug - I've installed the DX redistributable and followed all the instructions on this forum, but the component crashes every time I try and make it visible.  I'm using CUI on Windows 7 32-bit with a quadcore processor.  I've got the component installed and *sort of* displaying in my Layout BUT I can't make it visible.  At the moment it's obscured by the caption - if I untick "Show caption"OR if I try to stretch my foobar vertically so as to be able to see this component then my foobar instantly crashes.  This has now happened about 20 times in a row... :-(
Title: foo_wave_seekbar
Post by: bbt-hh on 04 January, 2010, 04:03:50 PM
Quote
Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)

Anything interesting in your console?

Not at all, thats why I noted 'everything loads fine'.
Console: Seekbar: taking Direct3D9 path. / Seekbar: Frontend initialized. / Wave cache: finished analysis of...
Title: foo_wave_seekbar
Post by: shakey_snake on 04 January, 2010, 04:18:05 PM
It's great to have an "oohh shiny!" component that actual adds to my ability to browse and listen to my music (rather than distract from it, like most shiny components) because it actually lets me look inside my individual tracks.

Great work Zao.
This is a shining example of what third-party components should be about, IMO.
Title: foo_wave_seekbar
Post by: Hamallainen on 04 January, 2010, 07:05:23 PM
Thank you for this great plugin.

I have 2 questions/requests :
- Is it possible to choose where is located wavecache.db, i'd prefer to have it at the root of my media library folder instead of within the foobar2000 folder.

- That would be nice it could display the according image of a track (for tracks already scanned) even if playback is stopped. A kind of follow cursor if playback is stopped. And then if this is possible that would be great if double-clicking the wave could start the playback at the desired position.
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2010, 08:42:41 PM
0.1.4 should hopefully give better diagnostic output and crash less for people who haven't got the relevant runtimes installed or dependencies unmet.

I have 2 questions/requests :
- Is it possible to choose where is located wavecache.db, i'd prefer to have it at the root of my media library folder instead of within the foobar2000 folder.

- That would be nice it could display the according image of a track (for tracks already scanned) even if playback is stopped. A kind of follow cursor if playback is stopped. And then if this is possible that would be great if double-clicking the wave could start the playback at the desired position.

Global database location could be configurable, I guess.

Displaying the selected track when not playing has been suggested. I'm just a bit split on whether it should scan selected tracks automatically or only on playback.
As for searching by doubleclicking, that'd probably be possible.
Title: foo_wave_seekbar
Post by: smkk on 04 January, 2010, 09:32:29 PM
Displaying every selected track would probably put alot of stress on the HDD, if you implement this please make it optional.
Thanks for this nice plugin.
Title: foo_wave_seekbar
Post by: rupert on 04 January, 2010, 10:40:13 PM
FB1.0b6 and WaveSeekBar 0.1.4 produce an error like "Seekbar: taking Direct3D9 path. / Seekbar: frontend creation failed: / Direct3D9: could not create effects." :-/

O$: XPproSp3

DirectX Version: DirectX 9.0c (4.09.0000.0904)
Card name: ATI Radeon 9600 / X1050 Series

Registry: OK
DDraw Status: Enabled
D3D Status: Enabled
AGP Status: Not Available
DDraw Test Result: All tests were successful.
D3D7 Test Result: All tests were successful.
D3D8 Test Result: All tests were successful.
D3D9 Test Result: All tests were successful.

How can we better report the errors or ia a debug/log switch possible?
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2010, 11:50:04 PM
If the effect failed to compile, you should have gotten errors in your console, so it's probably a missing file.
Did you extract the effects directory into your foobar2000 or profile directory?
The structure should be:
Code: [Select]
foobar2000/
` components/
  ` foo_wave_seekbar.dll
  effects/
  ` seekbar.fx
Title: foo_wave_seekbar
Post by: q_b6 on 05 January, 2010, 02:24:55 AM
Cheers!
Works great! 

Does it consider replaygain tags when drawing?
Title: foo_wave_seekbar
Post by: sld on 05 January, 2010, 09:46:17 AM
1.0.3 was crashing, but 1.0.4 runs! There's a slight problem on my setup, though: the peaks extend beyond the vertical space set for the seekbar, and the entire diagram seems to be offset downwards by quite a few pixels' worth. In other words, the 0 dB line isn't dead centre. Toggling the border setting provides no benefit.

I'm running Windows 7 build 7100, Foobar2000 1.0 beta 6, GMA945 Intel "Extreme" Graphics, using Direct2D 1.0 mode.
Title: foo_wave_seekbar
Post by: bbt-hh on 05 January, 2010, 11:23:55 AM
Quote
Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)
Console: Seekbar: taking Direct3D9 path. / Seekbar: Frontend initialized. / Wave cache: finished analysis of...
Unfortunately no changes with version 0.1.4.
Title: foo_wave_seekbar
Post by: rupert on 05 January, 2010, 02:49:45 PM
If the effect failed to compile, you should have gotten errors in your console, so it's probably a missing file.
Did you extract the effects directory into your foobar2000 or profile directory?
The structure should be:
Code: [Select]
foobar2000/
` components/
  ` foo_wave_seekbar.dll
  effects/
  ` seekbar.fx


Uuhm, mea culpa!
It works (now).

THX, rupert
Title: foo_wave_seekbar
Post by: foosion on 05 January, 2010, 05:16:07 PM
I have created an effect that also renders the RMS part. Since I didn't like the shading, I changed that to perform a grayscale conversion on the already played part. If you poke around in the script (see below) you can also enable a sepia-like effect.

seekbar.fx (http://foosion.foobar2000.org/misc/seekbar.fx.txt): Put this in your profile or installation directory in the effects subdirectory.
(https://hydrogenaud.io/imgcache.php?id=367bcc14273bb3fad64cde21542fdf5b" rel="cached" data-warn="External image, click to view at original size" data-url="http://foosion.foobar2000.org/misc/foo_wave_seekbar.png)
Title: foo_wave_seekbar
Post by: Zao on 05 January, 2010, 05:41:44 PM
1.0.3 was crashing, but 1.0.4 runs! There's a slight problem on my setup, though: the peaks extend beyond the vertical space set for the seekbar, and the entire diagram seems to be offset downwards by quite a few pixels' worth. In other words, the 0 dB line isn't dead centre. Toggling the border setting provides no benefit.

I'm running Windows 7 build 7100, Foobar2000 1.0 beta 6, GMA945 Intel "Extreme" Graphics, using Direct2D 1.0 mode.

The Direct2D frontend may very well be misbehaving after making it behave in high DPI scenarios (in which it's broken again).

Quote
Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)
Console: Seekbar: taking Direct3D9 path. / Seekbar: Frontend initialized. / Wave cache: finished analysis of...
Unfortunately no changes with version 0.1.4.

Somewhat odd. Currently I'm battling some elusive crashes so I haven't looked into this much yet.
A bunch of error checks for next version ought to give some more insight. Otherwise I guess you've got to use some other frontend like the primitive GDI+ one coming up.

I have created an effect that also renders the RMS part. Since I didn't like the shading, I changed that to perform a grayscale conversion on the already played part. If you poke around in the script (see below) you can also enable a sepia-like effect.

Isn't it nice when things are customizable using proper programming languages.
Title: foo_wave_seekbar
Post by: dano on 05 January, 2010, 06:28:19 PM
Could the calculation of the wave form (theoretically) be accelerated with GPU support?
Title: foo_wave_seekbar
Post by: Zao on 05 January, 2010, 06:42:34 PM
Could the calculation of the wave form (theoretically) be accelerated with GPU support?

Unlikely. Most of the cost tends to be in decoding the input.
Title: foo_wave_seekbar
Post by: stefle on 05 January, 2010, 06:58:52 PM
Hello,

actually a nice plugin,couldn't wait to try it.

I think wave seekbar should be perfect for music of the classical genre, e.g. long symphonic movements or the like. RMD level could be a kind of orientation when seeking particular parts like Development, Reprise, a certain loud passage.

But now, having tried, I'm a bit confused. I'm not really sure that the curve calculated by the plugin matches my perception of loudness. Sometimes it seems to me unreliable. Thus I compared the displayed graphics with that of Audacity, using Bruckner, Symphony No.9. There are spots where music is really soft while the plugin's curve makes a large amplitude - and vice versa. The Audacity curve looks quite different and seems to be more suitable regarding orientation matters.
Title: foo_wave_seekbar
Post by: Xezzy on 05 January, 2010, 07:04:33 PM
Thanks for this component, it looks amazing. And it works in DUI. Dunno if it was mentioned, but traktor has similiar feature and it's great to see that in foobar! Except in traktor the slider was "fixed" and wave was scrolling, and you could move entire wave left and right, causing cool vinyl sliding sound effect  But I realize it would take a lot more work to do.

Back to reality:
I got this (https://hydrogenaud.io/imgcache.php?id=cf5dea31e80a7c742bbf88f1ea1f28a9" rel="cached" data-warn="External image, click to view at original size" data-url="http://img682.imageshack.us/img682/2624/clipboard02m.jpg)
(on this picture we can see that wave is one-coloured)

But I saw screens with two-colored wave, plus dicrect2D mode is also two-colored. Is something wrong? My card supports ps2.0 and I'm running vista.
Title: foo_wave_seekbar
Post by: Zao on 05 January, 2010, 07:11:19 PM
But now, having tried, I'm a bit confused. I'm not really sure that the curve calculated by the plugin matches my perception of loudness. Sometimes it seems to me unreliable. Thus I compared the displayed graphics with that of Audacity, using Bruckner, Symphony No.9. There are spots where music is really soft while the plugin's curve makes a large amplitude - and vice versa. The Audacity curve looks quite different and seems to be more suitable regarding orientation matters.

The scanner divides the track into 2048 sections, and for each section it records the minimum and maximum values (and calculates RMS power). As such, the wave might seem a bit bloated compared to other visualisations.

But I saw screens with two-colored wave, plus dicrect2D mode is also two-colored. Is something wrong? My card supports ps2.0 and I'm running vista.

In the default effect, the colors are interpolated from background colour onto the border of the wave, where it uses the foreground colour. Inside of that, it shoots "past" the foreground colour towards white or black.
Try playing with the color settings in the Configure context menu item.
Title: foo_wave_seekbar
Post by: Xezzy on 05 January, 2010, 08:28:54 PM
Ugh, obviously... Thanks
Title: foo_wave_seekbar
Post by: Hengest on 05 January, 2010, 10:54:03 PM
Here's (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=5607) a  quick mod of foosion's effect for those who would like to have the RMS rendered, but also keep the shading effect. As usual, place 'seekbar.fx' in the 'effects' folder of your foobar dir. 

(https://hydrogenaud.io/imgcache.php?id=efe406531851178b135dce085a161c52" rel="cached" data-warn="External image, click to view at original size" data-url="http://i45.tinypic.com/205v3it.png)

Also, I'll see if I can get it to use the replaygain variable present; however, I'm not very familiar with programming, so I'm not sure if I'll have any luck.

Edit: added screenshot.
Title: foo_wave_seekbar
Post by: Zao on 05 January, 2010, 10:59:41 PM
Fun fact of the day - this is the same shader language used to create the shaders for real games.
Title: foo_wave_seekbar
Post by: Hengest on 06 January, 2010, 02:36:44 AM
And here's (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=5609) a new modification of 'seekbar.fx' that scales the waveform according to Replay Gain data. By default, it will use the track gain; however, a quick edit of the file will enable the use of the album gain mode instead.
Title: foo_wave_seekbar
Post by: sld on 06 January, 2010, 04:39:34 AM
The Direct2D frontend may very well be misbehaving after making it behave in high DPI scenarios (in which it's broken again).

Indeed, I use 125 DPI because of my Thinkpad's impossible 1400 by 1050 pixels resolution. Quite nice to have exact measurements with a ruler, too. Is this a bug with Direct2D?
Title: foo_wave_seekbar
Post by: Zao on 06 January, 2010, 06:00:22 AM
... Is this a bug with Direct2D?

Not with Direct2D itself, just with my use of it. Well, it has some rather annoying DPI semantics that tends to destroy beautiful code.
Title: foo_wave_seekbar
Post by: _oao on 06 January, 2010, 06:51:00 AM
feature request: it seems that people started to customize the seekbar appearance, would it be possible to add an option to select different effects instead of overwriting the seekbar.fx every time we want to try a new one?
Title: foo_wave_seekbar
Post by: Zao on 06 January, 2010, 06:59:22 AM
feature request: it seems that people started to customize the seekbar appearance, would it be possible to add an option to select different effects instead of overwriting the seekbar.fx every time we want to try a new one?

It's been in todo.txt since day one. It's pending implementation of frontend-specific configuration.
Title: foo_wave_seekbar
Post by: Xezzy on 06 January, 2010, 07:53:13 AM
I've noticed you can't access context menu items while in layout editing mode.
Title: foo_wave_seekbar
Post by: Zao on 06 January, 2010, 08:24:12 AM
Correct. It's on the todo.
Heh, just about every reply here is "it's on the todo". I should probably make it more public or take time to set up a bug tracker.
Title: foo_wave_seekbar
Post by: stefle on 06 January, 2010, 08:24:58 AM
1)
I know what the problem is. (see my last posting http://www.hydrogenaudio.org/forums/index....st&p=677826 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&view=findpost&p=677826))

Wave Seekbar stretches the curve cutting it at the end. (I have made a screenshot, but problems to upload. Perhaps later.)
Is this a bug or a configuration issue?

2)
Ist ist possible to update my onboard graphics to Direct 3D? Don’t have a video card. My Motherboard is MSI K9AG Neo2-Digital with AMD 690G and SB600 Chipset. OS: Vista 32
Title: foo_wave_seekbar
Post by: Zao on 06 January, 2010, 08:46:01 AM
1) If you have a non-default DPI, my use of Direct2D is likely broken again as mentioned earlier in the thread.
2) The X1250 integrated GPU of your motherboard should be capable of driving the Direct3D frontend, as the GPU supports PS2.0b. Does your console log any errors when trying to use the Direct3D mode? Ensure that you have the August 2009 DirectX runtime installed.
Title: foo_wave_seekbar
Post by: stefle on 06 January, 2010, 08:57:04 AM
Thx!
Didn't understand that DPI prob, but will reread the thread.

Wave Seekbar windows doesn't show anything if D3D is set. Now Foobar even crashes, no chance to look at console.

Okay, I have to install August 2009 DirectX runtime first.
Title: foo_wave_seekbar
Post by: stefle on 06 January, 2010, 09:15:45 AM
Don't understand that DPI issue yet. My monitor's resolution is about 94 DPI (LCD 21,3' - 1600x1200).
What is this high-DPI setting and how can I get rid of it?  ;-)
Title: foo_wave_seekbar
Post by: sld on 06 January, 2010, 09:40:15 AM
Not with Direct2D itself, just with my use of it. Well, it has some rather annoying DPI semantics that tends to destroy beautiful code.

No worries. I don't even know that a waveform seekbar THIS cool is actually possible in FB2K.

Allow me to add another bug though, this time with the Direct3D mode on 945GM. While Direct2D shifts the 0 dB line downwards and stretches the waveform beyond the vertical borders, Direct3D mode does the exact opposite: the 0 dB line is shifted upwards, while the waveform amplitudes are so small...
Title: foo_wave_seekbar
Post by: StuPC on 06 January, 2010, 12:23:28 PM
edited - never mind, I am an idiot! :-(
Title: foo_wave_seekbar
Post by: Andreasvb on 06 January, 2010, 12:27:37 PM
StuPC, did you download the DX update linked in 1st post?
And what's your graphics card, can it handle D3D?
Title: foo_wave_seekbar
Post by: lvqcl on 06 January, 2010, 12:30:43 PM
StuPC: "Furthermore, it requires installation of the DirectX August 2009 runtime redistributable."
Title: foo_wave_seekbar
Post by: Anomalous on 06 January, 2010, 09:57:50 PM
What about identifying tracks using the audio MD5 where possible?
Title: foo_wave_seekbar
Post by: frogworth on 06 January, 2010, 10:36:05 PM
Logging in purely to say that this plugin is the best thing since sliced bread.
Thanks, Zao! Awesome work.
Title: foo_wave_seekbar
Post by: Zao on 07 January, 2010, 12:19:26 AM
What about identifying tracks using the audio MD5 where possible?

I prefer methods where collisions do not occur. In any way, a MD5 of the audio data would be a bit error-prone unless the decoder provides bit-exact identical output on multiple runs.
In any way, computing the MD5 of the data would cost about as much as analyzing it, as most of the cost is in I/O and decoding.
If you mean to take the MD5 of compressed audio, I do not believe that that data is exposed by the input or decoder services.

The direction I'm going to take files with changing locations is to provide per-directory databases and tag-based storage, prioritized via preferences.

And oh, 0.1.5 is out with lots of fixes, including a GDI+ mode for people without GPUs.
Title: foo_wave_seekbar
Post by: jeremija on 07 January, 2010, 02:13:55 AM
This is a brilliant plug-in! Thank you for your hard work!
Title: foo_wave_seekbar
Post by: q_b6 on 07 January, 2010, 02:44:28 AM
It is strange, but when I was using the first version, I can use 'Direct3d' mode. Now it is 0.1.5, 'Direct3d' just doesn't draw (or 'redraw', 'refresh') anythin :S
Title: foo_wave_seekbar
Post by: Anomalous on 07 January, 2010, 02:48:39 AM
I prefer methods where collisions do not occur.

Surely the probability of two valid audio files having the same MD5 is tiny, the wavpack site even mentions using it for identification.
Quote
MD5 audio checksums for verification and identification


In any way, a MD5 of the audio data would be a bit error-prone unless the decoder provides bit-exact identical output on multiple runs.
In any way, computing the MD5 of the data would cost about as much as analyzing it, as most of the cost is in I/O and decoding.
If you mean to take the MD5 of compressed audio, I do not believe that that data is exposed by the input or decoder services.

The direction I'm going to take files with changing locations is to provide per-directory databases and tag-based storage, prioritized via preferences.

By "where possible", I meant for formats which already include the MD5 hash, such as flac and wavpack. For those that don't, you could either fall back on the file name or use the MD5 of the audio part and put it in a tag (http://www.hydrogenaudio.org/forums/index.php?showtopic=42276) (if that's possible).

Just some suggestions, my music doesn't move much so I'm happy with whatever you decide.
Title: foo_wave_seekbar
Post by: q_b6 on 07 January, 2010, 03:14:41 AM
To identify a track, I think a hash of the number of total samples and several samples in the middle is enough in practical use ...
Title: foo_wave_seekbar
Post by: NEMO7538 on 07 January, 2010, 03:28:27 AM
Version 0.1.5 does not work on one of my systems (Lenovo T60, Intel G945 Graphics, XP SP3).
I now have the two options (GDI and Direct3D 9.0) but none of them is working (the panel remains blank and is never refreshed). When I select Direct3D 9.0c, then close and reopen the preferences panel, GDI remains selected.

Version 1.0.4 was working fine with Direct3D 9.0c only after installing the August 2009 Direct X runtime redistributable.
Title: foo_wave_seekbar
Post by: Qest on 07 January, 2010, 03:31:47 AM
Very cool. This definitely makes the cut into my layout.

Small Request: Any chance you could change the border toggle into a combo for select between 'None', 'Gray', and 'Sunken' like other Columns UI components?

EDIT: Thought I should add that this is working absolutely perfectly!
Title: foo_wave_seekbar
Post by: shavenne on 07 January, 2010, 03:49:02 AM
What does happen when I play an audio CD?
Can't test it at the moment. I'm using foobar2000 in my car (CarPC) and I have the 0.9 version and I don't want to upgrade to 1.0 until it's stable. I just don't want to install a new foobar version every month . It's cold out there .
Title: foo_wave_seekbar
Post by: sld on 07 January, 2010, 04:26:37 AM
Version 0.1.5 does not work on one of my systems (Lenovo T60, Intel G945 Graphics, XP SP3).
I now have the two options (GDI and Direct3D 9.0) but none of them is working (the panel remains blank and is never refreshed). When I select Direct3D 9.0c, then close and reopen the preferences panel, GDI remains selected.

Version 1.0.4 was working fine with Direct3D 9.0c only after installing the August 2009 Direct X runtime redistributable.

Same here. However, since I use Windows 7, I can make GDI+ work by selecting Direct2D first, and then GDI+. Doing this resets the window or something like that, apparently. Direct3D mode is now broken.
Title: foo_wave_seekbar
Post by: fuflo on 07 January, 2010, 05:00:22 AM
0.1.5 works fine here. 8800gts 320, amd x2 5000+.

gdi+ mode flickers a little but that's probably it's own limitation or smth..
Title: foo_wave_seekbar
Post by: rol on 07 January, 2010, 07:37:36 AM
I have one request: mouse scroll to zoom.
Title: foo_wave_seekbar
Post by: grimes on 07 January, 2010, 07:49:59 AM
Or mouse scroll to seek?
Title: foo_wave_seekbar
Post by: rol on 07 January, 2010, 08:03:47 AM
There is some kind of bug on my Window 7. When i resize component to about > 500px my sound laggy as hell. Probably too much cpu usage
Title: foo_wave_seekbar
Post by: TomBarlow on 07 January, 2010, 11:30:28 AM
Thanks for the GDI+ thing, it's working, although I had to download gdiplus.dll from microsoft... my laptop must really be terrible!

I can't seem to get the custom seekbar.fx files working (e.g. by foosion on page 4) though, I saved it in the right directory and restarted foobar, but it hasn't changed anything.
Title: foo_wave_seekbar
Post by: Xezzy on 07 January, 2010, 11:42:59 AM
Try messing around with colors using configure from right-click menu. It helped in my case (but with default effect, this can be some other thing).
Title: foo_wave_seekbar
Post by: garbanzo.bean on 07 January, 2010, 12:08:49 PM
great component! many thanks

could you please add an option to reverse the direction? i want to use a vertical bar, but would like the progress to go from the bottom to the top.
Title: foo_wave_seekbar
Post by: Zao on 07 January, 2010, 12:28:43 PM
To identify a track, I think a hash of the number of total samples and several samples in the middle is enough in practical use ...

Except that formats like MP3 are horribly costly to seek in.

Version 0.1.5 does not work on one of my systems (Lenovo T60, Intel G945 Graphics, XP SP3).
I now have the two options (GDI and Direct3D 9.0) but none of them is working (the panel remains blank and is never refreshed). When I select Direct3D 9.0c, then close and reopen the preferences panel, GDI remains selected.

Version 1.0.4 was working fine with Direct3D 9.0c only after installing the August 2009 Direct X runtime redistributable.

I suppose that my fancy-pants detection of August 2009 misfires.
What console messages do you people get if you add a new seekbar to the layout?

Small Request: Any chance you could change the border toggle into a combo for select between 'None', 'Gray', and 'Sunken' like other Columns UI components?

Quite possibly.

What does happen when I play an audio CD?

In ancient versions, it tried to automatically analyze the track while playing. Being in two places at once on a CD is impossible if you want realtime playback.
I restricted all CDDA analyzation after that, and now relaxed that to allow explicit analyzation via the context menu.
The use case presented was "I want to scan my CDs beforehand and use cached data when playing", which is fair enough.

gdi+ mode flickers a little but that's probably it's own limitation or smth..

I weighed between buffering or not, and balked at the increased CPU cost, reasoning that it looks good enough on my test setup (Seven x64 and a VM with XPSP3 x86).

Thanks for the GDI+ thing, it's working, although I had to download gdiplus.dll from microsoft... my laptop must really be terrible!

I can't seem to get the custom seekbar.fx files working (e.g. by foosion on page 4) though, I saved it in the right directory and restarted foobar, but it hasn't changed anything.

Odd, I thought that any remotely updated XP machine should have GDI+.
As for effects, it prefers the one in profile_dir\effects over one in foobar_dir\effects, if any.

Try messing around with colors using configure from right-click menu. It helped in my case (but with default effect, this can be some other thing).

Visuals missing some state is known, a workaround is if you juggle settings or change tracks.

could you please add an option to reverse the direction? i want to use a vertical bar, but would like the progress to go from the bottom to the top.

Possibly.
Title: foo_wave_seekbar
Post by: NEMO7538 on 07 January, 2010, 03:48:54 PM
Version 0.1.5 does not work on one of my systems (Lenovo T60, Intel G945 Graphics, XP SP3).
I now have the two options (GDI and Direct3D 9.0) but none of them is working (the panel remains blank and is never refreshed). When I select Direct3D 9.0c, then close and reopen the preferences panel, GDI remains selected.

Version 1.0.4 was working fine with Direct3D 9.0c only after installing the August 2009 Direct X runtime redistributable.

I suppose that my fancy-pants detection of August 2009 misfires.
What console messages do you people get if you add a new seekbar to the layout?



Here are the messages I got :
[blockquote]Seekbar: taking Direct3D9 path.
Seekbar: frontend creation failed: Direct3D9: could not create texture.
Opening track for playback: "M:\Music\Emerson Hart - 2007 - Cigarettes & Gasoline\04 - I Wish the Best for You.mp3"
Wave cache: redundant request for "M:\Music\Emerson Hart - 2007 - Cigarettes & Gasoline\04 - I Wish the Best for You.mp3"
[/blockquote]
Title: foo_wave_seekbar
Post by: Zao on 07 January, 2010, 04:09:54 PM
Fixed. Silly copy/paste error made it try to create fancy floating-point textures three times instead of the two fallback formats.
Title: foo_wave_seekbar
Post by: 2E7AH on 07 January, 2010, 04:16:01 PM
Fixed

unfortunately, not
Title: foo_wave_seekbar
Post by: NEMO7538 on 07 January, 2010, 04:20:48 PM
I guess we have to wait for 0.1.16
Title: foo_wave_seekbar
Post by: Zao on 07 January, 2010, 04:36:05 PM
unfortunately, not

With which version? *points at 0.1.6*
Title: foo_wave_seekbar
Post by: TomBarlow on 07 January, 2010, 04:41:41 PM
Odd, I thought that any remotely updated XP machine should have GDI+.

OK, so it turns out I do have GDI+... For some reason it didn't load in GDI+ mode first, so I looked in my system32 folder, couldn't find gdiplus.dll and assumed the worst. So then I downloaded it from microsoft, and it seemed to fix things. Then I had the bright idea to search my windows folder for gdiplus.dll, because as you said XP is supposed to have it. It turns out it is there, but in some other folder. So then I deleted what I downloaded, and it's working properly now. Phew!

It still isn't loading the custom seekbar.fx though, and my profile folder is my install folder.
Title: foo_wave_seekbar
Post by: 2E7AH on 07 January, 2010, 04:49:01 PM
0.1.6 works fine

[edit] corrected version number, blame on NEMO7538
Title: foo_wave_seekbar
Post by: foosion on 07 January, 2010, 05:22:21 PM
It still isn't loading the custom seekbar.fx though, and my profile folder is my install folder.
The GDI+ mode does not use the seekbar.fx file, only the D3D modes do.
Title: foo_wave_seekbar
Post by: Hamallainen on 08 January, 2010, 03:32:19 AM
I have a strange behaviour in d3d.
I have 2 monitors. If i display the foobar window on the fisrt one everything is fine but on the 2nd, i get a ~90/100% cpu usage (even when it's not scanning and even if playback is stopped). If the window is minimized on monitor 2, cpu usage falls back to 0/2%

Another thing, i get a lot of flickering in gdi+ on the highlighted part and the selection bar

foobar 1.0 b6 / foo wave seekbar 1.0.6 /XP SP3
Title: foo_wave_seekbar
Post by: Zao on 08 January, 2010, 05:27:14 AM
I have a strange behaviour in d3d.
I have 2 monitors. If i display the foobar window on the fisrt one everything is fine but on the 2nd, i get a ~90/100% cpu usage (even when it's not scanning and even if playback is stopped). If the window is minimized on monitor 2, cpu usage falls back to 0/2%

Another thing, i get a lot of flickering in gdi+ on the highlighted part and the selection bar

foobar 1.0 b6 / foo wave seekbar 1.0.6 /XP SP3

Bug (http://zao.se:8080/flyspray/index.php?do=details&task_id=23) logged.
It's likely due to different devices being used for each monitor, incurring a costly copy if primarily on the non-primary monitor.
It may be solvable through multiple devices or magic.
Vista and Seven behaves much nicer in this regard, which is why I haven't noticed it as my test machines are Seven x64 multimon and a VM XPSP3 x86 with single monitor.

As for GDI+, known.
Title: foo_wave_seekbar
Post by: rol on 08 January, 2010, 06:12:04 AM
small request: disable indicator line.
Title: foo_wave_seekbar
Post by: frogworth on 08 January, 2010, 06:49:14 AM
small request: disable indicator line.


You can do this yourself by editing seekbar.fx in the effects folder. Where you find:
Code: [Select]
    float seekWidth = 2.5 * dx;
    float positionWidth = 2.5 * dx;

just change the scaling number to suit. I actually like it at 1 * dx myself. You can make it 0 if you like.
(NB: IANAP. I just hack away, so... it could be that only one of the two float values needs changing! No harm with both though.)
Title: foo_wave_seekbar
Post by: Zao on 08 January, 2010, 06:53:32 AM
Yes, if you're using the Direct3D9 frontend you can either modify the widths (one applies to the position bar and one for the seeking bar).
You could also comment out or completely remove one or both of the calls to bar() on lines 101-102.

Be happy that this isn't the effect file from the 0.0.x versions, as that wasn't remotely as modular.
Title: foo_wave_seekbar
Post by: TomBarlow on 08 January, 2010, 07:38:44 AM
The GDI+ mode does not use the seekbar.fx file, only the D3D modes do.
OK, that explains it!

All I'm after really is the RMS values superimposed on the normal amplitude. Zao, would it be possible to have an option for that in GDI+ mode?

Oh and another request... moodbar (http://www.hydrogenaudio.org/forums/index.php?showtopic=74255&hl=moodbar) colours! mmm it would be amazing!  Please?
Title: foo_wave_seekbar
Post by: Devocalypse on 08 January, 2010, 08:22:22 AM
First of all thank you for this great component and I find it extremely useful.

It's working good on my Win7x64 on the Secondary monitor with no noticable CPU spikes.

However when the computer is Locked (Win+L) and the Foobar window is NOT minimized I get constant 100% cpu usage on my C2D. Regardless of that on which monitor and it happens only when this component is enabled. In a multiuser scenario this is catastrophic as it leeches all the cpu cycles continuously and the other user cannot use the computer properly.

How to reproduce:
1. Run, process explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx)
2. Minimize it to tray.
3. Run foobar.
4. Do not minimize the foobar window and hit Win+L
5. Login again in a few seconds.
6. Check the graph on the cpu usage in process explorer.

NOTE: Happens only in Direct3D mode. (GeForce 8800GTX driver 195.62)

Strange thing is that once you login the cpu usage drops to normal again.
Looking forward to getting this fixed.
Title: foo_wave_seekbar
Post by: TomBarlow on 08 January, 2010, 10:04:41 AM
I think this component is causing problems for me when I listen to radio streams. It's not crashing foobar so there's no log, but the screen goes crazy, there is a box the same size as the seekbar panel in the top left of my screen, foobar loses its title bar, and the UI is just barely usable. The problem completely disappears when I minimize foobar, but comes back again, and doesn't properly fix itself until I restart foobar. It's hard to describe really. I'm only guessing that it's this component- it's the only one I've added recently.
Title: foo_wave_seekbar
Post by: LarsK on 08 January, 2010, 10:12:56 AM
Hello,

is it possible to start playing with double click in the waveform?

Thank you,
Lars
Title: foo_wave_seekbar
Post by: Zao on 08 January, 2010, 10:16:56 AM
However when the computer is Locked (Win+L) and the Foobar window is NOT minimized I get constant 100% cpu usage on my C2D.

Reported in early 0.0.x series, I lose the device and do probably not do the re-acquire test properly.

I think this component is causing problems for me when I listen to radio streams.

Remove the component and see what happens? Also, what protocol; it should completely ignore MMS etc.

is it possible to start playing with double click in the waveform?

Requested already.
Title: foo_wave_seekbar
Post by: TomBarlow on 08 January, 2010, 11:53:15 AM
If I set the panel to hidden (in columns UI layout prefs) everything is fine. The bad things only happen after listening to the stream for about 5 minutes or more. It's an m3u stream. From what I could see of the console it said it was skipping the stream. It also happens with mms streams. It seems to happen every time I listen to one, but only after a while.
Title: foo_wave_seekbar
Post by: Zao on 08 January, 2010, 02:06:57 PM
As the GDI+ mode is an overnight hack, it may very well be horribly broken.
A quick inspection with Process Explorer tells me I'm leaking GDI handles like crazy. Yay.
Title: foo_wave_seekbar
Post by: (Sly) on 08 January, 2010, 02:55:18 PM
Major bug: I was playing Heroes Might & Magic III in fullscreen when i discovered this bug.

On track change (one track ended other started) the playback stopped until i Alt-Tab-ed out from the game, after that playback continued normally. This happened on every tack change. Everybody knows that this is not a CPU speed problem, Heroes III uses very few resources. I'm running Windows XP SP3, DX9C latest, T2390 1.86GHz, 2GB RAM, Intel Mobile 965 Express @ Laptop.
Title: foo_wave_seekbar
Post by: Zao on 09 January, 2010, 02:04:52 AM
0.1.8 is out, improving greatly on performance, especially the high load when listening to streams. See changelog for all the changes.
Title: foo_wave_seekbar
Post by: (Sly) on 09 January, 2010, 03:49:54 AM
Major bug: I was playing Heroes Might & Magic III in fullscreen when i discovered this bug.

On track change (one track ended other started) the playback stopped until i Alt-Tab-ed out from the game, after that playback continued normally. This happened on every tack change. Everybody knows that this is not a CPU speed problem, Heroes III uses very few resources. I'm running Windows XP SP3, DX9C latest, T2390 1.86GHz, 2GB RAM, Intel Mobile 965 Express @ Laptop.



Bug is gone with 0.1.8. I was using 0.1.4.

Keep up the good work. Waiting for embended data in tags, or datatbase in root of music library. I hope that Peter releases the SDK for writing Default UI elements, for you to be able to create this greate addon as pure toolbar element.
Title: foo_wave_seekbar
Post by: kode54 on 09 January, 2010, 04:49:31 AM
I hope that Peter releases the SDK for writing Default UI elements, for you to be able to create this greate addon as pure toolbar element.

It already is a UI Element. There is no way for components to add to the toolbar.
Title: foo_wave_seekbar
Post by: Hamallainen on 09 January, 2010, 06:34:56 AM
No more flickering with gdi. Thanks
Title: foo_wave_seekbar
Post by: fuflo on 09 January, 2010, 10:30:51 AM
regarding the effects:

i have some general knowledge in programming, but not graphical.

how would i go about changing the bar() function to make the bar smaller in vertical size? the reason i'm asking is i'm trying out some designs for foobar with this component and it would look much less blockier if the bar was a little smaller vertically.
i tried hacking the default effect a little to no avail...
Title: foo_wave_seekbar
Post by: Zao on 09 January, 2010, 11:54:47 AM
how would i go about changing the bar() function to make the bar smaller in vertical size? the reason i'm asking is i'm trying out some designs for foobar with this component and it would look much less blockier if the bar was a little smaller vertically.
i tried hacking the default effect a little to no avail...

The following code may be acceptable and will available for use in the default effect in next release. Tweak the last two parameters to the function to indicate from what amplitude the bar should start fading and which amplitude it's fully gone. For fun, also try reversing the order of them, which would give a bar that's hollow towards zero.
Code: [Select]
float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, float vert_to )
{
    float dist = abs(pos - tc.x);
    float vertical = smoothstep(vert_from, vert_to, abs(tc.y));
    float4 c = show
        ? lerp(fg, bg, max(vertical, smoothstep(0, width, dist)))
        : bg;
    return c;
}

For example, to fade from solid at amplitude 0.3 to 0.8:
Code: [Select]
c0 = faded_bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible, 0.3, 0.8);
Title: foo_wave_seekbar
Post by: fuflo on 09 January, 2010, 04:24:57 PM
hmm.. either i'm doing it wrong or i have no idea..
it doesn't seem to have any effect. i added that function to default seekbar.fx and replaced bar() references with fade_bar() with added values 0.3 and 0.8 where you mentioned and it doesn't seem to have any effect.
also from your description of that function it doesn't seem to be what i actually want..

ps. although as i'm writing this, i had a couple or more beers so i'll check back tommorow with a clear mind
Title: foo_wave_seekbar
Post by: Gapkiller on 09 January, 2010, 04:45:31 PM
feature request:

Please add function to temporarily turn off wave analyzing.
When i make playlists I scroll and click tracks pretty fast so it gets very high on cpu usage...
It would be perfect if it would display only the scrollbar without analyzing!

Thx
Title: foo_wave_seekbar
Post by: Zao on 09 January, 2010, 04:59:52 PM
hmm.. either i'm doing it wrong or i have no idea..
it doesn't seem to have any effect. i added that function to default seekbar.fx and replaced bar() references with fade_bar() with added values 0.3 and 0.8 where you mentioned and it doesn't seem to have any effect.
also from your description of that function it doesn't seem to be what i actually want..

(https://hydrogenaud.io/imgcache.php?id=169e0b472a215ad7620607e485225786" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar24.png)
Left to right is (0.3, 0.7), (0.3, 0.35), (0.7, 0.3).
If you've got a seekbar.fx in both your profile and foobar dir, it prefers the profile one. Also, note that .fx files only affect the Direct3D mode, not GDI or Direct2D.

Please add function to temporarily turn off wave analyzing.
When i make playlists I scroll and click tracks pretty fast so it gets very high on cpu usage...
It would be perfect if it would display only the scrollbar without analyzing!

The processing threads run at idle priority, so it should not be horribly noticeable, responsivity-wise.
But yes, an "inhibit enqueueing of new tracks" command might be doable. It'd be tricky to get it to affect work items previously enqueued though.
Title: foo_wave_seekbar
Post by: Gapkiller on 09 January, 2010, 05:13:13 PM
Quote
The processing threads run at idle priority, so it should not be horribly noticeable, responsivity-wise.
But yes, an "inhibit enqueueing of new tracks" command might be doable. It'd be tricky to get it to affect work items previously enqueued though.


Thank you for considering this. Would be a very helpful feature to me!
Title: foo_wave_seekbar
Post by: Hancoque on 09 January, 2010, 07:12:12 PM
How is the waveform calculated? Is it just a sum of all channels? I noticed that the channels of a 5.1 file are treated differently. The LFE channel, for example, receives a boost. I'd like to be able to limit the calculation to certain channels or even use only one channel. As most music is in stereo, a two-channel view would also be great. The main reason for me to use this component would be to examine the material as accurately as possible, especially in terms of dynamics compression. That possibility is greatly reduced when viewing only a mono sum as it makes the material look better than it really is.
Title: foo_wave_seekbar
Post by: boombaard on 09 January, 2010, 07:53:27 PM
How is the waveform calculated? Is it just a sum of all channels? I noticed that the channels of a 5.1 file are treated differently. The LFE channel, for example, receives a boost. I'd like to be able to limit the calculation to certain channels or even use only one channel. As most music is in stereo, a two-channel view would also be great. The main reason for me to use this component would be to examine the material as accurately as possible, especially in terms of dynamics compression. That possibility is greatly reduced when viewing only a mono sum as it makes the material look better than it really is.

Actually, my girlfriend will love this visualizer. I acquainted her with the Loudness War a while back, and it's helped her identify why she didn't care for some music without really knowing why. Still, it would be nice to have 2 channels, or at least know if the single-wave output is RMSed or summed.
In any case: Thanks Zao
Title: foo_wave_seekbar
Post by: Zao on 09 January, 2010, 09:24:55 PM
The mixdown algorithm is very unscientific.

Code: [Select]
switch (channelCount)
{
case 8:
    frame[0] += frame[6] * sqrt_half;
    frame[1] += frame[7] * sqrt_half;
case 6:
    frame[0] += frame[2] * sqrt_half + frame[4] * sqrt_half + frame[3];
    frame[1] += frame[2] * sqrt_half + frame[5] * sqrt_half + frame[3];
case 2:
    frame[0] += frame[1];
    frame[0] /= 2.0;
    break;
case 4:
    frame[0] += frame[1] + frame[2] + frame[3];
    frame[0] /= 4.0;
}


That is, 7.1ch is mixed to 5.1ch.
5.1ch is mixed to stereo.
Stereo is averaged to mono (which will mislead with phase-skewed channels).
4ch is similarily averaged to mono.
Title: foo_wave_seekbar
Post by: fuflo on 10 January, 2010, 06:41:24 AM
finally found why fade_bar didn't work for me.

from your example:

float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, vert_to )

should be:

float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, float vert_to )

and now it works perfectly. thanks
Title: foo_wave_seekbar
Post by: TomBarlow on 10 January, 2010, 09:40:52 AM
Thanks for the latest version, it works well and looks great.

Would a transparent background be possible at all? Or maybe the ability to define a background image? I realise the foreground colour is calculated using the background colour, so maybe not, just thought I'd suggest it
Title: foo_wave_seekbar
Post by: boombaard on 10 January, 2010, 11:13:10 AM
Something quite problematic my gf pointed out:
Background: Black
foreground: Red
(hl: darkgreen selection:yellow
Now, if I disable the fg color, the fg (that is, the waveform) becomes white, but it also grows by a significant %age. What's happening there?
(The same thing applies when you change the bg color, btw)
Title: foo_wave_seekbar
Post by: aphasia on 10 January, 2010, 11:33:03 AM
Thanks for a very cool component. Kudos Zao!
Title: foo_wave_seekbar
Post by: fuflo on 10 January, 2010, 11:44:21 AM
hmm.. i don't know if this is a bug but with d3d, making foobar's window transparent, wave seekbar's bg is black ( and not transparent ). gdi is fine
Title: foo_wave_seekbar
Post by: Zao on 10 January, 2010, 09:18:04 PM
float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, vert_to )
float4 fade_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, float vert_to )

I'm fairly sure that the console should log any effect compilation errors with line and column.

Would a transparent background be possible at all? Or maybe the ability to define a background image? I realise the foreground colour is calculated using the background colour, so maybe not, just thought I'd suggest it

Since early on, I have intended to load any textures referenced by annotations in the effect file, but sadly enough I have not implemented it yet.
An example of such an annotation is line 2 of the default seekbar.fx.

Something quite problematic my gf pointed out:
Background: Black
foreground: Red
(hl: darkgreen selection:yellow
Now, if I disable the fg color, the fg (that is, the waveform) becomes white, but it also grows by a significant %age. What's happening there?
(The same thing applies when you change the bg color, btw)

At the edge of the waveform, the color is bg. To a certain distance inside the waveform, the color is linearly interpolated to fg. Inside of that distance, color continues the interpolation, depending on how b and fg relate to each other.

If bg.r is redder than fg.r, the center will go towards a color without red.
If bg.r is less red than fg.r, it will go towards a full red component.
Likewise for green and blue.

The more similiar bg and fg are, the softer the edge will seem and the less extreme the interior will be.

Note that what you disable is the override of the global colors, not the color itself. It will use whatever you have set in the DUI/CUI global preferences.

hmm.. i don't know if this is a bug but with d3d, making foobar's window transparent, wave seekbar's bg is black ( and not transparent ). gdi is fine

That's expected, and I do not believe that it's solvable, not even with Direct3D9Ex.
Similarily, it will most probably not do the right thing in the unholy Panel Stack of Columns.
Title: foo_wave_seekbar
Post by: eke on 12 January, 2010, 05:40:45 AM
is it possible to display 2 wavebars at once for 2 files, in order to compare them to each other?
Title: foo_wave_seekbar
Post by: Zao on 12 January, 2010, 06:28:12 AM
is it possible to display 2 wavebars at once for 2 files, in order to compare them to each other?

No. At least not currently. Maybe when I get around implementing displaying the selected song I can implement a setting to not track the currently playing one.
Title: foo_wave_seekbar
Post by: eke on 13 January, 2010, 09:13:22 AM
is it possible to display 2 wavebars at once for 2 files, in order to compare them to each other?

No. At least not currently. Maybe when I get around implementing displaying the selected song I can implement a setting to not track the currently playing one.

that would be supercool, esp. when dealing with timed audios where you want to compare if the silence parts are identical between 2 files at the same time index.
Title: foo_wave_seekbar
Post by: ejac on 13 January, 2010, 03:35:29 PM
GREAT component, thx a lot!!
Title: foo_wave_seekbar
Post by: Zao on 15 January, 2010, 08:02:36 AM
Preview of how one can load and use textures (in good and bad ways). (Thumbnails with links to make 2E7AH happy.)
(https://hydrogenaud.io/imgcache.php?id=4b174c960f235ef2e5049511efcf99a6" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar25_t.png) (http://www.acc.umu.se/~zao/seekbar25.png)(https://hydrogenaud.io/imgcache.php?id=e59b6ed87c9848e815693e81928bf9d7" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar26_t.png) (http://www.acc.umu.se/~zao/seekbar26.png)
Use cases range from a nice background image to a fancy position indicator to a custom gradient for the interior. The sky (and competence) is the limit!
Title: foo_wave_seekbar
Post by: Harm on 15 January, 2010, 10:58:35 AM
I think I found a bug: When I switch between two layouts (CUI), both having a wave seekbar, fb2k sometimes - but not always - crashes, pointing the problem to wave seekbar.
Title: foo_wave_seekbar
Post by: Zao on 15 January, 2010, 12:41:10 PM
There seems to be some lovely crashes with 0.1.8, it's likely due to my main thread callbacks.
It seems to happen mostly with CUI, but some DUI ones do occur.

0.1.9 most probably fixes it.
Title: foo_wave_seekbar
Post by: SpaceAgeHero on 16 January, 2010, 05:14:31 AM
Thank you for 0.1.9. I really like this component.
Title: foo_wave_seekbar
Post by: cc_bbs on 16 January, 2010, 11:16:43 AM
hi,can the foo+wave_seekbar work with FX5200? I tried it ,but it doesn't work
Title: foo_wave_seekbar
Post by: Zao on 16 January, 2010, 12:19:46 PM
hi,can the foo+wave_seekbar work with FX5200? I tried it ,but it doesn't work

It should run, assuming that you have reasonably decent drivers and the August 2009 runtime.
What errors/warnings do you get, and what "doesn't work"?
Title: foo_wave_seekbar
Post by: NullString on 16 January, 2010, 12:38:58 PM
Preview of how one can load and use textures (in good and bad ways). (Thumbnails with links to make 2E7AH happy.)
(https://hydrogenaud.io/imgcache.php?id=4b174c960f235ef2e5049511efcf99a6" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar25_t.png) (http://www.acc.umu.se/~zao/seekbar25.png)(https://hydrogenaud.io/imgcache.php?id=e59b6ed87c9848e815693e81928bf9d7" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar26_t.png) (http://www.acc.umu.se/~zao/seekbar26.png)
Use cases range from a nice background image to a fancy position indicator to a custom gradient for the interior. The sky (and competence) is the limit!

nice!

for those who don't know how, you have to place a picture for the texture in the "effects" folder, and then you have to edit the following lines in seekbar.fx (with notepad)

(line 2)
Code: [Select]
Texture2D bgTex < string ResourceName = "074.jpg"; >;

replacing "074.jpg" with the filename of the texture you want as background (that you placed in the "effects" folder)

and then

(line 102)
Code: [Select]
#if 1

changing it to
Code: [Select]
#if 0
Title: foo_wave_seekbar
Post by: pIv on 16 January, 2010, 02:01:38 PM
In windows xp I can use 3 modes of frontend - GDI, Direct2D 1.0 and Direct3D 9.0c.

I change my os to windows 7, and now I can use only 2 modes of frontend - GDI, Direct2D 1.0. If I change mode to Direct3D 9.0c then panel wave_seekbar  ifs freeze.

Why?
Title: foo_wave_seekbar
Post by: Zao on 16 January, 2010, 02:14:34 PM
In windows xp I can use 3 modes of frontend - GDI, Direct2D 1.0 and Direct3D 9.0c.

I change my os to windows 7, and now I can use only 2 modes of frontend - GDI, Direct2D 1.0. If I change mode to Direct3D 9.0c then panel wave_seekbar  ifs freeze.

Why?

With what video card, do you have the August 2009 DirectX runtime installed, do you have video drivers installed, do you get anything in the console, does it crash properly, does it stop responding, does it just not repaint, did you submit a crash report, etc.?
Title: foo_wave_seekbar
Post by: seigert on 16 January, 2010, 03:02:48 PM
I've added a wave_seekbar to a DarkOne theme for a ColumnsUI, but there is a little problem: thin white border on left and top sides of seekbar:

[a href="http://alexey.shuksto.name/data/uploads/fb2k/foo_wave_seekbar_bg_border_bug.png" target="_blank"]

Can this issue be resolved via shader code editing?
Title: foo_wave_seekbar
Post by: Harm on 16 January, 2010, 03:17:34 PM
I don't have the option for Direct3D, just Direct2D and GDI. I use windows 7 64 bits and have a nvidia GT220M graphics card with the latest drivers. What could be wrong?
Title: foo_wave_seekbar
Post by: Zao on 16 January, 2010, 03:24:23 PM
I've added a wave_seekbar to a DarkOne theme for a ColumnsUI, but there is a little problem: thin white border on left and top sides of seekbar:

Try adding float2(dx, dy) from the texture coordinates used to sample the texture. This is the usual half-pixel offset problem of Direct3D9. I'm so used to 10, I keep forgetting that it exists - see Understanding half-pixel and half-texel offsets (http://drilian.com/2008/11/25/understanding-half-pixel-and-half-texel-offsets/).

I don't have the option for Direct3D, just Direct2D and GDI. I use windows 7 64 bits and have a nvidia GT220M graphics card with the latest drivers. What could be wrong?

Ensure as per the original post and countless others, that you have installed the DirectX August 2009 Redistributable.
Title: foo_wave_seekbar
Post by: seigert on 16 January, 2010, 04:45:29 PM
Try adding float2(dx, dy) from the texture coordinates used to sample the texture.


Either I do not understand what values to use, or i do not understand where to add them -- i can perfectly well mess texture itself (mirror it or shift it) but i cannot move it.
Title: foo_wave_seekbar
Post by: bbt-hh on 16 January, 2010, 05:13:37 PM
Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)
As of version 0.1.9 console prints:
Seekbar: taking Direct3D9 path.
Wave seekbar: Direct3D9: Could not load annotation texture 074.jpg
Wave seekbar: Direct3D9: Could not load annotation texture seekbar.png
Seekbar: Frontend initialized.
Wave seekbar: Direct3D9: Could not load annotation texture 074.jpg
Wave seekbar: Direct3D9: Could not load annotation texture seekbar.png
Title: foo_wave_seekbar
Post by: Zao on 16 January, 2010, 06:27:31 PM
Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)
As of version 0.1.9 console prints:
*snip*

Your issue still makes no sense, so I haven't investigated that further.
The spam is unrelated and will be gone with 0.1.10. Does the GDI mode work?
Title: foo_wave_seekbar
Post by: 2E7AH on 16 January, 2010, 06:34:54 PM
(Thumbnails with links to make 2E7AH happy.)

eh thanks  it's not that hard
and you made them as a gentleman - with direct link + optimized png
Title: foo_wave_seekbar
Post by: Zao on 16 January, 2010, 06:59:41 PM
Either I do not understand what values to use, or i do not understand where to add them -- i can perfectly well mess texture itself (mirror it or shift it) but i cannot move it.

The problem was not with sampling the texture, it was with the coordinates of my full-window quad, which were shifted half a pixel shifted to the right/down, causing the border you saw.
It will be fixed in 0.1.11 when I get around collecting enough fixes for it. Until then, change
Code: [Select]
output.pos = float4(input.pos, 0, 1);
in VS() to
Code: [Select]
float2 half_pixel = float2(1,-1) / viewportSize;
output.pos = float4(input.pos - half_pixel, 0, 1);
Title: foo_wave_seekbar
Post by: cc_bbs on 16 January, 2010, 11:30:21 PM
hi,can the foo+wave_seekbar work with FX5200? I tried it ,but it doesn't work

It should run, assuming that you have reasonably decent drivers and the August 2009 runtime.
What errors/warnings do you get, and what "doesn't work"?


on my pc,the error with FX5200 is
"Failed to load DLL: foo_wave_seekbar.dll
Reason: ?????????  " 
and ,i have installed the August 2009 runtime
Title: foo_wave_seekbar
Post by: T.P Wang on 17 January, 2010, 12:42:56 AM
@cc_bbs:
I can only imagine that LoadLibrary fails with error ERROR_PROC_NOT_FOUND (127) is that dll files in your system are messed up (Wrong dll version number? Mixed newer and older dll files but older dlls are loadded first?)
Title: foo_wave_seekbar
Post by: bbt-hh on 17 January, 2010, 05:08:41 AM
Everything loads fine, but the Waveform Seekbar shows nothing than white space? Seeking works though. (Win XP SP3, Radeon 9550)
As of version 0.1.9 console prints:
*snip*
Your issue still makes no sense, so I haven't investigated that further.
The spam is unrelated and will be gone with 0.1.10. Does the GDI mode work?
I see, just mentioned it, because the console message was introduced in this version. GDI mode works fine.
D3D might work in a forthcoming version for me. Thanks for your effort, nice component.
Title: foo_wave_seekbar
Post by: seigert on 17 January, 2010, 05:26:09 AM
Big thanks!
Title: foo_wave_seekbar
Post by: cc_bbs on 17 January, 2010, 05:41:30 AM
@cc_bbs:
I can only imagine that LoadLibrary fails with error ERROR_PROC_NOT_FOUND (127) is that dll files in your system are messed up (Wrong dll version number? Mixed newer and older dll files but older dlls are loadded first?)

Would you like to tell me how to fix it ?thanks
Title: foo_wave_seekbar
Post by: seigert on 17 January, 2010, 06:23:03 AM
Found new strange thing: without border with same gradient texture for background now i have two thin lines -- dark one at the top and light one at the bottom of seekbar:

(https://hydrogenaud.io/imgcache.php?id=f62860944f36b8fed15c74ccae0cc850" rel="cached" data-warn="External image, click to view at original size" data-url="http://alexey.shuksto.name/data/uploads/fb2k/foo_wave_seekbar_bg_border_bug-2-thumb.png) (http://alexey.shuksto.name/data/uploads/fb2k/foo_wave_seekbar_bg_border_bug-2.png)

Seems to me that top- and bottom pixels of texture are mirrored when component drawing a seekbar.
Title: foo_wave_seekbar
Post by: Zao on 17 January, 2010, 07:38:29 AM
Change AddressV in the sampler to Clamp instead of Wrap.
The reason is that with Wrap, the texture is tiled and the topmost texel is filtered together with the bottommost and vice versa.
Your texture coordinates may be slightly off, but it should not be noticeable much.
Title: foo_wave_seekbar
Post by: TuNk77 on 17 January, 2010, 12:41:57 PM
Thank you for this nice plug-in
v0.1.10 seems to be a bit faster on analyzing than v0.1.9. With v0.1.10 it takes about 1,5 seconds on average to analyze, v0.1.9. used up to 3 seconds to analyze.
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 17 January, 2010, 01:23:29 PM
I'm for looking for some help on editing the seekbar.fx file.  This should be easy, but I can't figure it out.  Basically, I'd like to add a 1px border around the selection rectangle.  I like using the "no border" option and making the background blend into my UI.  Unfortunately, I don't like the transition from the background color to the highlight color. 

So, what I have currently is this (using Hengest's replaygain effect):
(https://hydrogenaud.io/imgcache.php?id=59f5705eefe5dd3dc7380f9f4e8ef5a2" rel="cached" data-warn="External image, click to view at original size" data-url="http://imgur.com/cd3LE.png)

What I'd like is this:
(https://hydrogenaud.io/imgcache.php?id=a84b481a89706b2c2b753cb2f0f3fab0" rel="cached" data-warn="External image, click to view at original size" data-url="http://imgur.com/qDjT9.png)

Thanks.
Title: foo_wave_seekbar
Post by: Zao on 17 January, 2010, 02:40:55 PM
Code: [Select]
float4 played( float pos, float2 tc, float4 fg, float4 bg, float alpha)
{
    float4 c = bg;
    float2 d = 1 / viewportSize;
    if (pos > tc.x)
    {
        if (tc.x < d.x || tc.y >= (1 - d.y) || tc.y <= (2 * d.y - 1))
            c = fg;
        else
            c = lerp(c, fg, saturate(alpha));
    }
    return c;
}
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 17 January, 2010, 03:58:09 PM
Thanks, that worked well.
Title: foo_wave_seekbar
Post by: pIv on 18 January, 2010, 04:39:35 AM
2Zao

Everest.exe report about version directx in my Windows 7/32 ultimate  - 11.
I  run dxwebsetup.exe and install all updates of directx 9.0.
Now I try change frontend mode to Directx3d 9.0c and waveseekbar panel is freeze.
Console report:
"Seekbar: taking Direct3D9 path failed."
I use Nvidia 8500 GT graphic card.

Title: foo_wave_seekbar
Post by: Andreasvb on 18 January, 2010, 06:37:06 AM
Did you install the specific DirectX August 2009?
Title: foo_wave_seekbar
Post by: pIv on 18 January, 2010, 07:22:20 AM
2Andreasvb

I use dxwebsetup.exe - this program is web directx setup and load directx files fom microsoft.com (http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en)
Title: foo_wave_seekbar
Post by: Zao on 18 January, 2010, 07:23:57 AM
For future information, the only usage scenarios I've personally verified works are as a DUI element or inside of a regular vertical/horizontal splitter in CUI.
A long time ago I tried it inside that Panel Stack plugin and made so that it at least didn't crash much, but I wouldn't say it "supports" PSS.

Now I try change frontend mode to Directx3d 9.0c and waveseekbar panel is freeze.
Console report:
"Seekbar: taking Direct3D9 path failed."
I use Nvidia 8500 GT graphic card.


I have searched my codebase and cannot find that message being emitted. Can you copy/paste it as-is?
Title: foo_wave_seekbar
Post by: pIv on 18 January, 2010, 10:06:34 AM
Now I try change frontend mode to Directx3d 9.0c and waveseekbar panel is freeze.
Console report:
"Seekbar: taking Direct3D9 path failed."
I use Nvidia 8500 GT graphic card.


I have searched my codebase and cannot find that message being emitted. Can you copy/paste it as-is?


Sorry now I place rigth condole log (copy-paste)
Quote
Seekbar: taking GDI path.
Seekbar: Frontend initialized.
Seekbar: taking Direct2D1 path.
Seekbar: Frontend initialized.
Opening track for playback: "I:\Audio\Jazz\Various Artists\2000 - El.Condor.Pasa\01 Lianto de una paloma.mpc"
Wave cache: finished analysis of "I:\Audio\Jazz\Various Artists\2000 - El.Condor.Pasa\01 Lianto de una paloma.mpc"
Wave cache: finished analysis of "I:\Audio\Jazz\Various Artists\2000 - El.Condor.Pasa\02 Thinku.mpc"
Seekbar: taking Direct3D9 path.
Seekbar: frontend creation failed: Direct3D9: could not create device.
Seekbar: taking Direct2D1 path.
Seekbar: Frontend initialized.
Reopening played file after update: "I:\Audio\Jazz\Various Artists\2000 - El.Condor.Pasa\01 Lianto de una paloma.mpc"
Seekbar: taking GDI path.
Seekbar: Frontend initialized.


I choose GDI, Direct2D1 and Direct3D9 frontend mode, then GDI again.
Title: foo_wave_seekbar
Post by: Zao on 18 January, 2010, 10:19:56 AM
That's ... surprising.
I guess I should add more error handling in that area, but it should have no problems whatsoever on that card.
Do you have proper drivers from NVIDIA installed?
Title: foo_wave_seekbar
Post by: pIv on 18 January, 2010, 11:12:06 AM
That's ... surprising.
I guess I should add more error handling in that area, but it should have no problems whatsoever on that card.
Do you have proper drivers from NVIDIA installed?


I use 195.62_desktop_win7_winvista_32bit_international_whql early and yesterday when I found bug  I install 195.81_desktop_win7_winvista_32bit_international_beta.

Error appears in both versions of this NVIDIA drivers.

Also I use two monitors connected to my graphic card (desktop extended to both monitors).
Title: foo_wave_seekbar
Post by: noisia on 18 January, 2010, 12:01:33 PM
can't play/pause when gaming with this/
Title: foo_wave_seekbar
Post by: Zao on 18 January, 2010, 12:19:06 PM
can't play/pause when gaming with this/

What do you do, what happens, what do you expect will happen?
Title: foo_wave_seekbar
Post by: noisia on 18 January, 2010, 12:55:56 PM
can't play/pause when gaming with this/

What do you do, what happens, what do you expect will happen?

I press my mouse button for play/pause, music keeps playing if i started the game with music playing, doesnt play if i starte the game on pauze
Title: foo_wave_seekbar
Post by: Zao on 18 January, 2010, 02:23:15 PM
I assume from your horribly short description that you're playing a game (windowed?), try to click in the foobar2000 toolbar (DUI/CUI?) to play/pause, and it does what (freeze, crash, nothing at all) while looking normal (not redrawing?)?
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 18 January, 2010, 05:21:54 PM
While trying to customize the effects file, I'm frequently running into this error:

"Compiled shader code uses too many arithmetic instruction slots (66). Max. allowed by the target (ps_2_0) is 64"

Is there anything that can be done about this, or is it just a limitation of the pixel shader that has to be worked around?
Title: foo_wave_seekbar
Post by: Zao on 18 January, 2010, 05:55:43 PM
While trying to customize the effects file, I'm frequently running into this error:

"Compiled shader code uses too many arithmetic instruction slots (66). Max. allowed by the target (ps_2_0) is 64"

Is there anything that can be done about this, or is it just a limitation of the pixel shader that has to be worked around?

Assuming you have the hardware, you can change the version in the technique to one of ps_2_b, ps_2_a or ps_3_0, in rough order of competence, latter is better.

The 2_a and 2_b levels have 512 combined arbitrary instructions and the 3_0 level has a minimum of 512 instructions supported.

I made the base effect use 2_0 as it's supported on the widest base of hardware.

Notable is that my shader isn't remotely efficient. It's written for legibility.
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 18 January, 2010, 06:58:02 PM
Changing it to 3_0 worked.

EDIT: One more thing.  Is it possible to access the "track peak" info, rather than just "track gain"?  Thanks.
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 19 January, 2010, 05:45:19 AM
Nevermind, I figured it out.
Title: foo_wave_seekbar
Post by: cc_bbs on 19 January, 2010, 08:15:26 AM
ZAO,I also cann't  run it under my FX5200.What should I do ?
Title: foo_wave_seekbar
Post by: Zao on 19 January, 2010, 08:55:44 AM
The four available ReplayGain values are available in the same float4, as per the comment.

I have currently lent out my FX card, so I cannot verify why it fails.
There's plans to make device creation more robust and verifying more.
What failure do you get? The device one?
Title: foo_wave_seekbar
Post by: TomBarlow on 19 January, 2010, 09:15:42 AM
Hi, this component seems to give me 403 forbidden errors when listening to last.fm radio, would it be accessing the tracks at all? It definitely seems to be caused by this component as I can listen fine when I remove it from my config, otherwise I get a 403 error after about 20 seconds then it skips two tracks forwards.
Title: foo_wave_seekbar
Post by: cc_bbs on 19 January, 2010, 09:34:40 AM
ZAO,I also cann't  run it under my FX5200.What should I do ?

the information is :
"Failed to load DLL: foo_wave_seekbar.dll
Reason: ?????????  "
and i have installed DirectX August 2009.

the same version of foo_wave_seekbar.dll,I used in a Q35 mainbroad,it is run .
So,is the FX5200's reason?
when  you can test it ,please tell me the result .thank you very much!
Title: foo_wave_seekbar
Post by: Zao on 19 January, 2010, 10:51:47 AM
Hi, this component seems to give me 403 forbidden errors when listening to last.fm radio, would it be accessing the tracks at all? It definitely seems to be caused by this component as I can listen fine when I remove it from my config, otherwise I get a 403 error after about 20 seconds then it skips two tracks forwards.


I assume that last.fm tracks are one-time listen only.
This component assumes that playable locations are idempotent. That is, you get the same output on subsequent decodings and you can decode it more than once.
This does not hold for regular streams, random: and some other input components.

Currently there is a blacklist of input paths that it should not attempt to decode. How does such a mysterious last.fm location entry look?
Title: foo_wave_seekbar
Post by: TomBarlow on 19 January, 2010, 11:17:20 AM
Yeah they're one time only, they look something like this:
FOO_LASTFM_RADIO://play.last.fm/user/c8878bea8ecb7e714adb3d101fdfe64a.mp3LASTFM

Thanks
Title: foo_wave_seekbar
Post by: cerAmik on 21 January, 2010, 08:27:52 AM
very nice component.

request: please add a timing tooltip (or another indicator) on x milliseconds mouseover (and when seeking)
Title: foo_wave_seekbar
Post by: Zao on 21 January, 2010, 11:20:43 AM
request: please add a timing tooltip (or another indicator) on x milliseconds mouseover (and when seeking)

In the todo list since forever, will do once I can be bothered reading up on how to do tooltips with WTL, and get some of that mythical Free Time.
Title: foo_wave_seekbar
Post by: Squeller on 23 January, 2010, 10:59:04 AM
[OT] Hey Zao, is that you?  http://tr.im/LkOR (http://tr.im/LkOR) - Did you recognize Google Streetview has been in your country  I love this service, unfortunately we'll see Germany there not soon I guess. Germany basically is a rather anti-progressive country IMO, people keep on complaining and complaining. I'm not surprised many non-german speaking people in the world know the german word "Verboten", which is sad.
Title: foo_wave_seekbar
Post by: q_b6 on 23 January, 2010, 11:18:12 AM
request: editable boolean expression (just like foo_skip) to specify whether to skip analyzing tracks
Title: foo_wave_seekbar
Post by: Zao on 23 January, 2010, 12:16:17 PM
I do not quite want to pollute the worker threads with accessing tags, let alone titleformatting.
I intend to provide preferences to exclude protocols, much like the current hardcoded set.
Title: foo_wave_seekbar
Post by: drmrbrewer on 23 January, 2010, 03:21:01 PM
This is an excellent component.  Many thanks for making this available.

Since installing it, however, I am getting a few of the following error popups:

Could not update tags (Sharing violation) on: "blah blah blah.m4a"

I don't think that this component actually writes anything to the track itself, but maintains a separate database (right?).  I suspect that it's a conflict with another component I have installed (http://www.hydrogenaudio.org/forums/index.php?showtopic=76968) that is attempting to write a lyric tag to the file at the same time as your seekbar component is reading from the file during its initial analysis.

Could there be any other explanation?  Thing is, it doesn't happen every time a new track is played, and it's often the case that a lyric tag is written and the seekbar analysis is performed concurrently (well, roughly at the same time) without any conflict; maybe the timing is such that the lyric is written soon after the seekbar component has done its stuff.

Thanks,

Mike
Title: foo_wave_seekbar
Post by: NullString on 23 January, 2010, 08:44:28 PM
Could there be any other explanation?  Thing is, it doesn't happen every time a new track is played, and it's often the case that a lyric tag is written and the seekbar analysis is performed concurrently (well, roughly at the same time) without any conflict; maybe the timing is such that the lyric is written soon after the seekbar component has done its stuff.

most probably when the lyrics are getting written on the file tags, the operation fails because wave_seekbar is scanning the file.
would be better to get lyrics and track signatures at different times 
Title: foo_wave_seekbar
Post by: Zao on 24 January, 2010, 09:30:06 AM
Could not update tags (Sharing violation) on: "blah blah blah.m4a"
Could there be any other explanation?  Thing is, it doesn't happen every time a new track is played, and it's often the case that a lyric tag is written and the seekbar analysis is performed concurrently (well, roughly at the same time) without any conflict; maybe the timing is such that the lyric is written soon after the seekbar component has done its stuff.

Your interpretation is likely correct. It only reads the track while decoding and never writes anything to it. The act of decoding it is enough to block other usage of it.
I have no way of detecting that someone is interested in writing to something I am busy decoding.
I already make an effort to not have the input open longer than necessary.
Cloning the file and decoding from a copy would still have a vulnerable period, so that wouldn't help.
Title: foo_wave_seekbar
Post by: Xezzy on 24 January, 2010, 11:36:04 AM
There is a glitch when playing MIDI files, it thinks to much and slows down foobar.

BTW, it would be nice to see MIDI notes in wave seekbar ^^ just sayin'
Title: foo_wave_seekbar
Post by: Zao on 24 January, 2010, 11:49:49 AM
Rendering MIDI files taking up CPU is something you have to take up with the author of whatever MIDI component you use.
As for visualizing notes, that's nothing I have access to, nor want to.
Title: foo_wave_seekbar
Post by: drmrbrewer on 24 January, 2010, 11:50:40 AM
I have no way of detecting that someone is interested in writing to something I am busy decoding.


Didn't think so.  I think the only solution would be for the lyric component to delay writing the lyric to the file... a 5 second delay would be plenty in my experience so far for wave_seekbar to have finished.

Thanks again for this component.  It is very interesting to see the whole dynamic of a track laid out before you.

Mike
Title: foo_wave_seekbar
Post by: Zao on 24 January, 2010, 12:09:45 PM
Introducing delays to the left and right will just modify the probability of a collision, not solve it.
I'd prefer it if the lyrics component author handled such things by either retrying or storing the data in a friendlier way.

What file format is this? Some people tell me that they have no trouble whatsoever to update their tags while playing, including RG and interactive editing via properties.
Title: foo_wave_seekbar
Post by: 2E7AH on 24 January, 2010, 01:41:12 PM
I think the only solution would be for the lyric component to delay writing the lyric to the file...

It's not only about lyrics, but any kind of tagging, i.e. using discogs/muscibrainz tagger or tagging yourself some new (unprocessed) release
Maybe there should be option to switch the component like - don't process items not in media library, or something like that
Title: foo_wave_seekbar
Post by: drmrbrewer on 24 January, 2010, 01:55:22 PM
I'd prefer it if the lyrics component author handled such things by either retrying or storing the data in a friendlier way.


There is an option inthe component to store lyrics in a separate file.  But I prefer the lyric to travel with the track.  But yes, it would be better to try, and retry if the file is open by another process.

What file format is this? Some people tell me that they have no trouble whatsoever to update their tags while playing, including RG and interactive editing via properties.


There isn't usually a problem updating tags while playing; I update my (embedded) ratings all the time when the track is playing.  I don't know how foobar2000 handles reading of the track for output: perhaps it makes a temporary duplicate and reads from that, leaving other components to do what they like with the underlying file.

Quote from: 2E7AH link=msg=0 date=
It's not only about lyrics, but any kind of tagging


Of course.  The problem is that both this component and the lyric component trigger when the track starts, and therefore there is a likelihood of conflict.
Title: foo_wave_seekbar
Post by: Zao on 24 January, 2010, 03:19:35 PM
Maybe there should be option to switch the component like - don't process items not in media library, or something like that

That has been suggested before and I will likely add a preferences toggle for that.
Title: foo_wave_seekbar
Post by: drmrbrewer on 25 January, 2010, 05:06:03 PM
Do you have a description somewhere of what the displayed signatures actually represent -- can be fairly technical, I can cope with it !  It's just that a couple of signatures have surprised me a little -- but it's just my lack of understanding of what they truly represent.

Thanks,

Mike
Title: foo_wave_seekbar
Post by: ExUser on 25 January, 2010, 05:29:31 PM
Each song is chopped into N pieces (N=2048?). Each piece is analyzed for three values: peak max, peak min, and RMS. This results in N*3 values, and is the basis of the display.
Title: foo_wave_seekbar
Post by: drmrbrewer on 25 January, 2010, 05:33:46 PM
OK, so how do you get the two traces from the three values?

Mike
Title: foo_wave_seekbar
Post by: Zao on 25 January, 2010, 05:39:26 PM
The process is done on a mono channel. I mix any higher channel counts down to mono before analysis, as mentioned a few pages back.

The out-of-the-box visualisations are centered around zero DC and extend to +1 amplitude towards the top and -1 amplitude at the bottom of the window.

The upper bound of the waveform is formed by the Maximum values, the lower bound of the waveform is formed by the Minimum values and the RMS values are symmetrical around zero.

Any surprises you see are likely due to that it picks the min/max value over each chunk, and that I mixdown before analyzing. I have pondered doing the analysis per-channel and doing the mixdown later.
Title: foo_wave_seekbar
Post by: drmrbrewer on 26 January, 2010, 05:28:58 AM
Maximum and Minimum of what? 

So the overall separation of the two traces is meant to represent loudness, while the variation in each trace is meant to represent variation in Maximum value (for upper trace) and Minimum value (for lower trace)?  It's just that some tracks seem overall to be fairly quiet, but the separation between tracks is quite high, and in some tracks the variation in audio seems quite low but the traces show a high variation.

And what determines where +1 and -1 are -- is it normalised per track, or is it consistent across tracks?  Sometimes, for particularly "messy" traces, the trace appears as if it is oscillating so much that it is off the scale.  Do you take account of replaygain values?

Thanks,

Mike
Title: foo_wave_seekbar
Post by: Zao on 26 January, 2010, 09:16:21 AM
Maximum and minimum of decoded floating point audio amplitude.
As I said earlier, tracks where the channels are out of phase will bloat or reduce the measurements, as I work on the downmixed data.

An amplitude of 1.0 is equivalent to the maximum value representable in a regular integer-based format. Similarly, -1.0 is the minimum value representable in a integer-based format. Unless audio is glitched or decoders overshoot, you will be much outside [-1.0, 1.0].

It is not normalized in any form, it's the raw downmixed output from the decoder. All four ReplayGain values are available but they are not taken into account in the default effect or frontends.
Title: foo_wave_seekbar
Post by: ExUser on 26 January, 2010, 01:12:51 PM
"Bug": When foo_wave_seekbar is installed on a machine without the DirectX redist, clicking on the place where the wave seekbar should be causes the current track to restart.
Title: foo_wave_seekbar
Post by: drmrbrewer on 26 January, 2010, 03:10:18 PM
Would it be possible to add an option *not* to write signatures to the database?  On my system it only takes ~ two seconds to generate the signature after the new track starts, and it really doesn't bother me that the signature only flashes up after two seconds.  Otherwise the signature database will continue to grow and grow... mine is up to 7 GB already and I've only been using it on and off for a few days now.

Mike
Title: foo_wave_seekbar
Post by: _oao on 26 January, 2010, 03:14:38 PM
mine is up to 7 GB already and I've only been using it on and off for a few days now.
weird, i'm using this component since the official release and my "wavecache.db" file is only 83.8MB...
Title: foo_wave_seekbar
Post by: drmrbrewer on 26 January, 2010, 03:25:27 PM
weird, i'm using this component since the official release and my "wavecache.db" file is only 83.8MB...


I couldn't find a red-faced smiley to insert here to indicate my embarrassment.  OK, OK, it's only MB not GB!  Still, the database will just keep growing in size, whereas personally I don't see the need to store the results for future use at all.  A 2 second delay for the results appear really doesn't bother me, and I'd prefer that to thinking of this ever-growing signature database lurking on my system.

Mike
Title: foo_wave_seekbar
Post by: Zao on 26 January, 2010, 07:10:29 PM
Canar: You're probably seeking to the first second or so, I'd reckon.
drmrbrewer: I guess you could create a file in its place, setting permissions to VERBOTEN, preventing the component from using it. Theoretically.

I'll probably add a transient mode to preferences the day I get around adding a preferences page. Real life is rather bogged down currently, so this component is on the back burner for now.
Title: foo_wave_seekbar
Post by: ExUser on 26 January, 2010, 08:24:37 PM
That's it. Could we change it to do nothing in that case? Just display an empty frame?
Title: foo_wave_seekbar
Post by: Zao on 27 January, 2010, 12:42:00 AM
It should be falling back to the fully functional GDI mode. You should see something, even if the view state (track length, etc) fails to propagate.
Title: foo_wave_seekbar
Post by: jeremija on 27 January, 2010, 03:45:41 AM
Would it be possible to add the option to manually start the plugin via the View -> Visualization -> Wave seekbar (like other visualizations included in foobar2000), so that I don't actually have to have the panel included in my config, but can open it at will?
Title: foo_wave_seekbar
Post by: bb10 on 27 January, 2010, 01:57:25 PM
Would it be possible to add the option to manually start the plugin via the View -> Visualization -> Wave seekbar (like other visualizations included in foobar2000), so that I don't actually have to have the panel included in my config, but can open it at will?

This is not a visualization though...
Title: foo_wave_seekbar
Post by: jeremija on 28 January, 2010, 05:10:10 AM
Just because it doesn't use FFT analysis and display it with all of the fancy effects or doesn't animate much, it doesn't mean that it couldn't be considered a music visualization. It's like a static oscilloscope, or an oscilloscope which displays once already recorded data. If the author likes that idea and has the will to do it, I really don't see no reason why it could not be implemented from the technical point of view.
Title: foo_wave_seekbar
Post by: 2E7AH on 28 January, 2010, 05:28:53 AM
I think he meant that it doesn't use visualization API, while Zao is considering some kind of switch for non media library files AFAIK, which is closest to what you asked, or if I misunderstood you can use it with dockable panels
Title: foo_wave_seekbar
Post by: Axon on 28 January, 2010, 05:15:52 PM
So, there is a lot of profound awesomeness in this plugin, and I am using it, but I'm still a little critical.

First, I don't consider my system that sluggish - a P4 2.4 with a 6600GT running XP with two monitors in horizontal span mode - but it seems like running D3D mode in parallel with anything else using D3D (in my case, JEdit, making use of Java2D's D3D acceleration) occasionally sucks CPU like a dog. It goes away when I minimize foobar2000. I'm not really sure this is your problem to begin with, but it sure is aggravating.

Using pixel shaders on a 2D texture to encode a 1D height map has to be akin to drilling holes in wood with a 10-gauge. Wouldn't this have been easier to write in assembly language?  You're basically using several gigaflops of computing power, to.... draw a few lines.
Title: foo_wave_seekbar
Post by: Zao on 28 January, 2010, 07:58:35 PM
Your problem probably lies mostly with running XP, I'd reckon.
Multiple concurrent D3D/GL contexts tend to interfere on XP, especially with multiple monitors involved. I may be able to make the component be kinder to such situations, but it's not high on the priority list as I do not have any living non-virtual XP machines. Most have exploded.

As for using pixel shaders, it's a matter of programmability. End users can customize the look greatly in a language suitable for the task. I do agree that it's slightly overkill though, but you should be happy to know that the Direct3D10 frontend isn't up to date.

As for update rate, I intend to make it configurable to lessen the load for the kind of people that do not need super-smooth sub-pixel position indicator movement.
Title: foo_wave_seekbar
Post by: jeremija on 29 January, 2010, 07:00:26 AM
I think he meant that it doesn't use visualization API, while Zao is considering some kind of switch for non media library files AFAIK, which is closest to what you asked, or if I misunderstood you can use it with dockable panels

Yeah, I meant something like that, but AFAIK dockable panels are a bit outdated so I made a suggestion because this component is a really useful tool, but looks better on bigger layouts...
Title: foo_wave_seekbar
Post by: Zao on 29 January, 2010, 02:15:26 PM
If there is some standalone UI element host in the API I can use, it wouldn't be horribly hard. If there's not, I'm not going to implement my own.
Title: foo_wave_seekbar
Post by: Caleb on 29 January, 2010, 05:43:42 PM
I'm running Win7 with fb2k 1.0 here, and for some reason I don't get the waveform at all.

I right clicked on a track (FLAC), chose Extract Seekbar Signature, and then created a Waveform UI Element in the Scratchbox.
I can seek by clicking on various locations on it, but I do not see a waveform.
Title: foo_wave_seekbar
Post by: jeremija on 29 January, 2010, 06:41:44 PM
did you try to restart the player after adding the panel to the main layout?
Title: foo_wave_seekbar
Post by: Caleb on 30 January, 2010, 02:11:30 AM
did you try to restart the player after adding the panel to the main layout?


That did the trick, thanks.

Too bad this cannot go on the actual toolbar on top and replace the real seekbar.

Another feature suggestion: hovering the mouse on various positions could show a "ghost" seeker there and show the time of that spot in a hint or whatever.
Title: foo_wave_seekbar
Post by: jeremija on 30 January, 2010, 02:45:42 AM
This has already been requested multiple times:
check the on-line bug/feature tracker: http://zao.se:8080/flyspray/ (http://zao.se:8080/flyspray/)
Title: foo_wave_seekbar
Post by: marc2003 on 01 February, 2010, 03:05:33 AM
first of all, thanks to Zao for this component.

i just have a little query though - i have no idea about audio analysis or how this works but most of my library shows a nice symmetrical result. but listening to one album this morning (Underworld - Second Toughest In The Infants) is showing these odd patterns. i'm just wondering if anybody has any idea why this is?

(https://hydrogenaud.io/imgcache.php?id=e2f364cd205177d5a1bf2ca20f0cef57" rel="cached" data-warn="External image, click to view at original size" data-url="http://k5sbdw.blu.livefilestore.com/y1ptSdos-zDaCHtIlCJrjem-pNV9TPucqoZzpk4x1DijMhuA7nbO8PCINmaGPnSE5gOGi9kWMolD6i7rk5XgD1mRilRNz4qddYt/underworld3.png)

(https://hydrogenaud.io/imgcache.php?id=80a15988c2c6ea2d2a0869b939e92726" rel="cached" data-warn="External image, click to view at original size" data-url="http://k5sbdw.blu.livefilestore.com/y1p9dqi2YGpXkRvPf_KMopoQIse08_lqUSA39dgflVW7YjG4otFUMxLwYOhcSLDPIJjQmYfZoSIhXV4hBDVyoXEIUW4Q_0RTDnX/underworld4.png)


Title: foo_wave_seekbar
Post by: fuflo on 01 February, 2010, 03:22:52 AM
yeah, i noticed some anomalies myself. by the idea it would seem that the wave should always be symetrical vertically, but i had a couple of tracks where for several seconds the wave is a little dropped. i'll post screenies when i find the specific tracks (if that's needed) ...
Title: foo_wave_seekbar
Post by: Zao on 01 February, 2010, 04:04:45 AM
That's how the track really looks, for certain values of "looks".
A sound wave is a sequence of signed amplitude samples, which are measured against a zero reference. When playing back, zero is no speaker movement while positive/negative amplitudes translate to movement along the speaker element axis.
There's nothing that says that a waveform should be symmetrical, it's just that most of them tend to be. In computer generated music, especially chiptunes and old video game music, it's quite common with lopsided signals.
Also, as previously mentioned, I downmix before analyzing, and a downmix will always be vulernable to phase shifts.
(https://hydrogenaud.io/imgcache.php?id=2d38f3beb2cee3f8adb2059c4d4414da" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar27_t.png) (http://www.acc.umu.se/~zao/seekbar27.png)
Title: foo_wave_seekbar
Post by: fuflo on 01 February, 2010, 04:52:56 AM
oh.. i didn't thought of that. i thought it only measured amplitude.. well that's an oversight by me, thanks for clearing that up
Title: foo_wave_seekbar
Post by: dutch109 on 03 February, 2010, 04:21:30 PM
Bug report :
When the converter is active on a playlist while playing another, the component seems to analyze the tracks of the converting playlist, not the one that is playing, thus the seekbar is displayed empty.

Awesome component by the way.

EDIT : False alert, the waveform is displayed after ~1min, probably because the converter is eating all the CPU time, and the analyzing thread is running at a low priority.
Title: foo_wave_seekbar
Post by: Zao on 03 February, 2010, 08:24:46 PM
The worker threads intentionally have idle priority to not impact the system or the rest of foobar.
Title: foo_wave_seekbar
Post by: Jack Schmaltz on 04 February, 2010, 01:25:39 PM
hey Zao, thank you for this great component, i have been enjoying it for a few weeks now.

iv ran into a very strange problem today however that appears to be due to wave seekbar.
when im playing a particular album (Venetian Snares - Printf) it takes over a minute to analyze the next track & in the process freezes foobar making it completely unresponsive.
iv tried other tracks since noticing this issue & they work fine as usual, only appears to be isolated to the tracks on this one album.

i dont know what other information i can provide at the moment as all that shows up in the console is track start then a minute later the wave seekbar finalization text.
however, if i can provide more info please ask.

thanks again

(https://hydrogenaud.io/imgcache.php?id=0a709dc79fc3c84d995072f2c1a83c2a" rel="cached" data-warn="External image, click to view at original size" data-url="http://i280.photobucket.com/albums/kk161/jackschmaltz/wave_analyze.png)
Title: foo_wave_seekbar
Post by: Zao on 15 February, 2010, 12:34:48 AM
I have breathed life into my old P2 which contains a Geforce FX 5600 card on XP, and the seekbar runs perfectly fine, so I cannot reproduce the failure you two FX guys cited.
Title: foo_wave_seekbar
Post by: marc2003 on 15 February, 2010, 07:37:34 AM
is the component analysing the same track twice when there is only 1 item in the playlist? i just noticed this in my console....

Code: [Select]
Wave cache: finished analysis of "F:\downloads\DJ_Retardo_-_What_the_North_Koreans_listen_to-Feb-2010\DJ_Retardo_-_What_the_North_Koreans_listen_to-Feb-2010.mp3"
Wave cache: finished analysis of "F:\downloads\DJ_Retardo_-_What_the_North_Koreans_listen_to-Feb-2010\DJ_Retardo_-_What_the_North_Koreans_listen_to-Feb-2010.mp3"

Title: foo_wave_seekbar
Post by: Zao on 15 February, 2010, 11:43:35 AM
Yes. Until a track has been fully scanned and recorded into the database, it is possible to trigger additional scans. In your case, it's from the "scan next track in advance for linear playback orders" logic that enqueues it.
They are harmless and will just burn a bunch of CPU.
Title: foo_wave_seekbar
Post by: kopf on 16 February, 2010, 05:51:16 PM
Can't add this DUI element to foobar v1.0 without having it crash foobar.

Let us know when it's stable and doesn't just invariably shit the bed.
Title: foo_wave_seekbar
Post by: marc2003 on 16 February, 2010, 06:03:05 PM
it works fine in DUI/foobar v1 for me. i think the problem is at your end. 

is your hardware up to it? directx upto date as outlined in the opening post?
Title: foo_wave_seekbar
Post by: Zao on 17 February, 2010, 12:37:21 AM
Can't add this DUI element to foobar v1.0 without having it crash foobar.
Let us know when it's stable and doesn't just invariably shit the bed.

Thank you for the encouraging feedback. Your crashes are Module Not Found while delay-loading d3dx10_42 for some reason. This is very strange, as you've successfully passed the d3dx9_42.dll test. Are you sure that you have installed the DirectX redist for August 2009 or later (February 2010 is available). The only reason I could see for such a crash would be someone grabbing single DirectX components and throwing them into the SysWoW64 folder.
Title: foo_wave_seekbar
Post by: kopf on 17 February, 2010, 03:58:35 AM
Can't add this DUI element to foobar v1.0 without having it crash foobar.
Let us know when it's stable and doesn't just invariably shit the bed.

Thank you for the encouraging feedback. Your crashes are Module Not Found while delay-loading d3dx10_42 for some reason. This is very strange, as you've successfully passed the d3dx9_42.dll test. Are you sure that you have installed the DirectX redist for August 2009 or later (February 2010 is available). The only reason I could see for such a crash would be someone grabbing single DirectX components and throwing them into the SysWoW64 folder.


You're very welcome for the crude feedback. I installed the dx redist and all's working now. That hadn't occured to me to be the possible source of the problem, since I'd installed dx with a game or two, and everything else that'd been using it was happy with that setup - i figured it was installed in its entirity.

cheers for the help zao, plugin looks gut
Title: foo_wave_seekbar
Post by: xapz on 18 February, 2010, 10:17:34 AM
This plugin is just awesome. I don't now how I could live without it for so long. 

I'm streaming all my music in FLAC from my NAS and at the beginning I was afraid the caching of the waveform data could be very slow, but it works like a charm.

Thank you very much Zao and keep up the good work! 
Title: foo_wave_seekbar
Post by: dhromed on 25 February, 2010, 06:17:50 PM
Most excellent!

I'm just letting it draw from the layout colours; will play around with that later.

An issue: the highlight doesn't advance smoothly like the vertical bar. I tried to set it up so that the bar would be gone (0px), but highlight would stll be there, and it seems it advances a whole pixel at a time.
Title: foo_wave_seekbar
Post by: Zao on 25 February, 2010, 08:08:34 PM
An issue: the highlight doesn't advance smoothly like the vertical bar. I tried to set it up so that the bar would be gone (0px), but highlight would stll be there, and it seems it advances a whole pixel at a time.

The highlight indeed does, as it's just a binary test per pixel whether it represents a past or future part.
If you want some light smoothing, consider a same-coloured position bar maybe, or if you're using the D3D frontend, maybe hack around a bit in the highlighting function.
I didn't put much time on smoothness for the played overlay, as the edge is hidden by the cursor.
Title: foo_wave_seekbar
Post by: dano on 25 February, 2010, 08:49:31 PM
Is it possible to remove dead entries from the .db file?
Title: foo_wave_seekbar
Post by: Anomalous on 25 February, 2010, 09:09:38 PM
Library > Remove Dead Waveforms

Also, any possibility of getting a fix for the freezing when the computer is locked (win+L)?
Title: foo_wave_seekbar
Post by: Zao on 26 February, 2010, 09:16:52 AM
Depends. I haven't reproduced it here yet, so it's a bit hard to figure out what's wrong.
I do have some theories, but haven't verified them yet, I probably do not handle lost devices that well.

Does it break on lock even if you have say the GDI or Direct2D frontend, or heck, if you remove all visible bars?
Title: foo_wave_seekbar
Post by: Anomalous on 26 February, 2010, 09:45:23 AM
When a song ends, the cpu usage goes to 50% (one core), and the next song does not play. Unlocking the computer resumes playback with no errors or anything in the console. This only happens with "Direct 3D 9.0c", removing the UI element also stops the problem from occurring. Possibly related, Process Explorer crashes when viewing foobar's threads, and foo_wave_seekbar.dll seems to be creating and destroying them like crazy even without the UI element visible.
Title: foo_wave_seekbar
Post by: Zao on 27 February, 2010, 01:23:38 AM
The Process Explorer bug is a bug with Process Explorer which I have contacted the author about. The seekbar does not create threads like crazy, it's the long symbol names in the DLL that confuses it.
Title: foo_wave_seekbar
Post by: dhromed on 28 February, 2010, 11:25:00 AM
Suddenly, the seekbar in D2D mode has decided to go to town on one of my cores, occupying between 50% and 100%. It affects the entire computer to the point where I can hardly browse folder in Explorer.

If I remove it from the layout or minimze Foobar or choose GDI, it all returns to normal instantly.

:\

What more details can I provide?
Title: foo_wave_seekbar
Post by: Zao on 28 February, 2010, 11:38:39 AM
Suddenly, the seekbar in D2D mode has decided to go to town on one of my cores.
What more details can I provide?

I haven't had this happen on any machine I own, but you're not alone.
What OS and GPU are you on? If on Vista or Seven, do you use accelerated Aero or Aero Basic?
Title: foo_wave_seekbar
Post by: dhromed on 28 February, 2010, 02:30:53 PM
XP SP3 Classic shell, Ati HD4850, AMD 5050e.
Catalyst 9.3, 2D Driver Version 6.14.10.6925
DX 4.09.000000000000000000(000)00000.0904

Title: foo_wave_seekbar
Post by: unclean on 28 February, 2010, 06:10:37 PM
Thank you for this component, it's amazing! Second only to the Channel spectrum panel, I think.

My only problem with it is that it makes resizing foobar incredibly sluggish even after it's hidden with $showpanel in pss, which is something that doesn't seem to happen with other visualizations. Would be nice if it removed itself from memory when it isn't visible (or whatever it is that's happening).

Other then that good job

Title: foo_wave_seekbar
Post by: Zao on 28 February, 2010, 09:31:23 PM
... it makes resizing foobar incredibly sluggish even after it's hidden with $showpanel in pss, ...
Any malfunctions when hosted in CUI are probably due to differences in how CUI handles hidden panels, as I use DUI for development and daily use.
Title: foo_wave_seekbar
Post by: 2E7AH on 28 February, 2010, 09:46:09 PM
here is some Yirkha and musicmusic talk concerning stopping Shpeck when CUI panel isn't visible: http://www.hydrogenaudio.org/forums/index....st&p=609073 (http://www.hydrogenaudio.org/forums/index.php?showtopic=59388&view=findpost&p=609073)
Title: foo_wave_seekbar
Post by: unclean on 01 March, 2010, 06:33:48 PM
Thank you for that! Resizing the width and height to zero does the trick.
Title: foo_wave_seekbar
Post by: sld on 02 March, 2010, 05:08:44 AM
Hi Zao, is the Direct2D display anomaly at high DPI due to driver limitations, and can it be worked around?
Title: foo_wave_seekbar
Post by: Zao on 02 March, 2010, 08:42:55 AM
No, it's solely in my code. I've made some misunderstanding of how Direct2D handles and propagates DPI, and it has worked properly in the past.
I'll fix it some day when I get around working on the seekbar again, I've been rather swamped with other work lately.
Title: foo_wave_seekbar
Post by: sld on 02 March, 2010, 12:00:38 PM
I'm already happy knowing that it's not some fungled-up shoddy coding in Intel's drivers. I'm currently experiencing the same problem in Firefox's DirectWrite alpha. So it can be rectified after all!

Please don't rush a hobby project, whatever brings in the salary is more important. In fact, GDI looks sweeter than Direct2D in the Wave seekbar, just that Direct2D is smoother. Thanks for the good news and a cool component.
Title: foo_wave_seekbar
Post by: servimo on 03 March, 2010, 12:37:18 AM
Nice component. I am seeing it in many screenshots.
Title: foo_wave_seekbar
Post by: Zao on 04 March, 2010, 07:20:55 PM
I got around rolling up accumulated changes and hacks into a release, this should fix assorted crashes and niggles, including high DPI mode, probably.
Title: foo_wave_seekbar
Post by: sld on 05 March, 2010, 01:52:06 AM
Hey thanks for the PM! It's amusing to know that I was using an upside-down seekbar all this while, but it's been great to be able to easily seek back to sections of songs I'm trying to figure out guitar chords for every now and then.

The DPI problem is gone. My laptop uses 945GM graphics, so it's probably the lowest common denominator to bugfix compatibility for. The Firefox devs working on D2D should use your component as inspiration!
Title: foo_wave_seekbar
Post by: tits on 05 March, 2010, 06:51:23 PM
please anybody help me to place this seekbar in this way:
(https://hydrogenaud.io/imgcache.php?id=1a9a6594514711c02c2bb6c0b3e226d2" rel="cached" data-warn="External image, click to view at original size" data-url="http://img94.imageshack.us/img94/5243/picki.th.jpg) (http://img94.imageshack.us/i/picki.jpg/)
Title: foo_wave_seekbar
Post by: emitter on 05 March, 2010, 07:30:56 PM
A big disadvantage to the normal "boring" Seekbar is, that i don't see in to which minute or second i search, can u add this?
Title: foo_wave_seekbar
Post by: emitter on 05 March, 2010, 07:33:08 PM
please anybody help me to place this seekbar in this way:
(https://hydrogenaud.io/imgcache.php?id=1a9a6594514711c02c2bb6c0b3e226d2" rel="cached" data-warn="External image, click to view at original size" data-url="http://img94.imageshack.us/img94/5243/picki.th.jpg) (http://img94.imageshack.us/i/picki.jpg/)


I would like it too like this on your screenshot!
Title: foo_wave_seekbar
Post by: Gapkiller on 05 March, 2010, 08:33:36 PM
please anybody help me to place this seekbar in this way:
...snip...


please post a screenshot of your splitter settings...(Columns Ui\Layout Tab)
Title: foo_wave_seekbar
Post by: tits on 05 March, 2010, 08:45:09 PM
please post a screenshot of your splitter settings...(Columns Ui\Layout Tab)


(https://hydrogenaud.io/imgcache.php?id=3827e5310b237e1f7c2c7073fe629046" rel="cached" data-warn="External image, click to view at original size" data-url="http://img31.imageshack.us/img31/2723/pic2pz.th.jpg) (http://img31.imageshack.us/i/pic2pz.jpg/)
Title: foo_wave_seekbar
Post by: Gapkiller on 05 March, 2010, 08:54:21 PM
right click the second panel stack splitter and insert a vertikal splitter.
right click that vertikal splitter and insert waveform seekbar.
move the vertikal splitter up until you are between the panel stack splitters on the third level.

done.

edit: oh and remove the other waveform seekbar..
Title: foo_wave_seekbar
Post by: tits on 05 March, 2010, 09:10:00 PM
right click the second panel stack splitter and insert a vertikal splitter.
right click that vertikal splitter and insert waveform seekbar.
move the vertikal splitter up until you are between the panel stack splitters on the third level.

done.

edit: oh and remove the other waveform seekbar..


Thank you so much!!!
Now everything is just like I want.
Title: foo_wave_seekbar
Post by: Zao on 06 March, 2010, 11:37:48 AM
A big disadvantage to the normal "boring" Seekbar is, that i don't see in to which minute or second i search, can u add this?

I intend to have a tooltip, eventually.
Title: foo_wave_seekbar
Post by: DragonQ on 06 March, 2010, 08:20:34 PM
A big disadvantage to the normal "boring" Seekbar is, that i don't see in to which minute or second i search, can u add this?

I intend to have a tooltip, eventually.


Awesome, this is the only thing preventing me from using this instead of the normal seek bar.
Title: foo_wave_seekbar
Post by: emitter on 07 March, 2010, 06:45:12 AM
right click the second panel stack splitter and insert a vertikal splitter.
right click that vertikal splitter and insert waveform seekbar.
move the vertikal splitter up until you are between the panel stack splitters on the third level.

done.

edit: oh and remove the other waveform seekbar..


Can i get the Seekbar just like he do without using colums UI? I like the default theme ;-)
Title: foo_wave_seekbar
Post by: Zao on 07 March, 2010, 07:55:52 AM
Naturally. Just go into edit mode and add splitters where suitable.
If you're inexperienced with the Default UI, there is a "sandbox" you can play around in.
Title: foo_wave_seekbar
Post by: emitter on 07 March, 2010, 02:21:24 PM
Naturally. Just go into edit mode and add splitters where suitable.
If you're inexperienced with the Default UI, there is a "sandbox" you can play around in.


Sry im new in foobar editing and a got no plan how i do that ^^ is there anywhere a guide for the editing mode?
Title: foo_wave_seekbar
Post by: Jack Schmaltz on 07 March, 2010, 02:57:36 PM
theres an overview here http://wiki.hydrogenaudio.org/index.php?ti...28foo_ui_std%29 (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Default_user_interface_%28foo_ui_std%29) with links to more info.
just mess around with it, its not overly complicated.
Title: foo_wave_seekbar
Post by: emitter on 07 March, 2010, 03:23:56 PM
theres an overview here http://wiki.hydrogenaudio.org/index.php?ti...28foo_ui_std%29 (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components/Default_user_interface_%28foo_ui_std%29) with links to more info.
just mess around with it, its not overly complicated.


Omg i didn't really know how awesome this program is!!!

A little Question in the false Forum ^^ --> Can i or how can i rename the tabs (Playing, Artist Album, Track No...)
Title: foo_wave_seekbar
Post by: boombaard on 09 March, 2010, 04:27:40 AM
Could you add a "force rescan waveform" option? I recently had a few tracks i'd mis-tagged (wrong order), and after I fixed the tags and renamed them again, the old waveforms still applied to the new tracks, with no way to fix them.
Title: foo_wave_seekbar
Post by: Zao on 09 March, 2010, 02:17:13 PM
Odd, I'm fairly sure that scanning tracks through the context menu will clobber any existing data. It may have silently broken, of course. If all else fails, open the database file with a sqlite3 tool and delete the relevant rows.
You could also move the files temporarily, invoke Library -> Remove Dead Waveforms, and move them back.
Title: foo_wave_seekbar
Post by: eerg on 10 March, 2010, 07:40:23 AM
is there a possibility to scan whole playlist before playing song? my foobar freezes for 5-10 seconds while loading new song. i would like to scan every file on playlist, and then fluently change them without necessity to wait. "extract seekbar signature" doesnt work. i think it is not caused by computer (i7 720, ati 4650).

also could you please paste your seekbar.fx with 3d effect?

Title: foo_wave_seekbar
Post by: Zao on 10 March, 2010, 10:53:32 AM
If your foobar freezes when decoding a song, you've got something fishy going on. Does it wedge if you use say the converter or checksum a file?
I highly doubt that it's this component, as all it does is a full decode and stores the results in a database.

Try doing it with a pristine portable installation with no other components.
Title: foo_wave_seekbar
Post by: freestyler on 10 March, 2010, 02:45:43 PM
Can anyone write step by step how to make the plugin appear on foobar screen?
I can't figure it out.
Title: foo_wave_seekbar
Post by: eerg on 10 March, 2010, 03:01:41 PM
thank you Zao, i think biography plugin caused those freezes. on new portable installation it works really smooth.

freestyler, it depends on which user interface you are using. if its default, then go to view > enable layout edition mode, and then just put wave seekbar somewhere

if its columns ui, then you should go to preferences > diplay > columns ui> layout
Title: foo_wave_seekbar
Post by: cwilliams on 10 March, 2010, 10:41:56 PM
Thanks for the awesome plugin Zao, I love it!

I have what might be viewed as an odd feature request. Can there be a user definable boost in the db calculated by the waveform?

I replaygain all my tracks to 89db. I apply the replaygain to the MP3s themselves, so any of my many uses of my music (streamed from my comp, MP3 cds, put on my phone, etc.) all have a nice level even if they don't support replaygain. The side effect of this is all my waveforms become compressed. See the attached screenshot:

(https://hydrogenaud.io/imgcache.php?id=63f60a4d3badfc080875869c77017803" rel="cached" data-warn="External image, click to view at original size" data-url="http://lh4.ggpht.com/_nLkAIczqfjk/S5hlsEgD3YI/AAAAAAAAGMA/70D7CBZd9BY/s144/example.jpg) (http://picasaweb.google.com/lh/photo/vXt8-mWwaW1gXx3l-pwJIg?authkey=Gv1sRgCKn_w_Ctu5ebQQ&feat=embedwebsite)

A way to configure a db boost, or possibly have waveform automatically use all the available vertical space, would bring the nice looking waveforms that exist before I apply the replaygain.

Thanks again for the plugin!
Title: foo_wave_seekbar
Post by: Zao on 10 March, 2010, 11:07:11 PM
If you're using the Direct3D mode, you can always modify the .fx file to apply a compensating scale.
Title: foo_wave_seekbar
Post by: cwilliams on 10 March, 2010, 11:17:14 PM
If you're using the Direct3D mode, you can always modify the .fx file to apply a compensating scale.

I opened that file, only to immediately realize I was in over my head

On more thought, and playing with other filetypes I have (such as emulated formats .nsf, .spc etc.) a static scale increase won't work to do what I am picturing. I guess the request would then be for a optional feature to automatically scale the waveform to fill most the vertical space. It just looks so much better that way

Thanks for the quick reply and awesome plug in.
Title: foo_wave_seekbar
Post by: Zao on 10 March, 2010, 11:25:08 PM
My ulterior motive with this component is to educate the unwashed masses in the finer points of programmable shader pipelines.
Anyway, I'll put it on the todo, if it's not already there somewhere.
Title: foo_wave_seekbar
Post by: cwilliams on 10 March, 2010, 11:39:00 PM
My ulterior motive with this component is to educate the unwashed masses in the finer points of programmable shader pipelines.

Hahaha, I knew there was more to your plan.

Anyway, I'll put it on the todo, if it's not already there somewhere.

Cool, if you get to it, great. Even if you don't, I'm still using and loving this plugin so thanks!
Title: foo_wave_seekbar
Post by: Zao on 14 March, 2010, 09:30:19 PM
Could you add a "force rescan waveform" option? I recently had a few tracks i'd mis-tagged (wrong order), and after I fixed the tags and renamed them again, the old waveforms still applied to the new tracks, with no way to fix them.

That feature accidentally disappeared when reworking the queue system a few versions ago. It should be fixed for the next version, which also will have a rewritten analysis core, which will cure most phase issues.
Title: foo_wave_seekbar
Post by: Zao on 15 March, 2010, 03:30:35 AM
I've made some work towards supporting multiple channels.
If I decide to do that, there will be slightly more work when loading the waveform as well as an increase in database disk usage (probably) linear to the number of channels.
Is this something that's acceptable? I've added transparent compression so the hit should probably be around 1-1.5x for stereo files, tops.
Title: foo_wave_seekbar
Post by: 2E7AH on 15 March, 2010, 04:35:57 AM
How and why would it affect stereo file behavior?
Title: foo_wave_seekbar
Post by: Zao on 15 March, 2010, 05:10:40 AM
Because currently I only persist a single channel of mixed down information.
The proposal is to persist each channel individually and display either a mixed down display or separate channel displays.
Title: foo_wave_seekbar
Post by: 2E7AH on 15 March, 2010, 05:41:25 AM
OK, waiting for your implementation 
It's not very clear to me what you mean with 1-1.5x: is it additional CPU work or you talk about disk space increase compared to current for stereo files
I take your talk for CPU when scanning stereo files
Title: foo_wave_seekbar
Post by: cwilliams on 15 March, 2010, 11:49:45 AM
I've made some work towards supporting multiple channels.
If I decide to do that, there will be slightly more work when loading the waveform as well as an increase in database disk usage (probably) linear to the number of channels.
Is this something that's acceptable? I've added transparent compression so the hit should probably be around 1-1.5x for stereo files, tops.


I think any increase in CPU usage for extracting the waveform is acceptable because of the extract seekbar option that lets me do all that work up front anyway. 50% increase filesize for double the channels seems reasonable to me as well, I say go for it.
Title: foo_wave_seekbar
Post by: Zao on 15 March, 2010, 05:58:55 PM
The analysis will take twice as long for stereo, six times as long for 5.1, etc. That's already implemented, and won't change.
The disk storage will double for stereo files, etc. Although, with compression, I expect it to rise with 50% or so, at most.
There will be a slight increase in CPU usage for loading a waveform, but it's neglible as the amounts of data is so small.
Title: foo_wave_seekbar
Post by: 2E7AH on 15 March, 2010, 06:05:13 PM
What will happen with current data?
Title: foo_wave_seekbar
Post by: Zao on 15 March, 2010, 07:25:48 PM
Currently, old data is untouched. It will probably be interpreted as a mono signal.
Rescanning files will replace them with the new format, with multiple channels and compression.
I could implement some compression functionality of old data, but as the generation method has changed, one probably wants to rescan anyway.
Title: foo_wave_seekbar
Post by: 2E7AH on 15 March, 2010, 07:36:13 PM
Don't want to sound demoralizing but I would also appreciate option not to use this advanced feature if it's somehow possible without sticky "last working for me version" option

Maybe:
- prolong CPU and storage even further with providing "mixed" mode data in normal state, and
- just work (scan and show) in "mixed" mode for users who want single wave representation
Title: foo_wave_seekbar
Post by: NullString on 15 March, 2010, 10:05:34 PM
rescanning would be odd, but nothing serious
compression is appreciated. the db weights a lot currently, even with just mono signatures
Title: foo_wave_seekbar
Post by: labou on 17 March, 2010, 12:59:39 AM
For me it does not show up at all. the panel just remains blank and if i click on it it restarts the song. that's it. I installed the DirectX August 2009 Redistributable and the DirectX February 2010 runtime redistributable. I also installed Microsoft Visual C++ 2008 Redistributable Package (x86), but im sure that was useless because im running windows 7 ultimate x64. any ideas about how to fix this?
Title: foo_wave_seekbar
Post by: wasmachien on 17 March, 2010, 11:55:41 AM
For me it does not show up at all. the panel just remains blank and if i click on it it restarts the song. that's it. I installed the DirectX August 2009 Redistributable and the DirectX February 2010 runtime redistributable. I also installed Microsoft Visual C++ 2008 Redistributable Package (x86), but im sure that was useless because im running windows 7 ultimate x64. any ideas about how to fix this?

Try right clicking, configure, and replacing DirectX with GDI. That worked for me.

Great component by the way, the only thing that lacks for now is a tooltip to indicate the track time.
Title: foo_wave_seekbar
Post by: servimo on 17 March, 2010, 02:39:37 PM
Don't want to sound demoralizing but I would also appreciate option not to use this advanced feature if it's somehow possible without sticky "last working for me version" option

Maybe:
- prolong CPU and storage even further with providing "mixed" mode data in normal state, and
- just work (scan and show) in "mixed" mode for users who want single wave representation

I want this too. My computer is slow and old. And I am happy with just showing the mixed way. But sometimes I want to see how the stereo is, or how the multiple channels looks. If there is some difference between channels.
Title: foo_wave_seekbar
Post by: ExUser on 17 March, 2010, 03:04:34 PM
There will likely be no significant speed difference between the "old", mono scanning method and the new multi-channel one. There will be a bit more storage, that's about it. Those of you with slow computers do not fear! Zao still loves you.
Title: foo_wave_seekbar
Post by: labou on 17 March, 2010, 03:49:48 PM
For me it does not show up at all. the panel just remains blank and if i click on it it restarts the song. that's it. I installed the DirectX August 2009 Redistributable and the DirectX February 2010 runtime redistributable. I also installed Microsoft Visual C++ 2008 Redistributable Package (x86), but im sure that was useless because im running windows 7 ultimate x64. any ideas about how to fix this?

Try right clicking, configure, and replacing DirectX with GDI. That worked for me.

Great component by the way, the only thing that lacks for now is a tooltip to indicate the track time.


I can't even do that. When I put it in a panel and right click the option that says waveform seekerbar is faded out
Title: foo_wave_seekbar
Post by: servimo on 17 March, 2010, 04:07:24 PM
For me it does not show up at all. the panel just remains blank and if i click on it it restarts the song. that's it. I installed the DirectX August 2009 Redistributable and the DirectX February 2010 runtime redistributable. I also installed Microsoft Visual C++ 2008 Redistributable Package (x86), but im sure that was useless because im running windows 7 ultimate x64. any ideas about how to fix this?

Try right clicking, configure, and replacing DirectX with GDI. That worked for me.

Great component by the way, the only thing that lacks for now is a tooltip to indicate the track time.


I can't even do that. When I put it in a panel and right click the option that says waveform seekerbar is faded out

Maybe you have to wait a little, like me, it will not show up immediately. It is not play a song and see the waveform. It have to seek in a song for peaks and then display. Happen this to me. I have an AMD XP 2400+ processor and no video card, 512MB RAM. I use GDI.
Title: foo_wave_seekbar
Post by: tom_vienna_at on 19 March, 2010, 08:53:12 AM
And here's (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=5609) a new modification of 'seekbar.fx' that scales the waveform according to Replay Gain data. By default, it will use the track gain; however, a quick edit of the file will enable the use of the album gain mode instead.


That modification would be oh-so-very useful for me, but for whatever reason it is not working... same waveform regardless if replaygain-values are present or not. Same waveform regardless of album- or track mode. Any idea? Thx.
Title: foo_wave_seekbar
Post by: mccarver on 19 March, 2010, 09:26:46 AM
That modification would be oh-so-very useful for me, but for whatever reason it is not working... same waveform regardless if replaygain-values are present or not. Same waveform regardless of album- or track mode. Any idea? Thx.


It works fine here.. Now waveforms seem to be RG-independent. But non replaygained files return an empty waveform. Guess it's normal.
Title: foo_wave_seekbar
Post by: Zao on 19 March, 2010, 09:36:07 AM
When querying for non-existant replaygain, the track and album gain is -1000, and the peaks are -1. Adjusting the effect to test for negative values will likely do the trick.
Title: foo_wave_seekbar
Post by: tits on 19 March, 2010, 11:28:07 AM
Just an idea where such seekbar will be also useful - a graphic scale in am/fm radio receiver. One will see the points where signal is clear.
Title: foo_wave_seekbar
Post by: Zao on 20 March, 2010, 07:32:03 PM
That would be quite out of scope of the component though, and more suitable for a domain-specific component, most probably integrated with whatever AM/FM tuner component you're using.
Title: foo_wave_seekbar
Post by: Zao on 27 March, 2010, 06:46:45 AM
A teaser of things to come:
(https://hydrogenaud.io/imgcache.php?id=9d497c48b1fa6b203227dce22a20a41a" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar31_t.png) (http://www.acc.umu.se/~zao/seekbar31.png) (https://hydrogenaud.io/imgcache.php?id=ddf19dbef9a0a219269eaf7916836e19" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar30_t.png) (http://www.acc.umu.se/~zao/seekbar30.png)

Is this configuration UI something that looks friendly and usable with regard to reordering the display of channels and toggling their visibility?

In my development version, it's fully functional and the Direct3D9 mode can display channels as can be seen in the above images. It also has other nice features like storage compression, optional multi-channel scanning and storage, an rescan command that actually works, and more. The next release will require some slight modifications to effect files to handle the additional texcoord parameter fed to it, but it should be a three line change in most cases.

And oh, before I forget it, a new Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) version has been released, which fixes the Process Explorer crash bug that my component caused due to being too awesome (and having too long symbols, but I blame it on being awesome).
Title: foo_wave_seekbar
Post by: cymoon on 28 March, 2010, 02:40:07 PM
Awesome. This is the feature I dreamed of.

It would be nice if it would be a part of the toolbar. So it could replace the seekbar completely.
Title: foo_wave_seekbar
Post by: Zao on 28 March, 2010, 02:56:21 PM
That is impossible for now, as there exists no published interface to augment the toolbar.
Title: foo_wave_seekbar
Post by: DragonQ on 30 March, 2010, 06:21:03 PM
Looks great Zao.

Probably wanna move those tick boxes to the right a bit, they look too close to the edge of the group box at the moment.
Title: foo_wave_seekbar
Post by: Zao on 30 March, 2010, 07:54:46 PM
That's how a list view with checkboxes looks natively. I will not muck around with owner drawing or other ill stuff. I value my sanity.
Title: foo_wave_seekbar
Post by: Zao on 31 March, 2010, 09:11:21 PM
0.2.0 released, see OP for a glorious changelog.
Highlights include multichannel display, fancy configuration for said display, multichannel analysis, storage compression.
Title: foo_wave_seekbar
Post by: 2E7AH on 31 March, 2010, 10:49:01 PM
Thanks Zao, looking good
Roughly I can't notice any difference in scanning speed which is great I guess
Title: foo_wave_seekbar
Post by: captorofsin on 01 April, 2010, 07:20:33 AM
Thank you! My Foobar looks so cool now with multichannel waveforms. 

This is a truly magnificent add on, keep up the good work Zao.
Title: foo_wave_seekbar
Post by: adam777 on 01 April, 2010, 11:05:47 AM
Thanks for the update, Zao, works great.
Title: foo_wave_seekbar
Post by: s33m33 on 01 April, 2010, 03:25:18 PM
Thanks Zao.

Excellent addon.
Title: foo_wave_seekbar
Post by: mudlord on 01 April, 2010, 06:12:40 PM
Very nice indeed.
Title: foo_wave_seekbar
Post by: TomBarlow on 02 April, 2010, 06:54:20 AM
Thanks for the latest version Zao, and thanks for blocking scanning of last.fm radio tracks. It doesn't interrupt playback anymore, but unfortunately it seems to try and scan them when they are the next thing in the playlist, so some tracks get skipped when foobar tries to play them.
Title: foo_wave_seekbar
Post by: Zao on 02 April, 2010, 11:45:40 AM
Hrm, odd. There should be no difference whatsoever between how the current and next tracks are auto-scanned.
Can you PM me your console contents when this happens?
Also, what is the URL/location of the entries it occurs on? Are they lastfm://, http://, or other?
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 02 April, 2010, 02:22:32 PM
thanks for blocking scanning of last.fm radio tracks.

Mine doesn't do that.  I'm using the latest 0.2.0 release, and I still get errors on Last.fm radio streams.  Any track that I select plays for a few seconds, then I get an error and it skips to the next track.  I'm using the Last.fm radio component, and the stream URLs begin with FOO_LASTFM_RADIO://.  If this protocol isn't automatically skipped, can it be?  Additionally, my http:// streams are also being scanned, but it's not causing problems (yet).
Title: foo_wave_seekbar
Post by: Zao on 02 April, 2010, 02:56:34 PM
I'll add those silly foo_lastfm_radio: and lastfm: protocols to the next version, but your HTTP claim bothers me.
Can you show a complete URL that it tries to scan together with the console output for it? If it contains sensitive fields like user/pass, censor those.
Note that messages like "Wave cache: skipping location ..." are from when the exclusion filter works. Any file that that message appears for will not be scanned.
Title: foo_wave_seekbar
Post by: TomBarlow on 02 April, 2010, 05:38:10 PM
Hmm it's started skipping tracks again. But the seekbar doesn't say it's scanning them, here's the console log:

Code: [Select]
Last.fm Radio: Handshake successful.
Last.fm Radio: Retrieved track "Fushitsusha [Pathetique] - Pathetique Pt. 2"
Last.fm Radio: Retrieved track "The Gerogerigegege [Tokyo Anal Dynamite] - Track 73"
Last.fm Radio: Retrieved track "Ruins [1986 - 1992] - Praha In Spring"
Last.fm Radio: Retrieved track "High Rise [Live] - Mainliner"
Last.fm Radio: Retrieved track "Keiji Haino with Boris [Black, Implication Flooding] - a rise, a moment before something unexpected is on the verge of starting"
Opening track for playback: "FOO_LASTFM_RADIO://play.last.fm/user/edbbe0bdade3d7d9d26c5c07e6e8d6c4.mp3LASTFM"
Last.fm Radio: Problem opening track "FOO_LASTFM_RADIO://play.last.fm/user/edbbe0bdade3d7d9d26c5c07e6e8d6c4.mp3LASTFM" : Forbidden (403)
Opening track for playback: "FOO_LASTFM_RADIO://play.last.fm/user/67467814a3f56101b38f7b014791fe6d.mp3LASTFM"
Last.fm Radio: Problem opening track "FOO_LASTFM_RADIO://play.last.fm/user/67467814a3f56101b38f7b014791fe6d.mp3LASTFM" : Forbidden (403)
Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"FOO_LASTFM_RADIO://play.last.fm/user/67467814a3f56101b38f7b014791fe6d.mp3LASTFM"
Opening track for playback: "FOO_LASTFM_RADIO://play.last.fm/user/a7890215f52583f3731a1c99d365026f.mp3LASTFM"
Last.fm Radio: Problem opening track "FOO_LASTFM_RADIO://play.last.fm/user/67467814a3f56101b38f7b014791fe6d.mp3LASTFM" : Forbidden (403)
Last.fm Radio: Updating playlist "lastfm://artist/灰野敬二"
Last.fm Radio: Problem opening track "FOO_LASTFM_RADIO://play.last.fm/user/a7890215f52583f3731a1c99d365026f.mp3LASTFM" : Forbidden (403)
Last.fm Radio: Retrieved track "Masonna [Release Your Mind Volume 2 (Disc 3)] - Spark"
Last.fm Radio: Retrieved track "Merzbow [1930] - Intro"
Last.fm Radio: Retrieved track "John Wiese [Soft Punk] - PS2"
Last.fm Radio: Retrieved track "灰野敬二 [A Challenge To Fate] - My Only Friend"
Last.fm Radio: Retrieved track "Sutcliffe Jügend [We Spit on Their Graves (tape 1)] - Kill, Kill, Kill!"

It has managed to play a couple of tracks OK now though...

They all seem to be FOO_LASTFM_RADIO://
Title: foo_wave_seekbar
Post by: Zao on 02 April, 2010, 06:36:49 PM
0.2.1 (see OP) now ignores stuff. Try it.
Title: foo_wave_seekbar
Post by: NullString on 02 April, 2010, 07:40:02 PM
Thanks for the update(s)!
Title: foo_wave_seekbar
Post by: boombaard on 03 April, 2010, 03:50:13 AM
Since .2, it seems to randomly decide whether or not to draw the seekbar in the window. Sometimes it returns if I switch between dx9/d2d/gdi, but most of the times it's just gone now.
(Playing .ape files from within my library)
Title: foo_wave_seekbar
Post by: TomBarlow on 03 April, 2010, 05:30:51 AM
Thanks very much Zao
Title: foo_wave_seekbar
Post by: Dandruff on 03 April, 2010, 10:53:58 AM
Short samples seems to be problematic (in 0.2.1)!?


With these samples for example I'm not getting any waveform display:

http://www.freesound.org/download/60719/60...ct_Goa_Kick.wav (http://www.freesound.org/download/60719/60719_Dstruct_Goa_Kick.wav)
http://www.freesound.org/download/76289/76...weight_Kick.wav (http://www.freesound.org/download/76289/76289_Dstruct_Heavyweight_Kick.wav)


But I think it should display something like that:

(https://hydrogenaud.io/imgcache.php?id=085267b21a78ac2b55a183e6f00b518a" rel="cached" data-warn="External image, click to view at original size" data-url="http://media.freesound.org/data/60/images/60719__Dstruct__Goa_Kick.png)

(https://hydrogenaud.io/imgcache.php?id=c1dd7a33e48880f49d55d70f50b384b8" rel="cached" data-warn="External image, click to view at original size" data-url="http://media.freesound.org/data/76/images/76289__Dstruct__Heavyweight_Kick.png)
Title: foo_wave_seekbar
Post by: Zao on 03 April, 2010, 11:28:18 AM
boombaard: Oh joy. There's always someone that fails horribly. What OS and machine are you on, and does it occur with older versions (preferably including 0.1.12 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.1.12.7z), 0.1.13 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.1.13.7z); back up your DB and configuration beforehand)?

Dandruff: There goes my assumption that "surely no-one will have really really short tracks".
The thought struck me when rewriting the analysis code, but I focused effort on things that mattered more. I might look into it if free time magically appears.
Title: foo_wave_seekbar
Post by: boombaard on 03 April, 2010, 11:35:57 AM
boombaard: Oh joy. There's always someone that fails horribly. What OS and machine are you on, and does it occur with older versions (preferably including 0.1.12 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.1.12.7z), 0.1.13 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.1.13.7z); back up your DB and configuration beforehand)?

All previous versions worked fine (.12, .13, .14) running win7 x64 (ATI HD3300 chipset, recent drivers). Stopped working with .2, .21 not working also.
After some finnicking with the new options, however, I noticed that it was due to the files I was using.
Apparently files that are mono (that is, with identical l/r channels) but encoded as stereo are displayed in the Center channel rather than frontleft/right. I'd disabled all other channels yesterday, hence it didn't do anything.
Title: foo_wave_seekbar
Post by: Dandruff on 03 April, 2010, 11:57:40 AM
Dandruff: There goes my assumption that "surely no-one will have really really short tracks".


Yeah. I actually have quite a lot of such samples. So it would be nice to be able to browse them with waveform display too ...


I might look into it if free time magically appears.


Thanks! Much appreciated!



Another suggestion: What about a "Normalize waveform display" option to get quiet tracks displayed in full height too? Would help the visibility quite a lot I think ...
Title: foo_wave_seekbar
Post by: Zao on 03 April, 2010, 01:17:05 PM
I thought that the (mono) annotation on the center channel should be enough, but you've shown me wrong.
Yes, tracks with "legacy" single-channel waveforms will display in the center (mono) channel. Note that if a channel is not present, it will not take any place in the display, so there's no harm in having them all enabled.

I'd recommend rescanning your whole library if you want proper multichannel. There's a command in the menu under Library to do just that.
Title: foo_wave_seekbar
Post by: Dandruff on 03 April, 2010, 01:26:27 PM
Ahh, this was the problem with my short samples too. Now they show a waveform but in a very ugly way.



For http://www.freesound.org/download/60719/60...ct_Goa_Kick.wav (http://www.freesound.org/download/60719/60719_Dstruct_Goa_Kick.wav) I'm getting this display:

waveform-seekbar-goa-kick.png


Almost invisible/unreadable. Guess the line should be thicker ...
Title: foo_wave_seekbar
Post by: Zao on 03 April, 2010, 01:51:51 PM
In D3D/GDI, the line thickness is determined by the difference between the maximum and minimum amplitude within a 1/2048th of the waveform. As your waveforms are very short, 16000-30000 samples, it's working with segments 7-14 samples wide. There's not much variation there really.

You could use the Direct2D mode, as that draws a line at the upper and lower bound of the waveform, or edit the shader for Direct3D, artificially adding a constant factor to the waveform.
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 03 April, 2010, 02:14:17 PM
I'll add those silly foo_lastfm_radio: and lastfm: protocols to the next version,

Thanks, the latest version works great.

but your HTTP claim bothers me.
Can you show a complete URL that it tries to scan together with the console output for it? If it contains sensitive fields like user/pass, censor those.
Note that messages like "Wave cache: skipping location ..." are from when the exclusion filter works. Any file that that message appears for will not be scanned.

Oops, never mind.  I misunderstood what was meant by "skipping" a track.  It skips the http:// tracks just fine (doesn't try to calculate the waveform, and the message you mentioned appears in the console), however, the progress bar tries to appear.  The progress bar flashes over the length of the seekbar a few times, and then goes to the end and stays there while the song is playing.  I'm guessing that this is because it can't properly compute the length of a streaming track, right?  Is it possible for the progress bar to completely ignore http:// tracks?
Title: foo_wave_seekbar
Post by: Dandruff on 03 April, 2010, 02:16:26 PM
You could use the Direct2D mode, as that draws a line at the upper and lower bound of the waveform


This mode isn't avaliable here. I guess because I'm on XP.



or edit the shader for Direct3D, artificially adding a constant factor to the waveform.


Ok. But shouldn't that be done by default (with the next update) to make it looking better?
Title: foo_wave_seekbar
Post by: Dandruff on 03 April, 2010, 02:21:29 PM
Is it possible for the progress bar to completely ignore http:// tracks?


Yeah, I wanted to ask the same. Would be nice if the seekbar would only show the background color for http streaming. At the moment it gets filled completely with the highlight color which is looking odd.
Title: foo_wave_seekbar
Post by: Zao on 03 April, 2010, 02:32:08 PM
I see you're on XP. That's too bad, as the following Direct2D shots will make you want to upgrade.
(https://hydrogenaud.io/imgcache.php?id=796cee0f39e54927ebab83cf6e745854" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar34_t.png) (http://www.acc.umu.se/~zao/seekbar34.png)
(https://hydrogenaud.io/imgcache.php?id=7074a79367d3338998be8d028797c165" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar35_t.png) (http://www.acc.umu.se/~zao/seekbar35.png)

I played around with the shader and I couldn't hack up a decent look for such thin waveforms. The current architecture is not designed for such a thing.
Title: foo_wave_seekbar
Post by: Dandruff on 03 April, 2010, 03:00:29 PM
I see you're on XP. That's too bad, as the following Direct2D shots will make you want to upgrade.
(https://hydrogenaud.io/imgcache.php?id=796cee0f39e54927ebab83cf6e745854" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar34_t.png) (http://www.acc.umu.se/~zao/seekbar34.png)
(https://hydrogenaud.io/imgcache.php?id=7074a79367d3338998be8d028797c165" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar35_t.png) (http://www.acc.umu.se/~zao/seekbar35.png)

I played around with the shader and I couldn't hack up a decent look for such thin waveforms. The current architecture is not designed for such a thing.


Alright. Thanks for trying! No big problem. But the Direct2D screenshot is looking very good indeed!
Title: foo_wave_seekbar
Post by: mauzel on 03 April, 2010, 06:02:31 PM
Hello, this is probably going to sound retarded because I don't really know anything about computers, but I'm going to try posting about it.

A week ago, I installed the foo_wave_seekbar (0.1.11) component into foobar2000 (v1.0.1). I was very pleased with it. I promptly generated waveforms for the music I had in my playlists (only about 20 songs or so) so I could take care of the bulk of the CPU usage at once. So everything seemed dandy.

However, over the past week after installing the component, my computer has started acting up. For example, seemingly at random times, my computer would get extremely, extremely sluggish. More specifically, my CPU usage would spike to 100% for a few seconds at a time, which would cause everything on to be sluggish as one would imagine. If foobar2000 was playing music, the music would start stuttering during these slow downs, and my computer basically would be unresponsive/unusable during these periods.

If I merely had foobar2k open without any music playing, and was, for example, playing a video in MPC and my computer started slowing down, the video file's audio stream would be uninterrupted (it would NOT stutter) but new frames of the video stream would not render or whatever (basically my video and audio would desync because of the immense spike in CPU usage, I guess).

At first, I didn't think it would have been caused by foo_wave_seekbar. The first thing I did was scan my computer for spyware and viruses, which turned up nothing. Then I used SeaTools to check my hard drives (just did simple SMART and Short Drive Self Test (Short DST)), and then I verified and rebuilt my RAID unit. Anyway, after that the spike in CPU usage+slow down persisted; I then saw that v0.2.0 of foo_wave_seekbar had been released, so I upgraded to that version. However, my computer still experienced CPU usage spikes at seemingly completely random intervals.

At this point, I said "o ok" and tried removing foo_wave_seekbar from my foobar2000 components directory. Apparently, I haven't had any problems since then. I wasn't smart enough to check ProcExp or Resource Manager to see exactly what process/threads/whatever was behind the CPU usage spiking, but what I can say is that after I removed foo_wave_seekbar, I have not had any slow downs.

I really would like to use the component, so it makes me sad that foo_wave_seekbar was apparently the culprit. What I would like to ask is if anyone can give me any advice as how to truly isolate whether it is the component that caused the slow downs. Like I said, the CPU usage spikes seemed to happen entirely randomly, whether I was putting my system on load or whether I was just sitting in front of the computer chatting with people and doing nothing else---the only condition for the CPU usage spikes seemed to be to have foobar2000 open with foo_wave_seekbar installed.

If it helps, this is how I have things setup:
- Vista x64
- foobar2k outputs to a USB Audio DAC
- DirectX 10 (does it matter?)

And yeah, if I said anything dumb, it's because I don't really know anything about anything. Basically just wanted to report this and hopefully find out whether it is possible for foo_wave_seekbar to be the culprit, and if it is, whether it is possible to fix. If it isn't possible for foo_wave_seekbar to be behind my CPU usage spikes, then it must have been some strange coincidence that the sluggishness started after I installed it, and stopped after I removed it.

Also, I did check my list of components against the foobar2000 troubleshooter thing and it said that there were no problematic components found.

tl;dr version: I'm retarded, but I think that foo_wave_seekbar causes my computron to explode with massive spikes in CPU usage at random intervals. I did various scans/tests to try to figure out what the problem was, but the only thing that seemed to solve the issue was to entirely remove foo_wave_seekbar from my foobar2k directory.
Title: foo_wave_seekbar
Post by: Zao on 03 April, 2010, 07:16:35 PM
First you could test whether it occurs on a freshly started foobar2000 without any UI elements from it in your layout. It should do absolutely nothing then.
Then you could test whether the behaviour differs between the three frontends available (Direct3D, Direct2D, GDI), as the Direct3D one has had a bit of trouble with lost devices.
I can't really see it doing much to disturb the system in general, except for maybe excessive timer usage, or a slow disk.

If you manage to catch it in the act, try to get to the threads view of the foobar2000 process and see which thread that's eating all the CPU.
Title: foo_wave_seekbar
Post by: mauzel on 04 April, 2010, 07:55:26 PM
Unfortunately, I won't be able to use the computer I've had the problems on for another 4 days or so. However, once I return, I will try the things you have suggested to possibly isolate the problem (if it pops up again).

Anyway, thanks for the reply.
Title: foo_wave_seekbar
Post by: Anomalous on 05 April, 2010, 08:41:39 AM
I think I'm having the same problem. It does not occur with no UI elements present at startup, but as soon as the element is added it eats up the cpu. Music doesn't have to be playing and changing the frontends doesn't help.

Here's the threads:
(https://hydrogenaud.io/imgcache.php?id=95d13270628e37039b1572e42484c94e" rel="cached" data-warn="External image, click to view at original size" data-url="http://i42.tinypic.com/357rsht_th.jpg) (http://i42.tinypic.com/357rsht.jpg)

Title: foo_wave_seekbar
Post by: Zao on 05 April, 2010, 01:53:44 PM
What frontend are you using, and is there anything interesting in the console?
Title: foo_wave_seekbar
Post by: Anomalous on 05 April, 2010, 02:17:26 PM
I guess I should have checked the console first, it's rescanning all the songs again. I have no idea why, since they've all been done already. Is there a shortcut key to rescan them which I might have pressed or something?
Title: foo_wave_seekbar
Post by: Zao on 05 April, 2010, 02:25:26 PM
If you've terminated foobar incorrectly, the component will continue with all the scanning jobs that were in queue at last successful shutdown. I can't see how it could be anything else, really.
I've just released 0.2.2 by the way, which fixes a nasty bug at shutdown. Upgrading is strongly recommended.
Title: foo_wave_seekbar
Post by: ggggg on 05 April, 2010, 07:27:21 PM
The wave seekbar doesn't work with ogg vorbis.
Could you solve this problem in one of the next updates? 

Or am I not able to install it correctly?
Title: foo_wave_seekbar
Post by: Zao on 05 April, 2010, 07:51:53 PM
What happens? Does it crash, does it not show any waveform, does the console say anything, what UI do you use?
Title: foo_wave_seekbar
Post by: Dandruff on 05 April, 2010, 08:14:10 PM
Working fine here with Ogg Vorbis.
Title: foo_wave_seekbar
Post by: Anomalous on 05 April, 2010, 11:57:06 PM
Changelog:
0.2.3 (2010/04/06)
Fixed the blocking on track change and 100% CPU when display is locked or some game are running.

Foobar now crashes when changing tracks while the computer is locked, the seekbar was on screen before locking, and the track changes; when foobar is minimised it works. Report submited.
Title: foo_wave_seekbar
Post by: Zao on 06 April, 2010, 12:22:28 AM
Curse you users, finding holes in my code!
0.2.4 is up, probably fixes the problem and ensures that all relevant state is updated on device re-acquire.
Title: foo_wave_seekbar
Post by: Dandruff on 06 April, 2010, 08:18:08 AM
Here two screenshots of 0.2.4:

(https://hydrogenaud.io/imgcache.php?id=a67118c7a987dffc3e1a72e4dfab8c3d" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.outburst-audio.com/maik/waveform-seekbar-ok.png)

(https://hydrogenaud.io/imgcache.php?id=eab497426891f242b21e967895fddae5" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.outburst-audio.com/maik/waveform-seekbar-ugly.png)


The first image is looking ok. Taken after foobar2000 starting up in maximized window (1920x1176 pixels). The second image was taken after foobar2000 starting up in small windows size (634x387 pixels) and maximized afterwards. Obviously the waveform isn't recalculated/redrawn properly automatically on window maximize!? Looks quite ugly. Too blurry ...
Title: foo_wave_seekbar
Post by: Jack Schmaltz on 06 April, 2010, 08:29:46 AM
thank you for your continued work zao, its greatly appreciated
Title: foo_wave_seekbar
Post by: Dandruff on 06 April, 2010, 11:22:40 AM
A problem with 0.2.4 in GDI mode:


-> maximize foobar2000 (so that we see a large waveform) - in my case the foobar window is 1920x1176 pixels large
-> open waveform seekbar configuration panel

=> Takes several seconds to open!? Makes it look like a hanging application. In "Direct3D 9.0c" mode it opens immediately!
Title: foo_wave_seekbar
Post by: ggggg on 06 April, 2010, 11:47:07 AM
Okay it works fine with ogg vorbis.
I just rescaned all waveforms and now it works.
Before that it shew nothing, i could skip but there were no graphics.
The console doesn't say anything about the seekbar, no error or anything else.

But now it works after rescan.
I use CUI.
Title: foo_wave_seekbar
Post by: Zao on 06 April, 2010, 05:23:16 PM
Dandruff: Both your bugs should be fixed in 0.2.5.
The stretching was due to the device loss fixes accidentally destroyed the reset call needed to resize the backbuffer. It reused the backbuffer from first creation, no matter the window size.
The load time was because the frontend recreated the rendered waveform once per channel in the list, at least. This has been fixed.
Title: foo_wave_seekbar
Post by: Dandruff on 06 April, 2010, 05:35:31 PM
Dandruff: Both your bugs should be fixed in 0.2.5.
The stretching was due to the device loss fixes accidentally destroyed the reset call needed to resize the backbuffer. It reused the backbuffer from first creation, no matter the window size.
The load time was because the frontend recreated the rendered waveform once per channel in the list, at least. This has been fixed.


Confirmed. Both fixed! Many thanks!



Any chance to get an option to disable antialiasing completely in the future? For my taste the whole waveform drawing is too blurry ...
Title: foo_wave_seekbar
Post by: Zao on 06 April, 2010, 05:43:28 PM
If you're using the Direct3D mode, replace line 128 (the one with lerp from bgColor to textColor) in seekbar.fx with
: textColor;
Title: foo_wave_seekbar
Post by: Dandruff on 06 April, 2010, 05:51:29 PM
And for GDI mode?
Title: foo_wave_seekbar
Post by: Zao on 06 April, 2010, 07:37:20 PM
There you're out of luck. The GDI mode is mostly only intended to be a last fallback for machines that for some reason doesn't have D3D or D2D capabilities.
Title: foo_wave_seekbar
Post by: Dandruff on 07 April, 2010, 02:47:14 AM
Ok, thanks. No big problem.
Title: foo_wave_seekbar
Post by: za222 on 07 April, 2010, 12:59:57 PM
Awesome plugin!

I am missing something, tho:

Would it be possible to cancel analysis of a track on manual track advance?

Example:

Let's say i have this playlist:
Track1
Track2
Track3
Track4
Track5

I start playing Track1, then i press "next" 4 times, so i listen to Track5. What happens now is that Tracks 1 to 4 are being analyzed first and i have to wait a long time for the waveform of Track5 to appear.
This also puts heavy load on CPU and HDD when i'm only randomly skipping throught tracks (for example when looking for a specific track).

My request could probably be summarized as:
Title: foo_wave_seekbar
Post by: Dandruff on 08 April, 2010, 03:39:13 AM
Another suggestion: What about a "Normalize waveform display" option to get quiet tracks displayed in full height too? Would help the visibility quite a lot I think ...


Any opinions about this? Of course it should be optional only. Basically all my music is using Bobn Katz K-20 level reference (means -20dBFS RMS). Now with heavy compressed music you have plenty of empty room above and below the waveform ...



More suggestions:

1. Would be nice if there would be 2 or 3 pixels empty space above and below the waveform. So that a 0dB peaking sound doesn't look like shashed to the window edges ...

2. Optional solid 1 pixel center line(s) to mark the center of waveform(s). Should be drawn behind the waveform(s) of course.
Title: foo_wave_seekbar
Post by: Zao on 08 April, 2010, 10:05:50 AM
I didn't say anything as it has been suggested in the past.
It should probably be reasonably easy to do nowadays, but don't expect it anytime soon.
Title: foo_wave_seekbar
Post by: Dandruff on 08 April, 2010, 10:28:19 AM
Alright, thanks!
Title: foo_wave_seekbar
Post by: DragonQ on 09 April, 2010, 12:14:10 PM
Not really a major thing but is there any chance of acquiring the waveforms in a multi-threaded operation? It takes ages for my entire playlist so if I ever had to re-scan them (like when the multi-channel waveforms feature was added), it'd be nice if it used all 8 of my CPU cores rather than just one.
Title: foo_wave_seekbar
Post by: mauzel on 09 April, 2010, 12:45:21 PM
If anybody was wondering about my problem before, I seem to somehow have done things to my computer that make it so that I don't get the spikes in CPU usage I mentioned before.

At first, I was getting CPU spikes using the Direct3D path, but did not get periods of high CPU usage using GDI. Using Direct3D, it was not foobar's threads that were eating up CPU, but it was actually Vista's dwm.exe's thread starting at milcore.dll (start address: milcore.dll!VirtualChannelGetInstance+x1420c) that would eat up all the CPU. However, dwm.exe would only cause CPU usage to spike if I had foobar2k open with the waveform seekbar component enabled. I don't really know about these things, but that's what I've observed.

(https://hydrogenaud.io/imgcache.php?id=424bb6d122937b1d0b3094b997cf2a5f" rel="cached" data-warn="External image, click to view at original size" data-url="http://tri4.net/linksys/images/foobar2000/fb2k_v_dwm.png)


After that, I switched my DAC from USB to optical (SPDIF) (for reasons unrelated to my foo_wave_seekbar issues), but I doubt this made the difference, although I did notice that foobar2k seemed to use more CPU when outputting via SPDIF than it did when it output to USB (I'm assuming this is because my optical/SPDIF out is on-board so is at least partially controlled by my CPU, and I guess more resources were needed to control SPDIF than were needed to control USB or something, I dunno).

Also, I updated foo_wave_seekbar to 0.2.5.

Then, after that, I installed Vista SP2 and the platform update for Vista SP2 (so before that, I didn't have support for D2D I guess). Along with foobar2k not using as much CPU as it did before after I switched to optical output, the spiking in CPU usage related to dwm.exe and using the Direct3D frontend seems to have stopped.

So, basically I don't really know what happened, whether it was coincidence or whether something in Vista's SP2/SP2 platform update fixed it, but I guess things are fixed.


Edit: Oh, and I should note that nothing was happening in foobar2k's console during the CPU usage spikes (so I wasn't having that problem the other user mentioned where foobar2k was picking up from where it left off scanning waveforms).
Title: foo_wave_seekbar
Post by: Zao on 09 April, 2010, 03:01:27 PM
DragonQ: There are up to three background threads for analyzing tracks. This cap was determined by empirical studies showing that more than three just swamped the disk with I/O, actually reducing throughput. I'm considering adding an advanced preference to raise this cap, but beware that it may very well backfire on you if you raise it.

mauzel: SP2 or the Platform Update may very well have provided a more efficient code path for the DWM or Direct3D9, so it sounds like a reasonable theory. By the way, the long symbols exported by the seekbar are essentially meaningless, they're an artifact from one of the libraries I use.
Title: foo_wave_seekbar
Post by: DragonQ on 09 April, 2010, 03:12:36 PM
Hmm I'm pretty sure it never goes above 13% (one core) for me.
Title: foo_wave_seekbar
Post by: Dandruff on 09 April, 2010, 03:26:38 PM
For me it does (on a Dual Core). You also should test this without other applications running. The threads seem to have very low priority (which I like).
Title: foo_wave_seekbar
Post by: Zao on 09 April, 2010, 03:39:58 PM
How many cores does this (http://www.acc.umu.se/~zao/core_count.exe) tell you you have?
Title: foo_wave_seekbar
Post by: DragonQ on 09 April, 2010, 04:12:17 PM
8, as expected. Maybe it does occasionally use 2 or 3 cores, I didn't check it for more than like 10 seconds. If the threads are indeed low priority then it's possible only one core is used sometimes cos I do a lot of multitasking (no point having 8 cores otherwise ).
Title: foo_wave_seekbar
Post by: Zao on 09 April, 2010, 04:15:40 PM
The only reason the three cores would not all be churning away at 100% each is because of non-processing overhead, like I/O, lock contention, etc.
As for idle priority, if nothing else wants to run, they will be running at full speed. Priority is just a scheduler hint.
Also, unless you have some magical multi-chip machine, you have four cores. Hyperthreading has always been and will always be, crap.
Title: foo_wave_seekbar
Post by: Andreasvb on 09 April, 2010, 04:16:46 PM
Zao, it says 4, I got a Quad Core Q6600, so it's correct.

foobar2000 can utilize up to 80% of the CPU sometimes when first analyzing the waveforms.
Usually it's around 50%, seems to work very well.
Title: foo_wave_seekbar
Post by: kode54 on 09 April, 2010, 04:36:07 PM
it says 4, I got a Quad Core Q6600, so it's correct.

That does not reflect on HyperThreading, which your CPU does not support.
Title: foo_wave_seekbar
Post by: DragonQ on 09 April, 2010, 07:01:41 PM
The only reason the three cores would not all be churning away at 100% each is because of non-processing overhead, like I/O, lock contention, etc.
As for idle priority, if nothing else wants to run, they will be running at full speed. Priority is just a scheduler hint.
Also, unless you have some magical multi-chip machine, you have four cores. Hyperthreading has always been and will always be, crap.


Actually HyperThreading is a logical way to make much more efficient use of a CPU core. Not gonna derail your thread with an argument about it. I watched the CPU % indicator for longer this time and it does look like most of the time it uses 2 cores so that's better than nothing I suppose.
Title: foo_wave_seekbar
Post by: dhromed on 11 April, 2010, 01:48:51 PM
I'm getting some anomalous display with the latest version.

Image. (http://www.pliv.com/things/wave_anomaly.png)

It looks like the top half only shows the top half of the left channel, and the bottom half nly shows the bottom half of the right channel.

Different subject: I feel the preferences should move to the main prefs, to fortify consistency. I'm not sure how exactly, or where they should go, because all other layout elements seem to have their unique configs in a context menu. Even a big one like Facets is almost entirely set-up via context menu. I also don't spy a logical place in the preferences tree.

Nonetheless, It's a typical pref-page-like window with lots of options, and I keep going to prefs when I want to configre it, and then remember I have to select the 1-item context menu from the element itself.
Title: foo_wave_seekbar
Post by: Zao on 11 April, 2010, 04:14:39 PM
As for your odd display, are you running 0.2.5?

A preferences page will not happen unless it is truly component-global, and thus far I've put those options in advanced preferences.
Making a central page would unnecessarily detach the configuration from the element it is for, and you would not have an easy way to indicate which one of the elements was affected by the proposed preferences page.
This will not happen unless Peter goes insane and adds a central preferences API, which I don't see ever happening.
Title: foo_wave_seekbar
Post by: dhromed on 11 April, 2010, 06:45:05 PM
> As for your odd display, are you running 0.2.5?

Yes.
Title: foo_wave_seekbar
Post by: Zao on 11 April, 2010, 08:23:16 PM
Alright. Could you list your OS, UI component, graphics card model, etc?
Title: foo_wave_seekbar
Post by: CyberFoxx on 11 April, 2010, 10:05:37 PM
Well, I wasn't sure if I should report this, um, bug, but I guess it couldn't hurt.
Anyway, with the Waveform Seekbar in my foobar layout, for some odd reason, the Windows Sidebar cannot keep window focus. (Eg: Context menus on gadgets and the Sidebar close as if I clicked away, Gadget Gallery window loses focus even though the mouse cursor never left it's window, etc) But, if I just remove the Waveform Seekbar from my layout, there's no problems with the Windows Sidebar losing focus. I've tried switching between Direct3D, Direct2D and GDI frontends to no effect. Even having foobar minimized with Waveform Seekbar in my layout still causes focus loss with the Sidebar. Oh, and a waveform has to have been displayed at least once, just starting up foobar won't cause it to happen, you have to hit play first.

Like I said, wasn't quite sure if I should report this, but it's the first time I've seen anything weird like this happen. I've tried other D3D and D2D apps to see if they do the same thing to the Sidebar, but nothing so far. If it's just one of those weird random one in a million things, then I'll just deal with it for now. Didn't think it'd hurt to report it...

Anyway, just in case it might help:
OS: Windows Server 2008 Standard
Graphics card: Radeon X1600 XT
UI: Columns UI 0.3.8.3
Title: foo_wave_seekbar
Post by: tropicalfish on 12 April, 2010, 02:05:59 AM
Haven't been able to find it here in the thread, but is there a way to "sharpen" the waveform a bit? So it isn't faded/blurred.

Thanks for the add-on, though! It works really nicely.
Title: foo_wave_seekbar
Post by: Zao on 12 April, 2010, 02:13:14 AM
CyberFoxx: Sidebar here on Seven works as intended with both CUI and DUI.
I'm going to randomly blame you running a server SKU on a desktop; you having an ATI card; and you're using CUI. 

tropicalfish: As for "sharpening" it, twiddle the assorted constants in the shader file if you use Direct3D; most particularly the "factor" variable, or write your own 
Title: foo_wave_seekbar
Post by: CyberFoxx on 12 April, 2010, 04:02:51 AM
Well, looks like it was ATI's fault. On a lark, I went to see if ATI/AMD decided to update their legacy drivers, they did. Installed the new drivers, and everything is playing together nicely. How and what was happening with the old drivers, who knows. I'm just glad it's working now.

(As to why I'm running 2K8, it was free from MS. Didn't think I could go wrong with free...)
Title: foo_wave_seekbar
Post by: bacti_buster on 12 April, 2010, 09:05:47 AM
for me this great component could  be even better if there will be some time marks, like NI Tracktor DJ does.
what you think about that folks???
zooming looks nice but seems like its not needed here

Title: foo_wave_seekbar
Post by: dhromed on 12 April, 2010, 12:53:27 PM
Alright. Could you list your OS, UI component, graphics card model, etc?


XP SP3
Ati Radeon 4850
DUI
Foobar v1.0

Hmm.
- I might try upgrading foobar (though small chance of fixing it)
- I think I fiddled with the shader file a bit. Might try reverting back to the default one.
Title: foo_wave_seekbar
Post by: Zao on 12 April, 2010, 12:58:43 PM
Is it an older shader? I added a rather important texture coordinate input semantic to it, with corresponding code in the VS function. Omitting that could very well result in the odd chimera display.
Title: foo_wave_seekbar
Post by: Dandruff on 13 April, 2010, 11:49:02 AM
As for your odd display, are you running 0.2.5?

A preferences page will not happen unless it is truly component-global, and thus far I've put those options in advanced preferences.
Making a central page would unnecessarily detach the configuration from the element it is for, and you would not have an easy way to indicate which one of the elements was affected by the proposed preferences page.
This will not happen unless Peter goes insane and adds a central preferences API, which I don't see ever happening.


But where are the display options stored now? I can't find these anywhere!? Really weird that they are not reset when deleting foo_wave_seekbar.dll.cfg

EDIT: Found it. Stored in the theme. Ok, No problem.



But why does the "Compact Waveform database" function not properly rewrite the database when activating "Store scanned tracks in mono" (after tracks have been stored with all channels)? Shouldn't it do so to free up space?




In these http://download.microsoft.com/download/win...US/6channel.exe (http://download.microsoft.com/download/winmediatech40/Utility/1.0/W98NT42KMeXP/EN-US/6channel.exe) 6 channel files the "Back right" channel isn't displayed in "Downmix display to mono". Why? "Back left" is.

In these http://download.microsoft.com/download/6/b...c8/8Channel.exe (http://download.microsoft.com/download/6/b/1/6b17045c-6ce8-4dc4-a3b5-2717b8711fc8/8Channel.exe) 8 channel files the "Side right" and "Back right" channels are missing in the "Downmix display to mono" display. Why?
Title: foo_wave_seekbar
Post by: Dandruff on 13 April, 2010, 12:22:43 PM
If you're using the Direct3D mode, replace line 128 (the one with lerp from bgColor to textColor) in seekbar.fx with
: textColor;


Can you give me a hint to get a straight cursor instead of the current blurry one?
Title: foo_wave_seekbar
Post by: Dandruff on 13 April, 2010, 03:34:04 PM
I have created an effect that also renders the RMS part. Since I didn't like the shading, I changed that to perform a grayscale conversion on the already played part. If you poke around in the script (see below) you can also enable a sepia-like effect.

seekbar.fx (http://foosion.foobar2000.org/misc/seekbar.fx.txt): Put this in your profile or installation directory in the effects subdirectory.
(https://hydrogenaud.io/imgcache.php?id=367bcc14273bb3fad64cde21542fdf5b" rel="cached" data-warn="External image, click to view at original size" data-url="http://foosion.foobar2000.org/misc/foo_wave_seekbar.png)


This is looking great! But it's only drawing stereo files in mono, no matter if "Downmix display to mono" is enabled or not!?

"Downmix display to mono" enabled = sharp good looking mono display
"Downmix display to mono" disabled = blurry bad looking mono display


I'm using version 0.2.5.


@Zao: What about integrating RMS drawing into the default fx file too? Or why not even more "professional" using ITU-R BS.1770-1 http://webs.uvigo.es/servicios/biblioteca/...;!PDF-E.pdf (http://webs.uvigo.es/servicios/biblioteca/uit/rec/BS/R-REC-BS.1770-1-200709-I!!PDF-E.pdf)
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 13 April, 2010, 04:29:09 PM
This is looking great! But it's only drawing stereo files in mono, no matter if "Downmix display to mono" is enabled or not!?

That effect was created before this component supported multiple channels.  If it is to support multiple channels in the future, foosion will need to update it.
Title: foo_wave_seekbar
Post by: Dandruff on 13 April, 2010, 04:44:21 PM
Alright. Didn't know that. Thanks!
Title: foo_wave_seekbar
Post by: Zao on 13 April, 2010, 08:05:21 PM
But why does the "Compact Waveform database" function not properly rewrite the database when activating "Store scanned tracks in mono" (after tracks have been stored with all channels)? Shouldn't it do so to free up space?

In these http://download.microsoft.com/download/win...US/6channel.exe (http://download.microsoft.com/download/winmediatech40/Utility/1.0/W98NT42KMeXP/EN-US/6channel.exe) 6 channel files the "Back right" channel isn't displayed in "Downmix display to mono". Why? "Back left" is.

In these http://download.microsoft.com/download/6/b...c8/8Channel.exe (http://download.microsoft.com/download/6/b/1/6b17045c-6ce8-4dc4-a3b5-2717b8711fc8/8Channel.exe) 8 channel files the "Side right" and "Back right" channels are missing in the "Downmix display to mono" display. Why?


The "compact database" command is for cleaning out unused blocks in the database, it doesn't recalculate anything. If you want to rescan everything, use the "rescan all" command. There is currently no way to mangle an existing multichannel entry into a mono one, as that would be rather pointless.

As for your (what I assume are) test files, I honor the channel map that fb2k tells me tracks have. If they mismatch your expectations to what is in which channel, it's not my fault (unless I have a bug, which I doubt).
Title: foo_wave_seekbar
Post by: Dandruff on 13 April, 2010, 08:18:43 PM
Ok, no problem.
Title: foo_wave_seekbar
Post by: dhromed on 14 April, 2010, 04:53:47 PM
Omitting [the new shader] could very well result in the odd chimera display.


Fix!
Title: foo_wave_seekbar
Post by: ExUser on 14 April, 2010, 05:09:20 PM
Fix!
Ambiguous!
Title: foo_wave_seekbar
Post by: bb10 on 14 April, 2010, 05:17:05 PM
This is looking great! But it's only drawing stereo files in mono, no matter if "Downmix display to mono" is enabled or not!?

That effect was created before this component supported multiple channels.  If it is to support multiple channels in the future, foosion will need to update it.


I've updated it: seekbar.fx (http://bb10x.org/temp/seekbar.fx.txt)
Title: foo_wave_seekbar
Post by: Dandruff on 14 April, 2010, 08:47:53 PM
This is looking great! But it's only drawing stereo files in mono, no matter if "Downmix display to mono" is enabled or not!?

That effect was created before this component supported multiple channels.  If it is to support multiple channels in the future, foosion will need to update it.


I've updated it: seekbar.fx (http://bb10x.org/temp/seekbar.fx.txt)


Thanks! Working fine.


By the way: Where do the filenames "seekbar.png" and "074.jpg" (found in the original fx file) come from? At least there are no such files on my system!?
Title: foo_wave_seekbar
Post by: Zao on 15 April, 2010, 09:06:26 AM
The Direct3D frontend is capable of loading and binding any texture listed in such an annotation. If you know how to write shaders, you can use that for gradient textures, backgrounds, custom position indicators, etc.

In this case, 074.jpg is the stone background in this screenshot (http://www.acc.umu.se/~zao/seekbar26.png) and seekbar.png has never been used, it just served as a hint for the purpose of them.
Title: foo_wave_seekbar
Post by: 2E7AH on 15 April, 2010, 10:45:41 AM
this is very thin, but anyway just curious:

any ideas for implementing part of "next track" in current view?
maybe with providing scrolling display with custom timeframe?

of course it won't work in random/shuffle playback
Title: foo_wave_seekbar
Post by: Dandruff on 15 April, 2010, 10:49:18 AM
The Direct3D frontend is capable of loading and binding any texture listed in such an annotation. If you know how to write shaders, you can use that for gradient textures, backgrounds, custom position indicators, etc.

In this case, 074.jpg is the stone background in this screenshot (http://www.acc.umu.se/~zao/seekbar26.png) and seekbar.png has never been used, it just served as a hint for the purpose of them.


Ok, thanks!
Title: foo_wave_seekbar
Post by: megar on 16 April, 2010, 08:05:26 AM
Awesome component !
Thank you VERY much !!

On my dual Screen system, The waveform is only shown when Foobar sits on Primary Display.
When using GDI mode, it is always working. Only D3D is concerned.
Title: foo_wave_seekbar
Post by: Zao on 16 April, 2010, 08:19:48 AM
I have not tested with multiple GPUs at all. What GPUs and OS do you have?
Title: foo_wave_seekbar
Post by: NullString on 16 April, 2010, 10:41:18 AM
This is looking great! But it's only drawing stereo files in mono, no matter if "Downmix display to mono" is enabled or not!?
That effect was created before this component supported multiple channels.  If it is to support multiple channels in the future, foosion will need to update it.

I've updated it: seekbar.fx (http://bb10x.org/temp/seekbar.fx.txt)
thanks!
added one line to scale the waveform using replaygain, from another script submitted by someone else.
Code: [Select]
Texture1D tex : WAVEFORMDATA;
Texture2D seekTex < string filename = "seekbar.png"; >;

SamplerState sTex
{
   Filter = MIN_MAG_MIP_LINEAR;
   AddressU = Clamp;
};

struct VS_IN
{
float2 pos : POSITION;
float2 tc : TEXCOORD0;
};

struct PS_IN
{
float4 pos : SV_POSITION;
float2 tc : TEXCOORD0;
};


float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor  : HIGHLIGHTCOLOR;
float4 selectionColor  : SELECTIONCOLOR;
float4 textColor      : TEXTCOLOR;
float cursorPos        : CURSORPOSITION;
bool cursorVisible    : CURSORVISIBLE;
float seekPos          : SEEKPOSITION;
bool seeking          : SEEKING;
float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
float2 viewportSize    : VIEWPORTSIZE;
bool horizontal        : ORIENTATION;
bool shade_played      : SHADEPLAYED;

PS_IN VS( VS_IN input )
{
PS_IN output = (PS_IN)0;

float2 half_pixel = float2(1,-1) / viewportSize;
output.pos = float4(input.pos - half_pixel, 0, 1);
if (horizontal)
output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
else
output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);

return output;
}

float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
{
float dist = abs(pos - tc.x);
float4 c = (show && dist < width)
? lerp(fg, bg, smoothstep(0, width, dist))
: bg;
return c;
}

float4 grayscale( float4 color )
{
return color.r * 0.3 + color.g * 0.59 + color.b * 0.11;
}

float4 sepia( float4 color )
{
float4 weight;
weight.r = 0.3;
weight.g = 0.59;
weight.b = 0.11;
weight.a = 0;

float4 adjust;
adjust.r = 0.098039215686275;
adjust.g = -0.050980392156863;
adjust.b = -0.26274509803922;
adjust.a = 0;

float intensity = dot(color, weight) ;
color = intensity + adjust;
return saturate(color);
}

float4 contrast( float4 color, float strength )
{
return saturate((color - 0.5) * strength + 0.5);
}

float4 played( float pos, float2 tc, float4 fg, float4 bg, float alpha)
{
float4 c = bg;
if (pos > tc.x)
{
#if 0
c = contrast(c, fg.r * 2);
c = lerp(c, sepia©, fg.g);
c = lerp(c, grayscale©, fg.b);
#else
c = grayscale©;
//c = sepia©;
#endif
}
return c;
}

float4 evaluate( float2 tc, float border )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex.Sample(sTex, tc.x);
minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 2; //use track gain
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;

float belowWave = tc.y + border - minmaxrms.r;
float aboveWave = tc.y - border - minmaxrms.g;
float factorWave = min(abs(belowWave), abs(aboveWave));
bool insideWave = (belowWave > 0 && aboveWave < 0);

float diffRms = abs(tc.y) - border - minmaxrms.b;
float factorRms = abs(diffRms);
bool insideRms = diffRms < 0;

float factor = insideRms ? (1.0 - 0.5 * saturate(factorRms / border / 2)): 1.0;
factor = insideWave ? (factor * saturate(factorWave / border / 2)) : 0.0;

float4 wave = lerp(backgroundColor, textColor, factor);

return saturate(wave);
}

float4 PS( PS_IN input ) : SV_Target
{
float dx, dy;
if (horizontal)
{
dx = 1/viewportSize.x;
dy = 1/viewportSize.y;
}
else
{
dx = 1/viewportSize.y;
dy = 1/viewportSize.x;
}
float seekWidth = 2.5 * dx;
float positionWidth = 2.5 * dx;

float4 c0 = evaluate(input.tc, 2.5 * dy);
if (shade_played)
c0 = played(cursorPos, input.tc, highlightColor, c0, 0.3);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos,  input.tc, selectionColor, c0, seekWidth,    seeking      );
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

technique Render9
{
pass
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
Title: foo_wave_seekbar
Post by: Dandruff on 16 April, 2010, 05:00:55 PM
@Zao: Would be possible to show the waveform building live on the fly while it's being calculated? Would be useful for long files ...
Title: foo_wave_seekbar
Post by: Dandruff on 16 April, 2010, 05:03:20 PM
added one line to scale the waveform using replaygain


What's the use/result of it?
Title: foo_wave_seekbar
Post by: Zao on 16 April, 2010, 05:07:21 PM
@Zao: Would be possible to show the waveform building live on the fly while it's being calculated? Would be useful for long files ...

Doing so would risk things taking longer time due to the act of prerendering the waveform (in Direct2D and GDI mode) being more costly than the scanning.
Also, as it's a two-pass process currently, intermediary results are not accessible.
I'd rather not touch that code much, as it's a bit gnarly.
Title: foo_wave_seekbar
Post by: Dandruff on 16 April, 2010, 05:12:57 PM
Ok. No prob.
Title: foo_wave_seekbar
Post by: NullString on 17 April, 2010, 08:15:25 AM
added one line to scale the waveform using replaygain


What's the use/result of it?

scaled smaller same sized waveforms, personal preference
Title: foo_wave_seekbar
Post by: Dandruff on 17 April, 2010, 09:56:42 AM
added one line to scale the waveform using replaygain


What's the use/result of it?

scaled smaller same sized waveforms, personal preference


Tried your script. Doesn't run here. Pasted it into Notepad and saved as seekbar.fx. But Waveform Seekbar reverts to GDI mode on startup.
Title: foo_wave_seekbar
Post by: lvqcl on 17 April, 2010, 10:08:18 AM
Tried your script. Doesn't run here. Pasted it into Notepad and saved as seekbar.fx. But Waveform Seekbar reverts to GDI mode on startup.

Change © to ( c )
Title: foo_wave_seekbar
Post by: Dandruff on 17 April, 2010, 10:22:04 AM
Tried your script. Doesn't run here. Pasted it into Notepad and saved as seekbar.fx. But Waveform Seekbar reverts to GDI mode on startup.

Change © to ( c )


Ok, working now. Thanks.


But:

1. Non-ReplayGain-tagged files are not showing any waveform now. Just a horizontal grey line visible.
2. Why not normalizing the Waveform display by peak value of the file so that it would also work for non-ReplayGain-tagged files? Is this not possible?
Title: foo_wave_seekbar
Post by: Zao on 17 April, 2010, 10:29:48 AM
Dandruff, NullString: From earlier in this thread -
When querying for non-existant replaygain, the track and album gain is -1000, and the peaks are -1. Adjusting the effect to test for negative values will likely do the trick.
Title: foo_wave_seekbar
Post by: Dandruff on 17 April, 2010, 11:06:48 AM
Ok, scripting is not my thing. But thanks.


Are ReplayGain tags required to scale the waveform height? Does Waveform Seekbar know the real peak value to be able to normalize the display for all tracks?
Title: foo_wave_seekbar
Post by: Zao on 17 April, 2010, 11:56:59 AM
It could probably be provided, but I'd rather not go break the effect interface again before I get around fixing multiple effects and add effect versioning.
Title: foo_wave_seekbar
Post by: Dandruff on 17 April, 2010, 02:26:01 PM
Ok, thanks!
Title: foo_wave_seekbar
Post by: Purple Monkey on 18 April, 2010, 10:16:28 AM
Got a new bug:

I installed foobar 1.0.2.1 and seekbar 0.2.5 on to my notebook which has an Intel 945 Express display adapter. I get no issues with GDI, but with DirectX9c it's not so good:
(https://hydrogenaud.io/imgcache.php?id=f229fe3af21e950486993ab27ef5f505" rel="cached" data-warn="External image, click to view at original size" data-url="http://img.photobucket.com/albums/v627/PurpleMonkeyMad/th_seek_mp3.png) (http://smg.photobucket.com/albums/v627/PurpleMonkeyMad/seek_mp3.png)

It would appear to be something to do with large peaks as the same original flac file (which has a peak < 1) displays fine, along with other mp3s that have a have peaks < 1.

(https://hydrogenaud.io/imgcache.php?id=38396569e41f13fbe7e0465378c07e21" rel="cached" data-warn="External image, click to view at original size" data-url="http://img.photobucket.com/albums/v627/PurpleMonkeyMad/th_seek_flac.png) (http://smg.photobucket.com/albums/v627/PurpleMonkeyMad/seek_flac.png)

(https://hydrogenaud.io/imgcache.php?id=97b4780269e5567007d3d12bca76762e" rel="cached" data-warn="External image, click to view at original size" data-url="http://img.photobucket.com/albums/v627/PurpleMonkeyMad/th_seek_mp3_low.png) (http://smg.photobucket.com/albums/v627/PurpleMonkeyMad/seek_mp3_low.png)

I attempted to scale the waveform in seebar.fx but this had no effect. I've seen other developers complain about how broken Intel's drivers are so I would hazard a guess it's the cards handling of textures.
Title: foo_wave_seekbar
Post by: Zao on 18 April, 2010, 12:15:05 PM
I'm currently in an awesome state of sleep deprivation, but I can tell you this: this texture scaling code looks like the works of a madman.
Try the 0.2.6 I just uploaded. It might even fix it.
Title: foo_wave_seekbar
Post by: Purple Monkey on 18 April, 2010, 01:51:59 PM
Can confirm that the new version does fix it, thanks a lot.

I wasn't expecting it to happen that fast, I don't know about everyone else but I'm always happy to wait for a fix if it means that you don't burn yourself out. Get some well deserved sleep.
Title: foo_wave_seekbar
Post by: Zao on 19 April, 2010, 02:10:52 AM
I was bending my sleep back into shape for the weekdays, so I had nothing to do anyway. 
I can't see how this code ever really worked right. Waveforms ought to have been mis-scaled by 4x, if it does what I think it did.
Title: foo_wave_seekbar
Post by: Virtureal on 19 April, 2010, 01:10:12 PM
Could I get some help with the RMS script? It doesn't seem to be working with 0.2.6. Also I get no waveform when playing a specific vinyl 24bit FLAC rip, everything else loads just fine  Is it the processing time which is incredibly long or am I having a problem here? I'm not seeing anything in the console.

/EDIT during the 13:48 minutes one of the songs is, the waveform never loads
Title: foo_wave_seekbar
Post by: Falstaff on 19 April, 2010, 01:29:59 PM
i have 3 available modes in te options for rendering of the wave :

Direct2D 1.0
Direct3D 9.c
GDI

but Direct3D 9.c doesn't work at all, empty panel or freeze of the previous rendering (GDI or Direct2D)

i run the latest version 0.2.6 under Seven x64 with a Geforce 8800 GTS video card with the latest video drivers (just installed to be sure my problem was not from the drivers)

any idea ? (i've try to installe again DirectX, but on install, system says i already have the latest version installed, for sure!)

so, what's the problem, plugin bug or vieo card (nvidia Geforce 8) not compatible??

i'm stuck
Title: foo_wave_seekbar
Post by: Zao on 19 April, 2010, 03:00:04 PM
The Direct3D9 mode supports cards down to the weak Intel cards and GF FX cards. Check your console for failure information.
Judging by your claim that the redist says you're up to date, you must be trying to run the web installer. If you've got spare time and a decent internet connection, there's always the full redist (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0cef8180-e94a-4f56-b157-5ab8109cb4f5).
Did you extract the effects directory into your foobar2000 profile or foobar2000 install directories?
Title: foo_wave_seekbar
Post by: Falstaff on 19 April, 2010, 03:24:43 PM
all methods tried for installing DirectX again (in case of...) : web or full redist package, same

effects folder is at the good place i mean, check below:

(https://hydrogenaud.io/imgcache.php?id=d631ba33646e51398d5e4ec64c891590" rel="cached" data-warn="External image, click to view at original size" data-url="http://xs.to/thumb-12E6_4BCCAB5F.jpg) (http://xs.to/share-12E6_4BCCAB5F.html)

the CONSOLE display this error when i select Direct3D render mode :

Seekbar: taking Direct3D9 path.
Seekbar: Direct3D: D3DXERR_INVALIDDATA(-2005529767) Invalid data
Seekbar: frontend creation failed: Direct3D9: could not create effects.


any idea ?
Title: foo_wave_seekbar
Post by: Zao on 19 April, 2010, 03:46:04 PM
At first guess, I would guess that it's probably the u-with-grave (ù) in your path, but I'd have to test that to be sure.
Also, can you upload your effect file intact somewhere. You might have accidentally saved it as UTF-8 with a BOM or with characters outside low ASCII. Both those things will make it fail.
Title: foo_wave_seekbar
Post by: Falstaff on 19 April, 2010, 03:53:20 PM
At first guess, I would guess that it's probably the u-with-grave (ù) in your path, but I'd have to test that to be sure.
Also, can you upload your effect file intact somewhere. You might have accidentally saved it as UTF-8 with a BOM or with characters outside low ASCII. Both those things will make it fail.


foobar2000 for renamed without ù and now it works (/fubar - tech/)... how do you get the foobar root folder in your code ? something is looking bad in ...

thanx for the help, and add an advert in the doc to explain that are restrictions in the name of the root foobar folder naming for Direct3D rendering ... just until you fix it


EDIT: the behaviour of this component is weird when i change seekbar.fx script, it's no always updated ... keep playing with it
Title: foo_wave_seekbar
Post by: Falstaff on 19 April, 2010, 04:11:05 PM
requests:

1. could it be possible to never save the wave form in db, maybe an option to purpose no ?

2. multiple instance of this panel (in a CUI config) ? for example, to display left channel in a panel and right panel in another one ...
Title: foo_wave_seekbar
Post by: Zao on 19 April, 2010, 04:21:09 PM
I have uploaded 0.2.7 which solves both possible problems.
It loads the file into memory using the foobar2000 infrastructure so it should behave properly with any paths that foobar2000 supports.
It also filters out (and warns) about any non-ASCII bytes in the effect file.

Multiple instances works out of the box. Just create two of it, and just check/uncheck channel checkboxes in each of them.

As for not storing waveforms and/or storing it in separate files, it's on the TODO but nothing concrete for now.
Title: foo_wave_seekbar
Post by: Falstaff on 19 April, 2010, 04:30:38 PM
I have uploaded 0.2.7 which solves both possible problems.
It loads the file into memory using the foobar2000 infrastructure so it should behave properly with any paths that foobar2000 supports.
It also filters out (and warns) about any non-ASCII bytes in the effect file.

Multiple instances works out of the box. Just create two of it, and just check/uncheck channel checkboxes in each of them.

As for not storing waveforms and/or storing it in separate files, it's on the TODO but nothing concrete for now.


i'm going to test the new version right now, thanx

"...storing it in separate files" -> would be cool to obtain the wave as a .png image in the music folder or in a specified folder (to set), so the wave form could be exploited out of the box with other components (WSH for example in order to code a more complex seekbar...)

thanx again Zao!

EDIT: all is fine in this new version foobar root folder name (fùbar is ok now) + multiple instances are ok (tested with both only)
Title: foo_wave_seekbar
Post by: Zao on 19 April, 2010, 04:43:32 PM
Back in the 0.0.x days, there used to be two separate components, foo_wave_cache and foo_wave_seekbar. The former had a public interface that could be used by any component.
Internally, that's still the case, so it sure would be possible to query the cache from other components. It's not separated enough to be usable by anyone else, and I doubt that anyone that was competent enough to do component dev would want it. Especially as if I publish an interface to it, I would be forced to ensure binary compatibility forever, which I'd rather not.

As for exporting PNG files, that's a bit restrictive and cumbersome, as the waveform is stored internally as a 1D texture.
Title: foo_wave_seekbar
Post by: Falstaff on 19 April, 2010, 04:52:37 PM
I understand

but ... exporting this 1D texture as a data file, that would be a useful option, for example, this will allow us to read this data file (ascii format because jscript can't read binary files) in a WSH script to draw to desired form, like a wave or like a color (like the moodbar of Amarok ...)

what do you think about it ?
Title: foo_wave_seekbar
Post by: Zao on 19 April, 2010, 04:59:11 PM
To quote Samir from Office Space: »Yes, this is horrible, this idea.«.
A solution not involving the file system would be most optimal. Possible implementation methods would be to use the non-existant service of my component, or opening the sqlite3 database yourself, or writing an component or external tool to extract such information. Or heck, expose it as a metadata field, but then we're getting into cwbowron-grade insanity.
Title: foo_wave_seekbar
Post by: lediur on 20 April, 2010, 12:04:42 AM
When I try to add this to my config, foobar immediately crashes with this in the event log:

Code: [Select]
Faulting application name: foobar2000.exe, version: 1.0.2.1, time stamp: 0x4bc1080c
Faulting module name: ntdll.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdb3b
Exception code: 0xc0000374
Fault offset: 0x000cdcbb
Faulting process id: 0x88c
Faulting application start time: 0x01cae03e20fa652f
Faulting application path: E:\Media\foobar2000\foobar2000.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
Report Id: 6cb7f953-4c31-11df-984f-f2b8e5f08a48


Here are my components:

Code: [Select]
Core (2010-04-10 23:21:50 UTC)
    foobar2000 core 1.0.2.1
foo_ac3.dll (2010-01-11 17:18:40 UTC)
    AC3 decoder 0.9.4
foo_adpcm.dll (2010-01-11 17:19:30 UTC)
    ADX decoder 1.8
    BRR decoder 0.7
    GCN DSP decoder 1.4
    Interplay ACM decoder 1.0
    kode's ADPCM decoders 1.4
    OKI-ADPCM decoder 0.14
    RAC decoder 1.0
    XA ADPCM decoder 1.5
foo_albumlist.dll (2010-04-10 23:19:56 UTC)
    Album List 4.4
foo_audioscrobbler.dll (2010-02-07 21:16:48 UTC)
    Audioscrobbler 1.4.6
foo_cdda.dll (2010-04-10 23:19:48 UTC)
    CD Audio Decoder 3.0
foo_channel_mixer.dll (2008-03-12 09:37:47 UTC)
    Channel Mixer 0.9.6.5
foo_converter.dll (2010-04-10 23:19:30 UTC)
    Converter 1.4
foo_dsp_dolbyhp.dll (2010-01-22 19:40:28 UTC)
    Dolby Headphone Wrapper 1.4.1
foo_dsp_fsurround.dll (2010-03-31 10:35:38 UTC)
    FreeSurround 0.3.5
foo_dsp_std.dll (2010-04-10 23:20:02 UTC)
    Standard DSP Array 1.0
foo_dumb.dll (2010-01-16 13:01:20 UTC)
    DUMB module decoder 0.9.9.12
foo_fileops.dll (2010-04-10 23:19:08 UTC)
    File Operations 2.1.2
foo_freedb2.dll (2010-04-10 23:19:10 UTC)
    freedb Tagger 0.6.2
foo_gep.dll (2010-02-10 05:23:54 UTC)
    Game Emu Player 1.94
foo_input_dts.dll (2010-01-11 17:28:30 UTC)
    DTS decoder 0.2.8
foo_input_std.dll (2010-04-10 23:19:50 UTC)
    Standard Input Array 1.0
foo_input_usf.dll (2010-02-04 00:10:14 UTC)
    LazyUSF 2.0 (Build Feb  3 2010)
foo_jesus.dll (2010-01-03 19:41:18 UTC)
    Autosave & Autobackup 8
foo_lastfm_radio.dll (2010-02-18 03:21:28 UTC)
    Last.fm Radio 0.5.7e
foo_midi.dll (2010-02-18 18:15:52 UTC)
    MIDI synthesizer host 1.99
foo_out_asio.dll (2009-03-22 20:15:46 UTC)
    ASIO support 1.2.7
foo_playcount.dll (2009-04-30 02:09:32 UTC)
    Playback Statistics 2.1.9
foo_podcatcher.dll (2010-03-26 02:30:42 UTC)
    Podcatcher 0.1.6d (beta)
foo_prettypop.dll (2009-12-06 03:31:08 UTC)
    Pretty Popup 1.2.5
foo_psf.dll (2010-03-04 04:52:40 UTC)
    Highly Experimental 2.0.12
foo_rgscan.dll (2010-04-10 23:19:38 UTC)
    ReplayGain Scanner 2.0.9
foo_sid.dll (2010-01-11 16:38:46 UTC)
    sidplay2 1.15
foo_softplaylists.dll (2010-03-23 04:30:13 UTC)
    Soft Playlists 2009-12-30.2
foo_ui_columns.dll (2010-01-09 14:40:28 UTC)
    Columns UI 0.3.8.3
foo_ui_std.dll (2010-04-10 23:20:12 UTC)
    Default User Interface 0.9.5
foo_uie_bookmarks.dll (2009-12-24 02:42:30 UTC)
    Bookmarks 0.3.0
foo_uie_vis_peakmeter_spectrum.dll (2008-04-20 01:18:50 UTC)
    Peakmeter Spectrum Visualisation 0.2.0.0 beta
foo_uie_wsh_panel_mod.dll (2010-02-28 02:59:14 UTC)
    WSH Panel Mod 1.3.2
foo_unpack.dll (2010-04-10 23:18:56 UTC)
    RAR reader 1.3
    ZIP/GZIP reader 1.0
foo_vis_shpeck.dll (2009-09-28 16:32:16 UTC)
    Shpeck - Winamp vis plugins wrapper 0.3.7
foo_w7shell.dll (2010-01-17 10:09:20 UTC)
    Windows 7 integration 0.2.9.1
foo_wave_seekbar.dll (2010-04-20 03:16:48 UTC)
    Waveform seekbar 0.2.7
Title: foo_wave_seekbar
Post by: Zao on 20 April, 2010, 06:55:26 AM
Did you submit a crash report? I can't find anything that's blamed on the current seekbar component. Is this CUI or DUI?
Also, try it on a fresh portable install without all the junk components.
Also, try running this redist test (http://www.acc.umu.se/~zao/CheckRedists.exe), as that does the same tests as my component does. You might be suffering from hooks from external applications or components. Something on your system is preventing the foobar2000 crash handler from activating.
Title: foo_wave_seekbar
Post by: Zao on 21 April, 2010, 09:40:20 AM
0.2.8 released, updating is strongly recommended as this fixes a rare crash bug when drawing detects a lost device.
Title: foo_wave_seekbar
Post by: Zao on 22 April, 2010, 06:12:18 AM
The 0.2.9 release is dedicated to all the idiots that consider themselves more competent at installing the DirectX runtime than the redist installer.
If you've been manually copying in d3dxN_NN.dll files, don't do that. That's bloody retarded and will lead to glorious explosions. Use the redist like everyone else, gaaaah.

*breathes*
0.2.9 also has a placeholder waveform with all possible channels present, and falls back to GDI more properly on frontend failure.
Title: foo_wave_seekbar
Post by: 2E7AH on 22 April, 2010, 06:53:31 AM
Maybe there should be option to switch the component like - don't process items not in media library, or something like that

That has been suggested before and I will likely add a preferences toggle for that.


Any news on this?
Title: foo_wave_seekbar
Post by: Zao on 22 April, 2010, 08:43:05 AM
0.2.10 has an advanced preference to scan tracks not in the media library. It defaults to the current behaviour, which to analyse everything.
Title: foo_wave_seekbar
Post by: 2E7AH on 22 April, 2010, 09:15:13 AM
All right, thanks
Long waited, very quickly implemented
Title: foo_wave_seekbar
Post by: Dandruff on 22 April, 2010, 09:43:31 AM
Mmh,

why not "Don't store analysed tracks not in the media library" to still get waveform display but without storing them to the database?
Title: foo_wave_seekbar
Post by: Zao on 22 April, 2010, 09:51:49 AM
Because that's a completely different feature, which would require multiple backends to support the temporary in-memory one then.
That is something that is not trivially implementable, unlike the analysis filter here, which was just a dozen lines or so in one function.
Literally, if (skip_tracks_outside) if (not library->is_track_in_library(make_handle(location))) skip();
Title: foo_wave_seekbar
Post by: Dandruff on 22 April, 2010, 10:10:17 AM
Ok, didn't know that. Just sounded more useful to me ;)

Don't actually need these options for me.
Title: foo_wave_seekbar
Post by: metalboy on 22 April, 2010, 12:23:47 PM
It would be nice for the display to scale or have ability to scale per volume. Example all my files are mp3gain scanned so they all "look" narrow ranged or quiet, some of the lower volume tracks or portions of tracks appear as just a line. Scale based on db's would be great then one could set max at 89 db's and that should be close on the range. It would give some control over the look of the wave also. Not really a dynamic per track scale as a constant scale, does that make sense?
Title: foo_wave_seekbar
Post by: Falstaff on 23 April, 2010, 06:33:55 AM
@Zao :

bug (according to me)

on playback STOP, the wave seekbar is still displayed, it shouldn't (no sense)

what about it ? could you fix it please ?

Thanx for feedback.

EDIT: i use latest version v0.2.10
Title: foo_wave_seekbar
Post by: Zao on 23 April, 2010, 12:46:45 PM
I consider it to be a feature that the previous waveform persists, as otherwise you'd get annoying flicker on track changes.
Title: foo_wave_seekbar
Post by: Falstaff on 23 April, 2010, 01:00:17 PM
weird, but it's your decision
Title: foo_wave_seekbar
Post by: Dandruff on 23 April, 2010, 01:07:17 PM
I consider it to be a feature that the previous waveform persists, as otherwise you'd get annoying flicker on track changes.


I'm cool with that! I hate flickering.
Title: foo_wave_seekbar
Post by: za222 on 23 April, 2010, 01:30:54 PM
I don't see what's wrong with that, either.

I'd rather see the waveform of the last track that was played instead of seeing nothing at all.
Title: foo_wave_seekbar
Post by: ExUser on 23 April, 2010, 02:33:25 PM
I think Falstaff's suggestion is backwards, personally. I like it the way it is.
Title: foo_wave_seekbar
Post by: Falstaff on 23 April, 2010, 03:29:40 PM
maybe i'm too binary
Title: foo_wave_seekbar
Post by: ExUser on 23 April, 2010, 03:54:02 PM
maybe i'm too binary
Maybe you're just false.
Title: foo_wave_seekbar
Post by: Zao on 24 April, 2010, 12:10:08 AM
0.2.11 now has a shiny tooltip when seeking that indicates the target time.
Title: foo_wave_seekbar
Post by: Dandruff on 24 April, 2010, 02:33:03 AM
0.2.11 now has a shiny tooltip when seeking that indicates the target time.


Very nice. But it should get improved a bit.


I have foobar at upper right screen corner. Dragging (seeking) mouse cursor out of screen (say above foobar in this case) causes tooltip going out of screen too. Tooltip should switch position to stay in foobar window. Same when dragging to the rightmost screen edge -> tooltip should switch position to the left of the mouse cursor to stay in screen. Also when dragging mouse cursor very far away from the foobar window (so that even the seek cursor gets hidden) doen't hide the tooltip. So you can move the tooltip around the whole screen via mouse drag. Should be avoided.
Title: foo_wave_seekbar
Post by: bb10 on 24 April, 2010, 07:32:58 AM
Very nice. But it should get improved a bit.


I have foobar at upper right screen corner. Dragging (seeking) mouse cursor out of screen (say above foobar in this case) causes tooltip going out of screen too. Tooltip should switch position to stay in foobar window. Same when dragging to the rightmost screen edge -> tooltip should switch position to the left of the mouse cursor to stay in screen. Also when dragging mouse cursor very far away from the foobar window (so that even the seek cursor gets hidden) doen't hide the tooltip. So you can move the tooltip around the whole screen via mouse drag. Should be avoided.

Already reported and fixed internally.
Title: foo_wave_seekbar
Post by: Dandruff on 24 April, 2010, 07:45:29 AM
Cool, thanks!
Title: foo_wave_seekbar
Post by: bb10 on 24 April, 2010, 08:16:19 AM
Sorry, I somehow didn't underline the part I was talking about.
Title: foo_wave_seekbar
Post by: teohhanhui on 24 April, 2010, 04:04:25 PM
Just wondering... Is Direct2D incapable of the same effects as Direct3D in this case? What are the advantages/disadvantages?
Title: foo_wave_seekbar
Post by: Zao on 24 April, 2010, 04:27:38 PM
I could make the Direct2D mode push the exact same pixels as the GDI mode, but then there would be no need for it.
The Direct2D look is the way it is because it's different and does something (smooth splines) that would be hard to do in the other two frontends.
This is why I do not bundle the Direct3D10 frontend anymore, it doesn't add any value over the Direct3D9 one.
Title: foo_wave_seekbar
Post by: Steve Forte Rio on 28 April, 2010, 04:39:25 AM
Hello and thank you for the great work.
I have an idea: could you add normalizing of waveforms? It can be very useful for signals with very low peaks
Title: foo_wave_seekbar
Post by: Kobs on 29 April, 2010, 06:07:46 AM
Hi Zao,

Thank you for this great component!

I use it since a long time but actually i have found a problem when tagging a file, short time after start playing :

Message:
'Could not update tags (Sharing violation) on: "<musicFileName>"'

I have installed a fresh foobar with foo_wave_seekbar only, same problem.
Hope it can help you resolving this. 
Title: foo_wave_seekbar
Post by: Dandruff on 29 April, 2010, 06:37:31 AM
I have foobar at upper right screen corner. Dragging (seeking) mouse cursor out of screen (say above foobar in this case) causes tooltip going out of screen too. Tooltip should switch position to stay in foobar window. Same when dragging to the rightmost screen edge -> tooltip should switch position to the left of the mouse cursor to stay in screen.

This still happens with 0.2.12!


Also when dragging mouse cursor very far away from the foobar window (so that even the seek cursor gets hidden) doen't hide the tooltip. So you can move the tooltip around the whole screen via mouse drag. Should be avoided.

This is fixed in 0.2.12, thanks!
Title: foo_wave_seekbar
Post by: Nii2 on 29 April, 2010, 08:04:20 AM
Hi,

thanks for this component. I would like to come back to 0.2.10 version. Where can I download it please?
Title: foo_wave_seekbar
Post by: ExUser on 29 April, 2010, 08:35:25 AM
What do you dislike about the new version?
Title: foo_wave_seekbar
Post by: Nii2 on 29 April, 2010, 08:58:11 AM
It's just visually. It doesn't render the same thing, I'd rather the 0.2.10 (I didn't test the 0.2.11) for this point.
Title: foo_wave_seekbar
Post by: Zao on 29 April, 2010, 11:07:16 AM
I have an idea: could you add normalizing of waveforms? It can be very useful for signals with very low peaks


It's deep in the todo somewhere, along with ReplayGain adjustment.

Message:
'Could not update tags (Sharing violation) on: "<musicFileName>"'


Known, but the fix is tricky and not robust. If I behave properly, any other component that tries to concurrently access the file will break it the same way.

I have foobar at upper right screen corner. Dragging (seeking) mouse cursor out of screen (say above foobar in this case) causes tooltip going out of screen too. Tooltip should switch position to stay in foobar window. Same when dragging to the rightmost screen edge -> tooltip should switch position to the left of the mouse cursor to stay in screen.

This still happens with 0.2.12!

Also when dragging mouse cursor very far away from the foobar window (so that even the seek cursor gets hidden) doen't hide the tooltip. So you can move the tooltip around the whole screen via mouse drag. Should be avoided.

This is fixed in 0.2.12, thanks!


The former needs querying of monitor rectangles and finding out the dimensions of the tooltip window itself. That requires effort, so I've put it on the mythical todo.
Hiding the tooltip on the other hand, is trivial and thus, it's done already.
Normally, the changelog tells the whole truth about what's in a release, unless I forget some minor fix or tweak.

Hi,

thanks for this component. I would like to come back to 0.2.10 version. Where can I download it please?


As far as I know, the components site only keeps the latest version, as it should.

It's just visually. It doesn't render the same thing, I'd rather the 0.2.10 (I didn't test the 0.2.11) for this point.


What frontend do you use, have you've rescanned the files with the later version?
What's different, scale, form, foot-tappityness?
Title: foo_wave_seekbar
Post by: Kobs on 29 April, 2010, 02:27:01 PM
It's deep in the todo somewhere, along with ReplayGain adjustment.

Message:
'Could not update tags (Sharing violation) on: "<musicFileName>"'


Known, but the fix is tricky and not robust. If I behave properly, any other component that tries to concurrently access the file will break it the same way.




Ok ! Thanks Zao!
Title: foo_wave_seekbar
Post by: Nii2 on 29 April, 2010, 04:23:57 PM
Ok, I'm gonna try to explain clearly with my poor english :S
I use Direct3D and I didn't rescan the files.
In previous version, I just had only one waveform for both channel display selected (right and left channel). Now, with 0.2.12, I have 2, and with my samll config it's not very nice. So, I would like to return to only one waveform. The other (minor) thing is the foreground color with latest version. It doesn't render the same nice "effect" with the same RGB adjustement than in the version 0.2.10. It's white instead of blue..
Here it is, I hope this is understanding.

Anyway, a suggestion, would it be possible to have tooltip indicating target time when focus with mouse on waveform seekbar?
Title: foo_wave_seekbar
Post by: Zao on 29 April, 2010, 05:00:34 PM
There is an option in the configuration for the element to downmix to just one channel. You just have to have the Center (mono) channel enabled and it will be just like before.
Title: foo_wave_seekbar
Post by: jeremija on 01 May, 2010, 07:58:09 AM
I'm experiencing 50% CPU Usage (guess this is 100% on one of two cores) while using Direct3D 9.0c on this system:

AMD Athlon II X2 250
2 GB RAM
Windows XP 32bit
ATI Radeon HD 4600 Series (latest drivers)

Using foobar2000 v1.0.3 DUI (didn't try in CUI)
Waveform seekbar 0.2.12

On other system with Win7 64bit this doesn't happen.

Also, when I switch to GDI, cpu falls down to 0%.
Title: foo_wave_seekbar
Post by: Zao on 01 May, 2010, 01:07:24 PM
Run Process Explorer, find the thread that is consuming a whole core, copy a few representative stack traces, or create a minidump and upload it somewhere.
Title: foo_wave_seekbar
Post by: jeremija on 01 May, 2010, 03:01:32 PM
Zao,

here is the screenshot of both foobar2000 and processexplorer in DUI,

(https://hydrogenaud.io/imgcache.php?id=81250294c1056f6dea7c6ff172f3f207" rel="cached" data-warn="External image, click to view at original size" data-url="http://img683.imageshack.us/img683/5543/dui.th.png) (http://img683.imageshack.us/i/dui.png/)

and this is what happens when I use this plugin in CUI (direct3d only, GDI is good): no significant CPU usage, but it displays just this fixed glitched image:
(https://hydrogenaud.io/imgcache.php?id=4e813100b18b3f03612115793a2534d4" rel="cached" data-warn="External image, click to view at original size" data-url="http://img204.imageshack.us/img204/3950/cui.th.png) (http://img204.imageshack.us/i/cui.png/)

Thank you for your time!
Title: foo_wave_seekbar
Post by: Zao on 01 May, 2010, 04:07:56 PM
I would blame ATI drivers. It's convenient, and wouldn't surprise me much.
Is that stack trace always the same, or does it vary a lot?
Title: foo_wave_seekbar
Post by: jeremija on 02 May, 2010, 02:12:09 AM
Could be that it's due to the ATI drivers... I've had problems with ATI cards before. I recently bought a GeForce and wouldn't go back to ATI for nothing (and on that PC this doesn't happen).
Title: foo_wave_seekbar
Post by: mjb2006 on 03 May, 2010, 03:20:33 AM
Quoting the 1st post:

Extract the archive into the foobar2000 directory (so that the effects directory is directly in your foobar2000 directory and not inside the components directory

I think you need to update these installation instructions. As of the 0.2.12, the distribution .zip contains only one file: the .dll, which apparently goes in the components directory.

Effects will only be loaded from profile directory now, if you have the effects directory in the application directory, move it to the profile directory (somewhere in the roaming application data, to get there, use the hidden [hold shift] »Browse configuration folder« command on the file menu).

That hidden command doesn't exist in my version of foobar2000 (1.0.3).
Maybe recommend this instead: Start > Run > %APPDATA%\foobar2000\effects
Also consider adding to this post something about the fact that seekbar.fx exists, and what it is?

Add UI element to the Default UI or Columns UI as normal

Took me a while to figure out that after doing this (in Columns UI), it was there, just collapsed. I had to drag the edge of the caption a bit to get the actual window to appear. Is this how it was for everyone, or does it depend on the existing layout?

Suggestion: If in the advanced prefs you have unchecked 'Analyse tracks not in the media library', and you attempt to manually extract a seekbar signature, write some kind of message to the console.

Anyway, thanks for the work you put into this component. It's awesome!
Title: foo_wave_seekbar
Post by: Zao on 03 May, 2010, 12:15:15 PM
Yay, feedback!
The changes in this version were mostly to conform to component site guidelines, so I changed the code and archive and didn't pay much attention to boring things such as documentation.
I've got a branch where I'm removing the .fx files completely, where the effect instead is stored in per-instance configuration. That would allow you to export your whole configuration cleanly as .fth or .fcl (I guess, don't use Columns).

As for your Columns UI snafu, it's probably due to the layout you're in, or my component not advertising a recommended size or something if there's such a thing in Columns.
In my world Columns is a second-tier platform, as I do not use it and rely on people on IRC who do to report misbehavior.

I've been blessed with a HA Wiki account recently, so I'll probably put some more structured information there eventually.
Title: foo_wave_seekbar
Post by: Axon on 04 May, 2010, 11:27:33 AM
FWIW, here's what I've done with my effect... plot is a 30 dB scale instead of linear; the plot is normalized to the track peak; orange=maxval, blue=minval, dark gray=rms.

(https://hydrogenaud.io/imgcache.php?id=bf2ca2b1aba4fb582287df47ede31586" rel="cached" data-warn="External image, click to view at original size" data-url="http://img175.imageshack.us/img175/3503/fb2kpic1b4may10.png)
Title: foo_wave_seekbar
Post by: Zao on 04 May, 2010, 03:39:56 PM
Cute. A bit too jaggy for my taste, but still.
Title: foo_wave_seekbar
Post by: MarkSeymour on 08 May, 2010, 11:18:31 AM
I have had this problem ever since using older versions of foo_wave_seekbar.
When using Direct2D mode on Windows 7 (x64, ATI Mobility Radeon HD 3650), the waveform appears outlined, while GDI is filled.
(https://hydrogenaud.io/imgcache.php?id=ee851dc778f56d8956be31987079b571" rel="cached" data-warn="External image, click to view at original size" data-url="http://i41.tinypic.com/5yccib.png)
Title: foo_wave_seekbar
Post by: Zao on 08 May, 2010, 11:49:49 AM
The Direct2D frontend intentionally looks different. If it looked the same, there would be no need to have it.
Title: foo_wave_seekbar
Post by: Zao on 09 May, 2010, 12:50:16 PM
A taste of future freedom:
(https://hydrogenaud.io/imgcache.php?id=8d5a3b089fe8b2c9ddc7ea23a5a85e54" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/effect-editor02-t.png) (http://www.acc.umu.se/~zao/effect-editor02.png)
It will have a fallback effect if you make errors, it stores per-instance effects, and has live preview and error reporting.
Title: foo_wave_seekbar
Post by: Dandruff on 09 May, 2010, 01:07:38 PM
Cool!
Title: foo_wave_seekbar
Post by: Slimbob on 11 May, 2010, 03:18:11 AM
I feel pretty stupid but I've looked through a lot of this thread and it seems like I am the only one with this problem.
I can't figure out how to make the bar horizontal. It's stuck in the vertical position for me.

EDIT 1: Woo I figured it out. I think.
Title: foo_wave_seekbar
Post by: Zao on 11 May, 2010, 06:59:25 AM
It automagically detects whether it should be vertical or horizontal from the size of the element. It will be orientated such that the bar follows the longest dimension. It used to be a configuration toggle.
Title: foo_wave_seekbar
Post by: Slimbob on 11 May, 2010, 09:15:01 AM
It automagically detects whether it should be vertical or horizontal from the size of the element. It will be orientated such that the bar follows the longest dimension. It used to be a configuration toggle.


Ah that explains it. I ended up making a horizontal splitter doodle to rest it on. It made the demons in my head stop.
Title: foo_wave_seekbar
Post by: Axon on 11 May, 2010, 06:00:26 PM
Cheezy pixel-shader-magnifying-glass effects, anybody?

Code: [Select]
float4 evaluate(float2 tc, float2 d, float x0)
{
   float xd=tc.x-x0,
         y=(1/2-1),
         u=-(2*xd/0.01)*(2*xd/0.01),
         E=exp(u/2);
  
   float4 minmaxrms = tex1Dbias(sTex, float4(
       tc.x + xd*y*E,
       0, 0,
       log2(2048*d.x * (1 + y*E*(1+u)))
       ));
      
// alpha 1 indicates biased texture
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;
...

Zao, I've noticed when mucking around with LOD bias/mipmap levels that min/max levels are being averaged at lower LOD levels. As I understand the effect code, this isn't as much of a big deal with the default effect, because well, it completely ignores LOD and thus has massive aliasing issues of its own. But how possible do you think it would be to manually populate the mipmaps, by computing the max/min of the higher resolution texture samples, instead of letting DirectX average samples together?

And for the ultimate nitpick: Could you populate the .g value of minmaxrms with rms^2, so that sample averaging at lower LOD levels is meaningfully accurate?
Title: foo_wave_seekbar
Post by: Zao on 12 May, 2010, 06:26:09 AM
I compute my own mipmaps. They are however just averaged as you noticed.
As for the default effect, as far as I know, sampling should pick a suitable miplevel according to size.
Title: foo_wave_seekbar
Post by: Purple Monkey on 12 May, 2010, 09:15:17 AM
Getting to grips with HLSL a bit, after much math I realised that it should excel at vectors. An update to the seekbar.fx (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5901) I posted in the CUI appearance thread.

To change the hue difference, change the number at 187,
Code: [Select]
c = hueshift(c,4.0);
If you want two particular hues, use the colour picker to find the hue values, subtract them and divide by 38.2.
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 13 May, 2010, 03:15:36 AM
Getting to grips with HLSL a bit, after much math I realised that it should excel at vectors. An update to the seekbar.fx (http://www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=5901) I posted in the CUI appearance thread.

To change the hue difference, change the number at 187,
Code: [Select]
c = hueshift(c,4.0);
If you want two particular hues, use the colour picker to find the hue values, subtract them and divide by 38.2.


I would like to make it so that my waveform is gray (or whatever the foreground color is), however, I want the played color to highlight it according to the selection color.  I can sort of get the opposite of what I want if I change your effect to grayscale.  Is there any easy way to modify it to get this effect?  Thanks.
Title: foo_wave_seekbar
Post by: Purple Monkey on 13 May, 2010, 09:14:42 AM
On line 165 under the played function change:
Code: [Select]
    if (pos > tc.x)
to
Code: [Select]
    if (pos < tc.x)
Title: foo_wave_seekbar
Post by: teohhanhui on 13 May, 2010, 04:02:59 PM
seekbar.fx is not extracted when the file does not exist but the "effects" folder already exists in the profile folder.
Title: foo_wave_seekbar
Post by: Zao on 13 May, 2010, 04:27:14 PM
That's not what my source code says, but in any way, it's largely moot.
The next version will not use files at all. I expect to release it in June or so.
Title: foo_wave_seekbar
Post by: Dandruff on 13 May, 2010, 07:06:09 PM
The next version will not use files at all.


Sounds nice! Thanks!
Title: foo_wave_seekbar
Post by: Anomalous on 13 May, 2010, 11:31:13 PM
Here's a version of the RMS effect which uses the highlight colour instead of just grey-scaling it. http://pastebin.com/rVfuCDgy (http://pastebin.com/rVfuCDgy)

(https://hydrogenaud.io/imgcache.php?id=f8012611e3b599d76b333d298a7f8bef" rel="cached" data-warn="External image, click to view at original size" data-url="http://i42.tinypic.com/4utgti.jpg)
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 14 May, 2010, 12:22:22 AM
On line 165 under the played function change:
Code: [Select]
    if (pos > tc.x)
to
Code: [Select]
    if (pos < tc.x)


Thanks.  This was really obvious, I really should have noticed that.


So, I've been trying to play around with the seekbar.fx file, but I'm really not sure what does what in the code.  First off, what language is this written in (and where can I find some basic documentation on the syntax)?  Also, is there any form of documentation for this code specifically?  I'm having a hard time trying to determine what each variable in the code corresponds to, and how to use them.  Finally, is there any way to print a variable's value to the console for debugging?  Thanks.
Title: foo_wave_seekbar
Post by: Anomalous on 14 May, 2010, 12:51:33 AM
From what I've read here it's High level shader language (http://en.wikipedia.org/wiki/High_Level_Shader_Language), there's documentation by Microsoft here (http://msdn.microsoft.com/en-us/library/bb509638%28VS.85%29.aspx).
Title: foo_wave_seekbar
Post by: Zao on 14 May, 2010, 05:19:11 AM
Printing is something that is very hard to achieve in shaders.

One fundamental concept that tends to confuse people used to normal languages is that the PS function (pixel shader) runs on each and every pixel of the display, in parallel.
Thus, you can't really return anything or affect anything outside that pixel, like some mythical console or so.
I find that one of the easier ways to output values is to set the output colour component to values you're interested in and estimate the value based on that, with the caveat that only colour components between 0 and 1 are representable.

Documentation should be available on MSDN as Anomalous linked, and you ought to be able to find decent information on post-processing elsewhere online too.
After all, this is the language that shaders for most games are written in.

As for documentation on my functions, they should hopefully be reasonably obvious based on their usage and parameters. Heh.
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 14 May, 2010, 06:07:32 AM
Thanks to both of you, that's helped a lot.
Title: foo_wave_seekbar
Post by: teohhanhui on 14 May, 2010, 08:11:07 AM
Here's a version of the RMS effect which uses the highlight colour instead of just grey-scaling it. http://pastebin.com/rVfuCDgy (http://pastebin.com/rVfuCDgy)

Thanks! That's exactly what I wanted but failed to achieve after trying for many hours...
Title: foo_wave_seekbar
Post by: IvoP123 on 19 May, 2010, 05:38:41 AM
My seekbar doesn't highlight played part of the song. Is this a bug or is it something wrong with my foobar (i use it in ubuntu with wine)?
Title: foo_wave_seekbar
Post by: Quærendo Invenietis on 24 May, 2010, 01:06:35 PM
Is there any feasible way to acquire Direct2D without having to install Vista SP2?
Title: foo_wave_seekbar
Post by: Zao on 24 May, 2010, 01:28:47 PM
No. None whatsoever. You need SP2 and the platform update.
Title: foo_wave_seekbar
Post by: Quærendo Invenietis on 26 May, 2010, 05:59:33 PM
Ah, I see. After trying to install SP2 on my system at least seventeen times, and after finally installing the Platform Update, and after finally trying Direct 2D out, I have come to the conclusion that I prefer GDI over Direct 2D. At least I have the option to switch between the two now. (I still prefer Direct 2D over Direct 3D.)

Thanks for the component, Zao. It's easily amongst my favorites.
Title: foo_wave_seekbar
Post by: MDMA on 27 May, 2010, 06:48:14 AM
Anyone have any idea how I can pad the wave seekbar, so that there are a few more extra pixels of background around the wave? Thanks :-)
Title: foo_wave_seekbar
Post by: Zao on 27 May, 2010, 10:11:56 AM
You can either scale down the texcoords somewhat, or fade to black when near the edge of the waveform, or something similarly sneaky.

That's all for the D3D one, of course. With GDI and D2D, you're out of luck.
Title: foo_wave_seekbar
Post by: MDMA on 27 May, 2010, 04:29:45 PM
No idea how to do what you just said  Some further help may be necessary! and yes I am using D3D
Title: foo_wave_seekbar
Post by: louiswain on 02 June, 2010, 08:38:25 AM
Hi
I'm trying to use your component but i cannot get it to work.
How can i activate the component so it appears in my foobar window?
I'm using winxp sp3 and i have an nforce4 gfx card, directx9 is installed too..
Please help. thank you!


update: already sorted out..
thanks for the neat plugin!
Title: foo_wave_seekbar
Post by: entsyymi on 05 June, 2010, 12:46:24 PM
Anyone have any idea why my seekbar goes like this at times:

(https://hydrogenaud.io/imgcache.php?id=6e4ff530dba62f1d3675bf11d26cee44" rel="cached" data-warn="External image, click to view at original size" data-url="http://pic.leech.it/i/27cea/6287ec6asd.jpg)

It just stays still, doesn't react to anything, and I have no idea what causes it. Im using Windows 7 and the newest version of fb2k.
Title: foo_wave_seekbar
Post by: Zao on 05 June, 2010, 06:04:16 PM
Not even clicking/dragging? Or resizing the element?
In other news, I'll be going home for summer, so I won't have any decent machine to develop on. After all my taunting of people who have GMA cards, now I have one of my own
Title: foo_wave_seekbar
Post by: 2E7AH on 06 June, 2010, 03:20:23 AM
I don't understand some of above talk, so hope not to repeat, but is it possible to script frequency range roughly in HSL space?

sine sweep:
(https://hydrogenaud.io/imgcache.php?id=04a4103a5e09ac31ca9009e02e7261c0" rel="cached" data-warn="External image, click to view at original size" data-url="http://img294.imageshack.us/img294/8122/11bramsweeplogw.png)

some track:
(https://hydrogenaud.io/imgcache.php?id=711ad6af641bdceeea19ac2e2cda25df" rel="cached" data-warn="External image, click to view at original size" data-url="http://img339.imageshack.us/img339/26/09vaihtujaflacw.png)

I found this when looking for some command line spectrogram script here (http://soundviewer.svn.sourceforge.net/viewvc/soundviewer/svt.py?view=markup&pathrev=1), which btw turned nice and fast for batch processing, and it also had option for generating such waveforms
Title: foo_wave_seekbar
Post by: Zao on 06 June, 2010, 06:16:39 AM
Any such analysis would probably be much better suited in another component using my storage, and even then it would require some extensive rewiring. If I were interested in doing it, which I'm not, I'd need at a minimum a proper existing algorithm to implement.
Title: foo_wave_seekbar
Post by: 2E7AH on 06 June, 2010, 12:36:08 PM
ok, Zao thanks for answering

for the record if you are referring to the linked code, as said it's fast, it uses numpy (all known lapack) for processing, and libsnd for reading audio, PIL for picture output. other is readable I guess
Title: foo_wave_seekbar
Post by: Zao on 06 June, 2010, 03:14:58 PM
That code is GPL licensed. I won't touch that with a ten foot pole.
Title: foo_wave_seekbar
Post by: 2E7AH on 06 June, 2010, 03:22:20 PM
I know what you mean + I'm replying as seems funny that libsnd author is known here: http://www.hydrogenaudio.org/forums/index....showtopic=36153 (http://www.hydrogenaudio.org/forums/index.php?showtopic=36153)
Title: foo_wave_seekbar
Post by: sPeziFisH on 10 June, 2010, 06:14:49 AM
Zao, Thx for this nice component.

Are the plans for adding a 2-step-update of visualization, i.e. if tracks are longer than x secs then the first y secs are displayed and the vis gets updated after the scan fully completed?
I recognize that with longer tracks the complete scan still takes its time (of course) and display is blank fot that time.

Maybe the whole seekbar-display and jumping-info gets added a state-variable/complete-variable, boolean, 0 for scanresult1 and 1 for scan-result2 (complete track-display), sort of this.

Btw, I am using seekbar only with on-the-fly-scanning as its a nicier way of displaying the track-position to me, Im no fan of extra-operations for more-or-less temporary-infos as storage of those signatures is of no use to me.


edit: btw
Title: foo_wave_seekbar
Post by: Zao on 10 June, 2010, 06:29:42 AM
Incremental updates has been suggested in the past.
The current architecture doesn't lend itself well to such things, even after the big rewrite for 0.2.
It might be doable with lots of effort, but I consider it not worth it, considering that tracks nominally scan in just a few seconds.

I'd rather focus my energy on things that matter, like the known crashes and bugs.
Title: foo_wave_seekbar
Post by: evil roy on 11 June, 2010, 09:40:34 PM
First of all great work on this component, Zao!!  I'm always amazed at the hard work done by people to make FB2K the best media player evar.

Now, of course, comes the bad part--not a waveform seekbar question per se, but for some reason I do not get the D3D option in the configuration window, only GDI and D2D.

Here is a screenie of my dxdiag (DX 11) which clearly states that D3D is enabled.  Any ideas?

(https://hydrogenaud.io/imgcache.php?id=b4cc3440d38ba327e9f7ace4f3de6499" rel="cached" data-warn="External image, click to view at original size" data-url="http://img822.imageshack.us/img822/332/dxdiag.jpg)

Thanks in advance . . .
Title: foo_wave_seekbar
Post by: jano on 11 June, 2010, 10:05:21 PM
...
The Direct3D 9.0c mode requires installation of the DirectX February 2010 runtime redistributable (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en).
The Direct2D 1.0 mode requires Windows Vista SP2 and the Platform Update (http://support.microsoft.com/kb/971644).
...

Have you installed the "DirectX February 2010 runtime redistributable"?
Title: foo_wave_seekbar
Post by: evil roy on 12 June, 2010, 12:32:21 AM
...
The Direct3D 9.0c mode requires installation of the DirectX February 2010 runtime redistributable (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en).
The Direct2D 1.0 mode requires Windows Vista SP2 and the Platform Update (http://support.microsoft.com/kb/971644).
...

Have you installed the "DirectX February 2010 runtime redistributable"?



Maybe I'm reading the download page wrong, but this looks like an update for directx 9.0c.  I am running directx 11.
Title: foo_wave_seekbar
Post by: teohhanhui on 12 June, 2010, 01:32:57 AM
...
The Direct3D 9.0c mode requires installation of the DirectX February 2010 runtime redistributable (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en).
The Direct2D 1.0 mode requires Windows Vista SP2 and the Platform Update (http://support.microsoft.com/kb/971644).
...

Have you installed the "DirectX February 2010 runtime redistributable"?



Maybe I'm reading the download page wrong, but this looks like an update for directx 9.0c.  I am running directx 11.

It updates DirectX components which are not only limited to DirectX 9. And do note that foo_wave_seekbar uses Direct3D 9.0c.
Title: foo_wave_seekbar
Post by: evil roy on 12 June, 2010, 01:53:51 AM
It updates DirectX components which are not only limited to DirectX 9. And do note that foo_wave_seekbar uses Direct3D 9.0c.


Does this mean that I can't get 3D3 functionality (for tweaked seekbar.fx's ala foosion et al)with DX11?
Title: foo_wave_seekbar
Post by: 2E7AH on 12 June, 2010, 02:04:06 AM
you can press "add reply" button instead quoting "reply" - back posts look silly

download the update setup file, it's a small file, and run it - it'll update what needs updating
if after that you have problems post again
Title: foo_wave_seekbar
Post by: evil roy on 12 June, 2010, 02:51:16 AM
you can press "add reply" button instead quoting "reply" - back posts look silly


Will do.

Sorry, I couldn't resist.
Title: foo_wave_seekbar
Post by: 2E7AH on 12 June, 2010, 03:12:55 AM


what a joker
Title: foo_wave_seekbar
Post by: omnimodis78 on 12 June, 2010, 12:30:18 PM
Spectacular!  Thanks a lot! 
Title: foo_wave_seekbar
Post by: Zao on 12 June, 2010, 02:21:33 PM
It is always safe to install newer DirectX updates, which will install and update any DirectX components in need of updating.
It is also safe to install older DirectX updates when a game or application attempts to do it, as it will never downgrade anything.

As for DirectX versions, they all coexist side-by-side. Older D3D versions tend to be emulated through newer ones as time passes, of course, but that's a driver implementation detail.
Title: foo_wave_seekbar
Post by: suaff on 14 June, 2010, 07:53:01 AM
hi,

Thank you for nice plugin! My suggestion is seeking using the mouse-wheel (like standard seekbar can do that). Is it hard to implement?
Title: foo_wave_seekbar
Post by: Zao on 14 June, 2010, 09:10:07 AM
Maybe. It depends on how much effort I need to make to honor the "scroll applies to focused window" contract.
Title: foo_wave_seekbar
Post by: dhromed on 21 June, 2010, 03:54:09 PM
I just had this weird idea where, instead of a waveform, it would display RG power, perhaps for some configurable resolution.

I don't know how feasible that is, though, given the CPU requirements of RG scanning.

The cause of this idea is that the waveform intensity often doesn't (completely) match my experienced intensity (which is why we have RG in the first place, obviously).
Title: foo_wave_seekbar
Post by: YoG on 26 June, 2010, 07:41:53 AM
awesome plugin.. thanks for coding this man!!
Title: foo_wave_seekbar
Post by: er_or on 27 June, 2010, 04:09:33 PM
1. I extract  foo_wave_seekbar.dll  into "components" directory
2. right click on track "extract seekbar signature", but nothing happens

I have XP SP3
What I'm doing wrong?
Title: foo_wave_seekbar
Post by: Case on 28 June, 2010, 03:31:49 PM
That option only forces the component to process the file(s) you selected. To see the results you need to enable layout editing mode and add the component to your layout. Also manual extraction isn't required normally. It will automatically do its thing for the files you play and to the next track in advance when possible.
Title: foo_wave_seekbar
Post by: er_or on 28 June, 2010, 11:15:55 PM
That option only forces the component to process the file(s) you selected. To see the results you need to enable layout editing mode and add the component to your layout. Also manual extraction isn't required normally. It will automatically do its thing for the files you play and to the next track in advance when possible.


I search though preferences, but there is no "layout editing mode". How can I enable it?
Title: foo_wave_seekbar
Post by: Andreasvb on 29 June, 2010, 01:39:22 AM
View > Layout.
Title: foo_wave_seekbar
Post by: er_or on 29 June, 2010, 04:25:31 PM
View > Layout.


ok, thx
Title: foo_wave_seekbar
Post by: evil roy on 01 July, 2010, 11:32:54 PM
Okay, I installed the DirectX February 2010 runtime redistributable.  I created a file named seekbar.fx containing the code from HERE (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&st=525&p=705262&#entry705262) and placed it in C:\Program Files\foobar2000\effects.  Still am not getting the RMS effect just a monochromatic wave from that looks like this: (https://hydrogenaud.io/imgcache.php?id=e2057c266ecddf7dc37eb1d8b247e39f" rel="cached" data-warn="External image, click to view at original size" data-url="http://usera.ImageCave.com/evilroy/form.jpg)

Configged thusly: (https://hydrogenaud.io/imgcache.php?id=a0318648ec89a46fb8028994567ddda7" rel="cached" data-warn="External image, click to view at original size" data-url="http://usera.ImageCave.com/evilroy/config.jpg)

Any ideas?
Title: foo_wave_seekbar
Post by: Zao on 02 July, 2010, 02:08:50 AM
The effects directory lives in your foobar2000 profile now, instead of in the application directory. There should (probably) exist one there already.

(This will change in the next release of the seekbar, as it has a built-in shader editor then, no more files).
Title: foo_wave_seekbar
Post by: evil roy on 02 July, 2010, 04:59:56 PM
Beautiful!! All is right with the world.  Thanks, Zao for you help and your hard work.
Title: foo_wave_seekbar
Post by: frogworth on 03 July, 2010, 09:59:46 AM
The effects directory lives in your foobar2000 profile now, instead of in the application directory. There should (probably) exist one there already.

(This will change in the next release of the seekbar, as it has a built-in shader editor then, no more files).


Cool. For those of us using a specially edited effects file to add customized RMS shading, will this then be doable via the built-in editor somehow? I've done a few things (make the location indicator narrower; change the colour of the RMS part, etc)...
Exciting! This is truly the awesomest foobar component
Title: foo_wave_seekbar
Post by: MarkSeymour on 04 July, 2010, 01:39:42 PM
I am getting an error in my console for when I attempt to use Direct3D, and it falls back to GDI:
Code: [Select]
[14:35:13] Seekbar: taking Direct3D9 path.
[14:35:13] Seekbar: Direct3D: ERROR_MOD_NOT_FOUND(-2147024770) n/a
[14:35:13] Seekbar: frontend creation failed: Direct3D9: could not create effects.
[14:35:13] Seekbar: taking GDI path.


I am using the .fx file for generating the RMS waveforms using the highlight colour.

Computer: foobar2000 1.0.3 / Windows 7 Professional x64 / 4GB ram / ATI Mobility Radeon HD 3650 - atikmdag.sys 8.1.1.921
Title: foo_wave_seekbar
Post by: Zao on 04 July, 2010, 03:26:54 PM
Ensure that you have the latest DX redist installed. Mixing and matching D3DX DLLs is not sufficient, nor recommended for anything.
Title: foo_wave_seekbar
Post by: MarkSeymour on 04 July, 2010, 04:04:33 PM
Ensure that you have the latest DX redist installed. Mixing and matching D3DX DLLs is not sufficient, nor recommended for anything.

I installed the latest (June 2010) DirectX version. It appears to load without problems (in the console), however I only see single lines where the waveforms should be.
Title: foo_wave_seekbar
Post by: Zao on 04 July, 2010, 09:14:30 PM
Can you upload your effect file zipped to some file hosting site?
Title: foo_wave_seekbar
Post by: MarkSeymour on 04 July, 2010, 11:08:21 PM
Can you upload your effect file zipped to some file hosting site?

Here it is ? http://pastie.org/1030696 (http://pastie.org/1030696)
Title: foo_wave_seekbar
Post by: Anomalous on 05 July, 2010, 10:23:41 PM
I installed the latest (June 2010) DirectX version. It appears to load without problems (in the console), however I only see single lines where the waveforms should be.

Do your tracks have replay gain data?
Title: foo_wave_seekbar
Post by: MarkSeymour on 08 July, 2010, 01:02:42 PM
Do your tracks have replay gain data?

Well, now they do! Thanks.
Title: foo_wave_seekbar
Post by: dzid_ on 13 July, 2010, 07:58:07 PM
I would like to see mouse wheel seeking 
Title: foo_wave_seekbar
Post by: dts350z on 24 July, 2010, 08:59:01 PM
Would it be possible to display the decoded waveforms of DTS files, similar to how the Peak meter and VU meter display the decoded channel info?

Title: foo_wave_seekbar
Post by: kode54 on 24 July, 2010, 10:18:35 PM
Yes, download my latest version of foo_input_dts. This particular feature will require foobar2000 1.1 or newer, beta included. Currently supports CDDA, WAV, FLAC, and WavPack.
Title: foo_wave_seekbar
Post by: mjb2006 on 26 July, 2010, 07:20:14 AM
I used MP3Gain/AACGain to adjust global gain in my MP3s and M4As. In my FLACs I just have ReplayGain metadata. Therefore I'd like my seekbar.fx file to use ReplayGain album gain if available, falling back on ReplayGain track gain, and if neither of those are available, then RMS (actually RMS multiplied by a reasonable value?).

I attempted to merge the seekbar.fx files posted earlier in this thread by using some branching in the evaluate function, but it doesn't work; I just get the flat line for every file:

Code: [Select]
float4 evaluate( float2 tc, float border )
{
    // alpha 1 indicates biased texture
    float4 minmaxrms = tex.Sample(sTex, tc.x);
    // scale by album gain or track gain or RMS
    if (replayGain.r) {
        minmaxrms.rgb *= pow(10,(replayGain.r) / 20) * 2;
    } else if (replayGain.g) {
        minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 2;
    } else {
        minmaxrms.rgb -= 0.5 * minmaxrms.a;
        minmaxrms.rgb *= 1.0 + minmaxrms.a;
    }

    float belowWave = tc.y + border - minmaxrms.r;
    float aboveWave = tc.y - border - minmaxrms.g;
    float factorWave = min(abs(belowWave), abs(aboveWave));
    bool insideWave = (belowWave > 0 && aboveWave < 0);
    
    float diffRms = abs(tc.y) - border - minmaxrms.b;
    float factorRms = abs(diffRms);
    bool insideRms = diffRms < 0;
    
    float factor = insideRms ? (1.0 - 0.5 * saturate(factorRms / border / 2)): 1.0;
    factor = insideWave ? (factor * saturate(factorWave / border / 2)) : 0.0;

    float4 wave = lerp(backgroundColor, textColor, factor);

    return saturate(wave);
}


Thanks to anyone who can help!
Title: foo_wave_seekbar
Post by: Anomalous on 27 July, 2010, 06:51:52 AM
It looks like the replay gain values are set to -1000 when it's not present (wouldn't NaN make more sense?), so i think what you want is:
Code: [Select]
    float4 minmaxrms = tex.Sample(sTex, tc.x);
    if (replayGain.r != -1000) {
        minmaxrms.rgb *= pow(10,(replayGain.r) / 20) * 2; //use album gain
    } else if (replayGain.g != -1000) {
        minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 2; //use track gain
    }
    minmaxrms.rgb -= 0.5 * minmaxrms.a;
    minmaxrms.rgb *= 1.0 + minmaxrms.a;
Title: foo_wave_seekbar
Post by: Hamallainen on 28 July, 2010, 04:57:44 PM
Hello
   Since april i have had 6 crash due to foo_wave_seekbar (according to crash report) while foobar playing in the background.
   Is there anything i can do or try to help solve this problem ?
   Thanks 
  
  
Code: [Select]
Illegal operation:
   Code: C0000005h, flags: 00000000h, address: 019FEFD8h
   Access violation, operation: read, address: 00007277h
  
   Call path:
   entry=>app_mainloop=>main_thread_callback::callback_run
  
   Code bytes (019FEFD8h):
   019FEF98h:  C7 04 3B 5D 08 75 A1 5E 5B 8B C7 5F 5D C3 CC CC
   019FEFA8h:  CC CC CC CC CC CC CC CC 55 8B EC 6A FF 68 18 DD
   019FEFB8h:  AD 01 64 A1 00 00 00 00 50 51 53 56 57 A1 18 AC
   019FEFC8h:  B4 01 33 C5 50 8D 45 F4 64 A3 00 00 00 00 8B F1
   019FEFD8h:  8B 46 08 85 C0 0F 84 2E 01 00 00 89 75 F0 E8 85
   019FEFE8h:  63 FE FF 83 7E 08 00 75 3F C7 45 FC FF FF FF FF
   019FEFF8h:  B8 00 00 00 80 8B CE F0 0F C1 01 A9 00 00 00 40
   019FF008h:  0F 85 03 01 00 00 3D 00 00 00 80 0F 8E F8 00 00
  
   Stack (0012FB04h):
   0012FAE4h:  00000000 00000000 00000000 00000000
   0012FAF4h:  00000000 00000000 00000000 00000000
   0012FB04h:  9DC8B4AD 08294578 0802B538 00000000
   0012FB14h:  0000726F 0012FB5C 01ADDD18 FFFFFFFF
   0012FB24h:  0012FB34 01A0480C 080147C0 07D7D61C
   0012FB34h:  0012FB68 01A03F3F 0012FB8B 9DC8B4E1
   0012FB44h:  080147C0 02724B1C 00000000 0046117F
   0012FB54h:  080147C0 07D7D61C 0012FB8C 01ADE42B
   0012FB64h:  00000001 0012FB98 01A039A3 0012FB8B
   0012FB74h:  9DC8B411 02724B18 00578988 0057964C
   0012FB84h:  06188E38 01000022 0012FBC8 01ADE4B8
   0012FB94h:  00000004 035B3A04 01A05099 035B3A00
   0012FBA4h:  004673C9 0012FC68 0012FC00 000004B1
   0012FBB4h:  00000000 00000001 035B3A00 02724B18
   0012FBC4h:  00000013 0012FBF0 0052C3F1 00000001
   0012FBD4h:  00467561 00000000 0012FC68 004674D0
   0012FBE4h:  00000000 0012FBDC 0012F728 0012FC84
   0012FBF4h:  0052A220 0055F610 00000000 0012FC2C
   0012FC04h:  7E398734 0002013A 000004B1 E976E5FE
   0012FC14h:  3704AEC1 004674D0 DCBAABCD 00000000
  
   Registers:
   EAX: 0012FB18, EBX: 00000000, ECX: 0000726F, EDX: 094A0001
   ESI: 0000726F, EDI: 08294578, EBP: 0012FB24, ESP: 0012FB04
  
   Crash location:
   Module: foo_wave_seekbar
   Offset: 4EFD8h
   Symbol: "boost::archive::detail::iserializer::load_object_data" (+1AA18h)
  
   Loaded modules:
   foobar2000                      loaded at 00400000h - 005BA000h
   ntdll                            loaded at 7C910000h - 7C9C9000h
   kernel32                        loaded at 7C800000h - 7C906000h
   COMCTL32                        loaded at 77390000h - 77493000h
   msvcrt                          loaded at 77BE0000h - 77C38000h
   ADVAPI32                        loaded at 77DA0000h - 77E4C000h
   RPCRT4                          loaded at 77E50000h - 77EE2000h
   Secur32                          loaded at 77FC0000h - 77FD1000h
   GDI32                            loaded at 77EF0000h - 77F39000h
   USER32                          loaded at 7E390000h - 7E421000h
   SHLWAPI                          loaded at 77F40000h - 77FB6000h
   DSOUND                          loaded at 73E60000h - 73EBC000h
   ole32                            loaded at 774A0000h - 775DD000h
   VERSION                          loaded at 77BD0000h - 77BD8000h
   WINMM                            loaded at 76AE0000h - 76B0F000h
   UxTheme                          loaded at 5B090000h - 5B0C8000h
   SHELL32                          loaded at 7C9D0000h - 7D1F5000h
   shared                          loaded at 10000000h - 1002B000h
   imagehlp                        loaded at 76C40000h - 76C68000h
   dbghelp                          loaded at 5D3F0000h - 5D491000h
   COMDLG32                        loaded at 76340000h - 7638A000h
   IMM32                            loaded at 76320000h - 7633D000h
   LPK                              loaded at 62DC0000h - 62DC9000h
   USP10                            loaded at 753C0000h - 7542B000h
   serwvdrv                        loaded at 5D0A0000h - 5D0A7000h
   umdmxfrm                        loaded at 5B3C0000h - 5B3C7000h
   MSCTF                            loaded at 74690000h - 746DC000h
   RTSUltraMonHook                  loaded at 00DA0000h - 00DCE000h
   WINTRUST                        loaded at 76BE0000h - 76C0E000h
   CRYPT32                          loaded at 779E0000h - 77A77000h
   MSASN1                          loaded at 77A80000h - 77A92000h
   wdmaud                          loaded at 72C70000h - 72C79000h
   msacm32                          loaded at 72C60000h - 72C68000h
   MSACM32                          loaded at 77BB0000h - 77BC5000h
   midimap                          loaded at 77BA0000h - 77BA7000h
   msctfime                        loaded at 75140000h - 7516E000h
   foo_audioscrobbler              loaded at 00F40000h - 00F73000h
   foo_input_std                    loaded at 00FA0000h - 010EC000h
   foo_ui_columns                  loaded at 01110000h - 0129E000h
   gdiplus                          loaded at 4EB80000h - 4ED2B000h
   foo_queuecontents                loaded at 012C0000h - 0137D000h
   OLEAUT32                        loaded at 770E0000h - 7716B000h
   foo_rgscan                      loaded at 013A0000h - 013EF000h
   foo_autoupdate                  loaded at 01410000h - 0145C000h
   POWRPROF                        loaded at 74A40000h - 74A48000h
   foo_dsp_std                      loaded at 01470000h - 014B9000h
   foo_input_monkey                loaded at 014E0000h - 01528000h
   foo_input_tak                    loaded at 01550000h - 01594000h
   tak_deco_lib                    loaded at 015B0000h - 015D0000h
   foo_fileops                      loaded at 016E0000h - 01728000h
   foo_burninate                    loaded at 01750000h - 01790000h
   foo_uie_console                  loaded at 017B0000h - 017CA000h
   foo_rg_trn                      loaded at 017F0000h - 01814000h
   foo_scheduler                    loaded at 01840000h - 0191E000h
   foo_uie_albumlist                loaded at 01940000h - 01983000h
   foo_wave_seekbar                loaded at 019B0000h - 01B7A000h
   WS2_32                          loaded at 719F0000h - 71A07000h
   WS2HELP                          loaded at 719E0000h - 719E8000h
   MSIMG32                          loaded at 76310000h - 76315000h
   foo_playcount                    loaded at 01BA0000h - 01BD0000h
   foo_uie_vis_channel_spectrum    loaded at 01BF0000h - 01C2D000h
   foo_freedb2                      loaded at 01C50000h - 01C92000h
   foo_ui_std                      loaded at 01CC0000h - 01DCE000h
   foo_cdda                        loaded at 01DF0000h - 01E3E000h
   foo_whatsnew                    loaded at 01E60000h - 01EA0000h
   foo_uie_playlists_dropdown      loaded at 01EC0000h - 01EFC000h
   foo_jesus                        loaded at 01F20000h - 01F48000h
   foo_converter                    loaded at 01F60000h - 01FD2000h
   foo_run                          loaded at 02000000h - 0205F000h
   CLBCATQ                          loaded at 76F80000h - 76FFF000h
   COMRes                          loaded at 77000000h - 770D4000h
   RTSUltraMonHookRes              loaded at 04C90000h - 04C93000h
   xpsp2res                        loaded at 05400000h - 056DA000h
   dciman32                        loaded at 73B10000h - 73B16000h
   mslbui                          loaded at 60970000h - 60979000h
   mswsock                          loaded at 71990000h - 719D0000h
   KsUser                          loaded at 73E30000h - 73E34000h
   DNSAPI                          loaded at 76ED0000h - 76EF7000h
   rasadhlp                        loaded at 76F70000h - 76F76000h
   imon                            loaded at 20B00000h - 20B2F000h
   WSOCK32                          loaded at 71A10000h - 71A1A000h
   NTMARTA                          loaded at 77650000h - 77671000h
   SAMLIB                          loaded at 71B50000h - 71B63000h
   WLDAP32                          loaded at 76F10000h - 76F3D000h
   hnetcfg                          loaded at 62E40000h - 62E99000h
   rsvpsp                          loaded at 72FD0000h - 72FED000h
   wshtcpip                        loaded at 719D0000h - 719D8000h
   netapi32                        loaded at 6FEE0000h - 6FF35000h
   appHelp                          loaded at 77B50000h - 77B72000h
   ieframe                          loaded at 40D30000h - 417C4000h
   iertutil                        loaded at 40B40000h - 40D28000h
   urlmon                          loaded at 45180000h - 452B3000h
   SETUPAPI                        loaded at 778E0000h - 779D8000h
   WININET                          loaded at 404A0000h - 40586000h
   Normaliz                        loaded at 04F90000h - 04F99000h
  
   Stack dump analysis:
   Address: 01ADDD18h (foo_wave_seekbar+12DD18h), symbol: "boost::serialization::singleton
   Address: 01A0480Ch (foo_wave_seekbar+5480Ch), symbol: "boost::archive::detail::iserializer::load_object_data" (+2024Ch)
   Address: 01A03F3Fh (foo_wave_seekbar+53F3Fh), symbol: "boost::archive::detail::iserializer::load_object_data" (+1F97Fh)
   Address: 0046117Fh (foobar2000+6117Fh)
   Address: 01ADE42Bh (foo_wave_seekbar+12E42Bh), symbol: "boost::serialization::singleton
   Address: 01A039A3h (foo_wave_seekbar+539A3h), symbol: "boost::archive::detail::iserializer::load_object_data" (+1F3E3h)
   Address: 00578988h (foobar2000+178988h)
   Address: 0057964Ch (foobar2000+17964Ch)
   Address: 01000022h (foo_input_std+60022h)
   Address: 01ADE4B8h (foo_wave_seekbar+12E4B8h), symbol: "boost::serialization::singleton
   Address: 01A05099h (foo_wave_seekbar+55099h), symbol: "boost::archive::detail::iserializer::load_object_data" (+20AD9h)
   Address: 004673C9h (foobar2000+673C9h)
   Address: 0052C3F1h (foobar2000+12C3F1h)
   Address: 00467561h (foobar2000+67561h)
   Address: 004674D0h (foobar2000+674D0h)
   Address: 0052A220h (foobar2000+12A220h)
   Address: 0055F610h (foobar2000+15F610h)
   Address: 7E398734h (USER32+8734h), symbol: "GetDC" (+6Dh)
   Address: 004674D0h (foobar2000+674D0h)
   Address: 004674D0h (foobar2000+674D0h)
   Address: 7E398816h (USER32+8816h), symbol: "GetDC" (+14Fh)
   Address: 004674D0h (foobar2000+674D0h)
   Address: 7E3C048Fh (USER32+3048Fh), symbol: "DeregisterShellHookWindow" (+1CFh)
   Address: 7E3C048Fh (USER32+3048Fh), symbol: "DeregisterShellHookWindow" (+1CFh)
   Address: 7E398830h (USER32+8830h), symbol: "GetDC" (+169h)
   Address: 7E3989CDh (USER32+89CDh), symbol: "GetWindowLongW" (+127h)
   Address: 004674D0h (foobar2000+674D0h)
   Address: 7E3991C6h (USER32+91C6h), symbol: "GetMessageW" (+0h)
   Address: 7C91FE30h (ntdll+FE30h), symbol: "RtlRestoreLastWin32Error" (+0h)
   Address: 7E3991C6h (USER32+91C6h), symbol: "GetMessageW" (+0h)
   Address: 7E3C048Fh (USER32+3048Fh), symbol: "DeregisterShellHookWindow" (+1CFh)
   Address: 7E3989F0h (USER32+89F0h), symbol: "GetWindowLongW" (+14Ah)
   Address: 7E398A10h (USER32+8A10h), symbol: "DispatchMessageW" (+Fh)
   Address: 7E39929Bh (USER32+929Bh), symbol: "PeekMessageW" (+0h)
   Address: 0046485Bh (foobar2000+6485Bh)
   Address: 01000811h (foo_input_std+60811h)
   Address: 00465614h (foobar2000+65614h)
   Address: 00547AFCh (foobar2000+147AFCh)
   Address: 00547AFCh (foobar2000+147AFCh)
   Address: 0055A354h (foobar2000+15A354h)
   Address: 00400000h (foobar2000+0h)
   Address: 0055A338h (foobar2000+15A338h)
   Address: 7C9201DBh (ntdll+101DBh), symbol: "RtlAllocateHeap" (+117h)
   Address: 0051F60Ch (foobar2000+11F60Ch)
   Address: 0051B1D0h (foobar2000+11B1D0h)
   Address: 0051F60Ch (foobar2000+11F60Ch)
   Address: 0051D5F4h (foobar2000+11D5F4h)
   Address: 7C92027Fh (ntdll+1027Fh), symbol: "RtlAllocateHeap" (+1BBh)
   Address: 00517EF2h (foobar2000+117EF2h)
   Address: 100027AAh (shared+27AAh), symbol: "uPrintCrashInfo_OnEvent" (+B0h)
   Address: 0054F384h (foobar2000+14F384h)
   Address: 00537F97h (foobar2000+137F97h)
   Address: 0054F384h (foobar2000+14F384h)
   Address: 00465857h (foobar2000+65857h)
   Address: 00400000h (foobar2000+0h)
   Address: 00517BEFh (foobar2000+117BEFh)
   Address: 005420B8h (foobar2000+1420B8h)
   Address: 0057F060h (foobar2000+17F060h)
   Address: 0053FE30h (foobar2000+13FE30h)
   Address: 00415116h (foobar2000+15116h)
   Address: 0051B1D0h (foobar2000+11B1D0h)
   Address: 00517BEFh (foobar2000+117BEFh)
   Address: 00517C03h (foobar2000+117C03h)
   Address: 0053FE30h (foobar2000+13FE30h)
   Address: 0053839Dh (foobar2000+13839Dh)
   Address: 00519036h (foobar2000+119036h)
   Address: 00400000h (foobar2000+0h)
   Address: 0051B1D0h (foobar2000+11B1D0h)
   Address: 7C817077h (kernel32+17077h), symbol: "RegisterWaitForInputIdle" (+49h)
   Address: 7C839AD8h (kernel32+39AD8h), symbol: "ValidateLocale" (+2B0h)
   Address: 7C817080h (kernel32+17080h), symbol: "RegisterWaitForInputIdle" (+52h)
   Address: 005190A1h (foobar2000+1190A1h)
   Address: 0057005Ch (foobar2000+17005Ch)
   Address: 004E0049h (foobar2000+E0049h)
   Address: 004F0044h (foobar2000+F0044h)
   Address: 00530057h (foobar2000+130057h)
   Address: 0057005Ch (foobar2000+17005Ch)
   Address: 01C8B5AEh (foo_freedb2+3B5AEh)
   Address: 004B0063h (foobar2000+B0063h)
   Address: 00530022h (foobar2000+130022h)
   Address: 00500069h (foobar2000+100069h)
   Address: 00500069h (foobar2000+100069h)
   Address: 00410072h (foobar2000+10072h)
   Address: 00540079h (foobar2000+140079h)
   Address: 00430022h (foobar2000+30022h)
   Address: 00490057h (foobar2000+90057h)
   Address: 0044004Eh (foobar2000+4004Eh)
   Address: 0057004Fh (foobar2000+17004Fh)
   Address: 0053006Eh (foobar2000+13006Eh)
   Address: 00530078h (foobar2000+130078h)
   Address: 004D005Ch (foobar2000+D005Ch)
   Address: 004D005Fh (foobar2000+D005Fh)
   Address: 0057002Eh (foobar2000+17002Eh)
   Address: 0047002Eh (foobar2000+7002Eh)
   Address: 004D002Eh (foobar2000+D002Eh)
   Address: 00500069h (foobar2000+100069h)
   Address: 0044002Eh (foobar2000+4002Eh)
   Address: 01C8B5AEh (foo_freedb2+3B5AEh)
   Address: 0044002Eh (foobar2000+4002Eh)
   Address: 00410072h (foobar2000+10072h)
   Address: 00540079h (foobar2000+140079h)
   Address: 0057005Ch (foobar2000+17005Ch)
   Address: 004E0049h (foobar2000+E0049h)
   Address: 004F0044h (foobar2000+F0044h)
   Address: 00530057h (foobar2000+130057h)
   Address: 0057005Ch (foobar2000+17005Ch)
   Address: 0044002Eh (foobar2000+4002Eh)
   Address: 004D002Eh (foobar2000+D002Eh)
   Address: 0044002Eh (foobar2000+4002Eh)
   Address: 0052002Eh (foobar2000+12002Eh)
   Address: 01C8B5AEh (foo_freedb2+3B5AEh)
   Address: 0052002Eh (foobar2000+12002Eh)
   Address: 00410072h (foobar2000+10072h)
  
   Environment:
   App: foobar2000 v1.0.3
   OS: Windows 5.1.2600 Service Pack 3 x86
   CPU: Intel® Pentium® 4 CPU 2.66GHz, features: MMX SSE SSE2
   Audio: Périphérique son SB Live!; Lecture sur modem n° 1 (émulé)
   UI: Columns UI 0.3.8.7
  
   Components:
   Core (2010-04-29 14:43:38 UTC)
       foobar2000 core 1.0.3
   foo_audioscrobbler.dll (2010-06-04 07:27:04 UTC)
       Audioscrobbler 1.4.7
   foo_autoupdate.dll (2010-04-19 23:21:14 UTC)
       Automatic Updater 1
   foo_burninate.dll (2010-01-18 21:10:44 UTC)
       Audio CD Writer 3.0.2
   foo_cdda.dll (2010-04-29 12:35:30 UTC)
       CD Audio Decoder 3.0
   foo_converter.dll (2010-04-29 12:35:08 UTC)
       Converter 1.4.1
   foo_dsp_std.dll (2010-04-29 12:35:48 UTC)
       Standard DSP Array 1.0
   foo_fileops.dll (2010-04-29 12:34:40 UTC)
       File Operations 2.1.2
   foo_freedb2.dll (2010-04-29 12:34:40 UTC)
       freedb Tagger 0.6.2
   foo_input_monkey.dll (2009-05-01 12:40:52 UTC)
       Monkey's Audio Decoder 2.1.4
   foo_input_std.dll (2010-04-29 12:35:34 UTC)
       Standard Input Array 1.0
   foo_input_tak.dll (2010-01-09 18:11:58 UTC)
       TAK Decoder 0.4.4
   foo_jesus.dll (2010-04-20 20:59:46 UTC)
       Autosave & Autobackup 9
   foo_playcount.dll (2009-04-29 18:09:32 UTC)
       Playback Statistics 2.1.9
   foo_queuecontents.dll (2010-05-20 08:18:58 UTC)
       Queue Contents Editor 0.3.9
   foo_rg_trn.dll (2010-01-13 23:01:01 UTC)
       ReplayGain override 0.1.3
   foo_rgscan.dll (2010-04-29 12:35:12 UTC)
       ReplayGain Scanner 2.0.9
   foo_run.dll (2009-06-07 13:15:18 UTC)
       Run services 0.3.7
   foo_scheduler.dll (2010-07-18 19:37:36 UTC)
       Scheduler 4.05
   foo_ui_columns.dll (2010-06-17 20:49:12 UTC)
       Columns UI 0.3.8.7
   foo_ui_std.dll (2010-04-29 12:35:56 UTC)
       Default User Interface 0.9.5
   foo_uie_albumlist.dll (2009-06-13 22:49:19 UTC)
       Album list panel 0.3.5
   foo_uie_console.dll (2009-08-29 16:06:24 UTC)
       Console panel 0.4
   foo_uie_playlists_dropdown.dll (2009-09-23 22:44:46 UTC)
       Playlists Dropdown 0.7.6
   foo_uie_vis_channel_spectrum.dll (2008-05-18 01:02:12 UTC)
       Channel Spectrum panel 0.17.2
   foo_wave_seekbar.dll (2010-04-24 22:35:42 UTC)
       Waveform seekbar 0.2.12
   foo_whatsnew.dll (2008-08-30 13:45:00 UTC)
       Feature Watcher 1.0.6
  
   Recent events:
   Audioscrobbler: Submission succeeded.
   Opening track for playback: "Z:\S\Skinny Puppy\1992. Last Rights\09. Circustance.mpc"
   Audioscrobbler: Submitting track...
   Audioscrobbler: Submission succeeded.
   Opening track for playback: "Z:\S\Skinny Puppy\1992. Last Rights\10. Left Hand Shake.mp3"
   Audioscrobbler: Submitting track...
   Audioscrobbler: Submission succeeded.
   Opening track for playback: "Z:\S\Skinny Puppy\1992. Last Rights\11. Download.mpc"
   Audioscrobbler: Submitting track...
   Audioscrobbler: Submission succeeded.
  
Title: foo_wave_seekbar
Post by: r0lZ on 29 July, 2010, 07:27:14 AM
Not sure that little bug has already been reported.  I'm too lazy to search the thread!

The seekbar shows nothing when the current track is encoded in MP3 Mono.  (I haven't tried with other file types.)

I have not ticked the option to store the signatures in mono.

As far as I know, everything else works flawlessly! 
Title: foo_wave_seekbar
Post by: Purple Monkey on 29 July, 2010, 09:44:40 AM
Have you got "Front Centre (mono)" ticked under the "Channel display order" option?
Title: foo_wave_seekbar
Post by: r0lZ on 29 July, 2010, 12:54:52 PM
Have you got "Front Centre (mono)" ticked under the "Channel display order" option?

Yes, the 6 first channels types are ticked.  (I think I have not changed that.)
Title: foo_wave_seekbar
Post by: r0lZ on 29 July, 2010, 01:49:20 PM
Bizarre!  I have checked my other mono MP3 files, and they are OK.  So, I've tried to clean the bad one, and I removed the tags and rebuilt the stream and the header.  No change.  Then I've tried to cut a part of the file with MP3DirectCut to upload it somewhere, and that part was OK!  But if I leave a relatively long part, the problem persists.  So, it might be related to the length of the track (11:30).

I've uploaded the original file here (http://www.4shared.com/audio/kiWtMnNu/12_-_interstellar_overdrive__l.html), so you can have a look.  But don't worry too much: as far as I know, only that file exhibits the problem.
Title: foo_wave_seekbar
Post by: Zao on 29 July, 2010, 06:27:57 PM
Your console should have a message along the lines of «Wave cache: track with mismatching channels, bailing out on "12 - interstellar overdrive (long mono version).mp3».
At 8m40s or so, the number of channels changes from 1 to 2 and stays at 2ch for the remainder of the track.
The analysis process is able to handle any combination of channels as long as they stay constant during the whole track, it can't and won't do is tracks where the channel count changes between chunks.
(https://hydrogenaud.io/imgcache.php?id=b6561003a8a7984ce30c35b8454f84c3" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar41_t.png) (http://www.acc.umu.se/~zao/seekbar41.png)
The 8:40 mark is at the discontinuity where it suddenly goes near-silent.
Title: foo_wave_seekbar
Post by: Zao on 29 July, 2010, 07:13:34 PM
Hello
    Since april i have had 6 crash due to foo_wave_seekbar (according to crash report) while foobar playing in the background.
    Is there anything i can do or try to help solve this problem ?
    Thanks


From your crash dumps, I gather that you're using the "do not scan tracks that are not in media library" feature.
The crash above is known and has been improved in the trunk, but has not been released. You might want to allow indiscriminate scanning.
(Preferences -> Advanced -> Tools -> Waveform Seekbar -> [X] Analyze tracks not in media library)

Furthermore, the codebase is not in shape for a release currently, as I don't have time to support the inevitable bugs that will arise.
Title: foo_wave_seekbar
Post by: Hamallainen on 29 July, 2010, 09:55:09 PM
Allright, i will try that. Thanks.
Title: foo_wave_seekbar
Post by: r0lZ on 30 July, 2010, 08:17:42 AM
Thanks for your fine analysis, Zao.  I did not know that the file was badly encoded, but I suspected something like that.  The next time, I'll watch the console.
Title: foo_wave_seekbar
Post by: bunaa on 07 August, 2010, 08:01:40 AM
dumb question maybe....

I can't manage to get the seekbar displayed.
Would be great if somebody can help me out.

@Creator:
An info at the first post and the documention page might help others, too!


It's nothing about an error message, it's more like I don't know how to place the bar (columns ui).
Title: foo_wave_seekbar
Post by: Zao on 07 August, 2010, 01:56:34 PM
Quote
- Add UI element to the Default UI or Columns UI as normal

You just add it like any other CUI panel.
Title: foo_wave_seekbar
Post by: bunaa on 08 August, 2010, 07:34:05 AM
I finally managed to get it displayed ...after a long trial and error period...

The Problem wasn't that I doesn't know that I've just to place it as any other panel - it was about how to place a panel at all!
I'm using foobar some time now, but the Quick Setup always was enough.


Maybe it's still worth to mention for other "beginners" like me!
Title: foo_wave_seekbar
Post by: r0lZ on 08 August, 2010, 07:35:49 PM
Maybe this time I've really found a bug.

I did some tests to convert 5.1 AC3 to Pro-Logic with foo_dsp_downmix. (BTW, it crashes when it is used to convert with F2K v1.0, but it seems to work well for playback.)  Anyway, your seekbar is handy to see what channels are really present (and not empty) in the AC3 file.  So, currently, I have two seekbars at the same time: a small mono seekbar that I use, well, as a seekbar, and a wide seekbar with all channels, usually hidden in a teb, that I use when I need to see what I'm currently playing or converting.

To set everything up, I downloaded this small test file: http://www.lynnepublishing.com/surround/ww...rround_test.ac3 (http://www.lynnepublishing.com/surround/www_lynnemusic_com_surround_test.ac3)

The bug: in the wide seekbar, I can see the 6 channels (although the LFE channel is hard to see).  But in the mono seekbar, the Rear Right channel is not present.  When I untick the Downmix Display To Mono option, the RR channel becomes visible immediately, so it's not a problem with the channels configuration.  (I have the 6 first channels ticked.)

Forcing the component to regenerate the waveform signature doesn't solve the problem.

I have also a question.  When there are two seekbars, I've noticed in the console that the two seekbars generate the same waveform signature at the same time.  Is it a risk of conflict?  Can I safely use several seekbars at the same time?
Title: foo_wave_seekbar
Post by: Zao on 09 August, 2010, 06:47:30 PM
The bug: in the wide seekbar, I can see the 6 channels (although the LFE channel is hard to see).  But in the mono seekbar, the Rear Right channel is not present.  When I untick the Downmix Display To Mono option, the RR channel becomes visible immediately, so it's not a problem with the channels configuration.  (I have the 6 first channels ticked.)


My downmixing code may very well be botched. It "worked" on whatever test file I had at the time.

I have also a question.  When there are two seekbars, I've noticed in the console that the two seekbars generate the same waveform signature at the same time.  Is it a risk of conflict?  Can I safely use several seekbars at the same time?

It is perfectly safe. The only thing that happens is that it'll throw away some redundant results, or overwrite them, can't quite remember which.

In any way, my SVN server and my development machines are offline until the fall semester starts again, so I can't even look at my code to tell what I'd done and what I need to do.

Thankfully you people don't have too many horrible crash bugs. Remember to submit crash reports if you get new kinds of crashes, as I look at the reports occasoinally.
Title: foo_wave_seekbar
Post by: r0lZ on 10 August, 2010, 04:39:05 AM
Thanks for the confirmation.  I'm glad I can use the two seekbars at the same time.

My downmixing code may very well be botched. It "worked" on whatever test file I had at the time.

When you will have access to your code, please try the AC3 sample.  The problem is obvious.

And BTW, I have never had real crashes with your seekbar.  :-)
Title: foo_wave_seekbar
Post by: Dandruff on 19 August, 2010, 01:23:22 PM
Why do I get double "Wave cache: finished analysis of" messages in the console?

Code: [Select]
Watching: D:\Music
Startup time : 0:00.154195
Seekbar: taking Direct3D9 path.
Seekbar: Frontend initialized.
Opening track for playback: "D:\Skream.mp3"
Wave cache: finished analysis of "D:\Skream.mp3"
Wave cache: finished analysis of "D:\Skream.mp3"
Opening track for playback: "D:\Benji B.mp3"
Wave cache: finished analysis of "D:\Pursuit Grooves.mp3"
Opening track for playback: "D:\Pursuit Grooves.mp3"
Wave cache: finished analysis of "D:\Benji B.mp3"
Opening track for playback: "D:\Skream.mp3"
Title: foo_wave_seekbar
Post by: Zao on 19 August, 2010, 01:28:11 PM
Why do I get double "Wave cache: finished analysis of" messages in the console?

It's probably normal, as the analysis process doesn't actively avoid scanning multiple times, it just discards results if not needed.
As for what may trigger an analysis, the list is something like: playing a track, changing playback order, advancing tracks.
I may of course have messed up one of the above, sometime in the future I might add in diagnostics to the source of an analysis and whether it's user-initiated or best-effort.
Title: foo_wave_seekbar
Post by: Dandruff on 19 August, 2010, 04:30:16 PM
Alright. Thanks!
Title: foo_wave_seekbar
Post by: jsalmont on 20 August, 2010, 07:49:02 PM
As I understand it, this is a nice plugin.  Seeing the waveform is like hooking up Predator heat vision gear.

HOWEVER.

I have no f@#$% idea how to setup this plugin.  It's one of the things I dislike about Foobar, the UI customization.  True, I haven't spent 3 straight hours figuring it out, and maybe someone will explain and I'll feel like an idiot.  Until then, I can't use this plugin.  Why is this so difficult?

Usage:
- Add UI element to the Default UI or Columns UI as normal

= not enlightening.

I looked around and it really wasn't obvious to me.  Apologies for the pissy tone, I know you guys work hard.

Regards,
.l
Title: foo_wave_seekbar
Post by: Hitchhiker427 on 20 August, 2010, 08:10:44 PM
Assuming that you're using the Default UI, here's the wiki page on customizing the layout:

http://wiki.hydrogenaudio.org/index.php?ti...ut_Editing_Mode (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Layout_Editing_Mode)

It's not really the responsibility of every component developer to rehash the same information that's easily accessible from the wiki.  Changing the Default UI is standard operating procedure (as is changing the Columns UI), and doesn't really differ component to component.  You should really read the documentation before trying to customize your software.
Title: foo_wave_seekbar
Post by: oaqm on 22 August, 2010, 10:09:59 PM
Zao, many thanks to you & your 'trusty team of madmen™' for this brilliant component.
Title: foo_wave_seekbar
Post by: juglesh on 24 August, 2010, 12:40:13 PM
Firstly, please flame my stupid ass if there *is* a 'search within thread' function here... 

I would love to see a 'ruler' or some such along the bottom of the waveforms, so you can see on the waveform what time you are at, and more quickly jump to the time you want.
Title: foo_wave_seekbar
Post by: Andreasvb on 24 August, 2010, 12:52:36 PM
There is, at the bottom with the Reply-buttons.

And you can hold down the mousse-button to see the time, not as easy maybe, but it's a start.
Title: foo_wave_seekbar
Post by: Zao on 24 August, 2010, 03:52:19 PM
I haven't quite needed such exact indications, I just glance at the status bar for the duration and click roughly, or go by the waveform.
Both tickmarks and hover-for-time has been suggested in the past, and probably resides in the todo list on the offline server somewhere.
Title: foo_wave_seekbar
Post by: jsalmont on 24 August, 2010, 05:55:55 PM
Agreed.  Turns out it's pretty straightforward once you read the wiki.  Thanks for the link.

.l



Assuming that you're using the Default UI, here's the wiki page on customizing the layout:

http://wiki.hydrogenaudio.org/index.php?ti...ut_Editing_Mode (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Layout_Editing_Mode)

It's not really the responsibility of every component developer to rehash the same information that's easily accessible from the wiki.  Changing the Default UI is standard operating procedure (as is changing the Columns UI), and doesn't really differ component to component.  You should really read the documentation before trying to customize your software.

Title: foo_wave_seekbar
Post by: ExtremeHunter on 26 August, 2010, 05:05:21 AM
Hey Zao any chance to add the transparent background option (pseudo transparency) to future release?
Then it will be perfect
Title: foo_wave_seekbar
Post by: Zao on 26 August, 2010, 06:12:46 AM
What would be behind the UI element?
I've experimented with abysmal things like Panel Stack Switcher before, and it was a trainwreck. You need proper compositing for that, which can really only be emulated by a separate floating window with D3D9Ex and prayer.

You can modify the shader to use any kind of texture for your background, if you want to make it fit in over gradients or whatever.
Title: foo_wave_seekbar
Post by: ExtremeHunter on 26 August, 2010, 06:58:18 AM
Thanks for your reply. Yes i use panel stack splitter and want to add some bakground image for wave seekbar.
I have no idea how to modify the shader to achive that?
Can you point me to some shader example.
Thanks.
Title: foo_wave_seekbar
Post by: Zao on 26 August, 2010, 08:57:29 AM
There's a commented out section that loads files as textures in the default shader. You can uncomment that and use tex2D in the PS function to sample your texture in any way you want, really.
Like say:
(https://hydrogenaud.io/imgcache.php?id=e59b6ed87c9848e815693e81928bf9d7" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar26_t.png) (http://www.acc.umu.se/~zao/seekbar26.png)
Title: foo_wave_seekbar
Post by: ExtremeHunter on 26 August, 2010, 10:00:06 AM
Ok i get it. Now i go and play with it some more
Thanks a lot!
Title: foo_wave_seekbar
Post by: kruji on 28 August, 2010, 07:19:44 AM
would it be possible to store the effects in the user-components\foo_wave_seekbar directory?
Title: foo_wave_seekbar
Post by: lvqcl on 28 August, 2010, 09:03:02 AM
would it be possible to store the effects in the user-components\foo_wave_seekbar directory?


So foobar2000 will delete these effects during component upgrade? 
Title: foo_wave_seekbar
Post by: Zao on 28 August, 2010, 11:31:04 AM
Effects will not be stored in the filesystem at all in the next version. There will be a fancy per-element configuration dialog for the effect contents.
As for how it's currently, it'll look in the profile for the effect file.
Title: foo_wave_seekbar
Post by: ExtremeHunter on 03 September, 2010, 10:11:24 AM
Hey Zao!

I'm using  0.2.12 Waveform seekbar in foobar 1.1 on 64bit Seven and all drivers and directx updated and good CPU and GPU,
but there is very large CPU usage (almost 100%) while wave is updating when playing 6 Channel files like DTS or A-DVD
and no matter what is selected on Frontend settings.

Is this normal?
Title: foo_wave_seekbar
Post by: Zao on 03 September, 2010, 03:33:53 PM
Try looking at the threads with a recent (>12.00) Process Explorer and see which threads are consuming much CPU.
A processing task takes a file, decodes it all, collects statistics on the fly per channel and chunk, and in the end mangles that into a signature.

There shouldn't be anything significantly different between a 2ch file and a 6ch file, really.
Title: foo_wave_seekbar
Post by: ExtremeHunter on 04 September, 2010, 12:10:48 PM
Seems that the problem was in my OS! It was acting weird lately, so reinstalled OS and now all is ok. 

PS. When we can expect update? 
Title: foo_wave_seekbar
Post by: Zao on 05 September, 2010, 06:57:09 AM
That - only the almighty longcat knows.

To be honest though, I don't know really. The code is a bit unreadable to me after a few months of inactivity, and I've got a couple of crash bugs I ought to fix some day.
The primary thing holding it up is that I'm dreading the day when I need to merge the effect-rewrite branch to the main trunk.
That, and of course the overall cruftyness of a codebase that has evolved rather been designed.
Title: foo_wave_seekbar
Post by: Chronial on 20 September, 2010, 03:03:06 PM
I have feature request that would make this component even more awesome than it already is .

If I am not mistaken, the loudness levels are currently only calculated by summed output power. The result of this is, that in songs with bass it's mostly the lower frequencies that define the waveform. If you'd run the sound through the Fletcher-Munson curves, that represent the level at which the human ear actually hears the sound (this is also what replaygain does). This would give the waveform a way more "realistic" form.

Form the replaygain specifications:
Quote
The human ear does not perceive sounds of all frequencies as having equal loudness. For example, a full scale sine wave at 1kHz sounds much louder than a full scale sine wave at 10kHz, even though the two have identical energy. To account for this, the signal is filtered by an inverted approximation to the equal loudness curves (sometimes referred to as Fletcher-Munson curves).


Implementation of this should be rather easy, as sourcecode is readily available from every replaygain implementation (e.g. http://forums.winamp.com/attachment.php?at...p;d=1159455163) (http://forums.winamp.com/attachment.php?attachmentid=37967&d=1159455163)).

(Also you don't need to understand your sourcecode to implement that . I'd guess the sound processing part is rather simple or at the least the point at which you'd plug in those calculations should be simple enough to find ^^)
Title: foo_wave_seekbar
Post by: Zao on 20 September, 2010, 03:17:32 PM
You have clearly not seen the hackfest that is my analysis code. Some day I'll make some private DSPs and feed my data through those instead of the ad-hoc madness I current have.
I don't suppose that you as a component developer happens to sit on the secret of how to keep interest in a component after it's reasonably mature? 
Title: foo_wave_seekbar
Post by: Chronial on 20 September, 2010, 03:22:03 PM
Quote
I don't suppose that you as a component developer happens to sit on the secret of how to keep interest in a component after it's reasonably mature?

No - I have the same problem . I stopped development on every component I created, once it became reasonably mature ^^. The only minor helpful tip I have is to write such bad code, that you have to do a major rewrite before the component is mature. That way you will at least be able to understand your code later on .

But it would still be awesome if you would manage to get you interest up and develop this component a bit further. But on the other hand I'd be lying if I'd say it's not good as it is .
Title: foo_wave_seekbar
Post by: herojoker on 28 September, 2010, 01:35:06 AM
I just have a little suggestion for this great component:
Let the user define some image that will be shown while no waveform is shown.
This might happen for example if tracks outside of the media library are played and the corresponding option is unticked.
Support for transparent PNGs and centering the image would be ideal 
Title: foo_wave_seekbar
Post by: Zao on 28 September, 2010, 10:40:19 AM
Generic transparency is impossible for D3D, as that would require control over the toplevel window and its backbuffer, as well as D3D9Ex.
The problem with showing a placeholder is that you've got a lose-lose tradeoff of having it flicker into existence for a moment between tracks, and delaying the placeholder, resulting in a gap where nothing shows and lots more implementation pain.

I'm unsure if I expose the playing state to the shader, but it would probably be possible to do it all shader-side, assuming that the texture loading hasn't broken while I looked away.
Title: foo_wave_seekbar
Post by: larryfine on 28 September, 2010, 06:43:29 PM
Great plugin, thank you! A little slow when seeking lossless data but all work fine!

(https://hydrogenaud.io/imgcache.php?id=5db2a733be69830bfc5bd1df779bc488" rel="cached" data-warn="External image, click to view at original size" data-url="http://ezpicshare.com/images/foobar2892.png)
Title: foo_wave_seekbar
Post by: Zao on 28 September, 2010, 07:17:05 PM
Complain at or optimize the decoder for your files then.
Title: foo_wave_seekbar
Post by: larryfine on 29 September, 2010, 11:38:13 AM
Complain at or optimize the decoder for your files then.


Excuse me, but my english is very limited. What did you mean with "complain at or optimize blah..." ?
Title: foo_wave_seekbar
Post by: Zao on 29 September, 2010, 05:31:30 PM
The plugin uses whatever file format plugins you have installed. If it seems slow, it's because your decoder (in this case OptimFrog) is slow, or the files are encoded with a mode that is costly to decode.
Looking at the speed charts on the OF site, it seems like a rather expensive format to decode in general, compared to Wavpack and FLAC.
Another source of slowness might be if your disk or storage cannot take the load of several processes decoding a track at once. If that is the case, there is a setting in advanced preferences to restrict the number of concurrent analysis threads.
Title: foo_wave_seekbar
Post by: larryfine on 29 September, 2010, 06:34:10 PM
Thank you for your reply. You're right. The Optimfrog decompression is a little slow when stracting seekbar signature. It doesn't bother me. Unfortunately, the Optimfrog project is frozen since 2006.
Thank you, Zao! You made a pretty component.
Title: foo_wave_seekbar
Post by: herojoker on 02 October, 2010, 09:39:05 PM
Yet another suggestion: Create an option and/or hotkey to show the waveform of the currently selected track.
Title: foo_wave_seekbar
Post by: CmdRobot on 17 October, 2010, 11:52:28 AM
Hey Guys,
this is my first post at this forum, I follow it for more than a year now and always solved my problems without writing something myself.
But I think I need help with this one.

The Waveform Seekbar is the only component I added to my Foobar in the past months. It's really handy and looks great!

Only problem is that I have Windows 7 (64 bit) with no DirectX 9. I don't wanna install it so I get to pick between GDI and Direct2D. That's fine, I like the simple b/w-GDI-look. But as people tell that GDI uses a lot more CPU-power I wanted to switch to D2D. Problem is I really don't like the D2D look, the white bachground, black waveform with a white core.

Now here is my question: I don't have an effects folder, no seekbar.fx and I don't see any option to change the whole look of D2D.
Am I missing something here? I read through the whole thread but most of the people are talking about D3D so I didn't get to solve this.

Can anyone help?

Thanks a lot!

Here is my Foobar with the GDI look. (http://www.dropbox.com/gallery/7136456/1/Mix?h=e772c3)
Title: foo_wave_seekbar
Post by: Purple Monkey on 17 October, 2010, 01:00:51 PM
The shader only affects the D3D path. If you only want to adjust colours of the seekbar; you can right click -> configure, otherwise you need to install the DirectX Runtimes and use D3D. There is not really any reasons why installing the runtimes would be bad.
Title: foo_wave_seekbar
Post by: Zao on 17 October, 2010, 01:56:17 PM
The D3D9 mode should run on anything that has DX9 drivers and some kind of SM2.0 support. It has been shown to work on cards as low as the Geforce FX series, as well as most Intel GMA cards.

As for "no Direct3D9", you always have DirectX installed in the OS. The things you are missing are the D3DX libraries I use, which come with a new version a couple times per year.

That's all that will be installed if you install the runtime.

As for configuring the GDI and D2D frontends, they are rather restricted aside from the usual color/channel configuration.
Title: foo_wave_seekbar
Post by: CmdRobot on 18 October, 2010, 05:03:17 AM
Thanks for the fast replies!

I'm sorry, I don't really get this D3D 9, runtimes, libraries stuff because I don't even know what DirectX does... I think I have DirectX 10 or even DX 11 preinstalled on Windows 7. But your seekbar needs DirectX 9, right? So I have to install it as well. I know it's not possible to uninstall DX9 once it's on a computer. Thats why I don't really wanna put it on mine. Because installing a multi-mb programm just for the seekbar to look nicer is not worth it for me.

I'm afraid it is something like with the windows media player. My girlfriend installed it once just because she didn't know what she was doing and it turned out it's just not possible to uninstall it in any way without damaging your system.
Title: foo_wave_seekbar
Post by: Andreasvb on 18 October, 2010, 05:27:57 AM
Read the first post, links to the required runtimes.
Title: foo_wave_seekbar
Post by: Zao on 18 October, 2010, 09:34:57 AM
Windows Seven has support for all DirectX versions up to 11.
If I didn't use the functions from the D3DX helper libraries, it would run just fine out of the box on a fresh install of Seven.

Now, as I'm not masochistic, I use functions from the D3DX version from February 2010 instead of reinventing the wheel, so the DirectX redistributable from February 2010 needs to be installed.

Additionally, the installer (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en) linked from the first post is a web installer, so it will only install the bits required for your system.

As for installing it unnecessarily, it's not a big dependency, and it tends to be common among games or multimedia applications.

You cannot destroy anything irreversibly by installing a DirectX redistributable, it only installs any components that do not already exist.
Title: foo_wave_seekbar
Post by: CmdRobot on 20 October, 2010, 05:14:08 AM
You cannot destroy anything irreversibly by installing a DirectX redistributable, it only installs any components that do not already exist.


Alright, I did it. I launched the Webinstaller, switched to D3D and everything looks like with GDI but runs a lot smoother. Nice! Thanks again for this wonderful component, Zao!

One last thing though: I would love to see the waveform getting scaled by replay gain. Some of my songs have a very low volume and the waveform's amplitude is really low.
I downloaded some guys seekbar.fx, it scaled the waveform just fine but changed to colors and look of it as well. As I said, I really like the simple white bachground, black wave look. So I tried for like one hour to understand whats going on in seekbar.fx but I didn't understand anything.

So maybe somebody could post a seekbar.fx with replay gain scaling...?

Thanks!
Title: foo_wave_seekbar
Post by: Anomalous on 20 October, 2010, 06:26:14 AM
If you're talking about the one I posted here (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77490&view=findpost&p=705262), you can right click the seekbar, select configure, and change the colours to something you like.

Or if you prefer the look of the default seekbar here's the fx file with replay gain scaling. http://pastebin.com/5Fv4kZDR (http://pastebin.com/5Fv4kZDR)
Title: foo_wave_seekbar
Post by: CmdRobot on 20 October, 2010, 06:48:52 AM
Or if you prefer the look of the default seekbar here's the fx file with replay gain scaling. http://pastebin.com/5Fv4kZDR (http://pastebin.com/5Fv4kZDR)


This is exactly it!
Merci beaucoup!

Now let's see if I can live with a perfect config or if I start tweaking again in a couple of days...
Title: foo_wave_seekbar
Post by: djchristian on 02 November, 2010, 08:33:09 AM
How much does this plug-in wear on the harddrive?
Title: foo_wave_seekbar
Post by: Zao on 02 November, 2010, 08:47:55 AM
When analysing a track, as much as decoding it normally would do, as well as writing out a few kilobytes to the database, with whatever overhead that might have.

When changing tracks, reading said kilobytes from the database.

And oh, when exiting fb2k with jobs in queue, writing those job descriptions to the database, as well as reading them in when starting up again.
Title: foo_wave_seekbar
Post by: CmdRobot on 02 November, 2010, 08:59:06 AM
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!
Title: foo_wave_seekbar
Post by: frogworth on 03 November, 2010, 04:27:17 AM
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
Title: foo_wave_seekbar
Post by: Zao on 03 November, 2010, 05:37:20 AM
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.
Title: foo_wave_seekbar
Post by: Anomalous on 03 November, 2010, 06:24:21 AM
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.
Title: foo_wave_seekbar
Post by: Zao on 03 November, 2010, 07:06:44 AM
Quite probably technically possible 
Title: foo_wave_seekbar
Post by: zooliat on 17 November, 2010, 11:29:24 AM
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.
Title: foo_wave_seekbar
Post by: Zao on 18 November, 2010, 09:09:16 AM
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.
Title: foo_wave_seekbar
Post by: Anomalous on 19 November, 2010, 09:51:10 PM
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...
Title: foo_wave_seekbar
Post by: Zao on 20 November, 2010, 11:37:16 AM
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.
Title: foo_wave_seekbar
Post by: Test_12 on 28 November, 2010, 07:54:29 AM
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:
(https://hydrogenaud.io/imgcache.php?id=88fce9241ece832af2865ed2b7297b50" rel="cached" data-warn="External image, click to view at original size" data-url="http://img502.imageshack.us/img502/8158/ekranalnts2.png)

D3D:
(https://hydrogenaud.io/imgcache.php?id=d760ba9b6fe06b7f824e0cb91e0adf11" rel="cached" data-warn="External image, click to view at original size" data-url="http://img543.imageshack.us/img543/8745/d3d.png)

D2D:
(https://hydrogenaud.io/imgcache.php?id=8dc4d8a1bb9a706e9a583edf723fcca2" rel="cached" data-warn="External image, click to view at original size" data-url="http://img833.imageshack.us/img833/4981/ekranalnts40.png)

GDI:
(https://hydrogenaud.io/imgcache.php?id=512cb94ec7366dcd9d37b2f286a49cb3" rel="cached" data-warn="External image, click to view at original size" data-url="http://img593.imageshack.us/img593/5426/gdi.png)

Thanks...
Title: foo_wave_seekbar
Post by: Zao on 28 November, 2010, 08:15:34 AM
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.
Title: foo_wave_seekbar
Post by: Test_12 on 28 November, 2010, 08:25:34 AM
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:
(https://hydrogenaud.io/imgcache.php?id=4efece4c0ebf4816c5cb510c4f5ceb63" rel="cached" data-warn="External image, click to view at original size" data-url="http://img339.imageshack.us/img339/8827/ekran33.png)

Foobar:
(https://hydrogenaud.io/imgcache.php?id=f05134bba55b55dcc5bb382afe0d42a9" rel="cached" data-warn="External image, click to view at original size" data-url="http://img152.imageshack.us/img152/4161/ekranalntsc.png)

I think it needs to be resized :S

EDIT:

Nevermind, I solved the problem...
Title: foo_wave_seekbar
Post by: Andreasvb on 28 November, 2010, 09:25:44 AM
What was the problem?
Some DSP or gain?

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

Thanks.
Title: foo_wave_seekbar
Post by: technicaltitch on 01 December, 2010, 11:39:58 AM
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
Title: foo_wave_seekbar
Post by: Zao on 01 December, 2010, 12:34:04 PM
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.
Title: foo_wave_seekbar
Post by: technicaltitch on 01 December, 2010, 02:15:51 PM
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.
Title: foo_wave_seekbar
Post by: Zao on 01 December, 2010, 03:21:00 PM
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.
Title: foo_wave_seekbar
Post by: technicaltitch on 01 December, 2010, 05:32:40 PM
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.
Title: foo_wave_seekbar
Post by: Zao on 01 December, 2010, 07:34:46 PM
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.
Title: foo_wave_seekbar
Post by: CmdRobot on 03 December, 2010, 04:29:18 AM
I support doubleclicking on the waveform starts playback from the clicked region.

But still it's perfect the way it is.
Title: foo_wave_seekbar
Post by: maitreya on 10 December, 2010, 08:15:53 AM
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
Title: foo_wave_seekbar
Post by: Zao on 10 December, 2010, 01:14:27 PM
Exit foobar2000.
Download the sqlite3 shell (http://www.sqlite.org/sqlite-shell-win32-x86-3070400.zip), 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.
Title: foo_wave_seekbar
Post by: maitreya on 13 December, 2010, 01:59:23 AM
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
Title: foo_wave_seekbar
Post by: phunkydizco on 21 December, 2010, 09:11:14 AM
When I listen to internet radio suddenly my custom background color turns to gray. How can I fix this?
Title: foo_wave_seekbar
Post by: Zao on 21 December, 2010, 11:32:27 AM
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.
Title: foo_wave_seekbar
Post by: Marsu42 on 21 December, 2010, 05:38:30 PM
Well, I know these types of I-don't-want-to-read-the-whole-thread type remarks are bothersome, but here's one anyway:

I really like this component, but the problem is that a large part of the library I'm using is on a network share - only a smaller often accessed part is attached to a local disc. Everything is included in the library for searching etc. purposes, but the building the waveform db kills our network - It is stressed enough as it is with reading the meta tags.

It would be nice to have a blacklisting option, maybe a simple "don't analyse the files under path xyz" or even better a custom evaluation that skips the files if true (like $strstr(%path%,M:\) or something else).
Title: foo_wave_seekbar
Post by: Zao on 23 December, 2010, 05:43:26 AM
The only filtering you have available for now is to exclude anything that is not in the media library. The problem with implementing your suggestion is that it requires making some UI for specifying the paths, which is something I loathe.
Title: foo_wave_seekbar
Post by: phunkydizco on 23 December, 2010, 09:18:10 AM
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.


That seems to work. But a want to use shade played. In a stream the length of the track is 0. Perhaps you could only use the normal background color in this case.
Title: foo_wave_seekbar
Post by: Zao on 23 December, 2010, 01:49:51 PM
If it wasn't for whiny finns, you'd have something like this (http://www.acc.umu.se/~zao/seekbar14.png) for tracks without information. 
Title: foo_wave_seekbar
Post by: Marsu42 on 24 December, 2010, 07:01:02 AM
The problem with implementing your suggestion is that it requires making some UI for specifying the paths, which is something I loathe.


I don't know the SDK, but there shouldn't it be rather easy to add a "Blacklist Path" or "Blacklist query" text field option under Preferences->Advanced->Tools->Waveform seekbar? Many other components do it this way, and the problem i described unfortunately really is a showstopper for using your component with a slow network setup.
Title: foo_wave_seekbar
Post by: Zao on 24 December, 2010, 07:49:28 AM
Sure, it's reasonably "simple". The bothersome bit is exposing the ability to blacklist more than one thing, and whether I should intermingle this with the existing banned protocols or not.

And of course, the codebase is in no shape to be released, due to some accidental merges from an experimental branch. Maybe in the next year, when I'm on something more powerful than a netbook that cries if you load VS10.
Title: foo_wave_seekbar
Post by: adam777 on 04 January, 2011, 01:26:15 PM
Hello Zao,
I've been using the component for quite some time and found it very useful and very well done.
I do have one problem - suppose a file have a waveform stored in the DB, if I change the file to a different file with the same name (overwrite), the waveform used is the one extracted for the old file.
(Not sure that's exactly what happens, but some sort of waveforms mixup).
A possible solution would be to add a time stamp for the extraction and if the file date is newer (as in "introduced to the media library later"), rescan (I think the media library has some mechanism for tracking when files are introduced to the media library, file date is not something you can count on).
Another possible (though pretty damn, I must admit), is to not store waveforms at all, and rescan every file on launch.

Once again, thanks for the component, Adam.
Title: foo_wave_seekbar
Post by: Zao on 04 January, 2011, 03:20:21 PM
Responding to media library notifications is already in my todo. As for file date, that will fail rather spectacularly for things like CUE sheets.
Title: foo_wave_seekbar
Post by: adam777 on 04 January, 2011, 06:10:31 PM
Dunno about CUE sheets, I split them files right away
Thanks, Zao.
Title: foo_wave_seekbar
Post by: fillip on 06 January, 2011, 12:35:39 PM
Might have been on the last 20something pages ... but you need a function to clean the wavecache.db from dead entries
Title: foo_wave_seekbar
Post by: Zao on 06 January, 2011, 02:07:49 PM
You mean the one in Library -> Waveform Seekbar -> Remove Dead Waveforms? 
Title: foo_wave_seekbar
Post by: fillip on 07 January, 2011, 03:40:49 PM
You mean the one in Library -> Waveform Seekbar -> Remove Dead Waveforms? 


Oh I'm sorry, didn't see it there ... just looked into the options. And now I see it's also mentioned in the documentation =)
Title: foo_wave_seekbar
Post by: Zao on 08 January, 2011, 11:59:48 PM
Sorry about that, thought you were talking about my component, heh.
For what it's worth for you regular users, I've added support in my development build to restrict the update rate even further.
Title: foo_wave_seekbar
Post by: dunego on 24 January, 2011, 04:49:21 PM
Hey Zao, first of all thanks for that. I´m a music producer and that component is just great, really useful.

If I´m not asking for too much, is possible to put a zoom tool so we can zoom in and out the waveform as the cursor follow it, or even an option to follow or not follow cursor like on music production apps ? This could be useful cause sometimes if the music is too long, the waveform will become a brickwall.
Title: foo_wave_seekbar
Post by: Zao on 25 January, 2011, 03:32:25 AM
Zooming is something that the current architecture doesn't handle well at all.
The way it works is that it as an offline step analyses the whole audio stream collecting results into a finite set of buckets (2048 or so). As such, almost all the data I have stored is visible in a typical window size. If you zoom 2x, any window wider than 1024 would have to interpolate the results, already having hit the resolution of my data.

Allowing zoom would require on-the-fly analysis and generation of data, something which the current architecture is not designed for. This is coincidentally why stream waveforms are not in there either.
Title: foo_wave_seekbar
Post by: Xyzzy on 28 January, 2011, 08:44:49 AM
Hello

First, thanks to Zao for useful and elegant component. Zao, have you ever thought of making volume-handling component with aesthetics similar to the Seekbar? I would use it from the day one.

Second, could anyone share an .fx file that makes the tracing bar a bit wider?

TIA
Title: foo_wave_seekbar
Post by: Zao on 28 January, 2011, 01:06:28 PM
You should be able to change that width yourself, look for the variables seekWidth and positionWidth in the PS function. They are 2.5px by default.
Title: foo_wave_seekbar
Post by: Xyzzy on 28 January, 2011, 06:59:14 PM
You should be able to change that width yourself, look for the variables [font= "Courier New"]seekWidth[/font] and [font= "Courier New"]positionWidth[/font] in the [font= "Courier New"]PS[/font] function. They are 2.5px by default.


Thanks. Should there be any default file created somewhere? I don't see any 'effects' folder created.
Title: foo_wave_seekbar
Post by: Zao on 28 January, 2011, 07:05:44 PM
It should be in the foobar2000 directory of your user profile, as is proper, as it's per-user data.
Title: foo_wave_seekbar
Post by: Xyzzy on 31 January, 2011, 04:34:48 AM
It should be in the foobar2000 directory of your user profile, as is proper, as it's per-user data.


OK, it's there. No idea why I haven't noticed earlier.
Title: foo_wave_seekbar
Post by: mzso on 06 April, 2011, 11:24:41 AM
Hello!

I think this component might be leaking memory. I experienced growing memory from foobar. When I listened all day long to music foobar would reach 600 MB of memory usage. This plugin and some others became suspicious. So I removed this and I didn't seem to experience the kind of memory growth. And now I also made a test. I kept tapping the random track hotkey for a few minutes (on a playlist that had all of the songs cached) with and without waveform seekbar and the memory usage became significantly higher with waveform.
(https://hydrogenaud.io/imgcache.php?id=047d5a4e81d8ad02638e7c3f993587e0" rel="cached" data-warn="External image, click to view at original size" data-url="http://i55.tinypic.com/2zzrp7l.jpg)
The first is with with waveform. And the second is after removing it.

Made another test:
(https://hydrogenaud.io/imgcache.php?id=b41cbfab2b352a9b830f8272bb316ad9" rel="cached" data-warn="External image, click to view at original size" data-url="http://i51.tinypic.com/a9ofa0.jpg)

This time I added 13 waveform seekbar panels and (a menubar) to columns UI. Foobar started with about 376 MB memory (gues this is normal) and after a few minutes and about 400 random file opens it ended up with 957 MB.
Title: foo_wave_seekbar
Post by: Zao on 06 April, 2011, 02:06:48 PM
I'm innocent!  I'd guess that I've got some circular smart pointers keeping each other alive.
Does this happen for any of the frontends or just a single one of D3D9/D2D/GDI? It'd help in tracking down where it might be.

I've reproduced this locally with 0.2.12.
Title: foo_wave_seekbar
Post by: mzso on 06 April, 2011, 04:01:54 PM
I'm innocent!  I'd guess that I've got some circular smart pointers keeping each other alive.
Does this happen for any of the frontends or just a single one of D3D9/D2D/GDI? It'd help in tracking down where it might be.

I've reproduced this locally with 0.2.12.

Now I tried it with all three frontends. Memory increase seems to happen with all. Although GDI is much slower so I couldn't exactly try the same thing as with the other two. Also interestingly foobar starts with a lot less memory when GDI is selected. (55 MB compared to the 566 MB and 158 MB for Direct3d and direct2d).
Title: foo_wave_seekbar
Post by: Zao on 06 April, 2011, 10:32:49 PM
It's likely fixed in my development trunk now. If it's what I think it was, it was due to storing and mishandling corrupt data in the database.
I've got no idea if it's possible to make a release though, the codebase is in a horrible shape.
Title: foo_wave_seekbar
Post by: mzso on 07 April, 2011, 05:49:59 AM
It's likely fixed in my development trunk now. If it's what I think it was, it was due to storing and mishandling corrupt data in the database.
I've got no idea if it's possible to make a release though, the codebase is in a horrible shape.

I suppose its not worse than it was at the last release. A bug fixed is still a bug fixed. Anyway, if you decide not to release it "officially" maybe you could share it here for people like me to try?
Title: foo_wave_seekbar
Post by: Zao on 07 April, 2011, 08:02:17 PM
The problem is that I've got lots of half-arsed changes in there, due to some version control misuse.
I've got a visual shader editor that kind of works. I've got per-instance effects for the D3D case. I've stopped using a filesystem file for the effects. It has each frontend (almost) in a separate DLL.
It will require you to rescan all your tracks again (due to the malformed data problem).

But sure, if you feel adventurous - 0.2.13 here (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.zip).
Do let me know how it works, I haven't tried deploying it to anyone outside my circle of insane testers.

Make sure to backup the configuration, as I've never meant it to be downgradable.
Title: foo_wave_seekbar
Post by: mzso on 08 April, 2011, 05:25:10 AM
The problem is that I've got lots of half-arsed changes in there, due to some version control misuse.
I've got a visual shader editor that kind of works. I've got per-instance effects for the D3D case. I've stopped using a filesystem file for the effects. It has each frontend (almost) in a separate DLL.
It will require you to rescan all your tracks again (due to the malformed data problem).

But sure, if you feel adventurous - 0.2.13 here (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.zip).
Do let me know how it works, I haven't tried deploying it to anyone outside my circle of insane testers.

So far I had no problems. I can confirm that the memory doesn't increase anymore. As for the new features I wouldn't know how to try them. (Well, I could change stuff per panel and use the new mirror option, and noticed the "frontend settings" which I have no clue what is for)
Title: foo_wave_seekbar
Post by: Zao on 08 April, 2011, 11:57:53 AM
0.2.13.1 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.1.zip) should be slightly more accepting of old shaders, if someone's affected by that.
Remember, it's still not production quality.
Title: foo_wave_seekbar
Post by: Anomalous on 08 April, 2011, 11:14:00 PM
Wooo progress 

Some things I've noticed so far:
The last two may have been due to the malformed data problem, with a new database "%waveform_channel_count% MISSING" appears to work .

EDIT: first crash after making an autoplaylist of missing waveforms, extracting some, and then watching it flicker in EsPlaylist for a bit.
Title: foo_wave_seekbar
Post by: rol on 09 April, 2011, 03:54:37 AM
When I'm trying to replace old version with it I got startup error:

Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.


foobar 1.1.5
Title: foo_wave_seekbar
Post by: Zao on 09 April, 2011, 04:25:05 AM
Anomalous:
The effect editor is miserably inconsistent and pitiful, so don't expect it to be working that well at all.
As for the crashes you have, I've probably botched something with %waveform_channel_count% as it's been a bit spuriously visible here.
I should probably force a database purge next to ensure that any old incompatible data is really gone.

rol:
It is now out of necessity built against the dynamic VC10 runtime, so you need this redistributable (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c32f406a-f8fc-4164-b6eb-5328b8578f03) installed.
Title: foo_wave_seekbar
Post by: cameron on 10 April, 2011, 03:19:43 AM
Hi Zao,
thanks for this great add-on.

Can I offer a few trivial suggestions, as long-time user of foobar, but one who has never bothered with add-ons in the past.

It would have saved me a bit of time and confusion if there was a bit more detail in the instructions.
Example: for the DX runtime, add the explicit statement that "this is required for all systems, including Window-7."
As was apparent in recurrent posts to the forum, it is not clear to ordinary users that this provides extra features not present in the standard DX-11 installation.
In addition, the linked page is now dated November-2010 for the web installer, although the offline download is labelled as the June 2010 update. Perhaps just calling it the "latest version" would be simpler.
I think part of the confusion, at least for me, lies in Microsoft's obscure naming system.  As far as they are concerned the "Direct-X runtime" is already installed with the OS. This extra installation is the "Direct-X end-user runtime", although I am baffled as  to how I am supposed to tell them apart with names like that.

For the DX2D you could say the Platform Update is "not required for Win-7."
Title: foo_wave_seekbar
Post by: Zao on 10 April, 2011, 12:42:35 PM
In a perfect world, users would take the instructions at face value and stop making assumptions.
Title: foo_wave_seekbar
Post by: adam777 on 12 April, 2011, 05:56:42 AM
Hi Zao,
Nice to see updates regarding the component again.
Any update about media library notifications integration (automatically re-scan on file change under the same name etc.).
Thanks.
Title: foo_wave_seekbar
Post by: Zao on 12 April, 2011, 04:03:57 PM
The only Media Library-related functionality I have currently is a setting to avoid scanning tracks that are not present in the Media Library at all.
It's on the suggestion list, somewhere.
Title: foo_wave_seekbar
Post by: theratcheteer on 12 April, 2011, 04:18:47 PM
Hi Zao! Great plugin, and works perfectly for me!

Feature request, though: normalize the waveform so that it's as tall as the seekbar.

Again, this plugin is kickass!
Title: foo_wave_seekbar
Post by: adam777 on 13 April, 2011, 02:46:17 AM
The only Media Library-related functionality I have currently is a setting to avoid scanning tracks that are not present in the Media Library at all.
It's on the suggestion list, somewhere.


Thanks for the quick reply, Zao.
Glad to hear it's still being considered 
Any idea when you might have time to implement new features such as this one?
Title: foo_wave_seekbar
Post by: Zao on 13 April, 2011, 04:52:47 AM
Somewhere between Duke Nukem Forever and the heat death of the universe. As usual, I'm completely bogged down with work. I'm not really actively developing, I just dedicated some procrastination time to fixing the memory leak above.
Title: foo_wave_seekbar
Post by: adam777 on 13 April, 2011, 08:00:56 AM
Somewhere between Duke Nukem Forever and the heat death of the universe. As usual, I'm completely bogged down with work. I'm not really actively developing, I just dedicated some procrastination time to fixing the memory leak above.


  appreciated.
Title: foo_wave_seekbar
Post by: aum on 11 June, 2011, 06:40:17 AM
Nice plug! Thanks!
Please add a pseudo-transparent background option!
Title: foo_wave_seekbar
Post by: Zao on 11 June, 2011, 07:01:01 AM
A good while ago the D3D backend supported loading arbitrary textures you could sample from in the effect file.
That functionality may still be alive, I haven't looked at that part of the code in ages.
(https://hydrogenaud.io/imgcache.php?id=e59b6ed87c9848e815693e81928bf9d7" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar26_t.png) (http://www.acc.umu.se/~zao/seekbar26.png)

It is (essentially) impossible to attain proper transparency (in panel stacker or so) in the D3D case, and nothing I have bothered implementing in GDI or D2D.
Title: foo_wave_seekbar
Post by: CmdRobot on 11 June, 2011, 07:29:35 AM
Hi forum!
I love waveform seekbar. Thanks a lot for that component, Zao!

A while ago, I asked for a seekbar.fx file, that scales with replay-gain information, so that all waveforms have the same size. I have absolutely no idea how he did it, but some nice guy uploaded me this file:
http://dl.dropbox.com/u/7136456/seekbar.fx (http://dl.dropbox.com/u/7136456/seekbar.fx)

It worked perfectly. If a waveform was too flat (because the track volume was too low), I scaned the file and the volume and wavform were raised.
That has changed now. Don't know why, but when I replay gain-scan my files, the waveforms get smaller now. They're all set to 3/4th of the size of my waveform seekbar. I want full 4/4th!

Can anybody help?
Title: foo_wave_seekbar
Post by: Dexter_prog on 12 June, 2011, 02:22:08 PM
0.2.13.1 turned my foobar really sluggish. After switching 4 or 5 songs foobar would just freeze for a couple of seconds. I had to go back to 0.2.12
Title: foo_wave_seekbar
Post by: SASN on 13 June, 2011, 12:04:04 PM
What a nice contribution to my Foobar2k setup!

I use it borderless and in mono mode. Perhaps this seekbar can hint at what songs are subject to overdriven compression in the mixing/mastering.

Question: Does this seekbar have some kind of 3D display function?

The configuration has a 2D and a 3D option for the rendering. I just cannot tell if the difference is that great.
Title: foo_wave_seekbar
Post by: mjb2006 on 14 June, 2011, 05:58:49 AM
What actually gets rendered isn't quite the same from mode to mode, but no, nothing is 3D! Windows has different APIs for drawing things on the screen. GDI+, Direct3D, Direct2D ... the component can use whichever of these is available. The difference is mainly how much CPU usage they take... GDI+ requiring the most effort.
Title: foo_wave_seekbar
Post by: Zao on 14 June, 2011, 06:05:18 AM
SASN: I had no idea that you had edited your message with a question, as the forum only notifies me on new posts.
As mjb2006 says, there's no "3D" mode as far as drawing some kind of geometry, I only use Direct3D to get cheap rasterisation of the waveform image, as that is a task that programmable shaders excels at.
It _would_ be possible to write something fancy if I had bothered to expose the waveform API to other components, but there's no such thing currently.
Title: foo_wave_seekbar
Post by: herojoker on 24 June, 2011, 10:49:16 PM
A little suggestion: Please make it possible to display the channel names in the seekbar. For example common 4 channel audio might yield FL, FR, SL, SR and usual stereo tracks may yield L and R.
Title: foo_wave_seekbar
Post by: Zao on 25 June, 2011, 10:02:51 AM
Maybe for the future. I thought that I exposed the channel number for the D3D mode as a semantic, but it seems that it's not present.
As for actually drawing text, that would be a bit painful, and wouldn't be remotely customizable, as that involves way too much UI.
Title: foo_wave_seekbar
Post by: djchristian on 27 June, 2011, 12:04:51 PM
Exit foobar2000.
Download the sqlite3 shell (http://www.sqlite.org/sqlite-shell-win32-x86-3070400.zip), 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.


Why is it necessary to download the dll? Just throw the seekbar data file in the trash manually. It would be great if there's were a option to manually enter how the cache behave in seekbar.

Title: foo_wave_seekbar
Post by: Zao on 27 June, 2011, 01:35:04 PM
Exit foobar2000.
Download the sqlite3 shell (http://www.sqlite.org/sqlite-shell-win32-x86-3070400.zip), 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.


Why is it necessary to download the dll? Just throw the seekbar data file in the trash manually. It would be great if there's were a option to manually enter how the cache behave in seekbar.

I said to download an EXE, and the purpose was not to get rid of all the data, but to selectively remove jobs that for some reason are stuck.

As for an option to control what it stores and where, it's been on the todo for a good while, but it's something that has wide ramifications if it goes wrong, and adds lots of complexity, both configuration-wise and code-wise.

Currently, there's limited support to ignore things not in the media library. It might degrade decently if you scan the music you want and then write-protect the database file as a stopgap measure.
Title: foo_wave_seekbar
Post by: grimes on 28 June, 2011, 07:23:24 AM
Thanks for great component.

As a ColumnsUI user i would like to use your component in toolbar (as simple seekbar replacement).

I think only minor changes are needed for CUI-panel:

type_panel -> type_toolbar

in this case normal panel is still available (type_toolbar = toolbar + panel)

Title: foo_wave_seekbar
Post by: tedych on 28 June, 2011, 08:44:20 AM
A killer component!
Actually I'm pretty new to foobar2000 in the first place, and having played around with it for a night, I thought how good it would be if I had a waveform seekbar much like the waveform view in most sound editors.
Guess the surprise I ran into when I found this component.
It works fine under my Win7 x64.
I have a minor question though.

Why I don't see the DirectX 9.0c option under the available frontends? Only GDI and Direct2D 1.0.
I use Win7 x64 Enterprise SP1 and all recent WUpdates (last updated maybe 2 months ago). I haven't installed any DX redistributables and such. Could it be the reason?
Title: foo_wave_seekbar
Post by: fuflo on 28 June, 2011, 09:31:43 AM
win7 doesn't have dx9 by default. you have to install it separately.
Title: foo_wave_seekbar
Post by: Zao on 28 June, 2011, 10:26:44 AM
Why I don't see the DirectX 9.0c option under the available frontends? Only GDI and Direct2D 1.0.
I use Win7 x64 Enterprise SP1 and all recent WUpdates (last updated maybe 2 months ago). I haven't installed any DX redistributables and such. Could it be the reason?

Yes, you need the right DX redistributable. The console in your foobar probably mentions this in a nicely phrased message.
There's no DX runtimes deployed via Windows Update, the software vendor (game, application) are supposed to bundle them with their installer. As foobar components are installer-less, I do not bundle the runtime, instead instructing people to download them themselves.

win7 doesn't have dx9 by default. you have to install it separately.

That's not quite accurate. Windows 7 ships with core runtimes for at least D3D9 up to D3D11.
What it doesn't have out of the box are the release-specific libraries provided in the redistributables. The core of a Direct3D version has always been mostly the same, what differs between the SDK and runtime releases are the auxillary libraries like D3DX and XAudio.
Title: foo_wave_seekbar
Post by: tedych on 28 June, 2011, 11:18:30 AM
Thanks for the clarifications. I don't mind using GDI, it works fine and as expected.
And as no software currently (1/2 year since I'm with Win7) alerted me about DX9, I don't plan installing it. I do not play games on this OS.

A small feature request:
An option to limit the wave database cache (the cache .db file indirectly) would be nice so we have some control over it's growth in size. Maybe a maximum number of cached waveforms (50-100-200 as default? ) especially for people who often need to preview large collections. And using a FIFO principle for the cache maybe.
Title: foo_wave_seekbar
Post by: Zao on 28 June, 2011, 01:04:52 PM
[a href="http://www.acc.umu.se/~zao/seekbar45.png" target="_blank"]
D2D looks horrible squished down that small though, probably could use a line width relative the window size or some downsampling.
Title: foo_wave_seekbar
Post by: grimes on 28 June, 2011, 01:19:22 PM
I do not think about stereo mode, just replacement of "standard" seekbar in toolbar:

(https://hydrogenaud.io/imgcache.php?id=39bdd55121f42708ae1b64894dd57019" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/2011-06-2819-11-13u8h2.png) (http://www.abload.de/image.php?img=2011-06-2819-11-13u8h2.png)

(This is a one-line panel simulation of seekbar-toolbar)
Title: foo_wave_seekbar
Post by: Zao on 28 June, 2011, 01:26:40 PM
It's as full-featured as the panel-kind seekbar, so you can downmix it into mono, change the look, and all that perfectly fine.
Well, except for the crashes I seem to suffer whenever I add/remove it from the toolbar, that is.

Edit: I might add, that you should not expect a release any time soon, I'm, as usual, horribly busy.
Title: foo_wave_seekbar
Post by: Dexter_prog on 28 June, 2011, 04:13:24 PM
I don't get where I am supposed to copy the 2 DX dlls, for some reason ver 0.2.13.1 doesn't need them in the component folder but version 0.2.13 does


Is anyone else experiencing lag in the waveform seekbar when playing short tracks (like 0:50 minute long tracks) using D3D 9.0c render?
Title: foo_wave_seekbar
Post by: marc2003 on 28 June, 2011, 04:17:27 PM
i have no idea what you're on about so i'll just post the relevant part of the OP that you didn't read.

The Direct3D 9.0c mode requires the DirectX end-user runtime dated earliest February 2010, which can be installed through use of the DirectX end-user Runtime Web Installer (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en) (make sure to not accidentally install the Bing Bar they try to force on you).
Note that the DirectX redistributable is required on all OSes no matter whether you think you "have DirectX installed already, lol" or not.
Title: foo_wave_seekbar
Post by: Zao on 28 June, 2011, 05:52:58 PM
I don't get where I am supposed to copy the 2 DX dlls, for some reason ver 0.2.13.1 doesn't need them in the component folder but version 0.2.13 does


Is anyone else experiencing lag in the waveform seekbar when playing short tracks (like 0:50 minute long tracks) using D3D 9.0c render?

You're not ever supposed to copy the runtime DLLs yourself anywhere. You should run the installer and install them system-wide, assuming that you have rights to do so.

If you do not have the rights to do so, the main foobar2000 directory might be a decent bet, as there's some search path shenanigans going on when loading components. The difference you see is probably due to moving out the frontends into separate DLLs instead of having them in the main component.

As for "lag", you've got to elaborate further on that.
Title: foo_wave_seekbar
Post by: Dexter_prog on 28 June, 2011, 09:30:42 PM
Oh, I had already installed the DX redistributables, but the dlls inside the rar mislead me, haha, sorry for that.

About the "lag", I mean the progress bar, it goes kinda skippy. Like if you were playing a video game and had low FPS, you know what I'm saying?
Title: foo_wave_seekbar
Post by: Zao on 29 June, 2011, 03:06:51 AM
You shouldn't ever need to open the archive yourself. Just drag it onto the components box of foobar2000 and it will install properly.

As for stuttery updates, the GDI and D2D modes have lower update rates than the D3D mode. There's a tuning parameter in Advanced in Preferences where you can bump it up if you feel like burning some more power.
Title: foo_wave_seekbar
Post by: tedych on 29 June, 2011, 05:30:19 AM
In GDI mode there is no stuttery behavior of the wave seekbar, even for tracks below 0:40 in length.

"There's a tuning parameter in Advanced in Preferences where you can bump it up "
- Where is this, I don't seem to find it there.
Although I wonder why prefer Direct* than GDI anyway, this seekbar is not graphics intensive in the first place and in GDI mode I don't seem to see any jumps above 0-1% CPU usage for foobar2000.
Title: foo_wave_seekbar
Post by: Dexter_prog on 29 June, 2011, 09:01:49 AM
As for stuttery updates, the GDI and D2D modes have lower update rates than the D3D mode.

For me, GDI works kinda like D3D, but D2D works the smoothest

Quote
There's a tuning parameter in Advanced in Preferences where you can bump it up if you feel like burning some more power.

I saw that but I don't really understand what they are for. I changed them a few times and saw no difference :/

- Where is this, I don't seem to find it there.

Foobar > advanced settings > tools > Waveform seekbar
Title: foo_wave_seekbar
Post by: tedych on 29 June, 2011, 09:24:11 AM
...
Foobar > advanced settings > tools > Waveform seekbar

I've already been there, thats why I asked. The only performance parameter there is the number of concurrent threads (defaults to 3). By the way using the available processor cores is a good idea to speed up the waveform generation by fast decoding of the track - usually just a second for noncached tracks here.
Title: foo_wave_seekbar
Post by: Zao on 29 June, 2011, 10:56:15 AM
I could've sworn that that was in a released build, I probably misremembered. Anyway, what kind of GPU (or lack of GPU) do you have there, and do you have proper drivers installed?

As for the core count, performance tests show that for more than three cores, you're pretty much completely disk-bound. The setting is there if the default of min(core_count,limit) is not suitable for you.
Title: foo_wave_seekbar
Post by: Dexter_prog on 29 June, 2011, 05:44:34 PM
I have an onboard card (geforce 6150), latest drivers and I'm on a dualcore cpu (athlon X2), but I can play some games with higher detail than the wavebar. That's why I didn't think my GPU could be the culprit.
Title: foo_wave_seekbar
Post by: mayer on 02 July, 2011, 06:35:16 AM
hi, Zao!
is the seekbar compatible with fb2k 1.1.7?
i have many versions of vcredist installed and it still doesn`t works (Win7 x64)
do i need older version of player?
great job anyway, thank you :)
Title: foo_wave_seekbar
Post by: frogworth on 02 July, 2011, 07:12:44 AM
hi, Zao!
is the seekbar compatible with fb2k 1.1.7?


Works fine for me. My work computer is Win7 x64.
Title: foo_wave_seekbar
Post by: Case on 02 July, 2011, 09:47:10 AM
i have many versions of vcredist installed and it still doesn`t works (Win7 x64)

Perhaps you missed these instructions:
The Direct3D 9.0c mode requires the DirectX end-user runtime dated earliest February 2010, which can be installed through use of the DirectX end-user Runtime Web Installer (http://www.microsoft.com/downloads/details.aspx?familyid=2DA43D38-DB71-4C1B-BC6A-9B6652CD92A3&displaylang=en) (make sure to not accidentally install the Bing Bar they try to force on you).
Note that the DirectX redistributable is required on all OSes no matter whether you think you "have DirectX installed already, lol" or not.
Versions over 0.2.12 require the Visual Studio 2010 SP1 (x86) runtime (http://www.microsoft.com/download/en/details.aspx?id=8328).

Title: foo_wave_seekbar
Post by: mayer on 02 July, 2011, 10:03:14 AM
oh, hell yeah!
all of vcredist was x64 version, that`s the problem, thank you
Title: foo_wave_seekbar
Post by: Zao on 02 July, 2011, 10:37:18 AM
To clarify for future consumption, the bitness of the vcredist is referring to the bitness of the applications you want to run, not the OS bitness you're on.
Title: foo_wave_seekbar
Post by: tedych on 03 July, 2011, 08:28:35 AM
Zao. I found a memory leak in your component. Unfortunately I'll have to remove it from my foobar.
I reproduced it on several installations, with 1.1.6 and 1.1.7.
With every played song your component seems to leak about 50-100KB or something like that.
I just noticed this yesterday, when after 3 days of uptime my foobar2000 totalled 120+MB of RAM. I spent much time troubleshooting this until I found a pattern, and after tried removing the next suspect (the seekbar), it was finally and instantly Ok.
I start foobar and play with Prev/Next few tens/hundreds of times and it easily eats 30-40MB more after just few minutes of doing this. If I continued, it eventually ate more than 100MB in a matter of 10 minutes. After deleting the component, everything is Ok even after 20 minutes playing around with Nex/Prev song controls.
This on 3 different OSes and foobars. I want a stable player accross months of uptime, so I'll wait for a fixed version of waveform seekbar since it is so great.

Thanks.
Title: foo_wave_seekbar
Post by: Zao on 03 July, 2011, 08:33:47 AM
Which version is this, 0.2.12? There's a interim release (0.2.13.1 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.1.zip)) with discussion about the leak a page or so ago which fixes this, but is generally unpolished.
Title: foo_wave_seekbar
Post by: tedych on 03 July, 2011, 08:52:16 AM
Yes, the latest stable 0.2.12.
The new 0.2.13.1 completely refuses to play with foobar. At startup it says it was not for this version of foobar or something like that (1.1.6), I test on another machine where I have tried 1.1.6 some time ago, I installed 1.1.7, and the installation told me similar things, the component not installed correctly, or not meant for this version of foobar...
Quote
Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.

The stable version at least worked to start.
Anyway, I'm forced to wait for a stable release though. Not bound to alpha versions of any software I use.

(I just saw few pages ago a discussion about the same problem as you mentioned  ). The new alpha version is about 500KB smaller, and since it is not working for me, I'g guess you made many other changes to it (apart from the additional 2 dlls involved). Is there a version where just this bug was fixed?
Title: foo_wave_seekbar
Post by: Andreasvb on 03 July, 2011, 09:06:51 AM
@tedych: http://www.hydrogenaudio.org/forums/index....st&p=751354 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77490&view=findpost&p=751354)
Title: foo_wave_seekbar
Post by: Zao on 03 July, 2011, 09:19:22 AM
As the first page of the thread says, and as the post where the new version is introduced, it now depends on the VC++ 2010 SP1 (x86) runtime, due to it being a build from my work-in-progress sources at the time.
The reason for it is moving out the optional frontends (D3D, D2D) into separate DLLs, necessitating the use of a dynamic runtime to avoid massive restructuring.

And no, there is no bugfix release with just that bugfix, due to some version control accidents.
Title: foo_wave_seekbar
Post by: tedych on 03 July, 2011, 09:35:07 AM
I apologize  .
I tested it on my own system now, and it seems to work. I have VS2010 here in fact and that seems to have helped. Or some other software installed it as part of its installation.
The interesting part is now I see the DX 9.0c frontend and I haven't installed any additional DX redistributables (as I mentioned before).
Hoping it is stable enough not to crash on me on everyday music listening.
Thanks.
Still waiting for a stable release  .

EDIT: Nevermind, it seems under GDI foobar eats less memory, and it seems after the initial memory increase, foobar stabilizes, even with the component.
Title: foo_wave_seekbar
Post by: tedych on 05 July, 2011, 05:42:23 AM
Still, after 2 days the player ate another about 20-25MB, I don't know whether waveform seekbar is at fault again. Totalling 60MB. The process is slower this time but still eating memory for some reason.
Title: foo_wave_seekbar
Post by: mzso on 05 July, 2011, 08:15:20 AM
Still, after 2 days the player ate another about 20-25MB, I don't know whether waveform seekbar is at fault again. Totalling 60MB. The process is slower this time but still eating memory for some reason.

Is it really an issue? My foobar instance starts with ~90 MB of ram and stabilises at 130-140MB.
Title: foo_wave_seekbar
Post by: tedych on 05 July, 2011, 08:30:09 AM
Yes, it is an issue. Still not sure if this is caused by the seekbar. I'll wait for few days to see at what level it would stabilize.
140MB of RAM is way too much for a simple player as this one. I have 8 gigs of ram, but there are many other things hungry for ram, and also many other small ones (like the player) that are small enough but useful to not geting in the way in any way.
Again, I used winamp with 40 megs so far, and I found foobar to have better playlist management and display. Other than that I don't find any other thing that would have helped with the switch away from Winamp. Only the playlist management and the wider volume control (and this seekbar of course). If this player proves a resource hog (4-5 times more ram than w/amp), I'll sacrifice these things, honestly.
In our local forums here, I pointed out the problem, and many people responded they notice the same thing. It was supposed to be much lighter than other players, namely winamp. Was a nice try though. This time I will try without wave seekbar to see the ram consumption.
Title: foo_wave_seekbar
Post by: mzso on 05 July, 2011, 08:43:24 AM
Yes, it is an issue. Still not sure if this is caused by the seekbar. I'll wait for few days to see at what level it would stabilize.
140MB of RAM is way too much for a simple player as this one. I have 8 gigs of ram, but there are many other things hungry for ram, and also many other small ones (like the player) that are small enough but useful to not geting in the way in any way.
Again, I used winamp with 40 megs so far, and I found foobar to have better playlist management and display. Other than that I don't find any other thing that would have helped with the switch away from Winamp. Only the playlist management and the wider volume control (and this seekbar of course). If this player proves a resource hog (4-5 times more ram than w/amp), I'll sacrifice these things, honestly.
In our local forums here, I pointed out the problem, and many people responded they notice the same thing. It was supposed to be much lighter than other players, namely winamp. Was a nice try though. This time I will try without wave seekbar to see the ram consumption.

Ridiculous. With 8 gigs you worry about foobar taking up 60+ megs, and you even have extra panels...
Anyway. The more stuff you use the more memory is needed especially with visual stuff.

By the way. This is anything but a simple player.
Title: foo_wave_seekbar
Post by: Zao on 05 July, 2011, 08:58:32 AM
Leaks should not exist, no matter if you have gobs of memory or not. I wish I had time to comb through the component and clean up ownership issues. In the end, in deployed software, I'd rather err to the side of leaking than to use dangling objects as they tend to be very painful to debug, especially if mutated after their death.

I had a very elusive memory clobber bug a good while ago that only occured in very special configurations, where an ATL window frame suicided (delete this) and modified a member afterwards.

Back to the issue at hand though - address space is a very limited resource, particularly in such a rich client as foobar2000, which is very limited in this regard as it is a 32-bit application. At best we get four gigs of address space on x64 Windows, with chunks eaten up by libraries, graphics APIs, and so on. Every little bit counts, particularly as leaks love to fragment the heaps.
Title: foo_wave_seekbar
Post by: orchid on 05 July, 2011, 10:52:50 AM
140MB of RAM is way too much for a simple player as this one. I have 8 gigs of ram...

Unused RAM is wasted RAM. With 8 GB you won't notice a difference, unless running some heavy image/video editing processes. And yeah foobar isn't exactly a "simple" player.
Title: foo_wave_seekbar
Post by: Zao on 05 July, 2011, 12:04:14 PM
The OS will ensure that it's very rare that physical memory is completely unused. If it's not populated by data pages from working sets, it will use it for assorted caching (including filesystem cache.
What you will end up wasting if you're leaking, assuming that no part of a leaked page is hot, is that your swap file will accumulate dead pages. If you're one of those strange people that disable swap files because "you have enough memory, lol" you're doing your machine a disservice as you will force cold pages to stay resident in physical memory.

Please avoid derailing this thread with the pros and cons of the memory system. Mark Russinovich has some lovely articles if you want to educate yourself.
Title: foo_wave_seekbar
Post by: tedych on 05 July, 2011, 02:29:19 PM
Zao, thanks.
Still, I will leave the player with your component active for few weeks and will watch the memory. If it goes too much up, I'll remove it and test for another week or so.

Yes, the OS is taking care of the free memory as of Vista and 7, effectively. No need to talk about why I have 8GB (which is somewhat not that much already), most of the time I have 120+ processes, and 3.5 to 4+GB actively taken and used. I use virtual machines extensively, easily going up to 7.5 used GBs. The cache itself is beyond 3GB most of the time. Strangely enough I keep 12GB of swap, totalling 20GB virt. memory, but as long as I have HD space, won't decrease it.
Anyway, that was not the point, the point was that every MB counts after a point when such a program passes. Maybe the 100MB limit is the psychological one for me.
Memory leaks are one of few things I'm most afraid of. Not to mention the security implications they might have on the system.
Title: foo_wave_seekbar
Post by: Dexter_prog on 13 July, 2011, 05:24:13 PM
I'm having a problem. Every time I play a song that hasn't already been scanned by wave seekbar, after 1 second it produces a skip in the music, which corresponds with the seekbar showing up. So that means that the plugin scanning and finally displaying the seekbar produces a skip in the song. I am using 13.1
Title: foo_wave_seekbar
Post by: mzso on 13 July, 2011, 05:42:19 PM
Somekind of length limit would be nice. A few days ago I tried playing a DTS file. It appeared to be six hours lon (erroneously though because it was a two hour movie). Anyway foobar ended up maxing the cpu for a long time. After I got fed up I restarted switched to another file restarted again, but I still had max cpu usage. After I deleted the wave cache it was working normally again.
Title: foo_wave_seekbar
Post by: Zao on 14 July, 2011, 08:58:17 AM
Such a time limit would backfire on real-world files.
I have several single-file mixes that are well over four hours. They scan in way less than a minute, as the analysis is essentially decoder-bound in speed.

I would recommend not adding non-music files, or wait for the day in the far future when I implement blacklists.
The reason why it restarted the scan when you restarted foobar2000 is because it remembers the jobs it had pending when shutting down and restores them from the database on startup. If you've got some job you don't want, you can open the database and clear out the job table.
Title: foo_wave_seekbar
Post by: Zao on 14 July, 2011, 09:05:39 AM
... after 1 second it produces a skip in the music, which corresponds with the seekbar showing up ...

Which frontend are you using? Have you've messed with the buffering amount or priority of foobar's playback?
Even if I'm blocking something, there should be quite enough audio data buffered up to ensure glitchless playback.
The Direct2D backend should do all updating in a background thread, and there shouldn't be anything overly expensive going on in the Direct3D frontend.
The D3D and GDI ones do do things in the main thread (out of necessity for the former, and laziness for the latter).
Title: foo_wave_seekbar
Post by: mzso on 14 July, 2011, 02:00:06 PM
Such a time limit would backfire on real-world files.
I have several single-file mixes that are well over four hours. They scan in way less than a minute, as the analysis is essentially decoder-bound in speed.

I would recommend not adding non-music files, or wait for the day in the far future when I implement blacklists.
The reason why it restarted the scan when you restarted foobar2000 is because it remembers the jobs it had pending when shutting down and restores them from the database on startup. If you've got some job you don't want, you can open the database and clear out the job table.

Yeah, blacklisting would be nice. Or an easy way to cancel the problematic job.

How do I open the database by the way?
Title: foo_wave_seekbar
Post by: Zao on 14 July, 2011, 03:57:09 PM
It's a SQLite3 database file, so you need to download sqlite3.exe (http://www.sqlite.org/sqlite-shell-win32-x86-3070701.zip) and invoke it like sqlite3 D:\apps\foobar2000\wavecache.db without foobar2000 running.
In there, you can DELETE FROM job; to destroy all pending jobs or SELECT * FROM job; to list all the pending jobs.
You can also get rid of particular waveforms by removing entries from the file table.
Title: foo_wave_seekbar
Post by: Dexter_prog on 18 July, 2011, 10:37:16 AM
... after 1 second it produces a skip in the music, which corresponds with the seekbar showing up ...

Which frontend are you using? Have you've messed with the buffering amount or priority of foobar's playback?
Even if I'm blocking something, there should be quite enough audio data buffered up to ensure glitchless playback.
The Direct2D backend should do all updating in a background thread, and there shouldn't be anything overly expensive going on in the Direct3D frontend.
The D3D and GDI ones do do things in the main thread (out of necessity for the former, and laziness for the latter).

I am currently seeing if the culprit actually was foo lyrics and not waveforme seekbar. Right now I am pretty sure it was the lyrics or a combination of both (or some fucked up setting in my config).
Title: foo_wave_seekbar
Post by: Dexter_prog on 19 July, 2011, 02:11:50 PM
Ok, both waveform seek bar and foo_uie_lyrics2 make the CPU go to 100% and that is what produces the crackles in the music. I tried disabling one and then other one and both separately produce cpu spikes, then I removed both and cpu doesn't go over 50% when changing tracks. I tried all renders in Waveform, no change.
Title: foo_wave_seekbar
Post by: Edgar Grey on 21 August, 2011, 02:55:58 AM
Can't get 0.2.13.1 to work. Win XP SP3. DirectX end-user runtime and Visual Studio 2010 SP1 (x86) runtime are installed.

Message in console: UI Element instantiation failure: boost::filesystem::directory_iterator::construct:

What am I missing?
Title: foo_wave_seekbar
Post by: Zao on 21 August, 2011, 05:40:24 AM
Do you have your foobar2000 profile in some strange place, with non-ASCII characters in the path perhaps? I see you're russian, so that's probably the case.
Title: foo_wave_seekbar
Post by: Edgar Grey on 21 August, 2011, 06:09:20 AM
Do you have your foobar2000 profile in some strange place, with non-ASCII characters in the path perhaps? I see you're russian, so that's probably the case.


Yeah, I have Russian word in the path. But the older version of this plugin (0.2.12) works perfectly with the same path.
Title: foo_wave_seekbar
Post by: Zao on 21 August, 2011, 06:38:31 AM
It's a known bug. I moved out the frontends (d2d, d3d) into separate DLLs. The function that looks for the companion DLLs is broken on most locales if you use non-ASCII codepoints in paths, and on more exotic locales, probably completely broken. It is fixed in my personal builds, but I haven't made any release of it yet.
Title: foo_wave_seekbar
Post by: Edgar Grey on 21 August, 2011, 06:57:15 AM
Thanks for help. Just tried Portable Mode with different path and it works.
Title: foo_wave_seekbar
Post by: Zao on 21 August, 2011, 09:31:47 AM
Could you (with proper backups of your profile and components) try 0.2.13.6 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.6.zip)? It's a preview release, not tested enough to be a properly released.
Title: foo_wave_seekbar
Post by: mzso on 21 August, 2011, 09:33:13 AM
Could you (with proper backups of your profile and components) try 0.2.13.6 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.6.zip)? It's a preview release, not tested enough to be a properly released.

Any other change than the character fix?
Title: foo_wave_seekbar
Post by: Zao on 21 August, 2011, 10:21:30 AM
That depends on which version I last linked in public. Squinting at the commit history since 0.2.13.1:

There's probably more in there that's not covered by commit messages.
Title: foo_wave_seekbar
Post by: Edgar Grey on 21 August, 2011, 10:25:40 AM
It works!
Title: foo_wave_seekbar
Post by: eddi5 on 22 August, 2011, 08:27:11 AM
great job of seek bar wave, I use it for a long time foobar, Hair of the scrambled audio as inthe clipboard not work for me ..All DLLs are in the same folder as user foobar components .. or have a different location each? use the 0.2.13.6. danks
Title: foo_wave_seekbar
Post by: Zao on 22 August, 2011, 08:44:38 AM
You should not need to extract it manually at all. Just drag the ZIP onto the Components pane in Preferences and it installs for you.
If you really really want to install it manually, everything should be in the user-components\foo_wave_seekbar directory of your foobar2000 profile.

What did you mean by "Hair of the scrambled audio as inthe clipboard not work for me"?
Title: foo_wave_seekbar
Post by: eddi5 on 22 August, 2011, 09:15:16 AM
Hallo..:-)
wanted to know if you can drag a selection of audio, as I read before, or got it wrong:
"Holding the control key while dragging on the seekbar decodes the region to the clipboard for pasting into audio editors."

That would be great ..jej  since I work with sound effects, and that in foobar, and that would be fine in foobar ..
Title: foo_wave_seekbar
Post by: mzso on 22 August, 2011, 09:27:30 AM
Hallo..:-)
wanted to know if you can drag a selection of audio, as I read before, or got it wrong:
"Holding the control key while dragging on the seekbar decodes the region to the clipboard for pasting into audio editors."

That would be great ..jej  since I work with sound effects, and that in foobar, and that would be fine in foobar ..

You can. There is just no feedback visually. You just see the cursor moving
Title: foo_wave_seekbar
Post by: Zao on 22 August, 2011, 09:51:57 AM
As mzso said, the copy functionality has no visible UI and is quite unpolished. It will also not copy anything longer than a few minutes as a safeguard against accidentally copying a five hour megamix. I made it by request from some lad on ICQ earlier this summer. (Hi Gleb!)
The set of applications that understand clipboard audio seems to be a bit limited. Adobe Audition understands it, while Audacity doesn't.

Hold Ctrl, press down the mouse cursor where you want to start copying from.
Drag it (without any visual showing) to where you want to stop copying.
Release and the data should be on your clipboard.
Title: foo_wave_seekbar
Post by: eddi5 on 22 August, 2011, 03:58:19 PM
thanks to everyone, the installation of the componet was not really the problem, after several attempts I managed to have an audio on the clipboard, and I've taken two audio editors. the few seconds to get enough sample, It works! ;-)
Zao, they really appreciated the componet ... thanks
Title: foo_wave_seekbar
Post by: mjb2006 on 26 August, 2011, 03:16:13 AM
When I play some tracks for the first time, they get analyzed once. When I play other tracks for the first time, they gets analyzed twice. That is, sometimes the console will say Wave cache: finished analysis of "(whatever)" two times in a row (after the same delay and CPU spike) instead of just once.

I haven't figured out why this happens or how to make it happen consistently, but it happens so often, it's causing me grief when I play very long tracks. During the analysis of a long track (90-minute DJ set or whatever) my laptop's CPU gets pegged, and then to prevent overheating, the CPU is being throttled. The throttling just trades one problem for another; the CPU temp doesn't drop, it just holds steady while the analysis runs that much longer, and the longer it goes, the more likely the temperature is to creep up past whatever the threshold is that makes the OS go to sleep. When it tries to go to sleep as the CPU is throttled and overheating, the computer is useless for 15 minutes.

Even if I set the concurrent threads to 1, that just causes the analyses to be done in series instead of in parallel; it's not really much help.

Is there anything that can be done?
Title: foo_wave_seekbar
Post by: Zao on 26 August, 2011, 03:50:07 AM
Have you've considered fixing the underlying cause - the computer that can't handle some load? 
On a more serious note though, I could probably add an advanced preference that inhibits pre-emptive scanning of the next track and implicit scanning of tracks you're just starting to play.

As for dual scanning, I can't quite pinpoint what would cause it, but it might be a benign race in queuing the track and attempting to retrieve the waveform, or it might be related to the next-track functionality.
Title: foo_wave_seekbar
Post by: mjb2006 on 26 August, 2011, 04:54:06 AM
I've definitely been looking into ditching this laptop (HP Pavilion dv4-1125nr), but it's my only option at the moment.

The dual scanning doesn't seem to be related to the scanning of the next track. I mean, it happens even if there's no next track.
Title: foo_wave_seekbar
Post by: Dandruff on 26 August, 2011, 06:22:59 AM
I've definitely been looking into ditching this laptop (HP Pavilion dv4-1125nr), but it's my only option at the moment.

The dual scanning doesn't seem to be related to the scanning of the next track. I mean, it happens even if there's no next track.



Older reply from Zao: http://www.hydrogenaudio.org/forums/index....st&p=719090 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&view=findpost&p=719090)
Title: foo_wave_seekbar
Post by: Zao on 26 August, 2011, 03:06:30 PM
Seems like the internet has a better memory than I do 
Title: foo_wave_seekbar
Post by: Dexter_prog on 28 August, 2011, 02:17:02 PM
Could you (with proper backups of your profile and components) try 0.2.13.6 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.6.zip)? It's a preview release, not tested enough to be a properly released.

Trying it at the moment.

By the way, do you remember my problems with tracks skipping at the beginning until the waveform was scanned. Well, I think I narrowed it to this component as I am not using that buggy lyrics component any more. Let's see if this new version has fixed the problem.
Title: foo_wave_seekbar
Post by: mzso on 30 August, 2011, 04:23:24 AM
Hi!

Just noticed (with ati tray tools osd) that the waveform seekbar runs at ~11 fps. Why is that? I wouldn't think that moving a line on a static background would use considerable processing power. And its rather stuttery when shorter songs play.
Title: foo_wave_seekbar
Post by: Zao on 30 August, 2011, 12:55:34 PM
The update rate is tuned as to not consume excessive resources for no discernible gain for typical songs.
If you wish to adjust the update rate, there's an advanced preferences setting where you can bump it up to 200%.
Title: foo_wave_seekbar
Post by: mzso on 30 August, 2011, 02:47:45 PM
The update rate is tuned as to not consume excessive resources for no discernible gain for typical songs.
If you wish to adjust the update rate, there's an advanced preferences setting where you can bump it up to 200%.

Where? How?
Title: foo_wave_seekbar
Post by: Andreasvb on 30 August, 2011, 03:15:35 PM
Preferences > Advanced > Tools > Waveform Seekbar.
Title: foo_wave_seekbar
Post by: grimes on 08 September, 2011, 12:10:00 PM
I've tested version 0.2.13.6, and i want to report a bug with this preliminary test version

I've installed a CUI toolbar and a normal panel. After a while foobar2000 doesn't close cleanly.
Here the message:

(https://hydrogenaud.io/imgcache.php?id=e2a9216e105770fc83a6a2cbae18b8f4" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/thumb/2011-09-0318-41-34_err0k4l.png) (http://www.abload.de/image.php?img=2011-09-0318-41-34_err0k4l.png)
Title: foo_wave_seekbar
Post by: bwsilverbolt on 09 September, 2011, 04:07:43 AM
Using 0.2.13.7, just wondering if it's normal to see "Memory - Commit Size" go from 90MB to 480MB when you play one track, then to 860MB when you play a second track. Great components, cheers.
Title: foo_wave_seekbar
Post by: mzso on 09 September, 2011, 04:51:30 AM
Using 0.2.13.7, just wondering if it's normal to see "Memory - Commit Size" go from 90MB to 480MB when you play one track, then to 860MB when you play a second track. Great components, cheers.

Yeah, but it tops off at that value.  Anyway, I can confirm that it leaks pretty badly. Rather unfortunate, that it was introduced with the released stable version. of which I didn't know because it wasn't announced in this forum.
Title: foo_wave_seekbar
Post by: Zao on 09 September, 2011, 10:01:13 AM
I cache away one LZMA encoder for each analysis thread to avoid recreating them constantly. Apparently they keep a whole lot of state.
Title: foo_wave_seekbar
Post by: Dexter_prog on 09 September, 2011, 10:45:35 AM
Latest version is a leaker. This is how ram consumption evolved in my case (MEMORY - COMMIT SIZE, both in MB)
Foobar startup: 114 - 160
Track 1: 196 - 555
Track 2: 200 - 560
Track 3*: 331 - 1.315
and it seems to stick there

* this track was scanned for the first time ever.
Title: foo_wave_seekbar
Post by: Zao on 09 September, 2011, 11:03:02 AM
It seems that I can go all the way down to level 1 compression and still retain the same compression rate. I'll remove the cached encoder as it doesn't have too much of a beneficial effect.
The benchmark results following are for decompressing and recompressing the first 500 tracks of my collection with LZMA2.

Code: [Select]
Benchmark completed in 2.481 seconds. Level 1 - cached encoder.
Benchmark completed in 6.16 seconds. Level 1 - fresh encoder.
Benchmark completed in 45.396 seconds. Level 6 - cached encoder.

lzma min/max/rms: μ=10649.8,σ=1932.82 / μ=10616.3,σ=1930.87 / μ=13211.4,σ=733.734
zlib min/max/rms: μ=11989.2,σ=1867.41 / μ=11990.4,σ=1856.33 / μ=14207.1,σ=552.998
Title: foo_wave_seekbar
Post by: Zao on 09 September, 2011, 11:13:19 AM
0.2.13.8 should solve this "leak".
Title: foo_wave_seekbar
Post by: herojoker on 09 September, 2011, 12:15:31 PM
In 0.2.13.8 the current position marker doesn't run smoothly when Direct3D 9.0c is being used. GDI runs better, Direct2D 1.0 yields perfect results.

Another little bug: The button "Frontend settings…" is active when opening the preferences even when having chosen GDI or Direct2D 1.0 (but it gets deactivated when choosing one of those options).

Requests:
Title: foo_wave_seekbar
Post by: Zao on 09 September, 2011, 12:58:54 PM
Does the unsmoothness change if you adjust the advanced preference "Tools -> Waveform Seekbar -> Percentage of base display rate"?

Fixed for the future:
It seems that D3D accidentally updates at 10Hz instead of the intended 100Hz.
Frontend settings button now behaves.
Extract/Remove is now under Utilities.

I'm deferring the "drop target" part, as I don't have a clue how to implement one of those, nor what to call in foobar to pass the track on.
Not to mention, I'm not quite sure that it's a good thing to make arbitrary UI elements accept things they don't really care about. Especially as this limits me from ever doing anything on my own with dropped things.
Title: foo_wave_seekbar
Post by: White_Shadow on 09 September, 2011, 01:18:25 PM
I agree (with Dexter_prog's issue)! The memory usage is now (after about 2 hours) at 250MB. Before updating this component, it sticked at about 35MB.

[Edit:] Oh! I missed one update. Now it's better. After 3 tracks my memory is still at about 60MB.
Title: foo_wave_seekbar
Post by: herojoker on 09 September, 2011, 03:50:45 PM
Indeed that setting betters the stuttering to a certain degree.
Title: foo_wave_seekbar
Post by: mzso on 09 September, 2011, 04:25:00 PM
Does the unsmoothness change if you adjust the advanced preference "Tools -> Waveform Seekbar -> Percentage of base display rate"?

Fixed for the future:
It seems that D3D accidentally updates at 10Hz instead of the intended 100Hz.
Frontend settings button now behaves.
Extract/Remove is now under Utilities.

I'm deferring the "drop target" part, as I don't have a clue how to implement one of those, nor what to call in foobar to pass the track on.
Not to mention, I'm not quite sure that it's a good thing to make arbitrary UI elements accept things they don't really care about. Especially as this limits me from ever doing anything on my own with dropped things.

Cool! Like the newly smooth position marker.
Title: foo_wave_seekbar
Post by: Dexter_prog on 09 September, 2011, 05:25:45 PM
Working fine for me now.

Tack så mycket
Title: foo_wave_seekbar
Post by: Dandruff on 10 September, 2011, 09:59:33 AM
0.2.13.9 seems to have a serious issue here.


I'm getting this error message for a file:

Code: [Select]
Startup time : 0:00.216576
Seekbar: taking Direct3D9 path.
Watching: D:\Music
Seekbar: Frontend initialized.
Opening track for playback: "D:\Downloads\Damaged_Minds_Dubstep_Mix_09_11.mp3"
Properties dialog refresh: 0:00.000035
Properties dialog display refresh: 0:00.000566
Wave cache: generic exception (bad allocation) for "D:\Downloads\Damaged_Minds_Dubstep_Mix_09_11.mp3"
Wave cache: generic exception (bad allocation) for "D:\Downloads\Damaged_Minds_Dubstep_Mix_09_11.mp3"



No waveform appearing too

Never had this with version 0.2.12!



Edit: With manually "Extract seekbar signature" and restarting foobar2000 1.1.7 I now got the waveform displayed. Why this problem?
Title: foo_wave_seekbar
Post by: Zao on 10 September, 2011, 02:37:23 PM
Reproduced the badalloc, after hunting down the file in question on the internet (http://soundcloud.com/chrisdamage/damaged-minds-dubstep-mix-09).
The cause is that my code partially trusts the length reported by foobar2000 (three hours), which leads to it trying to generate a few gigs of silence when the file is unexpectedly cut short.
Title: foo_wave_seekbar
Post by: Northtech on 10 September, 2011, 02:59:32 PM
SciLexer update - v.2.28 (now 2.26)

http://www.scintilla.org/ScintillaHistory.html (http://www.scintilla.org/ScintillaHistory.html)


p.s.: can be done showing the time when where position you hover (as in mpc-hc seekbar)?
(https://hydrogenaud.io/imgcache.php?id=9a689c90d3a6fce19ca6f4129b73b7ae" rel="cached" data-warn="External image, click to view at original size" data-url="http://img11.imageshack.us/img11/442/foowaveseekbar.png)


english is not my native language
Title: foo_wave_seekbar
Post by: Zao on 10 September, 2011, 03:25:36 PM
I strongly recommend against dropping in a binary build of SciLexer, at least until I remember if I build mine in any special way.
Title: foo_wave_seekbar
Post by: NullString on 10 September, 2011, 10:37:58 PM
Hey! I updated to the latest version just now. I was using the one of last april or something like that.

When I click the "Frontend settings..." button, nothing happens.

I've installed the vs2010 SP1 dependency that appeared on the "Links" section in the first post, as well as the directX runtime.
The component was installed by the select component dialog from foobar2000.

I  also tried manually copying the DLL's "frontend_direct3d9", "frontend_direct2d", "SciLexer" to the foobar2000 root (and then restarted fb2k), but nothing happened.

Title: foo_wave_seekbar
Post by: Zao on 10 September, 2011, 11:22:10 PM
You should not move the companion DLLs out of the user-components/foo_wave_seekbar directory. All that will achieve is that the component will not find those frontends, and fall back to the GDI one.
Title: foo_wave_seekbar
Post by: Zao on 11 September, 2011, 12:44:25 AM
0.2.13.10 should fix the bad_alloc exception when analysing large broken files.
Title: foo_wave_seekbar
Post by: NullString on 11 September, 2011, 03:35:53 PM
You should not move the companion DLLs out of the user-components/foo_wave_seekbar directory. All that will achieve is that the component will not find those frontends, and fall back to the GDI one.

I tried installing the component with fb2k before doing that, and the frontend settings dialog didn't open.

The console doesn't say nothing, and there is no window that "opens and closes". The button  (apparently)  just doesn't do anything.
If it's of any help, I'm running Windows 7 x64, with an nvidia card.
DirectX and nvidia drivers are up to date, as well as the OS.
Title: foo_wave_seekbar
Post by: Zao on 11 September, 2011, 04:00:42 PM
Note that "frontend settings" only does things when the Direct3D9 frontend is selected and used. There was some previous versions that accidentally had it enabled for non-Direct3D frontends.
When reporting something, don't say "latest version". I've released a handful in the last few days alone.
Title: foo_wave_seekbar
Post by: JoSch on 11 September, 2011, 05:27:51 PM
I get crashes using wave_seekbar since yesterday. I didn't change anything on purpose. Tried a update to the newest Version and foobar2k v1.1.8 beta 6, but still crashes.
Here is a crashdump: http://mir.cr/0WRDPBNV (http://mir.cr/0WRDPBNV)
If I just remove foo_wave_seekbar, it works.
Title: foo_wave_seekbar
Post by: Zao on 11 September, 2011, 08:14:18 PM
JoSch: What DirectX redist do you have installed - june 2010, february 2010? Have you've done something silly like deployed D3DX DLLs manually or renamed them? Is this the default effect, or one you've customized or gotten from elsewhere?
You seem to be on an ATI graphics card. Try fiddling with your cats.
Title: foo_wave_seekbar
Post by: JoSch on 11 September, 2011, 08:51:47 PM
I have the June 2010 Runtime, just tried reinstalling it with no success.
dxwebsetup also says I have got the newest version.
I have done nothing like that, as far as I remember.
It is the default effect. It also happens if i remove the foobar2000 folder in %APPDATA% and create a new one. As soon as I add the seekbar anywhere, it crashes. Here is a crashdump with only this component, apart from the default ones: http://mir.cr/1GCPNMDU (http://mir.cr/1GCPNMDU)

My Graphics card is a Radeon HD 4870 and I have the newest driver (11.8).
The strange thing is, it was working for some time and I don't remember changing anything related to DirectX/3D before it failed. (Windows wouldn't boot and I had to decrypt the whole HD and then run the boot repair tool, but that shouldn't change anything)
All other 3D Applications/Games I use run fine.
Title: foo_wave_seekbar
Post by: NullString on 11 September, 2011, 09:26:54 PM
Note that "frontend settings" only does things when the Direct3D9 frontend is selected and used. There was some previous versions that accidentally had it enabled for non-Direct3D frontends.
When reporting something, don't say "latest version". I've released a handful in the last few days alone.

I have the Direct3D frontend selected.
Previously I had a seekbar.fx effect that I was using, but it got "overriden" with the current installed wave seekbar version 0.2.13.10, but I can't edit because of the problem I mentioned earlier.
You sound a little bit "angry" or something. I'm just trying to report that small problem. The rest of the component has been working flawlessly for a long time now, and no known crashes so far.
Title: foo_wave_seekbar
Post by: Dandruff on 12 September, 2011, 03:05:31 AM
0.2.13.10 should fix the bad_alloc exception when analysing large broken files.


Confirmed. Thanks!
Title: foo_wave_seekbar
Post by: Zao on 12 September, 2011, 05:33:55 AM
You sound a little bit "angry" or something.

Nah, it's just a bit annoying to not have the information at hand needed to diagnose something, especially if I cannot reproduce it on any of my machines.
Are you using CUI or DUI? Is there any difference if a track is playing or not?
Title: foo_wave_seekbar
Post by: ExUser on 12 September, 2011, 02:10:16 PM
You sound a little bit "angry" or something.

u mad bro?

FTFY
Title: foo_wave_seekbar
Post by: Alexa on 13 September, 2011, 03:16:12 PM
just updated, and now I get this message:

Code: [Select]
Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.


I checked the component folder, and it's there... I see 4 files in it

I have directx 11 btw and windows 7...
Title: foo_wave_seekbar
Post by: Andreasvb on 13 September, 2011, 03:22:24 PM
just updated, and now I get this message:

Code: [Select]
Failed to load DLL: foo_wave_seekbar.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.


I checked the component folder, and it's there... I see 4 files in it

I have directx 11 btw and windows 7...

Read the first post and get all required files.
Title: foo_wave_seekbar
Post by: White_Shadow on 14 September, 2011, 03:24:34 AM
@Alexa

Have you installed the Visual Studio Redistributable and the DirectX Redistributable as explained here (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&view=findpost&p=677147)? (Scroll up to "Links")

Ah... Andreasvb was faster. Missed that. Sorry for spamming.
Title: foo_wave_seekbar
Post by: tedych on 14 September, 2011, 07:34:18 PM
Just to mention (a bit of offtopic). Still using an "interim" release 0.2.13.1 since July when I encountered a leak with the previous "stable" one, and so far so good with weeks of uptime.
I won't bother upgrading as long as it works with no issues for me. I see many pages of posts since then, I hope there isn't some critical fix in the meanwhile I might have missed..
Title: foo_wave_seekbar
Post by: Dandruff on 15 September, 2011, 08:04:16 AM
What does "Always rescan track if requested by user" mean exactly? Why shouldn't a track be rescanned if requested by user?


Also wouldn't it be more useful to call the display rate "fps" rather than "percentage of base display rate"?
Title: foo_wave_seekbar
Post by: Zao on 15 September, 2011, 08:45:53 AM
"Always rescan" is there to be disabled for people who like to select their whole library and "extract waveform", skipping any tracks that already have a waveform.
Edit: it seems to be completely unused in the source, heh. It does nothing currently.

The reason for the name is because it's not a refresh rate. It's a percentage modifier to the per-frontend refresh rate. A value of 100 uses the rate as-is, 200 doubles it, etc.
Title: foo_wave_seekbar
Post by: Dandruff on 15 September, 2011, 09:33:16 AM
Alright, thanks!


This "Holding the control key while dragging on the seekbar decodes the region to the clipboard for pasting into audio editors." feature is missing in 0.2.13.10 too, right? At least I can't get any audio copied into REAPER 4.02 http://www.reaper.fm (http://www.reaper.fm) ...
Title: foo_wave_seekbar
Post by: Zao on 15 September, 2011, 09:48:55 AM
The set of audio editors that actually support audio on the clipboard is miserably small. The only editor I succeeded with was Audition, as Audacity failed. The "clipboard" of most sound tools is mostly internal-only.
You should be able to see that there's data on the Windows clipboard with a decent clipboard viewer.

There might be some other method one should use, but I couldn't find anything documented at all apart from the usual standard "put a wave file with header and all in there" approach I used.
Title: foo_wave_seekbar
Post by: Dandruff on 15 September, 2011, 09:54:46 AM
Ok. So the feature is in 0.2.13.20. Maybe you should mention it in the changelog?

Which format does land in the clipboard? 32bit float WAV?
Title: foo_wave_seekbar
Post by: Zao on 15 September, 2011, 11:17:31 AM
Yes, it seems to be 32-bit float.

As for mentioning it in the changelog, I've mentioned it in passing in the forum, and I don't want to advertise it as a feature until it's solid.
Title: foo_wave_seekbar
Post by: Dandruff on 16 September, 2011, 05:27:12 AM
Alright, thanks!
Title: foo_wave_seekbar
Post by: NullString on 16 September, 2011, 04:10:22 PM
You sound a little bit "angry" or something.

Nah, it's just a bit annoying to not have the information at hand needed to diagnose something, especially if I cannot reproduce it on any of my machines.
Are you using CUI or DUI? Is there any difference if a track is playing or not?


I'm using DUI on Windows 7 Ultimate x64.
I also tried deleting the component settings.cfg file and restarting foobar, but it didn't work.
Here are some pictures that show you that the seekbar visualization indeed works with direct3d, the frontend gets initialized well (as the fb2k console says), also there's a picture of the advanced settings screen, and the installed dependencies on "add/remove programs" and "dxdiag".
http://imgur.com/a/nKsY2#TJglt (http://imgur.com/a/nKsY2#TJglt)

I still find it weird that the frontend settings dialog doesn't open. it doesn't blink & close, or anything like that. Nothing gets logged to the console regarding that issue too.

I know that you can't recreate the problem, and I have no crash dump to provide. So, I can't see you getting to a solution pronto. I can still scan and visualize waveforms so that's cool 
Title: foo_wave_seekbar
Post by: mzso on 20 September, 2011, 08:10:05 AM
What's the most likely dll I'm missing if I uninstalled catalyst/all amd stuff and switched to an nvidia card?

Nevermind. Looks like the catalyst installer thought that its a good idea to remove the Visual C++ libs.
Title: foo_wave_seekbar
Post by: Zao on 20 September, 2011, 08:35:34 AM
Nevermind. Looks like the catalyst installer thought that its a good idea to remove the Visual C++ libs.

That's ... bad.
Title: foo_wave_seekbar
Post by: Elevory on 24 September, 2011, 04:42:02 PM
Is texture loading still supported? I'm having some trouble getting it working. I read the entire thread and I don't think it was ever explicitly mentioned how to load images properly. I have a 074.jpg and seekbar.png in my effects folder, is that the right directory?

Thanks.
Title: foo_wave_seekbar
Post by: Zao on 24 September, 2011, 05:12:20 PM
No, it's not currently supported (https://github.com/zao/foo_wave_seekbar/issues/9).
I'm a bit unsure where you'd put your files if it worked, probably somewhere relative to the foobar2000 profile directory.
Title: foo_wave_seekbar
Post by: Elevory on 24 September, 2011, 05:21:29 PM
Ah, I should've checked the github page. Sorry.

Anyway, it's too bad they aren't working. Hope to see the feature make a return at some point in the future. Either way, thank you for such a wonderful component.
Title: foo_wave_seekbar
Post by: John Listener on 26 September, 2011, 03:39:28 PM
fb2k 1.8, fwsb 0.2.13.11, Direct3d

Configure>Frontend settings...>Load default

Entering any character causes an immediate crash.

Listener
Title: foo_wave_seekbar
Post by: Zao on 26 September, 2011, 03:49:31 PM
Turns out that my trusted team of test simians didn't exercise the Direct3D configuration dialog enough.
Reproduced.
Title: foo_wave_seekbar
Post by: John Listener on 26 September, 2011, 04:16:02 PM
Turns out that my trusted team of test simians didn't exercise the Direct3D configuration dialog enough.
Reproduced.


Oh noes... Not test simian failure. Alas. Alak. <sound of rending of garments> Must not have fed them enough beer.

Listener
Title: foo_wave_seekbar
Post by: grimes on 26 September, 2011, 04:16:48 PM
Want to report a crash.

fb2k1.1.8 Waveform Seekbar 0.2.13.11

with Popup Panels (foo_popup_panels.dll)

and View | Popup panels |  New panel | Waveform seekbar

crash under not exact reproducible conditions on popup close.

crashlog submitted.
Title: foo_wave_seekbar
Post by: Zao on 26 September, 2011, 08:36:50 PM
John Listener: Could you please try 0.2.13.12 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.12.zip)?
Title: foo_wave_seekbar
Post by: John Listener on 26 September, 2011, 08:38:15 PM
Same versions as above on Win XP.

FWS seems to be having problems with wma files.

Wave cache: generic exception (bad allocation) for "L:\wma\Blues\Michael Bloomfield-Al Kooper -Steve Stills\Super Session\07 Season of the Witch.wma"
and
Wave cache: generic exception (bad allocation) for "L:\wma\Jazz\Bob Berg\Enter the Spirit\10-Angles.wma"

Mp3s render fine as do flacs.

Best,

Listener
Title: foo_wave_seekbar
Post by: Zao on 26 September, 2011, 08:47:37 PM
fb2k1.1.8 Waveform Seekbar 0.2.13.11
View | Popup panels |  New panel | Waveform seekbar
crash under not exact reproducible conditions on popup close.


Crashlog claims it's 0.2.13.10, and as for what it's doing differently, I've got no idea, as the crash stack is utterly useless.
I haven't really tested it with any of the non-typical CUI hosts, so I'd reckon that the popup host is either doing something silly or something unexpected.
Title: foo_wave_seekbar
Post by: John Listener on 27 September, 2011, 11:20:48 AM
John Listener: Could you please try 0.2.13.12 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.13.12.zip)?

Solves the config editor problem perfectly, but still not rendering waveforms for wma files.

Best,

Listener -- who really likes this component!
Title: foo_wave_seekbar
Post by: White_Shadow on 29 September, 2011, 02:33:47 AM
Getting Bad Allocs for MP3's:

Code: [Select]
Wave cache: generic exception (bad allocation) for "C:\Musik\Red Hot Chili Peppers\Californication\Red Hot Chili Peppers [Californication #04] - Emit Remmus.mp3"
Wave cache: generic exception (bad allocation) for "C:\Musik\The Blues Brothers\The Blues Brothers Complete\The Blues Brothers [TBBC (1) #06] - SFI''B.mp3"


I've very long filenames... Probably wavecache has problems with that...?

Ah Sorry...
f2k 1.1..8
WaveCache 0.2.13.12
Title: foo_wave_seekbar
Post by: Dexter_prog on 29 September, 2011, 03:30:47 PM
I'm getting crashes with foobar since I installed the latest version

edit:oops, was using .11. Let's see if .12 does the same.
Title: foo_wave_seekbar
Post by: Dexter_prog on 29 September, 2011, 05:25:21 PM
hmm, no crashes so far but some tracks are not getting scanned :/
Title: foo_wave_seekbar
Post by: Zao on 30 September, 2011, 01:35:36 AM
All the bad-allocs should be solved with 0.2.13.13. *knocks on wood*
Title: foo_wave_seekbar
Post by: White_Shadow on 30 September, 2011, 02:33:09 AM
Great Zao!

Works with my two reported files... 
Title: foo_wave_seekbar
Post by: suaff on 30 September, 2011, 10:18:12 AM
Pleeeease: seeking using the mouse-wheel (like standard seekbar can do that)...
Title: foo_wave_seekbar
Post by: John Listener on 30 September, 2011, 01:06:10 PM
All the bad-allocs should be solved with 0.2.13.13. *knocks on wood*


Everything seems to be good here.

Thanks for a fab component.

Listener
Title: foo_wave_seekbar
Post by: czesiu on 02 October, 2011, 08:22:58 AM
so... I accidentally clicked "Extract Seekbar Signature" in Album List and now foobar2000 sits @90%CPU on both cores... 
I've removed foo_wave_seekbar for now. Is there any way to tell it to stop scanning the whole library? (as this is what it's probably doing)

[oh and I think a warning ("Do you really want to scan gazillion files?") would be appropriate when a user tries something like this  ]
Title: foo_wave_seekbar
Post by: Zao on 02 October, 2011, 10:07:03 AM
Run sqlite3 wavecache.db
Execute delete from job;

I haven't really seen any point for a warning when initiating a scan for a lot of files. It's a reasonably common use case.
In any way, you can always restrict it to only using one core in advanced preferences. They should not affect your performance in any significant way, as they run with idle priority.
Title: foo_wave_seekbar
Post by: czesiu on 02 October, 2011, 10:23:44 AM
Run sqlite3 wavecache.db
Execute delete from job;

I haven't really seen any point for a warning when initiating a scan for a lot of files. It's a reasonably common use case.
In any way, you can always restrict it to only using one core in advanced preferences. They should not affect your performance in any significant way, as they run with idle priority.

thx, it worked
Title: foo_wave_seekbar
Post by: s_PLASH on 09 October, 2011, 09:05:01 PM
thank you once again for updating the component. still i wished you could add the option shade played "non-transparent". also if played waveform could be coloured separately, it would be awsome. don't you want it too, sometimes? =) i so hope you do^^
Title: foo_wave_seekbar
Post by: Anomalous on 09 October, 2011, 09:59:53 PM
thank you once again for updating the component. still i wished you could add the option shade played "non-transparent". also if played waveform could be coloured separately, it would be awsome. don't you want it too, sometimes? =) i so hope you do^^

I'm not entirely sure what you're saying, do you mean like this?

Here's a version of the RMS effect which uses the highlight colour instead of just grey-scaling it. http://pastebin.com/rVfuCDgy (http://pastebin.com/rVfuCDgy)

(https://hydrogenaud.io/imgcache.php?id=f8012611e3b599d76b333d298a7f8bef" rel="cached" data-warn="External image, click to view at original size" data-url="http://i42.tinypic.com/4utgti.jpg)

Title: foo_wave_seekbar
Post by: s_PLASH on 09 October, 2011, 10:08:02 PM
YES! how do you do that? i got Direct3D 9.0c and "Frontened settings..." button below. but i cant activate it / click doesn't seem to work. why??

UPDATE: with Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) it it didn't work on my x64 win 7  now, with x64 Package, a click on "Frontened settings..." button opens a "Seekbar configuration: Direct 3D"-window. i loaded defaulf by clicking on it..

whats next stept to do for non-transparency?
Title: foo_wave_seekbar
Post by: Anomalous on 10 October, 2011, 12:19:30 AM
Paste in the code (here's a slightly updated version (http://pastebin.com/1mN12wNf)) and click apply.
Title: foo_wave_seekbar
Post by: s_PLASH on 10 October, 2011, 12:43:08 AM
thank you! now i miss only two small things: 1) how do i disable that 2nd, inner waveform? and 2) is it possible to get a a fine line for selection (as it was in GDI mode)?

also it would be great to see how you do it.. maybe with some coloured parts in a code posted right here? ^^
Title: foo_wave_seekbar
Post by: Anomalous on 10 October, 2011, 01:46:39 AM
I don't really know how to use this language, but I've figured out how to do what you want.

how do i disable that 2nd, inner waveform?
Change line 94
Code: [Select]
float factor = insideRms ? (1.0 - 0.5 * saturate(factorRms / border / 2)): 1.0;
to
Code: [Select]
float factor = 1.0;


is it possible to get a a fine line for selection (as it was in GDI mode)?
Change line 114
Code: [Select]
float positionWidth = 2.5 * dx;
to
Code: [Select]
float positionWidth = dx;
Title: foo_wave_seekbar
Post by: s_PLASH on 10 October, 2011, 08:01:55 AM
thank you 
maybe there is one last thing left, which ist not possible for now:
(https://hydrogenaud.io/imgcache.php?id=4d63ebc6b67ab9faaa02b232badbf194" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/thumb/capture27j4q.png) (http://www.abload.de/image.php?img=capture27j4q.png)
(Highlight background color only/separately)
Title: foo_wave_seekbar
Post by: Anomalous on 10 October, 2011, 08:19:40 AM
You're right that wasn't possible, here's an updated version which sets the background colour to the highlight colour if "shade played" is disabled. http://pastebin.com/q6qLaQ18 (http://pastebin.com/q6qLaQ18)
Title: foo_wave_seekbar
Post by: Zao on 10 October, 2011, 08:19:58 AM
Highlight only (http://ideone.com/ZXZb3) for s_PLASH.
The colors may be the wrong way around, check played() if it's the wrong way. There's very little you can't do with HLSL, it's just pure awesome math.
Beaten to the punch by Anomalous - bah.
Title: foo_wave_seekbar
Post by: s_PLASH on 10 October, 2011, 08:39:51 AM
thanks you both  your effort is appreciated! i can't even find the differences yet
here is my new seekbar
(https://hydrogenaud.io/imgcache.php?id=0867270ed95e561c8fdbd53d07028985" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/wfsbiqxk.png) (http://www.abload.de/image.php?img=wfsbiqxk.png)

EDIT
Quote
There's very little you can't do with HLSL

i think here it is. you need 5 colours for real separation of front- and background. maybe its possible without "Colors" menu, just by editing the "Effect source" script. but i'm not the one to edit in any way.
(https://hydrogenaud.io/imgcache.php?id=a86eb5325f3bb23bf6d7ed4370d5e1de" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/capture2crmg.png) (http://www.abload.de/image.php?img=capture2crmg.png)

your last script ignores "Foreground color" selection, as you wanted obviously. but that way it provides only 3 colours to chose from.
(https://hydrogenaud.io/imgcache.php?id=88e615947b63e15796d0b2ebf3566c3b" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/capture3hqmm.png) (http://www.abload.de/image.php?img=capture3hqmm.png)
Title: foo_wave_seekbar
Post by: RAZOR87 on 10 October, 2011, 11:29:37 AM
Zao,
Thank you so much for the plugin, is it possible for him to make support for DSD?
Title: foo_wave_seekbar
Post by: Zao on 10 October, 2011, 03:07:05 PM
That depends entirely on what you mean by DSD. If it's an input plugin, it's not currently banned like CDDA is. If it's a DSP, no, I do not support or intend to support any DSPs.

I might add, CDDA and similar formats are banned because random access of a CD is a very bad idea.
Title: foo_wave_seekbar
Post by: RAZOR87 on 11 October, 2011, 05:24:03 AM
I mean, SACD and are extracted from the DSD stream, for example (http://www.datafilehost.com/download-63c8b90f.html).
Title: foo_wave_seekbar
Post by: Zao on 11 October, 2011, 06:34:59 AM
That track scans perfectly fine with foo_input_dsdiff 1.4 here.
Title: foo_wave_seekbar
Post by: RAZOR87 on 11 October, 2011, 07:50:27 AM
I just meant another plug-in "foo_input_sacd (http://sourceforge.net/projects/sacddecoder/files/)".
Title: foo_wave_seekbar
Post by: Zao on 11 October, 2011, 03:57:42 PM
I do not have any source material to test that input. If it's not broken, it should work out of the box.
You still haven't said what fails, nor given any relevant console info.
Title: foo_wave_seekbar
Post by: Dr_Colossus on 11 October, 2011, 04:32:28 PM
Is there an upper limit on how many samples you scan? Because I have noticed that long podcasts will not scanned (a behavior I like) because of length so I think his sacd files may not be scanned because they are above the sample limit. For instance the file he posted has 504 908 544 samples total.
Title: foo_wave_seekbar
Post by: Zao on 11 October, 2011, 05:10:57 PM
The file he posted decodes perfectly fine with foo_input_dsdiff, and I've scanned 12 hour mp3s before.
The data types involved are much larger (64-bit ints), so there should be no problems in that area.
Title: foo_wave_seekbar
Post by: Zao on 11 October, 2011, 06:51:03 PM
His file decodes properly with foo_input_sacd as well. Ensure that you're using a sufficiently new seekbar.
Title: foo_wave_seekbar
Post by: RAZOR87 on 12 October, 2011, 07:55:00 AM
Thank you for your answers.

Perhaps you have not deleted the old plugin foo_input_dsdiff so foo_input_sacd and does not work. There exists a pattern of output frequency is set in the plugin settings foo_input_sacd depends on how much will be displayed in seconds, your plugin (44100 Hz - 5 sec, 88 200 Hz - 10 sec, 176 400 Hz - 20 sec, 352 800 Hz - 40 sec).
Title: foo_wave_seekbar
Post by: Zao on 12 October, 2011, 07:58:47 AM
No. These are completely different foobar2000 installations, so there is no plugin order dependencies.

Please explain in plain text what the problem you observe is, and what you expect to see. I still don't know what is wrong for you.
If the amount of displayed waveform is wrong, the component lies about the sample rate and/or track length.
Title: foo_wave_seekbar
Post by: RAZOR87 on 12 October, 2011, 08:08:07 AM
I checked on the standard pure foobar2000 and assemblies, shows the first few seconds of the track.

(https://hydrogenaud.io/imgcache.php?id=3f430babf85e3861e09d7b2581a55c69" rel="cached" data-warn="External image, click to view at original size" data-url="http://img854.imageshack.us/img854/8643/thumbgof.png) (http://img856.imageshack.us/img856/3014/screenshot20111012001.png)
Title: foo_wave_seekbar
Post by: eevan on 12 October, 2011, 09:18:00 AM
Indeed, there are some problems with seekbar and SACD ISO images.
I'm using Waveform seekbar version 0.2.13.13 and Super Audio CD Decoder version 0.3.9 in foobar v1.1.8.

It seems that the track length reporting is wrong, so the complete waveform of a track is horizontaly (and verticaly) scaled to the certain fixed length, independently of real track length.

Here are the two screenshots that show this behaviour. The first track (highlighted in the screenshot) is 5:37, and the second is 1:48, and the corresponding waveforms occupy the same horizontal space in the seekbar component.

(https://hydrogenaud.io/imgcache.php?id=a94782d1fb615f251266b19a0b3c96e0" rel="cached" data-warn="External image, click to view at original size" data-url="http://img5.imageshack.us/img5/3513/tr1ja.th.png) (http://img5.imageshack.us/i/tr1ja.png/)aaa(https://hydrogenaud.io/imgcache.php?id=1ff4486bf8b246ff3371b7b5e197e561" rel="cached" data-warn="External image, click to view at original size" data-url="http://img844.imageshack.us/img844/3774/tr2i.th.png) (http://img844.imageshack.us/i/tr2i.png/)

Cheers
Title: foo_wave_seekbar
Post by: Zao on 12 October, 2011, 10:13:29 AM
Apart for multipass scanning, I have no way of knowing the true length of a track.
I trust the metadata they provide to me, and here, it seems that they blatantly lie.
Title: foo_wave_seekbar
Post by: s_PLASH on 14 October, 2011, 11:54:56 AM
(https://hydrogenaud.io/imgcache.php?id=b45784871230b90e855efbc9d457059d" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/captureiyem.png) (http://www.abload.de/image.php?img=captureiyem.png)
(https://hydrogenaud.io/imgcache.php?id=a41db0e1ae3447dac4c355e92884c40e" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/capture29lmh.png) (http://www.abload.de/image.php?img=capture29lmh.png)
(https://hydrogenaud.io/imgcache.php?id=091d7f85bdfe61b3f3dc489c28f6e77c" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/capture3jzf4.png) (http://www.abload.de/image.php?img=capture3jzf4.png)
there are no waves in the form for some segments. is it possible to correct it?
Title: foo_wave_seekbar
Post by: Zao on 14 October, 2011, 12:02:59 PM
That depends entirely on what those images are supposed to illustrate, and what graphics card you have.
The analysis phase records full-scale floating point values, and if you have floating point textures, the shader will recieve those exact values.
Title: foo_wave_seekbar
Post by: s_PLASH on 14 October, 2011, 12:40:15 PM
the images illustrate that the wave seem to be to big for the box it is in so there is no wave to see.
here is my gpu
(https://hydrogenaud.io/imgcache.php?id=0c34b343a4bf00644ef44cc0e48bd6b0" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/capturei66d.png) (http://www.abload.de/image.php?img=capturei66d.png)
Title: foo_wave_seekbar
Post by: Zao on 14 October, 2011, 02:28:56 PM
The default effect fits the range -1.0 through 1.0, so if your decoded audio is outside of that range, it will not fit into the window.
You can always scale the visual in there, or use a RG-aware effect.
Title: foo_wave_seekbar
Post by: s_PLASH on 14 October, 2011, 10:15:40 PM
where can i find those options?
Title: foo_wave_seekbar
Post by: Zao on 17 October, 2011, 06:32:31 PM
0.2.14 released, previous versions apparently tried to create debug factories with Direct2D, resulting in mysterious failure to load that frontend.
Title: foo_wave_seekbar
Post by: ExUser on 18 October, 2011, 02:13:59 AM
Been playing with a new shader that supports ReplayGain and provides a basic estimate of compression via the relationship between RG track peak and RG track gain. This isn't "perfect", but it works pretty great so far! I'm sleepy and done with playing for the night now tho.

Here's an action-shot of a somewhat-compressed (ie. RG of -8dB or so at a peak of 1) track:
(https://hydrogenaud.io/imgcache.php?id=5f717a4d7d8972f48c5cf841d1173ede" rel="cached" data-warn="External image, click to view at original size" data-url="http://i51.tinypic.com/2jg2l4g.png)

The peak/RMS rendering is still jaggy but the ReplayGain functionality is the fun part anyhow.

Code: [Select]
texture tex : WAVEFORMDATA;

sampler sTex = sampler_state
{
Texture = (tex);
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;

   AddressU = Clamp;
};

struct VS_IN
{
float2 pos : POSITION;
float2 tc : TEXCOORD0;
};

struct PS_IN
{
float4 pos : SV_POSITION;
float2 tc : TEXCOORD0;
};


float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor  : HIGHLIGHTCOLOR;
float4 selectionColor  : SELECTIONCOLOR;
float4 textColor      : TEXTCOLOR;
float cursorPos        : CURSORPOSITION;
bool cursorVisible    : CURSORVISIBLE;
float seekPos          : SEEKPOSITION;
bool seeking          : SEEKING;
float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
float2 viewportSize    : VIEWPORTSIZE;
bool horizontal        : ORIENTATION;
bool flipped          : FLIPPED;
bool shade_played      : SHADEPLAYED;

PS_IN VS( VS_IN input )
{
PS_IN output = (PS_IN)0;

float2 half_pixel = float2(1,-1) / viewportSize;
output.pos = float4(input.pos - half_pixel, 0, 1);

if (horizontal)
{
output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
}
else
{
output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);
}

if (flipped)
output.tc.x = 1.0 - output.tc.x;

return output;
}

float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
{
float dist = abs(pos - tc.x);
float4 c = (show && dist < width)
? lerp(fg, bg, smoothstep(0, width, dist))
: bg;
return c;
}

float4 faded_bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show, float vert_from, float vert_to )
{
float dist = abs(pos - tc.x);
float fluff = smoothstep(vert_from, vert_to, abs(tc.y));
float4 c = show
? lerp(fg, bg, max(fluff, smoothstep(0, width, dist)))
: bg;
return c;
}

// #define BORDER_ON_HIGHLIGHT

float4 played( float pos, float2 tc, float4 fg, float4 bg, float alpha)
{
float4 c = bg;
float2 d = 1 / viewportSize;
if (pos > tc.x)
{
#ifdef BORDER_ON_HIGHLIGHT
if (tc.x < d.x || tc.y >= (1 - d.y) || tc.y <= (2 * d.y - 1))
c = selectionColor;
else
#endif
c = lerp(c, fg, saturate(alpha));
}
return c;
}

float4 evaluate( float2 tc )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex1D(sTex, tc.x);
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;
float below = tc.y - minmaxrms.r;
float above = tc.y - minmaxrms.g;
float factor = min(abs(below), abs(above));
bool outside = (below < 0 || above > 0);
bool inside_rms = abs(tc.y) <= minmaxrms.b;

#if 1
float4 bgColor = backgroundColor;
#else
float a = viewportSize.x / viewportSize.y;
float2 aspect = horizontal ? float2(a, 1) : float2(1/a, 1);
float2 tcBg = float2(tc.x, -tc.y / 2 + 0.5) * aspect;
float4 bgColor = tex2D(sTexBg, tcBg);
#endif

float4 wave = outside
? bgColor
: lerp(bgColor, textColor, 7.0 * factor);

return saturate(wave);
}

float4 peak( float2 tc, float4 bg )
{
float4 minmaxrms = tex1D(sTex, tc.x);
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;
if(replayGain.a>0)minmaxrms.rgb /= replayGain.a;
float below = (tc.y - minmaxrms.r);
float above = (tc.y - minmaxrms.g);
//float factor = min(abs(below), abs(above));
bool outside = (below < 0 || above > 0);
float4 wave = outside ? bg : textColor;
return saturate(wave);
}

float4 rms( float2 tc , float4 bg )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex1D(sTex, tc.x);
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;
//minmaxrms.rgb -= 0.5 * minmaxrms.a;
//minmaxrms.rgb *= 1.0 + minmaxrms.a;
if(replayGain.a>0)minmaxrms.rgb /= replayGain.a;
float below = tc.y - minmaxrms.r;
float above = tc.y - minmaxrms.g;
float factor = min(abs(below), abs(above));
bool outside = (below < 0 || above > 0);
bool inside_rms = abs(tc.y) <= minmaxrms.b;

float4 bgColor = backgroundColor;
float4 wave = inside_rms ? selectionColor : bg;
return saturate(wave);
}

float4 rg( float2 tc , float4 bg )
{
float gain=pow(10,replayGain.g/20);
float dist=abs(abs(tc.y/replayGain.a)/gain);
float maxdist=abs(1/replayGain.a)/gain;
bool end=(dist/replayGain.a)>1;
//bool end=tc.y>0;
return lerp(bg,backgroundColor,saturate((dist-1)/(maxdist-1)));

}
float4 PS( PS_IN input ) : SV_Target
{
float dx, dy;
if (horizontal)
{
dx = 1/viewportSize.x;
dy = 1/viewportSize.y;
}
else
{
dx = 1/viewportSize.y;
dy = 1/viewportSize.x;
}
float seekWidth = 2.5 * dx;
float positionWidth = seekWidth;//2.5 * dx;

float4 c0 = backgroundColor;

c0 = peak(input.tc, c0);
c0 = rms(input.tc, c0);
c0 = rg(input.tc, c0);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos,  input.tc, selectionColor, c0, seekWidth,    seeking      );
if (shade_played) c0 = played(cursorPos, input.tc, backgroundColor, c0, 0.5);
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

technique Render9
{
pass
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
Title: foo_wave_seekbar
Post by: andrew_berge on 18 October, 2011, 11:40:47 AM
Huh. I can get a basic waveform to display, but i can't customize it in any way.
I've installed everything suggested in the original post (as far as i can tell).

There is no effects folder or seekbar.fx file anywhere on my computer, and clicking "Frontend settings..." in Foobar doesn't do anything, no window, no nothing.

One thing, though, i don't know if my graphics card supports "PS2.0" (What is that, anyway?).

Running Windows 7 Home premium, 64bit
Intel Core 2 Duo T5750 at 2GHz, 3GB RAM.
ATI mobility Radeon HD 3400 series graphics.
System properties say i'm running DirectX 10.
Title: foo_wave_seekbar
Post by: frogworth on 19 October, 2011, 12:38:14 AM
System properties say i'm running DirectX 10.


If you scroll through much of this thread you'll note what's sort-of warned about in the original post too: having DirectX 10 does not mean having the functionality of DirectX 9.0c or whatever. They're different. You explicitly need Directx 9.0c as linked from the front post.

Try that. You wouldn't have an effects folder with the latest version - that's what the frontend editing should do, but try the really correct version DirectX first.
Title: foo_wave_seekbar
Post by: Zao on 19 October, 2011, 12:53:46 AM
A bit of clarification here might help.
The "DirectX version" that your OS tells you is rather unhelpful nowadays, as it roughly tells you the max core level the OS supports.
This component requires more than the core library, it requires the D3DX and D3DCompiler components from February 2010.

In order to get those, you've got to install a redistributable that's at least as new as that. When a game or program asks you to install a particular redistributable, install it. You are typically not capable of determining whether it's needed or not, and it will never be a mistake to install one, as they will only install the bits that are not already present.

As for the settings dialog not opening, not quite sure about that. Ensure that you've got all four DLLs in your users-components/foo_wave_seekbar directory, and haven't messed around with them.
PS 2.0 or SM 2.0 is a level of shader capability of a GPU, which you should exceed by far with your HD3400 card as it claims to be a DX10.1 part, thus having SM 4.1, assuming you have proper drivers installed.
Title: foo_wave_seekbar
Post by: Dandruff on 19 October, 2011, 02:31:14 AM
@Zao: Small suggestion: Direct3D and Direct2D entries should be removed from the driopdown menu if the related DLLs are not found in the components folder.
Title: foo_wave_seekbar
Post by: Zao on 19 October, 2011, 02:33:12 AM
There shall be no reason really to erase them really. Are you so strapped for disk space you can't have a stray half meg?
Do you go removing integral parts of random applications to see what happens? 

As for handling it in the settings, it's tricky. The code there is fairly brittle already, especially as it's pretty much impossible to detect whether a frontend is usable until you attempt to use it.
Title: foo_wave_seekbar
Post by: Dandruff on 19 October, 2011, 03:06:23 AM
Ok. No big problem
Title: foo_wave_seekbar
Post by: andrew_berge on 19 October, 2011, 08:42:33 AM
Thanks frogworth and Zao, i'm going to try all that out when i get back home today
Title: foo_wave_seekbar
Post by: andrew_berge on 19 October, 2011, 04:47:42 PM
The problem is fixed, thank you very much!

Sorry for the double post, by the way... i can't find the edit button anywhere.
Title: foo_wave_seekbar
Post by: ExUser on 19 October, 2011, 05:01:57 PM
The edit button disappears after a while due to past abuse. Don't worry about the double-posting.
Title: foo_wave_seekbar
Post by: ledge on 29 October, 2011, 12:00:20 AM
I'm having the same issue with the frontend settings button doing nothing.

The dlls are in the directory and everything is installed.

I know a couple of other people have run into this problem and seemed to fix it, can they give me any ideas please?
Title: foo_wave_seekbar
Post by: Andreasvb on 29 October, 2011, 01:27:32 AM
Are you using the latest version (0.2.14) and Direct3D?
Title: foo_wave_seekbar
Post by: ledge on 30 October, 2011, 06:06:51 PM
Sure am. Everything works fine except bringing up the frontend settings, so I can't alter the waveform code, which makes me sad.
Title: foo_wave_seekbar
Post by: Jac74 on 07 November, 2011, 08:17:58 PM
Apart for multipass scanning, I have no way of knowing the true length of a track.
I trust the metadata they provide to me, and here, it seems that they blatantly lie.


Zao, I've detected the same problem as eevan & RAZOR87. When I use foo_input_sacd with an .iso file (or .dff) together with a .cue file.

When I play the first song (or any other) I only get 11 seconds of the waveform. I wouldn't say it's a reporting problem, since the properties of that song show the correct duration and number of samples:

General
-------------------------------------------------
Duration: 3:03.000 (516 499 200 samples)
Sample rate: 2822400 Hz
Channels: 2
Bits per sample: 24
Bitrate: 5645 kbps
Codec: DSD64
Encoding: lossless

Same happens with DST64 encoding (losslessly compressed DSD). Any chance you take a look into this?

BTW, I'm using foo_wave_seekbar 0.2.14, foo_input_sacd 0.4.1 and fb2k 1.1.7. Great component!

Regards
Title: foo_wave_seekbar
Post by: lvqcl on 08 November, 2011, 09:18:20 AM
I wouldn't say it's a reporting problem, since the properties of that song show the correct duration and number of samples:

General
-------------------------------------------------
Duration: 3:03.000 (516 499 200 samples)
Sample rate: 2822400 Hz

Yes, but it outputs 32 281 200 samples with 176400 Hz samplerate.
Title: foo_wave_seekbar
Post by: Zao on 08 November, 2011, 11:24:40 AM
There's several places to look for information about a track, including dynamic and static metadata. I've got no idea which fields are the "right" ones for your kind of input, as I do not have access to any source media for this format. Whatever free .DSD files I tested with before generated proper waveforms.
Title: foo_wave_seekbar
Post by: Zao on 08 November, 2011, 05:28:14 PM
The file scans properly with kode54's DSDIFF component. Consider using that, until I can bother to determine why the (apparently redundant) SACD one misbehaves.
Title: foo_wave_seekbar
Post by: BASGTA on 08 November, 2011, 08:22:31 PM
I don't mean to look like a noob, but where can I download the latest?  I have 0.2.12 atm.
Title: foo_wave_seekbar
Post by: Zao on 09 November, 2011, 02:39:51 AM
As with any component in the official repository - on its component page (http://www.foobar2000.org/components/view/foo_wave_seekbar) or through the update functionality inside of foobar2000 itself.
Title: foo_wave_seekbar
Post by: Jac74 on 10 November, 2011, 06:12:15 PM
I wouldn't say it's a reporting problem, since the properties of that song show the correct duration and number of samples:

General
-------------------------------------------------
Duration: 3:03.000 (516 499 200 samples)
Sample rate: 2822400 Hz

Yes, but it outputs 32 281 200 samples with 176400 Hz samplerate.


176400 Hz is a samplerate when DSD (or DST) is transformed into PCM for playback. In any case, 32 281 200 samples / 176 000 samples / sec = 183 s, which is equal to 3.03 min for the duration. I tend to agree with Zao in that the problem might be in which field the duration is looked for (which I don't know which they are, BTW, except what fb2k reports).

@Zao,

If you have any free DSD file that can be shared, I'd gladly give it a try and report what happens if that's helpful.

Regards,
Title: foo_wave_seekbar
Post by: Zao on 10 November, 2011, 07:02:24 PM
The files I tried with are the ones under special formats on 2L (http://www.2l.no/hires/index.html).

In any way, a solution has already been presented, which is to use the dsdiff component instead of the SACD component, as no-one has yet to enlighten me why they keep sticking with a component that doesn't work properly. If there's a concrete reason to use the SACD input component, then I'll bother investigating why it feeds me bogus values.
Title: foo_wave_seekbar
Post by: Jac74 on 14 November, 2011, 04:39:13 PM
The files I tried with are the ones under special formats on 2L (http://www.2l.no/hires/index.html).

In any way, a solution has already been presented, which is to use the dsdiff component instead of the SACD component, as no-one has yet to enlighten me why they keep sticking with a component that doesn't work properly. If there's a concrete reason to use the SACD input component, then I'll bother investigating why it feeds me bogus values.


Zao, I'll try with these files to see what happens. I don't think this is about enlightening anybody, and I use foo_input_sacd since I like it better and it has many more options for the decoding (and didn't have any issue regarding sound quality, btw). If you want to take a look at this issue, then great! If you don't have enough time or don't want to spend your time solving this issue, it's also OK. I never meant anything else than collaborate and make all components work together. I just found something that didn't work as expected and reported it.

Regards
Title: foo_wave_seekbar
Post by: Zao on 14 November, 2011, 05:42:19 PM
Try 0.2.14.1 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.14.1.zip), see if it does the right thing.

foo_input_sacd gives me a quite useless raw sample rate when queried statically and a more correct sample rate while decoding. When using the correct sample rate, I get correct waveforms but with roughly half the amplitude compared to DSDIFF.
Title: foo_wave_seekbar
Post by: DarkScythe on 15 November, 2011, 12:14:16 AM
Hello everyone,

First off, thank you Zao for this great seekbar.
I upgraded from XP to Win7 and decided to give my foobar a facelift while I was at it, and I love your seekbar component.

I'm using v0.2.14 with foobar 1.1.9 and CUI 0.3.8.8 and no bugs to report as of yet.

However, I spent some time browsing this thread for some way to make the waveform look a bit nicer, and came across people sharing code for what used to be the seekbar.fx file (but it seems it's not needed anymore?)
I'm using some code from many pages back that allowed multiple channels plus replaygain. However, it also changed the highlighting. While I'm not necessarily annoyed at having only a grayscale and sepia option, I do miss the "original" seekbar behavior that highlighted the entire bar as it was progressing (though seemingly somewhat transparent) while leaving the waveform colors alone. Is there any way to combine these two things?

I've tried to do it myself, but every code snippet is different, so I'm having a heck of a time figuring it out. If there's a snippet of code I can simply drop in, that would be great. I'm still trying to figure out how to modify these colors and such from the existing code. I don't know if I should post the code I'm currently using though, as it's from like 20 pages ago, so I'm not sure if there's a more updated/configurable version of it now. (Mainly because I compared with a more recent link and the replaygain handling seemed completely different.)

Thanks!
Title: foo_wave_seekbar
Post by: Anomalous on 15 November, 2011, 12:27:35 AM
If you mean the script foosion posted back on page 4 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&st=75&p=677800&#entry677800), I made some modifications which might suit your needs.

http://pastebin.com/q6qLaQ18 (http://pastebin.com/q6qLaQ18)
Title: foo_wave_seekbar
Post by: DarkScythe on 15 November, 2011, 12:33:12 AM
Thanks for the quick response!

I believe your code was actually the last one I checked, and why I said it seemed the replaygain check (among other things) changed drastically. I wasn't using foosion's but rather the one someone updated a few pages later of foosion's to support multiple channels, instead of only mono.

However, your code changes the waveform itself to the highlight color which is not quite what I was looking for. (I set my highlight color to pure green, 0,255,0.) With the default behavior (if I click on load default) this green is somewhat transparent and not as neon/radioactive, covers the entire bar, and leaves the waveform color alone (though tinted slightly green.) I tried looking through the default effect code, but I couldn't find anything that called for the highlight color, so I was unable to copy it over.
Title: foo_wave_seekbar
Post by: Zao on 15 November, 2011, 03:10:11 AM
Here's the contents of the played() function in my source:
Code: [Select]
float4 played( float pos, float2 tc, float4 fg, float4 bg, float alpha)
{
    float4 c = bg;
    if (pos > tc.x)
    {
            c = lerp(c, fg, saturate(alpha));
    }
    return c;
}

{
    float4 c0 = evaluate(input.tc);
    c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
    c0 = bar(seekPos,   input.tc, selectionColor, c0, seekWidth,     seeking      );
    if (shade_played)
        c0 = played(cursorPos, input.tc, highlightColor, c0, 0.3);
    return c0;
}

Here, I interpolate between the highlight color passed in and the computed waveform image (including background), with the factor 'alpha'. A lerp(a, b, v) is a linear interpolation on the form (b*v + a*(1-v)), that is, when v is 0, it's all a, when v is 1 it's all b, when v is 0.3 it's 0.7*a and 0.3*b.

Compare that with the function in foosion's source:
Code: [Select]
float4 played( float pos, float2 tc, float4 bg, float factor)
{
        float4 c = bg;
        if (pos > tc.x)
        {
                if (shade_played)
                        c = evaluate(backgroundColor, highlightColor, factor);
                else
                        c = evaluate(highlightColor, textColor, factor);
        }
        return c;
}

{
        float4 c0 = evaluate(backgroundColor, textColor, factor);
        c0 = played(cursorPos, input.tc, c0, factor);

        c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
        c0 = bar(seekPos,   input.tc, selectionColor, c0, seekWidth,     seeking      );
        return c0;
}


While I compute the waveform up-front and then tint it, foosion computes two different things based on whether we're in the shaded area or not.
Title: foo_wave_seekbar
Post by: Jac74 on 15 November, 2011, 04:41:20 AM
Try 0.2.14.1 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.14.1.zip), see if it does the right thing.

foo_input_sacd gives me a quite useless raw sample rate when queried statically and a more correct sample rate while decoding. When using the correct sample rate, I get correct waveforms but with roughly half the amplitude compared to DSDIFF.


Works as a charm! It gives the complete waveform for the .dff files. I can't try the .cue/.iso files till the weekend, but it seems that the issue is nailed. I'll let you know.

Thanks for your prompt response!

Regards
Title: foo_wave_seekbar
Post by: DarkScythe on 15 November, 2011, 11:30:01 AM
Thanks, Zao!
I didn't expect the two functions to be so completely different, so I guess that's what threw me off.

After a bit of trial and error, I've managed to get it working. I took Anomalous' latest version to use as a base.

I ended up replacing the entire played() function
Code: [Select]
float4 played( float pos, float2 tc, float4 bg, float factor)
{
        float4 c = bg;
        if (pos > tc.x)
        {
                if (shade_played)
                        c = evaluate(backgroundColor, highlightColor, factor);
                else
                        c = evaluate(highlightColor, textColor, factor);
        }
        return c;
}


With the original code.
I ran into an odd situation trying to insert the c0 thing as it complained about converting from float2 to float4, but I noticed the existing line was very similar, so I made a quick change
Code: [Select]
c0 = played(cursorPos, input.tc, c0, factor);
Became:
c0 = played(cursorPos, input.tc, highlightColor, c0, 0.3);


It started working immediately!

I made a few other changes while I was at it using tips throughout this thread; switched RG mode to album gain, changed 0.3 to 0.15 for a lighter highlight, made the vertical bar thinner, and added the faded bar as per this post (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&st=150&p=678690&#entry678690).

The faded bar gave me a bit of trouble, but it seems it was due to a small typo; the function is set as fade_bar, but then it tries to call faded_bar. Removing the extra 'd' worked.

I tried to add a border around the shaded region outlined in this post (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77490&view=findpost&p=681165), but it gave me an error saying there were too many arithmetic functions (66 out of an allowed 64 or something.) I guess it's not a big loss, but in either case, thank you both of you for the help, and keep up the great work!

At some point I may try to merge in the code from foosion's effects script just to have more options available if I change my mind.

For now though, I'm quite happy with it.
Title: foo_wave_seekbar
Post by: Zao on 15 November, 2011, 11:42:23 AM
The number of instructions available are governed by what shader model your effect is compiled as. In the technique section of your effect you can change the pixel shader model by replacing ps_2_0 with ps_2_a or ps_3_0, assuming that your graphics card supports those shader models.

They have much higher minimal limits on instruction count, the reason that the default is SM2.0 is because some of the graphics cards I target do not support anything higher, and the default effect is crafted to fit within the limits of 2.0.
Title: foo_wave_seekbar
Post by: DarkScythe on 15 November, 2011, 12:25:16 PM
Thank you for the tip, Zao!
I have an 8800GT so it should support everything up to pixel shader 4. I'll give it a shot when I get home since I'm at work right now.
Title: foo_wave_seekbar
Post by: Zao on 15 November, 2011, 02:57:06 PM
Note that the reason I stopped at SM3.0 is because that's the highest supported in Direct3D 9. For SM4.0 you need Direct3D 10.0; SM4.1 needs Direct3D 10.1; SM5.0 needs Direct3D 11.0.
Title: foo_wave_seekbar
Post by: DarkScythe on 15 November, 2011, 06:45:02 PM
Ah, that's great to know.

Changing the pixel shader version to ps_3_0 (and I thought I'd bump vs to vs_3_0 while I was at it) worked like a charm.
Replaced the played() code with the snippet to add the border and it added them without changing the highlights.
A quick experiment showed that changing the number "1" would change the thickness of the borders, so I've set it to 0 for now until I have more time to muck with it.

Only thing I can say now is Process Explorer is tracking 20% CPU utilization while the seekbar is displayed, regardless of it playing a track or not. Switching to another layout without it drops CPU back to idle, but am I safe to assume this is simply the seekbar passively scanning the other tracks in my playlist? I don't have any library set up yet since I'm still tweaking everything.
Title: foo_wave_seekbar
Post by: colagen on 02 December, 2011, 02:45:35 PM
I wanted to share my use of this component with the developer, thanks to him, my foobar look good (and is easy to use)
(https://hydrogenaud.io/imgcache.php?id=c1d950c28a2f19fd47290f9a2974cc9d" rel="cached" data-warn="External image, click to view at original size" data-url="http://i39.tinypic.com/5x7no1.jpg)
(I would like to go further with skinning, but that's too harsh for me, i had to stop somewhere)
Title: foo_wave_seekbar
Post by: ExUser on 03 December, 2011, 09:23:00 AM
That's a rather attractive skin, colagen. Props.
Title: foo_wave_seekbar
Post by: San_dr on 04 December, 2011, 09:30:37 AM
I like this component. Refreshing design. Thank You.
(https://hydrogenaud.io/imgcache.php?id=18dce0cf37f9eee4dc9451fc661ba1e0" rel="cached" data-warn="External image, click to view at original size" data-url="http://savepic.net/2164712.png)
(https://hydrogenaud.io/imgcache.php?id=c6532b67bb523ec0ad40c08e6e397af1" rel="cached" data-warn="External image, click to view at original size" data-url="http://savepic.net/2204650.png)
Code: [Select]
Texture1D tex : WAVEFORMDATA;
SamplerState sTex
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = Clamp;
};
struct VS_IN
{
float2 pos : POSITION;
float2 tc : TEXCOORD0;
};
struct PS_IN
{
float4 pos : SV_POSITION;
float2 tc : TEXCOORD0;
};
float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor  : HIGHLIGHTCOLOR;
float4 selectionColor  : SELECTIONCOLOR;
float4 textColor   : TEXTCOLOR;
float cursorPos : CURSORPOSITION;
bool cursorVisible : CURSORVISIBLE;
float seekPos   : SEEKPOSITION;
bool seeking   : SEEKING;
float4 replayGain   : REPLAYGAIN; // album gain, track gain, album peak, track peak
float2 viewportSize : VIEWPORTSIZE;
bool shade_played   : SHADEPLAYED;
PS_IN VS( VS_IN input )
{
PS_IN output = (PS_IN)0;
float2 half_pixel = float2(1,-1) / viewportSize;
output.pos = float4(input.pos - half_pixel, 0, 1);
output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
return output;
}
float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
{
float dist = abs(pos - tc.x);
float4 c = (show && dist < width)
? lerp(fg, bg, smoothstep(0, width, dist))
: bg;
return c;
}
float4 evaluate(float4 bg, float4 fg, float factor)
{
return saturate(lerp(bg, fg, factor));
}
float4 played( float pos, float2 tc, float4 bg, float factor)
{
float4 c = bg;
if (pos > tc.x)
{
if (shade_played)
c = evaluate(1.2*selectionColor, .5*highlightColor, factor);
else
c = evaluate(highlightColor, textColor, factor);
}
return c;
}
float RMSfactor( float2 tc, float border )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex.Sample(sTex, tc.x);
if (replayGain.g != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 2; //use track gain
} else if (replayGain.r != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.r) / 20) * 2; //use album gain
}
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;
float belowWave = tc.y + border - minmaxrms.r;
float aboveWave = tc.y - border - minmaxrms.g;
float factorWave = min(abs(belowWave), abs(aboveWave));
bool insideWave = (belowWave > 0 && aboveWave < 0);
float diffRms = abs(tc.y) - border - minmaxrms.b;
float factorRms = abs(diffRms);
bool insideRms = diffRms < 0;
float factor = insideRms ? (- 18* saturate(factorRms / border)): 0.7;
factor = insideWave ? factor / saturate(factorWave / border /4) : 0.2;
return factor;
}
float4 PS( PS_IN input ) : SV_Target
{
float dx, dy;
dx = 1/viewportSize.x;
dy = 1/viewportSize.y;
float seekWidth = 1.5 * dx;
float positionWidth = 1.5 * dx;
float factor = RMSfactor(input.tc, 2.5 * dy);
float4 c0 = evaluate(backgroundColor+.2*selectionColor, textColor, factor);
c0 = played(cursorPos, input.tc, c0, factor);//selectionColor textColor highlightColor
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos,  input.tc, highlightColor, c0, seekWidth, seeking   );
return c0;
}
technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}
technique Render9
{
pass
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
Title: foo_wave_seekbar
Post by: White_Shadow on 06 December, 2011, 11:30:37 AM
Hey Zao!

There's probably another memory leak in Waveform Seekbar 0.2.14.1. After updating to this version I caught f2k once requiring about more than one GB of RAM. Today it's about 200 MB, although foobar lasts at about 70 MB. (Win 7x64, foobar2000 v1.1.10, 4 GB RAM)

Could you please check that? I'm sorry, that I cannot provide you more information.

Regards,
White_Shadow
Title: foo_wave_seekbar
Post by: colagen on 06 December, 2011, 02:28:41 PM
That's a rather attractive skin, colagen. Props.

Thanks ! But now, it is really attractive, at least for me  I finally take some hours to learn how to hide the scrollbars and others things. Next step for my next "what the f.. could i do this weekend" would be to learn how to do advanced things with WSH panel, but eh i've already fall too far into the foobar madness skinning.
With waveform + the two chanel spectrum panels i've add in the background (the big brown one is maybe hard to see in the screenshot), it seems that my foobar is now alive
(https://hydrogenaud.io/imgcache.php?id=1bb4ee9c1326bf0f68bb3952fb835487" rel="cached" data-warn="External image, click to view at original size" data-url="http://i40.tinypic.com/1zwnv44.jpg)
Title: foo_wave_seekbar
Post by: studio13 on 13 December, 2011, 09:44:14 AM
sorry if this has been posted before BUT ..

the wave seekbar has stopped displaying some of my files. I have no idea why. I ran all the functions available in the waveform seekbar drop down menu and the missing waveform overviews are missing. How can I force the rebuild of the waveform for these files ? thanks
Title: foo_wave_seekbar
Post by: Zao on 13 December, 2011, 10:52:52 AM
The context menu entry under Utilities named "Extract Seekbar Signature" should re-scan the file if run by the user.
What kind of file is this? Does the console say anything? Can you provide (privately) a file that is missing its waveform?
Title: foo_wave_seekbar
Post by: studio13 on 13 December, 2011, 12:29:54 PM
The context menu entry under Utilities named "Extract Seekbar Signature" should re-scan the file if run by the user.

Sorry that didn't work for any of the files ..

What kind of file is this?

They are all .wav but a mix of stereo, mono, 44.1k, 48k, 16bit, 24bit and some are ADPCM. Some files show the waveform display other do not. Last week the same files all showed thier waveform display.


Does the console say anything? Can you provide (privately) a file that is missing its waveform?
I'm sorry I don't know what the console is. I'll zip up a file I can share and send it later today.
Title: foo_wave_seekbar
Post by: Zao on 13 December, 2011, 05:31:06 PM
(https://hydrogenaud.io/imgcache.php?id=b89701670337bfa0c23562c39564b924" rel="cached" data-warn="External image, click to view at original size" data-url="http://zao.se/~zao/seekbar57.png)
Your sample file scans properly. Try some different frontends, see if there's any difference in whether it shows or not.
The console is accessible through View -> Console, and is a log of recent messages and errors.
Title: foo_wave_seekbar
Post by: studio13 on 14 December, 2011, 09:10:11 AM
Oops ok I see the console now thanks I have set it to write a log file.

I've realized this morning the problem is limited to playlists. When I started out using foobar I was only creating playlists then just dragging and dropping files directly onto them. I had not set the Preference for my "Music Library" folder pathname yet. Now that I have my "Music Library" folder pathnames setup and the files have scanned over-night they all show up in the waveform seekbar just fine. As I review the playlists created over the past week or two I can see the waveform overviews are still missing. I am using the "Playlist Organizer" component ... could that be part of the problem ?? Anway overall things have improved as I can now search the library directly and the waveforms display no problem.

If you have the time I would really appreciate your advice with one more thing. The path I have set for my "Music Library" is a network disk with over 11,000 full resolution .wav files. Most are less than 60seconds long. over time I will end up auditioning each one of these files. I'm concerned that I have no idea how the waveform overviews are managed. Is there some hidden directory somewhere that stores the waveform overview? Am I filling up a local directory or is it writing back to the network disk ?? Is there a process for managing the overview files ?? Thanks
Title: foo_wave_seekbar
Post by: Zao on 14 December, 2011, 09:21:18 AM
I've realized this morning the problem is limited to playlists. When I started out using foobar I was only creating playlists then just dragging and dropping files directly onto them. I had not set the Preference for my "Music Library" folder pathname yet. Now that I have my "Music Library" folder pathnames setup and the files have scanned over-night they all show up in the waveform seekbar just fine. As I review the playlists created over the past week or two I can see the waveform overviews are still missing. I am using the "Playlist Organizer" component ... could that be part of the problem ?? Anway overall things have improved as I can now search the library directly and the waveforms display no problem.

There's a setting somewhere for the waveform seekbar to allow analysis of files that are not in the Media Library. It is enabled by default, but you might have accidentally disabled it.

If you have the time I would really appreciate your advice with one more thing. The path I have set for my "Music Library" is a network disk with over 11,000 full resolution .wav files. Most are less than 60seconds long. over time I will end up auditioning each one of these files. I'm concerned that I have no idea how the waveform overviews are managed. Is there some hidden directory somewhere that stores the waveform overview? Am I filling up a local directory or is it writing back to the network disk ?? Is there a process for managing the overview files ?? Thanks

The backing storage for the component is a sqlite3 database file in your foobar2000 profile directory, named 'wavecache.db'. It stores the queue of pending scans (which persists over restarts) and it stores the waveforms as compressed binary blobs. A single stereo track takes around 20 KiB or so.

I've considered to have per-directory databases or so, but never really got a good use case to warrant implementing it.
Title: foo_wave_seekbar
Post by: studio13 on 14 December, 2011, 09:43:31 AM
There's a setting somewhere for the waveform seekbar to allow analysis of files that are not in the Media Library. It is enabled by default, but you might have accidentally disabled it.


man I am so sorry yes this is exactly the problem I BROKE IT !! The setting is in the //Preferences/Advanced/Waveform Seekbar/Analise tracks not in the media library. I had disabled this feature .. duh ...

I really appreciate that you created and actively support this very useful foobar component it has been a great help to me !!
Title: foo_wave_seekbar
Post by: Zao on 14 December, 2011, 11:41:50 AM
Nice to hear that for once, it was not my fault. 
Title: foo_wave_seekbar
Post by: Zao on 14 December, 2011, 01:09:40 PM
Case found a bug in the mono downmixing of waveforms, which had the effect of completely ignoring the rear right and surround right channels and attenuating the LFE and center channels in the waveforms.
If you have any waveforms that were scanned with the advanced setting to downmix scan results to mono, you probably want to rescan those. Otherwise, just enjoy a slightly less broken product.

This was fixed in the just released 0.2.14.2, which should be live on the site and through the update functionality now.
Title: foo_wave_seekbar
Post by: studio13 on 15 December, 2011, 09:36:34 AM
Just in case this info helps in the waveform seekbar right click / configuration window I have set
[blockquote]Frontend = Direct2D 1.0
Misc = Downmix display to mono set to YES[/blockquote]
Then in foobar Preferences/Advanced/Tools/Waveform Seekabar
[blockquote]Store analysed tracks in mono set to YES[/blockquote]
Title: foo_wave_seekbar
Post by: Zao on 15 December, 2011, 12:40:00 PM
[blockquote]Store analysed tracks in mono set to YES[/blockquote]

If anyone has analysed 5.1 or 7.1 content with that setting enabled, I recommend that you should rescan those tracks, as some channels will be missing or attenuated in the waveform data.
Title: foo_wave_seekbar
Post by: CmdRobot on 19 December, 2011, 04:27:33 AM
Hey guys,

I use these settings for my seekbar.fx:
http://pastebin.com/N6N1uCxJ (http://pastebin.com/N6N1uCxJ)

Someone from this thread gave them to me a year ago or so, I asked for code to scale the waveform with the replay gain. But I think it's not working correctly anymore. There are some tracks that are pretty loud due to replaygain, but the waveform is very tiny.

Can anybody help? I don't even slightly understand anything from this file...

Thanks for this awsome component!
Title: foo_wave_seekbar
Post by: Dandruff on 16 January, 2012, 09:03:32 AM
Hi Zao,

I have a minor issue with version 0.2.14.2:

Example:


file = 16bit, 44.1 kHz

-> Waveform analysed and displayed fine


Then I lower the volume and save the new file under the same name and same folder with 32bit, 48kHz. Now WaveformSeekbar doesn't update automatically. Even if I'm using the "Extract Seekbar signature" command, the file still displays the wrong/old waveform. I have to use "Remove seekbar signature" in order to get the new waveform (lower volume) displayed.


Is there no way to do this automatically (computing hash for each file and if it differs then do a rebuild of the signature)?
Title: foo_wave_seekbar
Post by: Zao on 16 January, 2012, 09:35:36 AM
Hashing a file is around the same magnitude of work as scanning a file, so that would be a rather significant performance hit for a common operation.

As for manual rescans, they should re-analyse the waveform properly unless I've managed to break that code yet again. The logic around there is ... tricky.
Title: foo_wave_seekbar
Post by: Dandruff on 16 January, 2012, 09:43:05 AM
"Always rescan track if requested by user" and "Analyze tracks not in the media library" are enabled here.
Title: foo_wave_seekbar
Post by: Zao on 17 January, 2012, 10:57:50 AM
I seem to have fixed that bug in the 0.2.15. It turns out that the "always rescan" option wasn't wired up at all in the code.
Note that the UI will not be aware of the change in the waveform until it re-requests it from the backend, which will typically happen when you restart the track.
Title: foo_wave_seekbar
Post by: Dandruff on 18 January, 2012, 02:33:49 AM
Ok, with 0.2.15 the "Extract Seekbar signature" + foobar2000 restart does the trick. Thanks!


Still not perfect (as it needs user interaction). What about saving the file date/time (instead of a hash) along with the signature? If the file date/time differs from the saved one, rebuild signature. Could this be done?
Title: foo_wave_seekbar
Post by: Zao on 18 January, 2012, 02:51:15 AM
That sort of information is not universally available from a playable location, especially not in the presence of cue sheets, archives and chapters.
I'd rather not make a half-arsed system that will require months of tuning to give occasionally better results.

Note that all you need to do is to restart the track, not the player.
Title: foo_wave_seekbar
Post by: Dandruff on 18 January, 2012, 03:13:13 AM
Ok. Thanks!
Title: foo_wave_seekbar
Post by: Zao on 18 January, 2012, 04:14:55 AM
In particular, being opportunistic and rescanning a file as soon as it changes will have the ill effect of locking access to the file a lot, which already is a problem as we lock the file when scanning already, causing real problems.

There's some problem with scanning a new file while playing the old contents too, as the display will then mismatch what is heard.

I'd need to design this properly if I ever implement it, and need to rejigger a bit of notification.
Title: foo_wave_seekbar
Post by: Dandruff on 18 January, 2012, 05:22:35 AM
Alright :)
Title: foo_wave_seekbar
Post by: aeidein on 02 February, 2012, 10:47:01 PM
• Would you consider implementing seeking via the mousewheel when mouseovered?
• I'm not sure if it's a limitation of Columns, but when the status bar is hidden/shown, the seekbar gets resized, even when locked.
Title: foo_wave_seekbar
Post by: Zao on 03 February, 2012, 10:53:08 AM
#18 - Seek on mouse wheel motion (https://github.com/zao/foo_wave_seekbar/issues/18)

As for resizing, I've got no clue what Columns UI does, or how to make it less stupid. It's probably their fault. If the window area changes as an effect of removing/adding the status bar, they don't have much alternative but to either resize panels or resize the whole window. Sounds like they went with the former.
Title: foo_wave_seekbar
Post by: Geordietastic on 03 February, 2012, 05:17:22 PM
That's a rather attractive skin, colagen. Props.

Thanks ! But now, it is really attractive, at least for me  I finally take some hours to learn how to hide the scrollbars and others things. Next step for my next "what the f.. could i do this weekend" would be to learn how to do advanced things with WSH panel, but eh i've already fall too far into the foobar madness skinning.
With waveform + the two chanel spectrum panels i've add in the background (the big brown one is maybe hard to see in the screenshot), it seems that my foobar is now alive
(https://hydrogenaud.io/imgcache.php?id=1bb4ee9c1326bf0f68bb3952fb835487" rel="cached" data-warn="External image, click to view at original size" data-url="http://i40.tinypic.com/1zwnv44.jpg)


Love to know how you did this please?
Title: foo_wave_seekbar
Post by: SmartOne on 05 February, 2012, 03:38:32 PM
Is there an easy way to edit the HLSL making the waveform look sharp like in Audacity?

And maybe a way to show clipping as a different color, while you're at it.
Title: foo_wave_seekbar
Post by: Zao on 05 February, 2012, 04:01:38 PM
That depends entirely on what "sharp like Audacity" means.
As for clipping, predicate the color for a column based on whether the min/max exceeds 1.0 or not.
Title: foo_wave_seekbar
Post by: SmartOne on 05 February, 2012, 04:14:50 PM
Sharp as in the edges aren't faded.  I don't like fading on the waveform or the selection.
Title: foo_wave_seekbar
Post by: MDMA on 07 February, 2012, 02:56:22 PM
what would I type in seekbar.fx to add a couple of pixels worth of vertical padding to the top and bottom of my seekbar? I'd like to give it more 'float' space
Title: foo_wave_seekbar
Post by: Zao on 07 February, 2012, 03:54:11 PM
In the VS function, on the line before return output; you could add output.tc.y *= 1.2; which would make the range of the display from -1.2 to 1.2 (with 1.0 being full-scale).
Title: foo_wave_seekbar
Post by: SmartOne on 08 February, 2012, 01:55:26 PM
I'm having trouble deciphering the purpose of each of the variables (comments?).  I also don't know HLSL (but who cares, right?).  What is tc?  How can I determine the value of the waveform at an arbitrary point and color it red when it hits the maximum amplitude (indicating clipping)?

After much tinkering, the waveform and seekbar are now sharp (no ugly fading).  That's the extent of my progress.
Title: foo_wave_seekbar
Post by: Zao on 08 February, 2012, 05:58:17 PM
Comments? Those are for the weak, I hear. 

The x-component of tc indicates the position along the waveform. 0.0 is snugly against the left side of the window, 1.0 is to the far right of the window. In the PS (pixel shader), a tc.x of 0.25 would be 25% from the left side of the window.

The y-component of tc indicates at what absolute signal level the top and bottom of the window is at. The default of 1.0 makes the vertical range of the window from -fullscale to +fullscale.

The pixel shader function runs once for every pixel (fragment) of the window, with the parameters interpolated from the values set in the corners by the vertex shader.

The way the waveform is rasterised is that the x-component is used to sample the texture representing the amplitude data. The resulting data is then tested against the y-component to see if it's outside or inside the waveform, and coloured appropriately. If you get rid of the interpolations/smoothsteps at that border, you get an aliased sharp edge.

You can have a predicate picking a particular colour for the fragment if the sampled value (min/max) is larger than 1.0, instead of the default color. As for the exact place to do that, you've got to find on your own as I do not use the default shader anymore.
Title: foo_wave_seekbar
Post by: MDMA on 08 February, 2012, 06:13:25 PM
In the VS function, on the line before return output; you could add output.tc.y *= 1.2; which would make the range of the display from -1.2 to 1.2 (with 1.0 being full-scale).


Thanks a lot for this but I am pretty clueless on scripting. Would it be possible to just add it in its own line at the end of the config?
Title: foo_wave_seekbar
Post by: SmartOne on 08 February, 2012, 10:26:35 PM
Thank you for the help.  I think I figured it out (at least, it looks accurate):

Code: [Select]
float4 wave;
if(minmaxrms.y > 1.0){
bgColor.r = 1.0;
bgColor.g = 0.0;
bgColor.b = 0.0;
wave=bgColor;
}
else if(outside)
wave = bgColor;
else
wave = textColor;

return wave;

This replaces the if statement at the end of evaluate(), making clipping parts red.

MDMA, I think you need to add the line [font= \"Courier New\"]output.tc.y *= 1.2;[/font] to the end of VS().  The result should look like this:

Code: [Select]
PS_IN VS( VS_IN input )
{
PS_IN output = (PS_IN)0;

float2 half_pixel = float2(1,-1) / viewportSize;
output.pos = float4(input.pos - half_pixel, 0, 1);

if (horizontal)
{
output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
}
else
{
output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);
}

if (flipped)
output.tc.x = 1.0 - output.tc.x;

output.tc.y *= 1.2;
return output;
}
Title: foo_wave_seekbar
Post by: mforceew on 10 February, 2012, 03:28:41 PM
Hello everyone. I'm newbie in foobar. How can i make waveform seekbar thinner? Thank you.
Title: foo_wave_seekbar
Post by: MDMA on 10 February, 2012, 03:31:27 PM
Thanks, although I have added it in so it is like so:

Code: [Select]
if (horizontal)
        output.tc = float2((input.pos.x + 1.0) / 2.0, input.pos.y);
    else
        output.tc = float2((-input.pos.y + 1.0) / 2.0, input.pos.x);

    output.tc.y *= 1.2;
    return output;
}


and it doesn't seem to be doing anything. Is there a conflict from the output.tc = float lines? thanks
Title: foo_wave_seekbar
Post by: Zao on 10 February, 2012, 04:35:28 PM
No, operations are done in sequence. It's probably due to how your PS function uses the texcoords. It does a difference in my shader, and as mentioned, I don't use the default effect anymore.
Title: foo_wave_seekbar
Post by: MDMA on 10 February, 2012, 06:15:27 PM
No, operations are done in sequence. It's probably due to how your PS function uses the texcoords. It does a difference in my shader, and as mentioned, I don't use the default effect anymore.


Nor I, here is a copy of my current seekbar.fx config:
https://privatepaste.com/00c389b6a4 (https://privatepaste.com/00c389b6a4)
Title: foo_wave_seekbar
Post by: Dandruff on 23 February, 2012, 05:57:11 AM
SciLexer.dll from http://prdownloads.sourceforge.net/scintil...03.zip?download (http://prdownloads.sourceforge.net/scintilla/wscite303.zip?download) is at version number 3.0.3.0 while Waveform Seekbar's is at 2.2.6.0. Can we use the 3.0.3.0 one?
Title: foo_wave_seekbar
Post by: lvqcl on 23 February, 2012, 06:18:36 AM
http://www.hydrogenaudio.org/forums/index....st&p=768884 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77490&view=findpost&p=768884)
Title: foo_wave_seekbar
Post by: Dandruff on 23 February, 2012, 09:15:44 AM
I strongly recommend against dropping in a binary build of SciLexer, at least until I remember if I build mine in any special way.


Why do you recommend avoiding the scilexer dll update? Just tried the 3.0.3.0 DLL and it seems to work fine with Waveform Seekbar 0.2.16!
Title: foo_wave_seekbar
Post by: enigmatik on 23 February, 2012, 03:44:47 PM
Is it possible to move wavecache.db to some other location outside foobar's main directory?
Title: foo_wave_seekbar
Post by: Zao on 23 February, 2012, 04:07:16 PM
Please don't modify things, even if it "seems to work fine". I've got enough pain in debugging crash dumps without people running things I have not built in unsupported configurations.
I have not seen any reason whatsoever to upgrade, and I don't see why I should change something that works properly for something that most probably is larger, has different semantics and comes with additional maintenance requirements, just because someone feels that "higher is better, lol".

In particular, I use the non-message interface to it, which couples the library built with and the library used at runtime more than the poor message interface.

It's not a matter of "why do you not upgrade",  it should be "why should I upgrade".
Title: foo_wave_seekbar
Post by: Zao on 23 February, 2012, 04:10:46 PM
Is it possible to move wavecache.db to some other location outside foobar's main directory?

Known request, needs thinking.
Title: foo_wave_seekbar
Post by: Zao on 24 February, 2012, 06:00:50 PM
Why do you recommend avoiding the scilexer dll update? Just tried the 3.0.3.0 DLL and it seems to work fine with Waveform Seekbar 0.2.16!

I've updated it in my sources for no reason what-so-ever. I redirect all blame for the pointless file size increase to you.

Also, yet again, I do not recommend against building against some particular version. I recommend against replacing DLLs you have no idea about how they are built or what customizations are in place.
Multi-module programming is hard enough without all the unknown variables you cause.
Title: foo_wave_seekbar
Post by: tribaljet on 24 February, 2012, 10:32:24 PM
Hello. I've seen foo_wave_seekbar used on many different configs and themes, and I've decided to give it a try, being quite pleased at the result. But I have a small problem, which is being unable to find where seekbar.fx is located. I'm using a portable foobar2000 installation, but the file isn't located on the portable folder nor on the Appdata folder. Switching to a normal installation isn't an option for me, but what boggles my mind is that I did a full search on my HDDs and couldn't locate the file at all.

Can someone shed some light on this?

Thanks in advance
Title: foo_wave_seekbar
Post by: Zao on 24 February, 2012, 11:12:56 PM
It was moved from being a file to being a per-instance setting many versions ago.
Add a seekbar, right click it to get the configuration dialog and hit the "Frontend settings..." button to get a text editor with the effect source.
This is the same in both portable and non-portable installs.
Title: foo_wave_seekbar
Post by: Dandruff on 25 February, 2012, 11:59:56 AM
Why do you recommend avoiding the scilexer dll update? Just tried the 3.0.3.0 DLL and it seems to work fine with Waveform Seekbar 0.2.16!

I've updated it in my sources for no reason what-so-ever. I redirect all blame for the pointless file size increase to you.

Also, yet again, I do not recommend against building against some particular version. I recommend against replacing DLLs you have no idea about how they are built or what customizations are in place.
Multi-module programming is hard enough without all the unknown variables you cause.


Other question: Can we delete the SciLexer DLL savely? I don't need to change the Direct3D Frontend settings here.
Title: foo_wave_seekbar
Post by: tribaljet on 25 February, 2012, 12:01:44 PM
It was moved from being a file to being a per-instance setting many versions ago.
Add a seekbar, right click it to get the configuration dialog and hit the "Frontend settings..." button to get a text editor with the effect source.
This is the same in both portable and non-portable installs.


Thanks Zao. Another question. Is there a guide for editing Frontend settings? Because mine is currently empty and I'm not familiar with what I should add there.
Title: foo_wave_seekbar
Post by: Dandruff on 25 February, 2012, 12:05:16 PM
0.2.16 crashes here when switching from Direct3D to Direct2D mode while playing this internet stream: http://72.233.84.175 (http://72.233.84.175)

Code: [Select]
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 00EB19EDh
Access violation, operation: read, address: 00000000h

Call path:
entry=>app_mainloop

Code bytes (00EB19EDh):
00EB19ADh:  FC 00 C7 46 2C 03 00 00 00 E8 49 76 09 00 83 C4
00EB19BDh:  04 C7 85 C4 FE FF FF 32 00 00 00 89 5D FC B8 D1
00EB19CDh:  19 EB 00 C3 8B BD C4 FE FF FF 8B B5 BC FE FF FF
00EB19DDh:  8B CE E8 1C 08 00 00 8B 86 B8 00 00 00 8B 48 18
00EB19EDh:  8B 11 8B 42 18 6A FF FF D0 8B 86 B8 00 00 00 83
00EB19FDh:  78 18 00 74 64 89 BD C4 FE FF FF DB 85 C4 FE FF
00EB1A0Dh:  FF 6A 00 85 FF 79 06 DC 05 E0 77 FC 00 DC B5 98
00EB1A1Dh:  FE FF FF 8B 56 04 D9 BD BE FE FF FF 0F B7 85 BE

Stack (0012F8C0h):
0012F8A0h:  E145EAE8 00000001 00000000 00000150
0012F8B0h:  B223DC0C 00000001 00000006 B223DBCC
0012F8C0h:  3157539F 00000000 01084C48 00000000
0012F8D0h:  00000000 00000000 00000000 00000000
0012F8E0h:  00FB67E8 00000000 C47A0000 0012F8E0
0012F8F0h:  00000000 3FF00000 0108B160 00000001
0012F900h:  00FC6384 00000000 00000000 00000000
0012F910h:  00000037 01084C48 00000000 00000032
0012F920h:  0000011C 00000005 00000001 00000A28
0012F930h:  00000002 00650053 00760072 00630069
0012F940h:  00200065 00610050 006B0063 00330020
0012F950h:  00000000 00000000 00000000 00000000
0012F960h:  00000000 00000000 00000000 00000000
0012F970h:  00000000 00000000 00000000 00000000
0012F980h:  00000000 00000000 00000000 00000000
0012F990h:  00000000 00000000 00000000 00000000
0012F9A0h:  00000000 00000000 00000000 00000000
0012F9B0h:  00000000 00000000 00000000 00000000
0012F9C0h:  00000000 00000000 00000000 00000000
0012F9D0h:  00000000 00000000 00000000 00000000

Registers:
EAX: 0108B160, EBX: 0012FA4C, ECX: 00000000, EDX: 00EC4ED0
ESI: 01084C48, EDI: 00000032, EBP: 0012FA58, ESP: 0012F8C0

Crash location:
Module: foo_wave_seekbar
Offset: 219EDh
Symbol: "g_gdi_entrypoint" (+11F5Dh)

Loaded modules:
foobar2000   loaded at 00400000h - 005B6000h
ntdll loaded at 7C910000h - 7C9C9000h
kernel32 loaded at 7C800000h - 7C908000h
COMCTL32 loaded at 773A0000h - 774A3000h
msvcrt   loaded at 77BE0000h - 77C38000h
ADVAPI32 loaded at 77DA0000h - 77E4A000h
RPCRT4   loaded at 77E50000h - 77EE3000h
Secur32   loaded at 77FC0000h - 77FD1000h
GDI32 loaded at 77EF0000h - 77F39000h
USER32   loaded at 7E360000h - 7E3F1000h
SHLWAPI   loaded at 77F40000h - 77FB6000h
DSOUND   loaded at 73E70000h - 73ECC000h
ole32 loaded at 774B0000h - 775EE000h
VERSION   loaded at 77BD0000h - 77BD8000h
WINMM loaded at 76AF0000h - 76B1E000h
UxTheme   loaded at 5B0F0000h - 5B128000h
SHELL32   loaded at 7E670000h - 7EE91000h
zlib1 loaded at 5A4C0000h - 5A4D4000h
shared   loaded at 10000000h - 1002B000h
imagehlp loaded at 76C50000h - 76C78000h
dbghelp   loaded at 59DD0000h - 59E71000h
COMDLG32 loaded at 76350000h - 7639A000h
gdiplus   loaded at 4EBA0000h - 4ED4B000h
CRYPT32   loaded at 77A50000h - 77AE6000h
MSASN1   loaded at 77AF0000h - 77B02000h
IMM32 loaded at 76330000h - 7634D000h
msctfime loaded at 75250000h - 7527E000h
foo_dsp_std   loaded at 00D20000h - 00D68000h
foo_ui_std   loaded at 00D80000h - 00E65000h
MSIMG32   loaded at 76320000h - 76325000h
foo_wave_seekbar loaded at 00E90000h - 0102B000h
WS2_32   loaded at 71A10000h - 71A27000h
WS2HELP   loaded at 71A00000h - 71A08000h
foo_converter loaded at 01090000h - 0110C000h
foo_cdda loaded at 01130000h - 0117E000h
foo_out_asio loaded at 011A0000h - 011D2000h
foo_albumlist loaded at 01200000h - 0125C000h
foo_input_std loaded at 01280000h - 013DB000h
frontend_direct3d9   loaded at 01620000h - 01680000h
d3d9 loaded at 4FD50000h - 4FEF6000h
d3d8thk   loaded at 6DE80000h - 6DE86000h
d3dx9_42 loaded at 01690000h - 01875000h
CLBCATQ   loaded at 76F90000h - 7700F000h
COMRes   loaded at 77010000h - 770E3000h
OLEAUT32 loaded at 770F0000h - 7717B000h
xpsp2res loaded at 01AC0000h - 01D99000h
mswsock   loaded at 719B0000h - 719F0000h
hnetcfg   loaded at 66710000h - 66769000h
wshtcpip loaded at 719F0000h - 719F8000h

Stack dump analysis:
Address: 00FB67E8h (foo_wave_seekbar+1267E8h), symbol: "boost::serialization::singleton<std::set<boost::serialization::void_cast_detail::void_caster const *,boost:" (+445A8h)
Address: 00FC6384h (foo_wave_seekbar+136384h), symbol: "boost::serialization::singleton<std::set<boost::serialization::void_cast_detail::void_caster const *,boost:" (+54144h)
Address: 00FABB9Eh (foo_wave_seekbar+11BB9Eh), symbol: "boost::serialization::singleton<std::set<boost::serialization::void_cast_detail::void_caster const *,boost:" (+3995Eh)
Address: 00EE74E3h (foo_wave_seekbar+574E3h), symbol: "boost::archive::detail::iserializer<boost::archive::xml_iarchive,wave::color>::load_object_data" (+24B63h)
Address: 00EAB45Bh (foo_wave_seekbar+1B45Bh), symbol: "g_gdi_entrypoint" (+B9CBh)
Address: 00EABC47h (foo_wave_seekbar+1BC47h), symbol: "g_gdi_entrypoint" (+C1B7h)
Address: 00F7B0A0h (foo_wave_seekbar+EB0A0h), symbol: "boost::serialization::singleton<std::set<boost::serialization::void_cast_detail::void_caster const *,boost:" (+8E60h)
Address: 00EABE33h (foo_wave_seekbar+1BE33h), symbol: "g_gdi_entrypoint" (+C3A3h)
Address: 00EABB0Fh (foo_wave_seekbar+1BB0Fh), symbol: "g_gdi_entrypoint" (+C07Fh)
Address: 00EACFF0h (foo_wave_seekbar+1CFF0h), symbol: "g_gdi_entrypoint" (+D560h)
Address: 7E368734h (USER32+8734h), symbol: "GetDC" (+6Dh)
Address: 7E368816h (USER32+8816h), symbol: "GetDC" (+14Fh)
Address: 0048A7C9h (foobar2000+8A7C9h)
Address: 7E39048Fh (USER32+3048Fh), symbol: "DeregisterShellHookWindow" (+1CFh)
Address: 7E368830h (USER32+8830h), symbol: "GetDC" (+169h)
Address: 7E378EA0h (USER32+18EA0h), symbol: "DefWindowProcW" (+180h)
Address: 004792DAh (foobar2000+792DAh)
Address: 7E39048Fh (USER32+3048Fh), symbol: "DeregisterShellHookWindow" (+1CFh)
Address: 7E378EB0h (USER32+18EB0h), symbol: "DefWindowProcW" (+190h)
Address: 7E378EECh (USER32+18EECh), symbol: "DefWindowProcW" (+1CCh)
Address: 7C91E473h (ntdll+E473h), symbol: "KiUserCallbackDispatcher" (+13h)
Address: 7E378E53h (USER32+18E53h), symbol: "DefWindowProcW" (+133h)
Address: 7E3694D2h (USER32+94D2h), symbol: "GetWindowLongA" (+75h)
Address: 7E378F10h (USER32+18F10h), symbol: "DefWindowProcW" (+1F0h)
Address: 7E39048Fh (USER32+3048Fh), symbol: "DeregisterShellHookWindow" (+1CFh)
Address: 7E3689F0h (USER32+89F0h), symbol: "GetWindowLongW" (+14Ah)
Address: 7E368A10h (USER32+8A10h), symbol: "DispatchMessageW" (+Fh)
Address: 7E3774FFh (USER32+174FFh), symbol: "IsDialogMessageW" (+DBh)
Address: 00DF5CB6h (foo_ui_std+75CB6h)
Address: 0045848Ch (foobar2000+5848Ch)
Address: 7E37B19Ch (USER32+1B19Ch), symbol: "DestroyWindow" (+0h)
Address: 00514812h (foobar2000+114812h)
Address: 0045856Fh (foobar2000+5856Fh)
Address: 00459001h (foobar2000+59001h)
Address: 00538358h (foobar2000+138358h)
Address: 00538358h (foobar2000+138358h)
Address: 00537BB4h (foobar2000+137BB4h)
Address: 00541E54h (foobar2000+141E54h)
Address: 7C9201DBh (ntdll+101DBh), symbol: "RtlAllocateHeap" (+117h)
Address: 0050157Ah (foobar2000+10157Ah)
Address: 005080E6h (foobar2000+1080E6h)
Address: 00424730h (foobar2000+24730h)
Address: 00505570h (foobar2000+105570h)
Address: 005080E6h (foobar2000+1080E6h)
Address: 00505E05h (foobar2000+105E05h)
Address: 100027D8h (shared+27D8h), symbol: "uPrintCrashInfo_OnEvent" (+B1h)
Address: 00537E5Ch (foobar2000+137E5Ch)
Address: 00520E72h (foobar2000+120E72h)
Address: 0045926Eh (foobar2000+5926Eh)
Address: 00400000h (foobar2000+0h)
Address: 0050B287h (foobar2000+10B287h)
Address: 0056A600h (foobar2000+16A600h)
Address: 00504D7Ah (foobar2000+104D7Ah)
Address: 0050184Ch (foobar2000+10184Ch)
Address: 00501846h (foobar2000+101846h)
Address: 00529888h (foobar2000+129888h)
Address: 0052988Ch (foobar2000+12988Ch)
Address: 00526F81h (foobar2000+126F81h)
Address: 00505570h (foobar2000+105570h)
Address: 00501846h (foobar2000+101846h)
Address: 0052104Bh (foobar2000+12104Bh)
Address: 00502BB2h (foobar2000+102BB2h)
Address: 00400000h (foobar2000+0h)
Address: 00505570h (foobar2000+105570h)
Address: 7C817077h (kernel32+17077h), symbol: "RegisterWaitForInputIdle" (+49h)
Address: 7C839AD8h (kernel32+39AD8h), symbol: "ValidateLocale" (+2B0h)
Address: 7C817080h (kernel32+17080h), symbol: "RegisterWaitForInputIdle" (+52h)
Address: 00502C05h (foobar2000+102C05h)
Address: 0057005Ch (foobar2000+17005Ch)
Address: 004E0049h (foobar2000+E0049h)
Address: 004F0044h (foobar2000+F0044h)
Address: 00530057h (foobar2000+130057h)
Address: 0057005Ch (foobar2000+17005Ch)
Address: 01C8AA0Ah (xpsp2res+1CAA0Ah)
Address: 004B0063h (foobar2000+B0063h)
Address: 00530022h (foobar2000+130022h)
Address: 00500069h (foobar2000+100069h)
Address: 01CBF9B6h (xpsp2res+1FF9B6h)
Address: 00500069h (foobar2000+100069h)
Address: 00410072h (foobar2000+10072h)
Address: 00540079h (foobar2000+140079h)
Address: 00430022h (foobar2000+30022h)
Address: 00490057h (foobar2000+90057h)
Address: 0044004Eh (foobar2000+4004Eh)
Address: 0057004Fh (foobar2000+17004Fh)
Address: 0053006Eh (foobar2000+13006Eh)
Address: 00530078h (foobar2000+130078h)
Address: 004D005Ch (foobar2000+D005Ch)
Address: 004D005Fh (foobar2000+D005Fh)
Address: 0057002Eh (foobar2000+17002Eh)
Address: 0047002Eh (foobar2000+7002Eh)
Address: 004D002Eh (foobar2000+D002Eh)
Address: 00500069h (foobar2000+100069h)
Address: 0044002Eh (foobar2000+4002Eh)
Address: 01C8AA0Ah (xpsp2res+1CAA0Ah)
Address: 0044002Eh (foobar2000+4002Eh)
Address: 00410072h (foobar2000+10072h)
Address: 00540079h (foobar2000+140079h)
Address: 0057005Ch (foobar2000+17005Ch)
Address: 004E0049h (foobar2000+E0049h)
Address: 004F0044h (foobar2000+F0044h)
Address: 00530057h (foobar2000+130057h)
Address: 0057005Ch (foobar2000+17005Ch)

Environment:
App: foobar2000 v1.1.11
UI: Default User Interface 0.9.5

Components:
Core (2012-02-04 13:05:48 UTC)
foobar2000 core 1.1.11
foo_albumlist.dll (2012-02-04 13:04:12 UTC)
Album List 4.5
foo_cdda.dll (2012-02-04 13:03:52 UTC)
CD Audio Decoder 3.0
foo_converter.dll (2012-02-04 13:04:00 UTC)
Converter 1.5
foo_dsp_std.dll (2012-02-04 13:04:14 UTC)
Standard DSP Array 1.0
foo_input_std.dll (2012-02-04 13:05:10 UTC)
Standard Input Array 1.0
foo_out_asio.dll (2012-02-04 13:59:56 UTC)
ASIO support 2.1.1
foo_ui_std.dll (2012-02-04 13:04:08 UTC)
Default User Interface 0.9.5
foo_wave_seekbar.dll (2012-02-22 18:57:06 UTC)
Waveform seekbar 0.2.16

Recent events:
Startup time : 0:00.048498
Seekbar: taking Direct3D9 path.
Opening track for playback: "http://72.233.84.175/"
Seekbar: Frontend initialized.
Wave cache: skipping location "http://72.233.84.175/"
Wave cache: skipping location "http://72.233.84.175/"
Seekbar: taking Direct2D1 path.
Seekbar: frontend creation failed: unavailable frontend
Seekbar: taking GDI path.
Wave cache: skipping location "http://72.233.84.175/"


Machine specifications:
OS: Windows 5.1.2600 Service Pack 3 x86
CPU: Intel® Core™2 CPU   6700  @ 2.66GHz, features: MMX SSE SSE2 SSE3
Audio: HDSP9632 Analog (1+2); HDSP9632 SPDIF; HDSP9632 ADAT (1+2); HDSP9632 ADAT (3+4); HDSP9632 ADAT (5+6); HDSP9632 ADAT (7+8)
Title: foo_wave_seekbar
Post by: Zao on 25 February, 2012, 09:11:18 PM
0.2.17 probably fixes the fallback crashes, but you should of course look into why you fall back to GDI in the first place.
Title: foo_wave_seekbar
Post by: tribaljet on 25 February, 2012, 09:21:50 PM
Hopefully someone will post a tutorial on how to configure the Frontend Settings for those who aren't familiar with the code.
Title: foo_wave_seekbar
Post by: Zao on 25 February, 2012, 09:35:50 PM
The Reset button ought to get you the default effect source in there.
Title: foo_wave_seekbar
Post by: Dandruff on 27 February, 2012, 02:42:45 AM
0.2.17 probably fixes the fallback crashes, but you should of course look into why you fall back to GDI in the first place.


Oh, of course - my fault. Crashed because I've deleted the frontend_direct2d.dll. Ok, 0.2.17 not crashing. Thanks!
Title: foo_wave_seekbar
Post by: Hotze on 28 February, 2012, 05:59:44 AM
It would be nice that you could put the bar horizontally. That can't be difficult to programe, can it?
Title: foo_wave_seekbar
Post by: mzso on 28 February, 2012, 06:21:53 AM
It would be nice that you could put the bar horizontally. That can't be difficult to programe, can it?

I'm sure you can. I think you only just need to have a panel that's height is bigger than its width.
Title: foo_wave_seekbar
Post by: Zao on 28 February, 2012, 08:41:01 AM
Indeed.

If the bar is higher than it's wide, it flips the content diagonally. Crouching tiger hidden feature.
Title: foo_wave_seekbar
Post by: tribaljet on 28 February, 2012, 08:58:25 AM
Seriously, can anyone help out on how to custom the code of the Frontend Settings?
Title: foo_wave_seekbar
Post by: Zao on 28 February, 2012, 09:17:09 AM
It's in HLSL, the language used to write programmable shaders for 3D applications.

If you feel an urge to "customize" it, look at the PS function, which is invoked once per pixel and computes a color value from the waveform data and time.

If you do not feel capable of this, there's some existing custom effects spread around this thread and the Columns UI thread.
Title: foo_wave_seekbar
Post by: Hotze on 28 February, 2012, 10:57:42 AM
Indeed.

If the bar is higher than it's wide, it flips the content diagonally. Crouching tiger hidden feature.


My fault! I didn't notice that behaviour before. I feel kind of dumb...
Title: foo_wave_seekbar
Post by: DarkScythe on 28 February, 2012, 11:25:03 AM
Interesting little quirk I've discovered, but I'm not sure what exactly the cause is.

I haven't updated from 0.2.14 yet, because I haven't had any issues.
In any case, I noticed recently that I can no longer access the front-end settings.
I can go into the configuration window, but when I click on frontend settings (D3D9 mode) nothing happens. Not a huge deal because it's retained the settings I set last time, and I haven't felt the need to alter them, but it is curious.
(Foobar 1.1.9, Win7 x64; nothing's changed, really.)
Title: foo_wave_seekbar
Post by: tribaljet on 28 February, 2012, 11:59:15 AM
It's in HLSL, the language used to write programmable shaders for 3D applications.

If you feel an urge to "customize" it, look at the PS function, which is invoked once per pixel and computes a color value from the waveform data and time.

If you do not feel capable of this, there's some existing custom effects spread around this thread and the Columns UI thread.


Thank you Zao. I'm not familiar with customizing HLSL, and the custom presets people made are very specific. I'm just looking for documents that might help me get started with customizing this exactly the way I want.
Title: foo_wave_seekbar
Post by: NullString on 08 March, 2012, 09:07:13 PM
I had a problem regarding a "Nothing happens when I click Frontend settings", even though I had all the prerequisites installed. The problem got solved when I deleted the UI element, and added it again with the default settings. Now I can edit the frontend settings. =)
Title: foo_wave_seekbar
Post by: Dandruff on 09 March, 2012, 09:12:54 AM
Bug in version 0.2.17:

-> start up foobar2000 (1.1.11) with empty playlist (no playback started)
-> try any of the Waveform Seekbar actions ("Remove Dead Waveforms" for example)

Result: Nothing happens.

Log only showing
Code: [Select]
Watching: D:\Music
Startup time : 0:00.045009
Seekbar: taking Direct3D9 path.
Seekbar: Frontend initialized.



-> start playback of any file
-> try any of the Waveform Seekbar actions ("Remove Dead Waveforms" for example)

Result: working


Why do we have to start playback in order to access the Waveform Seekbar functions?
Title: foo_wave_seekbar
Post by: Zao on 09 March, 2012, 09:17:35 AM
Known behaviour.

It's an artifact of how the backing store cache is loaded. It's single-instance and loaded on demand. If no service needs it, it's not loaded at all.
The benefit of this is that it avoids doing things during application startup, resulting in a faster startup sequence and gets rid of a lot of scary limitations on what may be done during initialization.
The downside is that the context menu and menu commands seem to do nothing before the cache is brought to life.
Title: foo_wave_seekbar
Post by: Dandruff on 09 March, 2012, 09:19:01 AM
Ok, no big problem I think!
Title: foo_wave_seekbar
Post by: Zao on 09 March, 2012, 09:13:06 PM
Version 0.2.18 should perform the delay-initialization for context and main menu commands, now.
Title: foo_wave_seekbar
Post by: Dandruff on 10 March, 2012, 10:03:11 AM
Thanks! Working fine!
Title: foo_wave_seekbar
Post by: adam777 on 11 March, 2012, 04:42:51 AM
Hi Zao,
Now that development seems to be live again, I have a question.
A pretty long time ago you mentioned media library notifications integration (that is, automatically re-scan a file if changed, automatically remove dead files etc.) as something on the to-do list.
Is this feature still planned for the foreseeable future?
Thanks, Adam.
Title: foo_wave_seekbar
Post by: Zao on 11 March, 2012, 08:47:41 AM
I wouldn't say live, as it's mostly looking at things that are either trivial or serious enough to warrant attention.
Larger features are a bit out of scope, unless they're interesting enough to take time from the things I ought to be working on.
Title: foo_wave_seekbar
Post by: ledge on 11 March, 2012, 06:28:48 PM
I had a problem regarding a "Nothing happens when I click Frontend settings", even though I had all the prerequisites installed. The problem got solved when I deleted the UI element, and added it again with the default settings. Now I can edit the frontend settings. =)



Holy shit, this fixed the same problem for me, I should have thought about trying this.

Thanks for posting this rather than just keeping it to yourself
Title: foo_wave_seekbar
Post by: DarkScythe on 11 March, 2012, 08:35:25 PM
I had a problem regarding a "Nothing happens when I click Frontend settings", even though I had all the prerequisites installed. The problem got solved when I deleted the UI element, and added it again with the default settings. Now I can edit the frontend settings. =)


Whoa, I somehow missed this post.

Does this preserve the settings in use before the element was removed?
I don't really have to change anything right now, as it's set up how I want it, but I don't believe I have any way of copying the settings somewhere before replacing the element.
Title: foo_wave_seekbar
Post by: adam777 on 12 March, 2012, 04:39:47 AM
I wouldn't say live, as it's mostly looking at things that are either trivial or serious enough to warrant attention.
Larger features are a bit out of scope, unless they're interesting enough to take time from the things I ought to be working on.


Fair Enough 
Title: foo_wave_seekbar
Post by: Zao on 12 March, 2012, 08:12:55 PM
Could one of you people that have the frontend settings trouble export a theme file (assuming you use the Default UI)?
That is, coincidentally, the sane way of preserving any settings.
Title: foo_wave_seekbar
Post by: DarkScythe on 12 March, 2012, 08:24:19 PM
Could one of you people that have the frontend settings trouble export a theme file (assuming you use the Default UI)?
That is, coincidentally, the sane way of preserving any settings.


I don't think I can, since I use CUI. :/
Hopefully someone else can!
Title: foo_wave_seekbar
Post by: ledge on 13 March, 2012, 03:59:46 PM
Could one of you people that have the frontend settings trouble export a theme file (assuming you use the Default UI)?
That is, coincidentally, the sane way of preserving any settings.


I could export my theme now, but I don't have the problem anymore.
Title: foo_wave_seekbar
Post by: NullString on 13 March, 2012, 08:01:29 PM
I had a problem regarding a "Nothing happens when I click Frontend settings", even though I had all the prerequisites installed. The problem got solved when I deleted the UI element, and added it again with the default settings. Now I can edit the frontend settings. =)


Whoa, I somehow missed this post.

Does this preserve the settings in use before the element was removed?
I don't really have to change anything right now, as it's set up how I want it, but I don't believe I have any way of copying the settings somewhere before replacing the element.

When you insert an UI element from scratch it adds itself with its default properties, so you'll lose the effect you had set =\
Title: foo_wave_seekbar
Post by: Zao on 13 March, 2012, 08:12:42 PM
In the Default UI, a roundabout way to make an export is to:


When you want to restore the element:


This may sound like more work than it is, but it really isn't. As for you strange people who use CUI, whatever methods there are to export themes or single panels there will work, assuming there are such ways.
Title: foo_wave_seekbar
Post by: Philip Goddard on 16 March, 2012, 12:59:51 PM
Please bear with me for my technical ignorance, but I cannot get this Seekbar to work at all, despite having installed it correctly. Maybe this comes down to my not having the right hardware, but I could not make out for sure from the online documentation as to whether I had or hadn't got the right hardware for it to operate. I have a recently purchased Nofan A40-Z68 computer with Gigabyte Z68X-UD3H-B3 motherboard with Intel® Core™ i3-2125 CPU and on-board graphics described as Intel HD Graphics 2000 (GT2), and thus I have no dedicated graphics card. I'm running Win7 Home Premium x64 with the latest DirectX (11).

Although Waveform Seekbar is shown as installed in the list of Components, it shows no sign of operating - no pane, no option for it in the Toolbar drop-down right-click menu, and no error messages.  I do not know where to tell it to use one operating mode or another - i.e. if indeed any of its operating modes would work on my system. The only sign of its being installed, apart from its listing in the Components list is that there are relevant items in the Utilities submenu of the right-click menu on playlist items, and somewhere in Preferences there are a few Waveform Seekbar settings, but none that tell it which mode to operate in.

I would most appreciate any guidance as to how to get it operating, as it would be very useful.  -- Many thanks.
Title: foo_wave_seekbar
Post by: Zao on 16 March, 2012, 01:15:45 PM
It is an UI element in the Default UI, and a panel in Columns UI (pretty much the same thing, but different terms).
As such, it's something you add to your layout, the menu items and preferences you've found are just peripheral ones.

The method of adding an UI element/panel depends on which user interface you use, but in the default UI there's a decent introduction (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Layout_Editing_Mode) on the wiki.
If you're using the Columns UI interface, there's some preferences page in Display -> Columns UI -> Layout that has some kind of interactive editor of the tree of UI panels.

As for you graphics card, it should be plenty capable of supporting any of the modes, which you can choose from the Configure context menu once you've managed to add the UI element/panel. I've gone through a fair amount of pain to ensure that it works on Intel chips way inferior than the one you're sporting.
Title: foo_wave_seekbar
Post by: Philip Goddard on 16 March, 2012, 04:01:26 PM
Thank you indeed, Zao.  I've now investigated further, and have found why I couldn't get the seekbar to appear. I was using the simple playlist view, and even in layout editing mode I had no option to add UI elements, and only an option to replace one UI element - the playlist itself, which wouldn't have been helpful. So, I tried switching to Slim View +tabs, and then I was able to replace one of the visualization tabs with the Waveform Seekbar, which does indeed work. I also then removed other elements I didn't want, so effectively having my simple playlist view but with added, Waveform Seekbar. At no point, however, did I get a right-click menu option to add a new UI element - only to cut, paste or replace - but at least I managed to work round that absence by replacing an unwanted element.

One remaining point is that the waveform display is decidedly blurred - enough for me to assume that something really isn't right and needs changing. Is there anything that I could do to improve that?

Anyway, even as it is, this is a tremendous enhancement of Foobar2000 for my purposes, now making it much easier to assess individual sound files (actually of thunderstorms!) that I'm shaping up and organizing for making up a series of audio CDs. -- So, thanks again, Zao!
Title: foo_wave_seekbar
Post by: tpijag on 16 March, 2012, 04:18:28 PM
FYI for your future configuration needs, there is nothing inherent about simple playlist view that does not allow full customization. You were using a layout with only one panel filled with the playlist. No place to add something without replacing what was there. What you would do to add a panel is temp replace the playlist with a splitter of your choice which would then give you multiple locations to add panels. Then add back the playlist in one panel and your seekbar in another.
Title: foo_wave_seekbar
Post by: Philip Goddard on 16 March, 2012, 05:07:52 PM
FYI for your future configuration needs, there is nothing inherent about simple playlist view that does not allow full customization. You were using a layout with only one panel filled with the playlist. No place to add something without replacing what was there. What you would do to add a panel is temp replace the playlist with a splitter of your choice which would then give you multiple locations to add panels. Then add back the playlist in one panel and your seekbar in another.


Thanks, tpijag. That makes sense.

Zao, I got sharper though not fully sharp rendering of the waveform display by switching to Direct2D 1.0 mode, though I would prefer a fully sharp display of the solid black waveform that I get with Direct3D 9.0C mode. Anyway, great to have this feature, even with the display not being quite 100% yet.
Title: foo_wave_seekbar
Post by: SidEvolution on 23 April, 2012, 02:12:07 PM
Hi!
I recently started to use waveform_seekbar and it, so far, seems pretty great. I've read a lot of what was said on here to figure out how to use it but I still have a few problems. That is, I tried to achieve the same look as Zao did in his first picture post of the component (the one that had only the edges of the wave color and the center was the background color). I couldn't figure out how to do that.
Secondly I wanted to know if it was possible to expand the waveform_seekbar, while in the CUI toolbar, to take up two rows. Just to assure clarification, what I mean by expand is that it expands vertically in the toolbar as opposed to the normal vertical expansion.
If these question were posted and answered within the 46 pages of the component I apologize for the repetition and hope not to enrage anyone.
Title: foo_wave_seekbar
Post by: Zao on 23 April, 2012, 05:17:13 PM
I've got no idea how to do anything with the CUI toolbar, as I do not use it. If the toolbar supports vertical spanning, it probably works with whatever vertical spanning it has. If not, no.
Title: foo_wave_seekbar
Post by: grimes on 23 April, 2012, 05:50:01 PM
Quote
Add it as a panel, not a toolbar element, then you can resize it to however you like.


http://www.hydrogenaudio.org/forums/index....showtopic=92816 (http://www.hydrogenaudio.org/forums/index.php?showtopic=92816)
Title: foo_wave_seekbar
Post by: SidEvolution on 23 April, 2012, 10:04:17 PM
okay, thanks!

how about getting the colors in the actual wave to only have the edges of wave colored and the middle the color of the background?
http://www.acc.umu.se/~zao/seekbar19.png (http://www.acc.umu.se/~zao/seekbar19.png)

like the second one down that has the green highlight

and yea
I tried that before but wasn't to pleased with it so thats is why i asked again but thanks!
Title: foo_wave_seekbar
Post by: Zao on 24 April, 2012, 02:41:39 AM
The second one uses the Direct2D frontend. They're intentionally different to get some variations in.
I wrote a Direct3D effect that renders a smoother line as well which I currently use - https://gist.github.com/2477148 (https://gist.github.com/2477148).
Title: foo_wave_seekbar
Post by: Milloflex on 24 April, 2012, 12:24:42 PM
Love that this is even possible!! But I have some feedback.

I was hoping this would be fixed in an update, but I can see that you updated the plugin today.

My wish is to change the algorithm a bit to kinda reflect the same output as for example zippyshare does. Why? Because you really can't see where "things" happen in the music.

Take this track for example: http://www66.zippyshare.com/v/77531586/file.html (http://www66.zippyshare.com/v/77531586/file.html)
At 3m1s it gets brutal. But with your plugin you can't see that.

I also feel that the waveform isn't very detailed, or super detailed (depends on how you see it) instead of showing what's more interested. The waveform is "thick" all the way instead of showing the variations more brutally. Again, look at zippyshares for a reference.

Hope you can do anything about it. And keep up the good work! Love the idea and possibility to do this!! :-)
Title: foo_wave_seekbar
Post by: mzso on 24 April, 2012, 12:28:55 PM
I just noticed the capture screenshot option. (It might be there for a while) What does it do? Other than the gui freeze I didn't notice anything.
Title: foo_wave_seekbar
Post by: Zao on 24 April, 2012, 03:30:19 PM
I accidentally put the screenshot functionality in the latest (0.2.21) build as I rushed it out to fix a resume-from-hibernate/sleep crash.

The screenshot functionality is controlled via advanced preferences.
There's a size setting and a titleformat string for naming the file.
If the path is just a filename, it ends up as a PNG in My Pictures.
If it's a full path, it probably ends up in that location with that name.

This functionality only works with the Direct3D9 frontend, as I haven't been arsed to implement it for the other ones. Expect it to be unstable.
Title: foo_wave_seekbar
Post by: mzso on 24 April, 2012, 04:16:58 PM
I accidentally put the screenshot functionality in the latest (0.2.21) build as I rushed it out to fix a resume-from-hibernate/sleep crash.

The screenshot functionality is controlled via advanced preferences.
There's a size setting and a titleformat string for naming the file.
If the path is just a filename, it ends up as a PNG in My Pictures.
If it's a full path, it probably ends up in that location with that name.

This functionality only works with the Direct3D9 frontend, as I haven't been arsed to implement it for the other ones. Expect it to be unstable.


It seems to work fine.
(https://hydrogenaud.io/imgcache.php?id=1bc605d4bb24816bb8f305e32237742e" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/ironmaiden-01.whereeayyznb.png)
On thing that I miss is the auto renaming feature.
Title: foo_wave_seekbar
Post by: Zao on 24 April, 2012, 06:31:44 PM
What auto renaming feature? You can use whatever titleformatting string you want (probably).
Title: foo_wave_seekbar
Post by: SidEvolution on 24 April, 2012, 07:42:21 PM
Ah my problem was that for some reason all of the files weren't being read in correctly so I re-downloaded and copy pasted them back into the components folder and restarted foobar. It now recognizes a difference between the GDI, direct3 9 and the direct2
before, it was just rerouting to the GDI
Title: foo_wave_seekbar
Post by: White_Shadow on 25 April, 2012, 03:06:26 AM
It seems to work fine.


For me, it always exports the same waveform, although I wanted to export another waveform. It simply generates another PNG with the Name of the target waveform but with the image of an earlier waveform.
Title: foo_wave_seekbar
Post by: Zao on 25 April, 2012, 06:36:38 AM
Ah my problem was that for some reason all of the files weren't being read in correctly so I re-downloaded and copy pasted them back into the components folder and restarted foobar. It now recognizes a difference between the GDI, direct3 9 and the direct2
before, it was just rerouting to the GDI

Please do not attempt to install components manually, and definitely do not paste them into the 'components' directory.
Components have for a good while now been installable through the Preferences->Components page, either by dragging the archive directly onto that window, or by pushing the Install button there.
Manual installations are error-prone, as you might've noticed
Title: foo_wave_seekbar
Post by: Zao on 25 April, 2012, 06:37:38 AM
For me, it always exports the same waveform, although I wanted to export another waveform. It simply generates another PNG with the Name of the target waveform but with the image of an earlier waveform.

Are you actually playing the track you're trying to export, or just selecting it? The dumper only dumps the one currently rendered.
Title: foo_wave_seekbar
Post by: White_Shadow on 25 April, 2012, 07:29:43 AM
Yeah. I'm playing it. That's the way, I expected its behaviour.
Title: foo_wave_seekbar
Post by: Dandruff on 25 April, 2012, 08:06:05 AM
I accidentally put the screenshot functionality in the latest (0.2.21) build as I rushed it out to fix a resume-from-hibernate/sleep crash.

The screenshot functionality is controlled via advanced preferences.
There's a size setting and a titleformat string for naming the file.
If the path is just a filename, it ends up as a PNG in My Pictures.
If it's a full path, it probably ends up in that location with that name.

This functionality only works with the Direct3D9 frontend, as I haven't been arsed to implement it for the other ones. Expect it to be unstable.


Can you remove the "Capture screenshot" entry from the context menu when in GDI or Direct2D mode?
Title: foo_wave_seekbar
Post by: Zao on 25 April, 2012, 09:34:30 AM
Can you remove the "Capture screenshot" entry from the context menu when in GDI or Direct2D mode?

Maybe. Haven't really determined whether I'm going to keep it in at all, really. It was not intended to be released, forgot to put it in a branch.
Title: foo_wave_seekbar
Post by: Dandruff on 25 April, 2012, 09:42:46 AM
Ok, thanks!
Title: foo_wave_seekbar
Post by: tribaljet on 25 April, 2012, 02:12:25 PM
The second one uses the Direct2D frontend. They're intentionally different to get some variations in.
I wrote a Direct3D effect that renders a smoother line as well which I currently use - https://gist.github.com/2477148 (https://gist.github.com/2477148).


Would it be possible for you to add to the first post of the thread a few different presets like the one you posted on the quoted post? Having a tutorial on how to do it by ourselves would also be immensely useful.
Title: foo_wave_seekbar
Post by: derty2 on 25 April, 2012, 04:16:42 PM
I'm using Win XP + foobar2000 v1.1.10 + Columns UI + Waveform Seekbar v0.2.15 with GDI in a Columns UI panel

The Waveform Seekbar does not render anything when I load and play Audio CD's; The panel is always blank !
I load an Audio CD into a fb2k playlist, right click on a track and go to 'Utilities -> Extract Seekbar Signature' ,
The CD Drive starts spinning out of control and will not slow down until I kill foobar2000.
Does this component have known limitations with Audio CD's ?

I have also noticed a few FLAC tracks which render most of the waveform except for the last 5-10 seconds !
Does this component have known limitations with some audio files ?
Title: foo_wave_seekbar
Post by: Zao on 25 April, 2012, 04:57:41 PM
Does this component have known limitations with Audio CD's ?

Yes, it explicitly forbids CDDA and ignores it, among other formats. It should not attempt to read anything whatsoever from it. It's largely pointless to allow it to scan discs, at least automatically, as you cannot read a CD concurrently.
Your mad spinning might be a bug somewhere.

I have also noticed a few FLAC tracks which render most of the waveform except for the last 5-10 seconds !
Does this component have known limitations with some audio files ?

Your files may have incorrect metadata or be otherwise corrupted. Is the problem that the right side is not the end of the song, or that there's silence in the last few seconds?
Title: foo_wave_seekbar
Post by: derty2 on 25 April, 2012, 07:12:37 PM
^ the right side is not the end of the song .

The last file I noticed with this error was a few days ago; I must say it was a FLAC file living on my filesystem for many years which I thought I had lost
and I have no information on the source; maybe you are right, it could be corrupted. But it plays just fine all the way to the end, except for the fact
that the Waveform Seekbar will not render the last 5 or so seconds.

Is there anything I can do to repair it?
Title: foo_wave_seekbar
Post by: Dandruff on 02 May, 2012, 11:03:43 AM
Minor bug in 0.2.21 I think:

-> playback internet stream (http://205.188.215.225:8018 )


Result: after a while the shaded color becomes Grey

Doesn't happen in Direct2D or Direct3D mode. Backgound color always = Light Purple.


______________________
Windows XP SP3
Title: foo_wave_seekbar
Post by: Zao on 02 May, 2012, 11:48:06 AM
When playing a stream or content without a size, the window represents an empty waveform of one second.
As such, the position indicator will quickly fly past and leave the shaded progress, if any.

I don't really have a decent idea about what to show for streams, this has sufficed thus far, as the presence of the indicator hints that it's actually playing, which I find useful.

Of course, you might've run into some fun bug with the GDI mode, haven't really touched that much at all since it appeared.
Title: foo_wave_seekbar
Post by: Dandruff on 02 May, 2012, 11:53:30 AM
When playing a stream or content without a size, the window represents an empty waveform of one second.
As such, the position indicator will quickly fly past and leave the shaded progress, if any.

I don't really have a decent idea about what to show for streams, this has sufficed thus far, as the presence of the indicator hints that it's actually playing, which I find useful.



I know. I don't have a problem with this. I just don't understand why the shaded color in GDI mode goes to Grey at some time instead of staying at Light Purple color like in the DirectX modes ...
Title: foo_wave_seekbar
Post by: BuzzOff on 02 May, 2012, 08:41:17 PM
This is the feature I was always waiting for! This is the feature that makes foobar2000 the only right music player for me. This is the only cause that I registered here just to thank you for that!

Thank you! You're great! Keep it up and updated!
Title: foo_wave_seekbar
Post by: mzso on 03 May, 2012, 04:46:08 AM
I don't really have a decent idea about what to show for streams, this has sufficed thus far, as the presence of the indicator hints that it's actually playing, which I find useful.

Real time moving waveform?
Title: foo_wave_seekbar
Post by: Zao on 03 May, 2012, 05:08:04 AM
With the current and foresee-able future architecture - impossible.
Title: foo_wave_seekbar
Post by: mzso on 03 May, 2012, 10:48:54 AM
With the current and foresee-able future architecture - impossible.

What do you mean by that? I'd think that Directx rendering is fast.
Title: foo_wave_seekbar
Post by: Zao on 03 May, 2012, 11:17:44 AM
Display presentation rate is not the problem. The problem is that the whole component is designed around a storage of waveforms representing a track of known length, all pre-computed at the time of display.
Changing the waveform triggers relatively costly updates in frontends, which is acceptable as it only happens about once per time you play a track.

It's designed to work this way, and the structure of the codebase is not remotely pliable for dynamic updating of the waveform data, nor scrolling/zooming around interactively.
Title: foo_wave_seekbar
Post by: Dandruff on 04 May, 2012, 02:43:54 AM
But definitely the best idea. Same look as current waveform, just scrolling live.
Title: foo_wave_seekbar
Post by: Boiled Beans on 17 May, 2012, 01:08:12 PM
After much tinkering, the waveform and seekbar are now sharp (no ugly fading).  That's the extent of my progress.


What did you change to make the waveforms sharp with no fading?
Title: foo_wave_seekbar
Post by: Boiled Beans on 17 May, 2012, 02:46:07 PM
After much tinkering, the waveform and seekbar are now sharp (no ugly fading).  That's the extent of my progress.


What did you change to make the waveforms sharp with no fading?


Probably I should elaborate more on my question.
https://docs.google.com/open?id=0B0VzdFckXFt3WG9lY0VpRHZWS0U (https://docs.google.com/open?id=0B0VzdFckXFt3WG9lY0VpRHZWS0U)
The screenshot shows the Direct2D, Direct3D and GDI in order.

In the Direct2D and GDI, the peaks are clearly seen, while in Direct3D, the peaks are smoothened and reduced.

So firstly, is there any advantage to using Direct3D over Direct2D?

If Direct3D does really have an advantage, how can I remove the smoothened peaks, so it looks like Direct2D or GDI?
Title: foo_wave_seekbar
Post by: Zao on 18 May, 2012, 06:06:26 AM
The fundamental difference is how I use the waveform data in the Direct2D frontend vs. the GDI and Direct3D ones.

The data used for a waveform is two sets of two thousand datapoints, equally spaced along the track.
Each point records the minimum and maximum amplitude in that region.

In the Direct2D mode, I tell the API to draw a spline with all the datapoints, even though there are too many to fit in the window and rely on it to do a half-arsed job antialiasing the curves.

In the other modes, the amplitude drawn is a mix of the two closest bins, so it has a tendency to remove single-bucket transients. If your window was >2k pixels wide, there wouldn't be as much of a difference.

The unfilled line outline shader (https://gist.github.com/2477148) takes a bit more information into consideration, so it might give you a reasonable effect. One could possibly adapt it to do more taps, but I'm unsure if there's enough instructions left to do that.
Title: foo_wave_seekbar
Post by: Boiled Beans on 18 May, 2012, 12:58:53 PM
The fundamental difference is how I use the waveform data in the Direct2D frontend vs. the GDI and Direct3D ones.

The data used for a waveform is two sets of two thousand datapoints, equally spaced along the track.
Each point records the minimum and maximum amplitude in that region.


Thanks for your reply. This leads to another question.
If I choose Direct3D now, and decide to switch to Direct2D in future, would it be necessary to rescan all the files?
Title: foo_wave_seekbar
Post by: White_Shadow on 18 May, 2012, 01:22:29 PM
@ Boiled Beans:

Of course not. The drawing mode decides only how to display the data in your waveform cache. The data won't be affected.
Title: foo_wave_seekbar
Post by: dts350z on 25 May, 2012, 03:52:01 PM
Could we please have checksum or other method on the wavecache.db so that changes to the audio file are reflected in the waveform without having to delete the waveformcache.db?

Thanks!
Title: foo_wave_seekbar
Post by: Zao on 25 May, 2012, 05:38:42 PM
Checksums are utterly useless for this. Computing the checksum on something costs the same magnitude as computing the waveform.
The feature you _should_ be nagging about is the one that does some kind of media library notifications.

Anyway, if you re-scan waveforms with the context menu, the waveform should be updated. You might have to frob the "Always rescan" advanced preference for this. The default is that tracks are to be considered forever immutable, because that's the norm.
Title: foo_wave_seekbar
Post by: dts350z on 25 May, 2012, 06:30:54 PM
Checksums are utterly useless for this. Computing the checksum on something costs the same magnitude as computing the waveform.
The feature you _should_ be nagging about is the one that does some kind of media library notifications.

Anyway, if you re-scan waveforms with the context menu, the waveform should be updated. You might have to frob the "Always rescan" advanced preference for this. The default is that tracks are to be considered forever immutable, because that's the norm.



I checked "Always rescan if requested by user"

restarted foobar. Don't see any change in behavior. Don't see any change in right click in the waveform (still just configure) or right click on a track.

Am I looking for trackname --> right click --> utilities --> remove waveform seekbar signature?

That seems to work except I'd have to load the track, remove the signature and re load the track (to get the waveform to update).

Easier than deleting the whole database I guess.

Title: foo_wave_seekbar
Post by: Zao on 26 May, 2012, 08:20:14 AM
The intended semantics with that option enabled is that Extract will rescan and overwrite the previous waveform and should display the new one on the next play.
Title: foo_wave_seekbar
Post by: xnamkcor on 04 June, 2012, 07:40:31 PM
http://www.foobar2000.org/components/view/foo_wave_seekbar (http://www.foobar2000.org/components/view/foo_wave_seekbar)

The "Download" Link downloads a file called "foo_wave_seekbar-0.2.21.fb2k-component", which does not show up in the file browser opened by the "Install..." option.
It seems to be a PK zip file. If I extract it with 7zip and repackage it as a .zip file the "Install..." option sees it and it installs fine, but why the weird file extension?
Title: foo_wave_seekbar
Post by: White_Shadow on 04 June, 2012, 07:53:52 PM
I'm confused... I've tested with my installation of f2k. The download dialog shows already the option to open directly in f2k and install the component. And the "install..." option works fine, too. Which version of foobar2000 are you using? See changelog (http://www.foobar2000.org/changelog), version 1.1.11:
Quote
New .fb2k-component file type extension for foobar2000 component packages.
Title: foo_wave_seekbar
Post by: Zao on 04 June, 2012, 08:04:57 PM
You must be running a very old foobar2000 installation. They have supported .fb2k-component for a very long while now, and any new components will be released in this (renamed zip) format.
There are many gains, including the ability to associate the files and to filter/find them easier.
Title: foo_wave_seekbar
Post by: xnamkcor on 04 June, 2012, 08:22:25 PM
I'm on 1.1.10.
For some reason the Changelog has no release dates for any version. Stange thing to omit from a log. I'll update. Thanks.
Title: foo_wave_seekbar
Post by: Peter on 05 June, 2012, 04:30:01 AM
In case you're running an outdated foobar2000 version or a portable installation, instructions in http://wiki.hydrogenaudio.org/index.php?ti...all_a_component (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:How_to_install_a_component) still work (which is linked at the bottom of each component page for your convenience).
Title: foo_wave_seekbar
Post by: matt the cat on 05 June, 2012, 10:29:50 AM
Is there any difference between Direct2D and 3D modes? Anything performance related or anything? Wondering which one I should use, you could think 2D as what its rendering is 2D.

Seems like Direct2D is the most accurate visually in depicting what the true waveform is like, GDI and 3D dont seem to show peaks properly, they seem "muffled" if you can say that of an image

Looks like 3D is the worst in rendering peaks, GDI is slightly better but 2D is the most accurate

The fundamental difference is how I use the waveform data in the Direct2D frontend vs. the GDI and Direct3D ones.

The data used for a waveform is two sets of two thousand datapoints, equally spaced along the track.
Each point records the minimum and maximum amplitude in that region.

In the Direct2D mode, I tell the API to draw a spline with all the datapoints, even though there are too many to fit in the window and rely on it to do a half-arsed job antialiasing the curves.

In the other modes, the amplitude drawn is a mix of the two closest bins, so it has a tendency to remove single-bucket transients. If your window was >2k pixels wide, there wouldn't be as much of a difference.

The unfilled line outline shader takes a bit more information into consideration, so it might give you a reasonable effect. One could possibly adapt it to do more taps, but I'm unsure if there's enough instructions left to do that.



Interesting, however there is a slight difference between GDI and 3D as well as I said above.
Title: foo_wave_seekbar
Post by: LosMintos on 05 June, 2012, 11:10:35 AM
I very like the wave_seekbar, it's a great component! From the fist use I'm wondering: Can we have coloured waveforms respecting the frequency of the sound: bass = red, mid = green and treble = blue? You probably know it from many DJ applications. (I probably missed something. If so, it would be nice if someone points me into the right direction since my search here was without results.)
Title: foo_wave_seekbar
Post by: Zao on 11 June, 2012, 02:03:02 PM
People have suggested moods, tempo, foot-tappityness and other metrics, but no, none of those are considered for inclusion.

By the way, 0.2.23 is out, with slightly less horrible downmixing for formats that are not mono, stereo, quad, 5.1, or 7.1.
Title: foo_wave_seekbar
Post by: DarkScythe on 12 June, 2012, 10:26:23 AM
Could one of you people that have the frontend settings trouble export a theme file (assuming you use the Default UI)?
That is, coincidentally, the sane way of preserving any settings.


It's been a while, but I thought I'd pop back with a quick update.
I'm upgrading my PC again, and so I needed to backup my Foobar stuff.

I never actually did fix this problem, so I was unable to get to the frontend settings.
I tried exporting, but it kept failing to do so because of a missing panel. (It turns out it was WSH Panel that I had removed, but not from some test layouts I had.)

Anyway, I wound up with a last resort of updating the component to the latest version, then relaunched Foobar, and I was able to access the frontend settings again. This time I've copied it off into a text file.
Simple solutions.. go figure.
Title: foo_wave_seekbar
Post by: Pixel Eater on 29 June, 2012, 02:58:53 AM
I could have sworn "Capture Screenshot" worked initially. I remember because I produced an image that was 1024 x 1024 and thought that looked really funny for a waveform. After reinstalling Windows and copying over my AppData/roaming profile, it no longer functions. Is there a way to do a clean install of Waveform Seekbar, where upon reinstallation it won't remember my configuration settings like color and position?

Also I ran into really strange issues after deleting wavecache.db one time. I thought "wow, so that's why my AppData folder got so huge, I'll just let foo_wave_seekbar start a new one. Well foobar was very wonky after that, taking several seconds to produce waveform images and skipping through songs. The problem actually got worse over a few days as I played more music. Luckily I found a backup.

I'm just hoping there's a way to do a true clean uninstall and reinstall, without affecting the rest of my configuration.
Title: foo_wave_seekbar
Post by: Zao on 29 June, 2012, 09:21:21 AM
There's three places where the seekbar keeps state:

What codecs were the affected songs using, and roughly how many tracks did you have before destroying it?
Title: foo_wave_seekbar
Post by: Brand on 05 July, 2012, 04:56:28 AM
What are the differences, if any, between using Direct2D, Direct3D and GDI in terms of performance, GPU usage?

My priority is low GPU heat and GPU/system stability. (Using Windows 7 and a very old ATI X1300 Pro with bad cooling.)

Thanks in advance!
Title: foo_wave_seekbar
Post by: Zao on 05 July, 2012, 05:36:28 AM
GDI would win there, on virtue of not using the GPU. It might however be a bit expensive CPU-wise due to re-blitting the static waveform image repeatedly.
D3D would probably be decent if you lower the update rate in advanced properties some.
D2D I have no idea about, but it probably leverages some 3D tech in the background.

GDI and D2D both draw a static cached image with the position and shade overlaid, while D3D rerasterises everything.

Try them and see, Process Explorer's GPU utilization meter might give you some insight.
Title: foo_wave_seekbar
Post by: Brand on 05 July, 2012, 07:52:15 AM
I tried now quickly with Process Explorer and it seems like GDI even uses very little CPU, comparable to D2D (which also uses a little bit of GPU).
D3D uses the most of both CPU and GPU.
Title: foo_wave_seekbar
Post by: l_0ver on 12 July, 2012, 03:09:33 AM
[feature request] Could you add customizable (fields, font, transparency etc.) label over waveform?
Title: foo_wave_seekbar
Post by: Dandruff on 18 July, 2012, 07:59:31 AM
I accidentally put the screenshot functionality in the latest (0.2.21) build as I rushed it out to fix a resume-from-hibernate/sleep crash.

The screenshot functionality is controlled via advanced preferences.
There's a size setting and a titleformat string for naming the file.
If the path is just a filename, it ends up as a PNG in My Pictures.
If it's a full path, it probably ends up in that location with that name.

This functionality only works with the Direct3D9 frontend, as I haven't been arsed to implement it for the other ones. Expect it to be unstable.


Can you remove the "Capture screenshot" entry from the context menu when in GDI or Direct2D mode?


Any chance? Still there in 0.2.27 ...
Title: foo_wave_seekbar
Post by: Zao on 18 July, 2012, 08:41:53 AM
Out of sight, out of mind.

Quite tempted to just patch it out completely. It's not production-ready anyway.
Title: foo_wave_seekbar
Post by: Pixel Eater on 19 July, 2012, 12:27:20 PM
What codecs were the affected songs using, and roughly how many tracks did you have before destroying it?


Not just a ton of tracks, I must have had it for 2 weeks and Wavecache was like ~70 MB at the time. Everything I listen to is pretty much FLAC.

By the way, why do waveforms look so different in GDI and DirectX 9 mode? Which do you recommend? FWIW I really would enjoy and use GDI screenshot capabilities, if it's doable later.
Title: foo_wave_seekbar
Post by: Zao on 19 July, 2012, 03:07:07 PM
I recommend the one that pleases you the most. It's all lies.
Title: foo_wave_seekbar
Post by: Slamvan on 08 August, 2012, 05:27:40 PM
Hi, please explain the beginner how to insert a picture into the background, or make it Standard tubing, transparent.
Now I use:
Code: [Select]
Texture1D tex : WAVEFORMDATA;

SamplerState sTex
{
   Filter = MIN_MAG_MIP_LINEAR;
   AddressU = Clamp;
};

struct VS_IN
{
float2 pos : POSITION;
float2 tc : TEXCOORD0;
};

struct PS_IN
{
float4 pos : SV_POSITION;
float2 tc : TEXCOORD0;
};


float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor  : HIGHLIGHTCOLOR;
float4 selectionColor  : SELECTIONCOLOR;
float4 textColor      : TEXTCOLOR;
float cursorPos        : CURSORPOSITION;
bool cursorVisible    : CURSORVISIBLE;
float seekPos          : SEEKPOSITION;
bool seeking          : SEEKING;
float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
float2 viewportSize    : VIEWPORTSIZE;
bool horizontal        : ORIENTATION;
bool shade_played      : SHADEPLAYED;

PS_IN VS( VS_IN input )
{
PS_IN output = (PS_IN)0;

float2 half_pixel = float2(1,-1) / viewportSize;
output.pos = float4(input.pos - half_pixel, 0, 1);
if (horizontal)
output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
else
output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);

return output;
}

float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
{
float dist = abs(pos - tc.x);
float4 c = (show && dist < width)
? lerp(fg, bg, smoothstep(0, width, dist))
: bg;
return c;
}

float4 evaluate(float4 bg, float4 fg, float factor)
{
return saturate(lerp(bg, fg, factor));
}

float4 played( float pos, float2 tc, float4 bg, float factor)
{
float4 c = bg;
if (pos > tc.x)
{
c = evaluate(backgroundColor, highlightColor, factor);
}
return c;
}

float RMSfactor( float2 tc, float border )
{
// alpha 1 indicates biased texture
float4 minmaxrms = tex.Sample(sTex, tc.x);
if (replayGain.g != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 2; //use track gain
} else if (replayGain.r != -1000) {
minmaxrms.rgb *= pow(10,(replayGain.r) / 20) * 2; //use album gain
}
minmaxrms.rgb -= 0.5 * minmaxrms.a;
minmaxrms.rgb *= 1.0 + minmaxrms.a;

float belowWave = tc.y + border - minmaxrms.r;
float aboveWave = tc.y - border - minmaxrms.g;
float factorWave = min(abs(belowWave), abs(aboveWave));
bool insideWave = (belowWave > 0 && aboveWave < 0);

float diffRms = abs(tc.y) - border - minmaxrms.b;
float factorRms = abs(diffRms);
bool insideRms = diffRms < 0;

float factor = insideRms ? (1.0 - 0.5 * saturate(factorRms / border / 2)): 1.0;
factor = insideWave ? (factor * saturate(factorWave / border / 2)) : 0.0;

return factor;
}

float4 PS( PS_IN input ) : SV_Target
{
float dx, dy;
if (horizontal)
{
dx = 1/viewportSize.x;
dy = 1/viewportSize.y;
}
else
{
dx = 1/viewportSize.y;
dy = 1/viewportSize.x;
}
float seekWidth = 2.5 * dx;
float positionWidth = 2.5 * dx;

float factor = RMSfactor(input.tc, 2.5 * dy);

float4 c0 = evaluate(backgroundColor, textColor, factor);
if (shade_played)
c0 = played(cursorPos, input.tc, c0, factor);
c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
c0 = bar(seekPos,  input.tc, selectionColor, c0, seekWidth,    seeking      );
return c0;
}

technique10 Render10
{
pass P0
{
SetGeometryShader( 0 );
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetPixelShader( CompileShader( ps_4_0, PS() ) );
}
}

technique Render9
{
pass
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}
Title: foo_wave_seekbar
Post by: Zao on 08 August, 2012, 08:34:58 PM
Tubing?

Anyway, the functionality to load textures is probably not working, so even if I authored an effect that would do it, it wouldn't work.
Title: foo_wave_seekbar
Post by: Slamvan on 09 August, 2012, 02:07:18 AM
I think many of my support, I would like to see this functionality.
Title: foo_wave_seekbar
Post by: Slamvan on 09 August, 2012, 03:43:57 AM
I use a translator, sorry.
The background can be made ​​transparent?
Title: foo_wave_seekbar
Post by: Zao on 09 August, 2012, 05:47:42 AM
It cannot be made to show a hole through the window to display the desktop or other windows.
It cannot be (sanely) made to show other child windows below it, in case you're using Columns UI with panel stack splitter or something.

It's just not within the reach of the current technical solution and the time I have to invest.
Title: foo_wave_seekbar
Post by: Slamvan on 09 August, 2012, 07:31:33 AM
You do not understand me. We need to do
(https://hydrogenaud.io/imgcache.php?id=bbc0159a389d8e8527f388d14bc8b07a" rel="cached" data-warn="External image, click to view at original size" data-url="http://alexey.shuksto.name/data/uploads/fb2k/foo_wave_seekbar_bg_border_bug.png)
I need a pseudo-transparency
http://www.hydrogenaudio.org/forums/index....st&p=680424 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&view=findpost&p=680424)
Title: foo_wave_seekbar
Post by: ianc on 14 August, 2012, 01:03:44 AM
Hi,
I am using Foobar (version1.1.13) to convert 24 bit/48 khz WAV files to 24-bit FLAC files.  I am then trying to play these 24-bit FLAC files in Foobar with the Waveform Seekbar (version 0.2.27).  I'm finding that these 24-bit FLAC files will not display in the Waveform Seekbar; the seekbar just appears completely blank if I try to play a 24-bit FLAC file.  If I select "auto" bitdepth when converting WAV to FLAC, the Waveform Seekbar also comes up blank when I play the resulting FLAC files.  However, if I convert my WAVs to 16-bit FLAC, these files will play just fine in the Waveform Seekbar, as will 24-bit WAVs.  I would love to be able to view 24-bit FLAC files using the Waveform Seekbar, so I'd appreciate ay thoughts or recommendations. 

I have not used dither when converting from 24-bit WAV to 24-bit FLAC; I am unsure if I should use dither when performing this conversion?

Thanks,
Ian



Title: foo_wave_seekbar
Post by: Garf on 14 August, 2012, 02:02:35 AM
I have not used dither when converting from 24-bit WAV to 24-bit FLAC; I am unsure if I should use dither when performing this conversion?


No need to use dither, in fact you should never when converting to a lossless format at the same bit-depth. Dither is useful when you're going 24->16 bit for example.
Title: foo_wave_seekbar
Post by: derty2 on 14 August, 2012, 06:14:27 AM
I'm using foobar2000 v1.1.10 with Columns UI v0.3.8.8 and Waveform Seekbar v0.2.15.

My Waveform Seekabr is rendering all of these WAV and FLAC resolutions -regardless of dither- without any problems:
24/44 | 24/48 | 24/88 | 24/96 | 24/192 | 32/96 | 32/192
Title: foo_wave_seekbar
Post by: ianc on 14 August, 2012, 12:25:31 PM
Thanks for the comments so far.  I should add that these are MONO 24-bit FLAC files giving me problems with Waveform Seekbar, in case that has any bearing on what the issue might be.
Title: foo_wave_seekbar
Post by: lvqcl on 14 August, 2012, 12:35:00 PM
Quote
these are MONO 24-bit FLAC

which reminds me about this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=93037)
Title: foo_wave_seekbar
Post by: derty2 on 14 August, 2012, 01:10:50 PM
You know, the 'problem' I had with 24-bit Mono FLAC in that thread does not seem to apply to my foobar2000 anymore !!!

Last week, a friend of mine was testing his vinyl ripping skills and ripped a few tracks from a Mono album and gave me a listen.
He uses an Apple MAC computer .
He packaged the files as 2-channel Mono .

Dragging the tracks into my foobar2000 Playlist Viewer, The track properties tell me: Encoder=TwistedWave | Tool=reference libFLAC 1.2.1 20070917 .
The tracks play perfect, and all Properties are showing correct info, and Waveform Seekbar renders without errors.

I then converted the tracks to 1-channel FLAC with DSP Processing "Downmix channels to mono", and I got perfect playback specs again.

So this leaves me a bit confused; since I posted that topic (see link posted by LVQL above) I don't seem to have the 24-bit FLAC Mono problem anymore !!??
I can't remember what -if anything- I may have changed.

Digging into my memory scraps and trying to remember what config changes I have applied in my foobar2000 since Jan 2012,
The major thing I have done is remove all rarely or never used used components; aiming for a minimum list of third-party items .
I also reviewed all Panels and UI elements and tried to remove Panels and UI elements which have duplicate or redundant functionality; aiming for a minimum list of items .
I also reviewed all WSH Scripts and Title-Formatting syntax to eliminate bad or redundant logic .

Is it possible that any/all of those config changes had some effect of "repairing" this Mono issue? ...or am I dreaming.
Title: foo_wave_seekbar
Post by: ianc on 14 August, 2012, 01:11:55 PM
Quote
these are MONO 24-bit FLAC

which reminds me about this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=93037)


Success!  I had been using flac encoder version 1.2.1b.  Following a link in the thread above, I downloaded "flac_1.2.1_mod4".  Using mod4 to convert 24-bit WAV to 24-bit flac, the waveform seekbar displays the resulting flac files perfectly.

Thanks for the help.
Title: foo_wave_seekbar
Post by: derty2 on 14 August, 2012, 01:46:04 PM
ianc, Did your problem also relate to the 4 GB size limit problem in standard FLAC builds?
I assume that is the main reason that modded build of FLAC was compiled.
These 24-bit Mono FLAC files which caused you problems, were they converted from +4 GB WAV files?
Title: foo_wave_seekbar
Post by: ianc on 14 August, 2012, 02:23:06 PM
[quote name='derty2' date='Aug 14 2012, 17:46' post='805288']
ianc, Did your problem also relate to the 4 GB size limit problem in standard FLAC builds?
I assume that is the main reason that modded build of FLAC was compiled.
These 24-bit Mono FLAC files which caused you problems, were they converted from +4 GB WAV files?
[/quote

No, the original 24/48 WAV files were all under 0.1 GB (mostly < 5-minutes duration).  Interesting that this mod seems to do the trick.  Does anyone know if this mod will be built into the regular FLAC for windows package in the future? 
Title: foo_wave_seekbar
Post by: Zao on 14 August, 2012, 07:43:20 PM
So the FLAC problem was not my fault. That's nice to hear. 
Title: foo_wave_seekbar
Post by: studio13 on 16 August, 2012, 04:20:25 PM
If you have the time I would really appreciate your advice with one more thing. The path I have set for my "Music Library" is a network disk with over 11,000 full resolution .wav files. Most are less than 60seconds long. over time I will end up auditioning each one of these files. I'm concerned that I have no idea how the waveform overviews are managed. Is there some hidden directory somewhere that stores the waveform overview? Am I filling up a local directory or is it writing back to the network disk ?? Is there a process for managing the overview files ?? Thanks

The backing storage for the component is a sqlite3 database file in your foobar2000 profile directory, named 'wavecache.db'. It stores the queue of pending scans (which persists over restarts) and it stores the waveforms as compressed binary blobs. A single stereo track takes around 20 KiB or so. I've considered to have per-directory databases or so, but never really got a good use case to warrant implementing it.


Hey just wanted to report that my 'wavecache.db' is now over 1gig heading towards 1.5gig ... what happens when it gets this big ??? I'm scared ..
Title: foo_wave_seekbar
Post by: db1989 on 16 August, 2012, 05:34:05 PM
Does anyone know if this mod will be built into the regular FLAC for windows package in the future?

The more relevant question is whether there is a future (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=96458&view=findpost&p=805075).
Title: foo_wave_seekbar
Post by: Zao on 16 August, 2012, 05:41:15 PM
Hey just wanted to report that my 'wavecache.db' is now over 1gig heading towards 1.5gig ... what happens when it gets this big ??? I'm scared ..

The database library supports files up to 2 terabytes in size, so unless you're on FAT32, nothing ill ought to happen. Probably.
Title: foo_wave_seekbar
Post by: studio13 on 23 August, 2012, 03:28:44 PM
The database library supports files up to 2 terabytes in size, so unless you're on FAT32, nothing ill ought to happen. Probably.
OK thanks I feel better now. I'm very grateful for your work on maintaining foo_wave_seekbar it's been a huge help to me.
Title: foo_wave_seekbar
Post by: muchnot on 24 August, 2012, 12:46:25 PM
hi, is there any ui i can use say under the waveform that i can tag parts of a tune much like on soundcloud, but more for notes to self on structures of tunes, and if these notes could be then saved and recalled when i open a said tune? im a foobar noob who only started using strictly for the waveform display.
btw i dont use mac but there is a similar idea im looking for on this program http://itunes.apple.com/us/app/transitions...460127911?mt=12 (http://itunes.apple.com/us/app/transitions-player/id460127911?mt=12) 
im a music producer and this feature would be awesome Zao
Title: foo_wave_seekbar
Post by: Dandruff on 15 September, 2012, 05:25:20 AM
foobar2000 1.1.5 Troubleshooter gives this:

Code: [Select]
foobar2000 troubleshooter
The following components found on your system are known to be problematic and should be either uninstalled or updated to their latest versions:

foo_wave_seekbar.dll : Waveform seekbar 0.2.27
Reason: Repeated crash reports.
Download the latest version...


Any serious issues with 0.2.27?
Title: foo_wave_seekbar
Post by: Zao on 15 September, 2012, 09:48:07 AM
Any serious issues with 0.2.27?

Nothing I can recall off-hand, but I haven't looked at the crash dumps lately.
Sadly, many users of this component also use the unstable horrible skin-type components that has a nice tendency to ruin the stability of the process.
I blame everyone but me
Title: foo_wave_seekbar
Post by: Dario on 16 September, 2012, 06:53:55 AM
Feature request: Remove waveforms of tracks not in the media library. Self-explanatory, I hope.
Title: foo_wave_seekbar
Post by: Zao on 20 September, 2012, 01:06:01 PM
I'm looking at changing around the way the style of the seekbar is selected.

The current approach is having the three distinct frontends, where for the Direct3D one you happen to be able to provide effect source to customize that particular instance.

I instead suggest a preset system with styles that are easy to share and backup, which transparently would use whatever frontend needed to render it.
I'm a bit unsure as to how many of you that actually have customized effects, if you wrote them yourself from scratch, adapted the stock effect, adapted an effect from someone else, or just use an effect as-is from others.
I'm also curious as to how many use the GDI (software) and Direct2D 1.0 frontends.

Additionally, I'm a bit curious as to if there are any surviving XP users around. It's getting more and more bothersome to target XP and well as Direct3D 9. It would be very nice to know if it's finally possible to move on, as I do not have any machines running XP anymore to test the corner cases of the completely pants-on-head stupid device reset model that D3D9 has. Upstream compiler support for XP, D3DX and D3D9 is gone, and the OS itself will be properly EoS:ed Real Soon Now.
Title: foo_wave_seekbar
Post by: Dandruff on 20 September, 2012, 01:20:14 PM
I'm using GDI (less DLLs needed) on WinXP SP3.
Title: foo_wave_seekbar
Post by: mezenga on 20 September, 2012, 03:36:35 PM
I´m using the stock effect with the GDI frontend on Win7.
Title: foo_wave_seekbar
Post by: Emerelle on 20 September, 2012, 04:10:08 PM
Using D2D 1.0 on Windows 7 - I couldnt get the GDI version to run on my XP (main!) desktop computer and had to remove the component due to crashes.
My Windows 7 netbook only has some custom colours, nothing too complicated.
Title: foo_wave_seekbar
Post by: ledge on 20 September, 2012, 08:11:43 PM
I'm using xp gdi on one and direct 3d on another. That said if I were you, I'd drop xp support. People like me can just stay with the current version. Both xp boxes are work machines. My home pc is windows 7.
Title: foo_wave_seekbar
Post by: Zao on 20 September, 2012, 08:54:45 PM
I do most definitely not want anyone to stay on a version with known problems. The last thing I want is a repeat of the horde of people like the ones staying on ancient foobar versions due to their favorite SDK-violating or unmaintained component not surviving an API bump.

I wouldn't really say that 0.2.27 is in any state to be a viable long-term solution for anyone, and any new fixes wouldn't percolate down to it.

I wanted to get a feeling for where my userbase is at, due to not having any kind of telemetry data available at all. There'll always be some people refusing to migrate from their entrenched legacy operating systems like Wish, but at some point one has to cut the losses.

That point is probably not quite yet, but I'm getting really annoyed with the kind of people that make Microsoft chicken out on promises to euthanize the bloody OS.
Title: foo_wave_seekbar
Post by: tribaljet on 20 September, 2012, 09:30:07 PM
I've used GDI, D2D and D3D, but I'm currently on D3D.

In any case, all have been on Windows 7, some friends of mine were still running Vista, and very little on XP.

If you feel the current version isn't a proper long term solution for legacy systems, then perhaps it would be best to release a final version with a few fixes that's still compatible with XP, then announce it will no longer be supported, allowing you to focus on Vista/7/8.
Title: foo_wave_seekbar
Post by: fuflo on 21 September, 2012, 01:02:07 AM
gdi on win8 rtm. i would probably use d3d but with my custom effect which i would make, and which i'm too lazy to make - at least right now.
Title: foo_wave_seekbar
Post by: mudlord on 21 September, 2012, 02:38:08 AM
gdi on win8. Why.
Use Direct2D or something.
Title: foo_wave_seekbar
Post by: foosion on 21 September, 2012, 05:39:20 AM
D2D on Win7. I toyed with D3D and custom effects in the beginning but settled for D2D because I like the look.
Title: foo_wave_seekbar
Post by: Zao on 21 September, 2012, 06:16:40 AM
If you feel the current version isn't a proper long term solution for legacy systems, then perhaps it would be best to release a final version with a few fixes that's still compatible with XP.

That's a bit of the problem right there - in order to find and fix the current set of crashes, I'd probably have to tear down and rejigger a fair bit of the core that happens to be stable for most of the user base. The architecture of this component wasn't designed in any way, it's mostly an organic growth of excellent and way less excellent ideas. It's a bit ... resistant to change.

The only reason I haven't made breaking changes is because I hate when people make breaking changes.
Title: foo_wave_seekbar
Post by: fuflo on 21 September, 2012, 10:39:15 AM
gdi on win8. Why.
Use Direct2D or something.


GDI:


(https://hydrogenaud.io/imgcache.php?id=93519c20d1b260b3370acf5d8c6c093f" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/QIxjn.png)

D2D:

(https://hydrogenaud.io/imgcache.php?id=a4ee5c13782471accf8095c1d46191a4" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/yftJY.png)




That's why. And personally i really don't like d3d due to it's smoothness. I need sharp peaks. Is it possible with custom shader?

Title: foo_wave_seekbar
Post by: Zao on 21 September, 2012, 11:23:50 AM
That's why. And personally i really don't like d3d due to it's smoothness. I need sharp peaks. Is it possible with custom shader?


You've got all the data available in the shader, you just need to sample the input texture enough and construct a nice view of it.
There's a D2D-like line drawing effect out there, which does a piecewise linear curve, much like D2D.
It might be https://gist.github.com/1329609 (https://gist.github.com/1329609), I don't have a machine I can look at it with right now.
Title: foo_wave_seekbar
Post by: Boiled Beans on 21 September, 2012, 01:24:22 PM
I use D2D on my Vista computer because I like sharp peaks, just like the post above.

On my XP, selecting the D3D option froze the computer completely. The GDI waveforms looked ugly, while the D2D waveforms could not render. So I removed the component from that computer. Probably the hardware couldn't handle it.

I'm alright with removing support for XP though.
Title: foo_wave_seekbar
Post by: Dandruff on 21 September, 2012, 01:26:57 PM
I'm alright with removing support for XP though.


I'm not!
Title: foo_wave_seekbar
Post by: fuflo on 21 September, 2012, 02:04:55 PM
You've got all the data available in the shader, you just need to sample the input texture enough and construct a nice view of it.
There's a D2D-like line drawing effect out there, which does a piecewise linear curve, much like D2D.
It might be https://gist.github.com/1329609 (https://gist.github.com/1329609), I don't have a machine I can look at it with right now.

Well you got me tinkering around...


The linked effect does provide exact d2d effect ( or at least it seems so to me )

And i started modifying it until foobar crashed due to d3d ( not sure, don't care - yet ). Anyway, then i saw that i only need to triple the 'factor' var in evaluate() in the default shader to get very sharp peaks. So i'm all set on that, now just need to modify played() so that only the waveform is shaded, not the background. Will probably play around tomorrow, when i'm sober  anyway, thanks for providing the interest

Title: foo_wave_seekbar
Post by: NullString on 21 September, 2012, 10:15:23 PM
The architecture of this component wasn't designed in any way, it's mostly an organic growth of excellent and way less excellent ideas.


Dude.. I'm this close of making a t-shirt with that phrase!! you struck gold!
Title: foo_wave_seekbar
Post by: Zao on 22 September, 2012, 09:17:25 AM
The linked effect does provide exact d2d effect ( or at least it seems so to me )

And i started modifying it until foobar crashed due to d3d ( not sure, don't care - yet ). Anyway, then i saw that i only need to triple the 'factor' var in evaluate() in the default shader to get very sharp peaks. So i'm all set on that, now just need to modify played() so that only the waveform is shaded, not the background. Will probably play around tomorrow, when i'm sober  anyway, thanks for providing the interest


Yup, the goal I had when writing it was to as close as possible model the Direct2D line list method, by computing the distance to sub-pixel line segments. It's not a perfect match, but mostly accurate.

The primary benefit of modelling it as many small line segments is that it deals much better with near-vertical lines.

As for the D3D9 crashing, that whole effect loading bits and error recovery is quite a mess and something I'd rather either remove or move out into a subprocess.

As it seems now, I'll stick with the VS10 toolchain for a while longer until legacy XP support is rolled out from MS HQ for VS11. Hopefully I've got a solution with styles that reduce the reliance on D3D9 for legacy users. I've also been toying with making the configuration GUI in Windows Forms from .NET, that would get rid of much of the shader editor instability.
Title: foo_wave_seekbar
Post by: tribaljet on 22 September, 2012, 09:21:55 AM
Out of curiosity but is it possible for a preset system to be added to foo_wave_seekbar? There could be implementations of the 3 stock wavebars interchangeable between GDI, D2D and D3D as default, and user contributed presets (after being tested, of course) could then be added later to newer versions, or just be made available separately, being then usable through some form of preset import feature.
Title: foo_wave_seekbar
Post by: Zao on 22 September, 2012, 03:11:26 PM
I've pondered this over time, but it would be quite tricky considering the significant difference in the frontends and what they allow.
Title: foo_wave_seekbar
Post by: tribaljet on 22 September, 2012, 10:27:55 PM
That's a shame, as it's one feature I would certainly enjoy, and it would truly make customization far easier.

So, it might be too much work to make a newer version with most XP bugs fixed and setting it as the final XP version, focusing from there on to Vista, 7 and 8?
Title: foo_wave_seekbar
Post by: Zao on 23 September, 2012, 03:34:09 AM
That assumes that I know what bugs there are, and know how to fix them. I've yet to dig properly into the crash reports I have for 0.2.27, where some at a glance seems to be related to the GDI fallback from D3D9, probably for a device reset after hibernation.

People have the strangest systems with odd graphics cards and drivers, not to mention tons of malware and shovelware... systems that still run XP tend to run the same install for ages.

Solving the crashes would require me to re-familiarize myself with how this abomination is supposed to work, and how it actually works. Those two concepts differ greatly in reality.

I would reckon that there's some major rejiggering needed to get that part into a stable state... I wouldn't want to release something that's worse than the current, stability-wise, particularly as a release tends to require lots of effort spent on seeing if there's fallout and handling renewed interest.
Title: foo_wave_seekbar
Post by: tribaljet on 24 September, 2012, 02:55:56 AM
If XP systems seem to have that many issues with D3D9, what if D3D9 was removed from a XP version and only be available on Vista/7/8?
Title: foo_wave_seekbar
Post by: Dandruff on 24 September, 2012, 03:05:05 AM
If XP systems seem to have that many issues with D3D9


No issues here with D3D9 on XP!
Title: foo_wave_seekbar
Post by: Zao on 24 September, 2012, 10:31:56 AM
If XP systems seem to have that many issues with D3D9, what if D3D9 was removed from a XP version and only be available on Vista/7/8?

The reason for that is the same reason why I still target XP. There's some innocent people for whom it still works adequately, and by removing it I would just create incitements to stay on an inferior version of the component.
There's nothing worse than an entrenched user base on a perceived "better" version when you have to deploy a criticial fix.

D3D9 will still have the completely stupid device reset mechanics, no matter what OS you put it on.
It's just more painful on XP as it resets if you stare at it, while Vista and up just reset if you do more extreme things like remove the GPU, hibernate or similiar things.

I really don't want to be in this situation, but people like Wish refuse to leave XP and I will eventually have to crush the dreams of some. Bloody luddites.
Title: foo_wave_seekbar
Post by: tribaljet on 24 September, 2012, 11:50:54 AM
The whole situation is honestly to be expected. Some people will stick to what they consider to be good or better than newer versions, which on some cases can be true. However, an OS like Windows 7 simply is better than Windows XP in most regards. But don't worry, considering how things are going, Windows 7 will become the new Windows XP.

Windows XP no longer gets bugfixes of any kind and its security updates still don't make that OS as secure as any of the newer Microsoft OSes, so regardless of personal preferences, people who stick with Windows XP are riding a dying horse and endangering everyone they connect to due to that hole filled kernel that's a virus haven.
Title: foo_wave_seekbar
Post by: mzso on 24 September, 2012, 12:04:21 PM
The whole situation is honestly to be expected. Some people will stick to what they consider to be good or better than newer versions, which on some cases can be true. However, an OS like Windows 7 simply is better than Windows XP in most regards. But don't worry, considering how things are going, Windows 7 will become the new Windows XP.

Windows XP no longer gets bugfixes of any kind and its security updates still don't make that OS as secure as any of the newer Microsoft OSes, so regardless of personal preferences, people who stick with Windows XP are riding a dying horse and endangering everyone they connect to due to that hole filled kernel that's a virus haven.

When did security bother those who stick with obsolete OS-es?
Title: foo_wave_seekbar
Post by: Zao on 12 November, 2012, 09:28:47 AM
Version 0.2.29 was released the other day, with some fixes for Direct2D rendering not updating after locking/suspending a Windows 8 machine.

The fix for it should be benign, but if you experience any form of deadlocks, honk.
Title: foo_wave_seekbar
Post by: mjb2006 on 12 November, 2012, 10:32:34 PM
The current approach is having the three distinct frontends, where for the Direct3D one you happen to be able to provide effect source to customize that particular instance.


I gave the documentation in the wiki a much-needed update to explain where the shader effect can be customized, because it was still pointing people to an external seekbar.fx file, and didn't make it clear it was only applicable to Direct3D.

I wanted to test Direct3D mode to make sure it still works for me and is customizable (I normally just use Direct2D, ever since I got a Win7 machine). So I installed the DirectX end-user runtime and at first everything looked OK..the first files I tried looked as expected. But then some files wouldn't have anything rendered for them, just the flat line in the middle, even with the default shader effect. In fact it seems to happen more often than not, but I don't see any rhyme or reason as to which files render and which don't.

There's nothing unusual in the console...the wave is always analyzed and it works fine in Direct2D and GDI modes.

What could be going wrong? Let me know if you need more info.

fb2k 1.1.14a / Win7 64-bit / Waveform seekbar 0.2.29
Title: foo_wave_seekbar
Post by: Zao on 13 November, 2012, 06:30:24 AM
I would make a wild stab at the presence or absence of replaygain information, if you've got a fancier effect.

There's some special values that end up with large sentinel values to signal the absence of one or the other form of replaygain info.

I can't quite recall which right now, it's probably documented in the default effect and/or source.
Title: foo_wave_seekbar
Post by: DragonQ on 19 November, 2012, 05:11:37 PM
gdi on win8. Why.
Use Direct2D or something.


GDI:

(https://hydrogenaud.io/imgcache.php?id=93519c20d1b260b3370acf5d8c6c093f" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/QIxjn.png)

D2D:

(https://hydrogenaud.io/imgcache.php?id=a4ee5c13782471accf8095c1d46191a4" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/yftJY.png)

That's why. And personally i really don't like d3d due to it's smoothness. I need sharp peaks. Is it possible with custom shader?

I get the same thing on Windows 8 with Direct2D. I use Direct3D but it certainly is less "detailed" than GDI in terms of peaks shown.
Title: foo_wave_seekbar
Post by: fuflo on 20 November, 2012, 01:01:54 PM
I get the same thing on Windows 8 with Direct2D. I use Direct3D but it certainly is less "detailed" than GDI in terms of peaks shown.

Open 'Frontend Settings', load default effect. Go to line 107, and enter *3 or *4 at the end of min() function in that line. Sharp(er) peaks and you can adjust it by how much you multiply it


Title: foo_wave_seekbar
Post by: mzso on 20 November, 2012, 03:55:31 PM
(https://hydrogenaud.io/imgcache.php?id=f5f568ce44ff27d2e856d73b3d5f89da" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/seekbar19.png)


Probably a stupid question, but how does one get coloring like that? I mean that the "edges" are a different (orangish) color.
Title: foo_wave_seekbar
Post by: Zao on 20 November, 2012, 06:30:38 PM
That effect goes from background color at the very edge, shooting through the text color a particular distance from the outline, and goes past by that delta, in this case ending up with white saturation.

The colors used is from one of the built-in themes:
Text: R 244, G 126, B 70
Background: R 33, G 35, B 31
Selection: R 171, G 163, B 154
Highlight: R 175, G 171, B 143

There might be some effect source in earlier threads, if whatever one is built-in nowadays doesn't reproduce it.
Title: foo_wave_seekbar
Post by: mzso on 21 November, 2012, 11:56:49 AM
That effect goes from background color at the very edge, shooting through the text color a particular distance from the outline, and goes past by that delta, in this case ending up with white saturation.

The colors used is from one of the built-in themes:
Text: R 244, G 126, B 70
Background: R 33, G 35, B 31
Selection: R 171, G 163, B 154
Highlight: R 175, G 171, B 143

There might be some effect source in earlier threads, if whatever one is built-in nowadays doesn't reproduce it.

I don't have a text color option, but I have a foreground colour option. Anyway copying the values (adding the ones from thext ot the foreground option) I get something similar, but still quite different.
(https://hydrogenaud.io/imgcache.php?id=10e09440b9c47a04961cbdfa1fe49f31" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.abload.de/img/seekbar.orangetjsyf.png) (http://www.abload.de/image.php?img=seekbar.orangetjsyf.png)
Title: foo_wave_seekbar
Post by: Zao on 21 November, 2012, 12:00:09 PM
Right, foreground.

You could either make that colour a bit brighter, or add some factor to the responsible lerp in the source - the end effect should be reasonably similiar. The differences are probably mostly because your waveform is lower amplitude than the one in my shot.
Title: foo_wave_seekbar
Post by: mzso on 21 November, 2012, 12:13:40 PM
Right, foreground.

You could either make that colour a bit brighter, or add some factor to the responsible lerp in the source - the end effect should be reasonably similiar. The differences are probably mostly because your waveform is lower amplitude than the one in my shot.

Oh, ok.
Title: foo_wave_seekbar
Post by: protospork on 22 November, 2012, 12:33:59 PM
You're right that wasn't possible, here's an updated version which sets the background colour to the highlight colour if "shade played" is disabled. http://pastebin.com/q6qLaQ18 (http://pastebin.com/q6qLaQ18)

I'm using a lightly modified version (https://gist.github.com/4132222) of this script (mainly I've just turned the inner form back on, iirc), but I'd like to replace the inner RMS waveform with just a straight centerline the same color as the background. I thought it'd be simple, just unplug something in RMSfactor, but this language is pretty opaque to me. Could someone help me out, please?
Title: foo_wave_seekbar
Post by: Dario on 25 November, 2012, 06:58:22 AM
Can anyone tell me which part of the default settings to modify so that it takes ReplayGain into consideration?
Title: foo_wave_seekbar
Post by: robertcollier4 on 25 November, 2012, 03:16:33 PM
This is fantastic, thanks. It is working for me in Direct3D 9.0c mode with Intel 965 Integrated Graphics chip. If this were incorporated into Foobar2000 as a standard base component I think it would increase the popularity of Foobar2000.

I have it set to just display the "Front right" channel - why spend extra computation cycles on 'downmixing display to mono' - for most music applications just showing one channel is adequate and should be the default.

Also - when I have it set to "Store analysed tracks in mono" it seems to be using much more CPU and taking much more time. Is it spending computation time on merging the Left+Right sound tracks? Is there any way I can set it to just store "Front right" and just display "Front right" -- not do any heavy left-right merging operations (I just need simple visual to seek around within DJ sets to find song boundaries).
Title: foo_wave_seekbar
Post by: robertcollier4 on 25 November, 2012, 03:45:02 PM
The waveform is very nice and pretty - but it is taking quite a bit of CPU to create - for a 1 hour music set it takes around 20 seconds of 99% processor usage using two processors of a 2.2 Ghz Core 2 Duo Intel Machine.

Is there any way to have a less pretty, less-detailed, lower frequency, lower sample-rate version that is snappy and quick to create? Something like Soundcloud does. I feel the seekbar signature shouldn't take more than 1 second of CPU time to create. I feel the CPU does not need to sample so heavily to create such a detailed bar that is just going to be displayed in a small section of the screen anyways. Sampling at something like 5hz (5 times per second) should be way more than enough? What is the current sampling rate that is being used to build the seekbar signature?

Better yet - the sampling rate can reduce as the length of the track increases past certain thresholds. So if it is a 1 hour music set that is being indexed for seekbar signature - that is 3600 seconds to be displayed across the horizontal resolution of my screen. My screen only has 1600 pixels horizontally across anyways. So for something longer than 20 minutes - the sampling frequency can even be 1hz. 3600 bars to be displayed across 1600 pixels on an LCD screen sounds right for a 1 hr music set.

Also, I feel this could be done without requiring the DirectX end-user runtime which would open it up to much higher compatability.
http://gareus.org/wiki/sndfile-waveform (http://gareus.org/wiki/sndfile-waveform)
https://github.com/beschulz/wav2png (https://github.com/beschulz/wav2png)
http://www.schillmania.com/projects/soundmanager2/ (http://www.schillmania.com/projects/soundmanager2/)
Title: foo_wave_seekbar
Post by: lvqcl on 25 November, 2012, 04:00:09 PM
So for something longer than 20 minutes - the sampling frequency can even be 1hz. 3600 bars to be displayed across 1600 pixels on an LCD screen sounds right for a 1 hr music set.


This plugin uses 2048 points which is even less than you propose: http://www.hydrogenaudio.org/forums/index....st&p=732029 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77490&view=findpost&p=732029)
Title: foo_wave_seekbar
Post by: robertcollier4 on 25 November, 2012, 04:36:12 PM
Additionally, I'm a bit curious as to if there are any surviving XP users around. It's getting more and more bothersome to target XP and well as Direct3D 9. It would be very nice to know if it's finally possible to move on, as I do not have any machines running XP anymore to test the corner cases of the completely pants-on-head stupid device reset model that D3D9 has. Upstream compiler support for XP, D3DX and D3D9 is gone, and the OS itself will be properly EoS:ed Real Soon Now.


*Raises hand*. Lots of surviving XP users will remain - especially for music playing, lots of people (such as myself) use old laptops for music playing servers connected to speakers. You'll be glad to hear that foo_wave_seekbar is working perfectly for me with Direct3D 9.0c on Windows XP on a Thinkpad T61 with Intel 965 Integrated Graphics.

The reason is that there is simply no reason to upgrade. Only when I get an SSD will I upgrade to Win7 for the TRIM support. XP is better suited to old laptops and uses less memory and hard disk space than Win7.

Thanks.
Title: foo_wave_seekbar
Post by: Zao on 25 November, 2012, 05:06:06 PM
This is fantastic, thanks. It is working for me in Direct3D 9.0c mode with Intel 965 Integrated Graphics chip. If this were incorporated into Foobar2000 as a standard base component I think it would increase the popularity of Foobar2000.

Nothing stops anyone from recommending it on "top 10 components"-style lists, which probably gets better exposure than some strange unknown bundled UI element that no-one knows to look for.

I have it set to just display the "Front right" channel - why spend extra computation cycles on 'downmixing display to mono' - for most music applications just showing one channel is adequate and should be the default.

Also - when I have it set to "Store analysed tracks in mono" it seems to be using much more CPU and taking much more time. Is it spending computation time on merging the Left+Right sound tracks? Is there any way I can set it to just store "Front right" and just display "Front right" -- not do any heavy left-right merging operations (I just need simple visual to seek around within DJ sets to find song boundaries).

The mixdown is done after the analysis, and thus has no real impact whatsoever on the speed as it acts on at most a few thousand data points. Similarly, it shouldn't have any noticeable cost when preparing a waveform for display. It's just 2048*[1-8] averages, after all.

I dislike the notion of hiding information in a default setting. If you have needs to change it, it's mutable for a reason.

The waveform is very nice and pretty - but it is taking quite a bit of CPU to create - for a 1 hour music set it takes around 20 seconds of 99% processor usage using two processors of a 2.2 Ghz Core 2 Duo Intel Machine.

Is there any way to have a less pretty, less-detailed, lower frequency, lower sample-rate version that is snappy and quick to create? Something like Soundcloud does. I feel the seekbar signature shouldn't take more than 1 second of CPU time to create. I feel the CPU does not need to sample so heavily to create such a detailed bar that is just going to be displayed in a small section of the screen anyways. Sampling at something like 5hz (5 times per second) should be way more than enough? What is the current sampling rate that is being used to build the seekbar signature?

Assuming around 500x realtime decoding, an hour of audio takes around ten seconds to decode, let alone analyse.

Better yet - the sampling rate can reduce as the length of the track increases past certain thresholds. So if it is a 1 hour music set that is being indexed for seekbar signature - that is 3600 seconds to be displayed across the horizontal resolution of my screen. My screen only has 1600 pixels horizontally across anyways. So for something longer than 20 minutes - the sampling frequency can even be 1hz. 3600 bars to be displayed across 1600 pixels on an LCD screen sounds right for a 1 hr music set.

As linked, the analysis gathers audio linearly into 2k buckets per channel, resolving results as it goes.
If I were to seek and look at subparts of songs, it'd likely miss out on interesting features in the waveform, and would have some severe decoder seek costs.
Yes, the analysis might be "slow", but it's fast enough for the majority.

Also, I feel this could be done without requiring the DirectX end-user runtime which would open it up to much higher compatability.
http://gareus.org/wiki/sndfile-waveform (http://gareus.org/wiki/sndfile-waveform)
https://github.com/beschulz/wav2png (https://github.com/beschulz/wav2png)
http://www.schillmania.com/projects/soundmanager2/ (http://www.schillmania.com/projects/soundmanager2/)

First two are licensed under the GPL and are thus nothing I can't even look at.

As for the DirectX redist, that is solely for the use of the effect compiler and/or d3d_compiler. No matter how I spin it, if I want to compile effects, I need it present. If you use the D2D or GDI frontends, you don't need it.

I could swear I saw a mention of having to right-click, but I guess it was edited. It automagically scans (if enabled) the playing track and the next one to play, ahead of time.
Title: foo_wave_seekbar
Post by: Zao on 01 December, 2012, 03:21:05 PM
I've done some ad-hoc benchmarking of a typical MP3 set, and I get around 8 seconds for a 1h20m track. Out of that, at most 2 seconds is from my code, the rest is in decoding and data shoveling.

In order to achieve any significant improvements, I'd have to decode less audio. This means that I'd have to seek, which is not remotely free. If we decide to analyze only some lumps of the track, we need to consider the implications.
Given a 1h track, we've got buckets of 1.75 seconds for each sample in the result. If we only decode half of this interval, we'll completely miss any energy and peak content of the other half. Lowering the scanned:unscanned ratio would possibly improve speed, but cause greater blindness.

In the end, the executive summary is: if you want higher speeds, use faster hardware/formats. Otherwise, do your scanning ahead-of-time or during other downtime. The analysis process is idle-priority, so it shouldn't really affect your normal operation in any way.
Title: foo_wave_seekbar
Post by: mudlord on 01 December, 2012, 08:43:03 PM
You're right that wasn't possible, here's an updated version which sets the background colour to the highlight colour if "shade played" is disabled. http://pastebin.com/q6qLaQ18 (http://pastebin.com/q6qLaQ18)

I'm using a lightly modified version (https://gist.github.com/4132222) of this script (mainly I've just turned the inner form back on, iirc), but I'd like to replace the inner RMS waveform with just a straight centerline the same color as the background. I thought it'd be simple, just unplug something in RMSfactor, but this language is pretty opaque to me. Could someone help me out, please?

Thats not a script, its a pixel shader. Get your facts straight.
Title: foo_wave_seekbar
Post by: Zao on 02 December, 2012, 11:11:49 AM
This means that I'd have to seek, which is not remotely free. If we decide to analyze only some lumps of the track, we need to consider the implications.


I did some quick speed tests, and seeking has a significant cost. For the Ogg Vorbis track I tried, decoding the whole track is equivalent in time to decoding 40% of the song with 2048 seeks.
The cutoff fraction for MP3 was somewhere around 85%, FLAC 65%.

All in all, the accuracy penalty isn't worth the miniscule improvement in analysis time.
Title: foo_wave_seekbar
Post by: robertcollier4 on 10 December, 2012, 09:38:02 AM
Thanks. One more request. I am trying to save hard drive seeks by not scanning every single thing opened (some times I do not need the seekbar info, or am just opening something for a few seconds and then closing it).

I have unchecked "Analyze tracks not in the media library" - and the automatic signature building for everything has stopped (I don't use the Foobar2000 library anyways). But now it would be nice to be able to manually build some signatures via Right Click > Utilities > Extract Seekbar Signature. It seems that "Extract Seekbar Signature" does not work for tracks not in the media library when "Analyze tracks not in the media library" is unchecked. It would be nice if "Extract Seekbar Signature" would override "Analyze tracks not in the media library" so that there is an ability to manually choose which songs the signature will get built for and which for not. Or an option to turn off "automatic signature building" at times when the user wants to save hard disk activity -- and allow manual only operation via a button on the toolbar (the "Extract Seekbar Signature" menu item can already be added to the toolbar -- but it is missing an icon).
Title: foo_wave_seekbar
Post by: robertcollier4 on 10 December, 2012, 11:26:40 AM
I figured another thing that was greatly slowing down signature creation. I had number of threads set to 2 and observed the filesystem activity with Sysinternals Process Monitor. It starts immediately creating the currently playing song in the 1st thread and the next song in the playlist in the second thread. So you have two threads which are requesting data from the hard drive at the same time. Process Monitor showed reading between File1 and File2 over and over again, switching rapidly back and forth - asking the filesystem to give it streams of two files at two different locations at the same time was causing a lot of disk thrashing.

I set the number of threads to 1 and now it is only reading one file at a time which has greatly reduced disk thrashing. Sequential read access on a single file is much faster on a spinning hard drive than random reads between two files at the same time. A huge bottleneck also is probably the rate at which the plugin can load the entire song into RAM for analysis.

Based on this - I would recommend that the # of threads be always set to 1. Parallel threads should only be run when working with in-memory objects.

Screenshot of Process Monitor with # of threads = 2:
(https://hydrogenaud.io/imgcache.php?id=7d324345fd078a9c77ad49ebd8495c1b" rel="cached" data-warn="External image, click to view at original size" data-url="http://img819.imageshack.us/img819/6774/20121210220548.jpg)
Title: foo_wave_seekbar
Post by: Zao on 10 December, 2012, 12:43:22 PM
The default cap for number of threads (3) is the cutoff point where a typical machine doesn't gain more from adding threads.

If your harddrives and/or file buffering characteristics are horrible enough to warrant crippling it to one thread, do so - it's configurable for a reason. What OS are you on that exhibits such horrible prediction?

I've considered fully buffering files, but that's either pointless (for small files) or unfeasible (for larger files or archives). Any solution with serial disk I/O will be pretty much equivalent to crippling yourself to a single thread anyway.
Title: foo_wave_seekbar
Post by: robertcollier4 on 11 December, 2012, 12:10:17 AM
If your harddrives and/or file buffering characteristics are horrible enough to warrant crippling it to one thread, do so - it's configurable for a reason.

In my case - each of my "songs" are 1hr+ 120MB+ files so no filesystem cache is going to load two of these files fully into memory. For people using Foobar2000 with 5 min songs it is probably fine for them. Running with 1 thread with large 1hr songs fixes the problem and results in nearly sequential disk access behavior and the "thrashing" observed earlier from constantly blinking hard drive light and observed noise coming from hard disk head movement is now gone.
Title: foo_wave_seekbar
Post by: Dario on 15 December, 2012, 06:11:38 AM
Can I get an answer regarding this?

Can anyone tell me which part of the default settings to modify so that it takes ReplayGain into consideration?
Title: foo_wave_seekbar
Post by: Zao on 15 December, 2012, 06:39:15 AM
Can anyone tell me which part of the default settings to modify so that it takes ReplayGain into consideration?

Consideration for what area of the component?
The analysis process won't take RG into consideration in any way.
The display doesn't take RG into consideration unless you use the Direct3D frontend, where the RG parameters are available in the four-component REPLAYGAIN semantic.

Code: [Select]
float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
Title: foo_wave_seekbar
Post by: Dario on 15 December, 2012, 08:17:07 AM
Sorry for not being specific enough—I was talking about the display. I found some front-end setting that DOES take it into consideration while displaying, but the rest of it looks ugly. Guess I'll try to modify the default one myself...
Title: foo_wave_seekbar
Post by: robertcollier4 on 26 December, 2012, 04:56:34 AM
My vote would still be for an option in Preferences to "Disable automatic scanning from playlist entries".

I like to load my songs into RAMDisk via the RAMDisk plugin. So I first load the song from Explorer - it loads in Foobar - then I click on "Send to RamDisk". then I click on "Send to Playlist" in the RamDisk window to send the Ramdisk file to the Playlist. This results in foo_wave_seekbar first scanning the file on the hard disk - and then again for the file on the RamDisk. I only want it to scan files that I load from my Ramdisk.

So another request (or another way of doing this) would be that there would be a path filter - "Exclude paths in pathexclude.ini". I could specify the paths from which I want foo_wave_seekbar to not scan. If I wanted to turn off automatic scanning all-together (and run in manual-only mode) - then I could specify "*" in pathexclude.ini. Otherwise I could specify specific directories from which foo_wave_seekbar should not engage in automatic signature creation.
Title: foo_wave_seekbar
Post by: mezenga on 26 December, 2012, 08:12:59 AM
My vote would still be for an option in Preferences to "Disable automatic scanning from playlist entries".

Have you tried unchecking "Analyse tracks not in the media library" under "Preferences -> Advanced -> Tools -> Waveform seekbar" ?
Title: foo_wave_seekbar
Post by: Zao on 26 December, 2012, 09:27:03 AM
That fails if he wants his HDD to be indexed by the media library but not scanned by the seekbar.

The "don't scan stuff not in library" setting is from a day where everyone and their mother wanted blacklists and whitelists of what to scan where. I implemented it as a trivial stopgap measure, as I didn't want to make the painful UI needed to customize location lists.

In general, the more UI a feature needs, the less I'm motivated to work on it.
Title: foo_wave_seekbar
Post by: mezenga on 26 December, 2012, 09:36:30 PM
My vote would still be for an option in Preferences to "Disable automatic scanning from playlist entries".

Have you tried unchecking "Analyse tracks not in the media library" under "Preferences -> Advanced -> Tools -> Waveform seekbar" ?

I´ve just seen from early posts that you already knew this option.
I tried foo_ramdisk and found that it is mapped at the application level and can´t be added to Media Library so my suggestion wouldn´t work anyway.

The only other option I can think of is the use of a regular RAM disk.

The "don't scan stuff not in library" setting is from a day where everyone and their mother wanted blacklists and whitelists of what to scan where. I implemented it as a trivial stopgap measure, as I didn't want to make the painful UI needed to customize location lists.

Fair enough   
Title: foo_wave_seekbar
Post by: robertcollier4 on 29 December, 2012, 04:58:15 PM
That fails if he wants his HDD to be indexed by the media library but not scanned by the seekbar.


When "Analyse tracks not in the media library" is unchecked - it disables all signature creation even if invoked manually. Manually right clicking on a song in playlist > Utilities > Extract Seekbar Signature - does not build the seekbar signature if "Analyse tracks not in the media library" is unchecked.

I don't use the media library at all.

Thanks.
Title: foo_wave_seekbar
Post by: Zao on 29 December, 2012, 05:04:40 PM
That's working as intended. If it's unchecked, all scanning, whether it's user-initiated or automatic is ignored on tracks that are not in the Media Library.
Title: foo_wave_seekbar
Post by: Evil Elf on 05 January, 2013, 10:49:23 AM
Hi! I just registered to share my seekbar setup. I wanted to make something that looks like soundcloud's seekbar (https://soundcloud.com/lorn/on-the-ice).
I found a post from 2010 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77490&view=findpost&p=705262) from the user Anomalous, and edited his code a bit so it works with seekbar 0.2.29. Here's what I got:

(https://hydrogenaud.io/imgcache.php?id=6ea730390af13cc04c80b968e4b207c2" rel="cached" data-warn="External image, click to view at original size" data-url="http://img16.imageshack.us/img16/3126/12008747.png) (http://imageshack.us/photo/my-images/16/12008747.png/)

and here's the code from frontend settings:
Code: [Select]
texture tex : WAVEFORMDATA;

sampler sTex = sampler_state
{
    Texture = (tex);
    MipFilter = LINEAR;
    MinFilter = LINEAR;
    MagFilter = LINEAR;
    
    AddressU = Clamp;
};

struct VS_IN
{
    float2 pos : POSITION;
    float2 tc : TEXCOORD0;
};

struct PS_IN
{
    float4 pos : SV_POSITION;
    float2 tc : TEXCOORD0;
};


float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor  : HIGHLIGHTCOLOR;
float4 selectionColor  : SELECTIONCOLOR;
float4 textColor       : TEXTCOLOR;
float cursorPos        : CURSORPOSITION;
bool cursorVisible     : CURSORVISIBLE;
float seekPos          : SEEKPOSITION;
bool seeking           : SEEKING;
float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
float2 viewportSize    : VIEWPORTSIZE;
bool horizontal        : ORIENTATION;
bool flipped           : FLIPPED;
bool shade_played      : SHADEPLAYED;

PS_IN VS( VS_IN input )
{
    PS_IN output = (PS_IN)0;

    float2 half_pixel = float2(1,-1) / viewportSize;
    output.pos = float4(input.pos - half_pixel, 0, 1);

    if (horizontal)
    {
        output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
    }
    else
    {
        output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);
    }

    if (flipped)
        output.tc.x = 1.0 - output.tc.x;

    return output;
}

float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
{
    float dist = abs(pos - tc.x);
    float4 c = (show && dist < width)
        ? lerp(fg, bg, smoothstep(0, width, dist))
        : bg;
    return c;
}


float4 evaluate(float4 bg, float4 fg, float factor)
{
        return saturate(lerp(bg, fg, factor));
}

float4 played( float pos, float2 tc, float4 bg, float factor)
{
        float4 c = bg;
        if (pos > tc.x)
        {
                c = evaluate(backgroundColor, highlightColor, factor);
        }
        return c;
}

float RMSfactor( float2 tc, float border )
{
        float4 minmaxrms = tex1D(sTex, tc.x);

        minmaxrms.rgb -= 0.5 * minmaxrms.a;
        minmaxrms.rgb *= 0.7 + minmaxrms.a;

        float belowWave = tc.y + border - minmaxrms.r;
        float aboveWave = tc.y - border - minmaxrms.g;
        float factorWave = min(abs(belowWave), abs(aboveWave));
        bool insideWave = (belowWave > 0 && aboveWave < 0);
      
        float diffRms = abs(tc.y) - border - minmaxrms.b;
        float factorRms = abs(diffRms);
        bool insideRms = diffRms < 0;
      
        float factor = insideRms ? (1.0 + 0.15 * saturate(factorRms / border / 2)): 1.0;
        factor = insideWave ? (factor * saturate(factorWave / border / 1)) : 0.0; //1 = max sharp
      
        return factor;
}

float4 PS( PS_IN input ) : SV_Target
{
        float dx, dy;
        if (horizontal)
        {
                dx = 1/viewportSize.x;
                dy = 1/viewportSize.y;
        }
        else
        {
                dx = 1/viewportSize.y;
                dy = 1/viewportSize.x;
        }
        float seekWidth = 1 * dx;
        float positionWidth = 1 * dx;

        float factor = RMSfactor(input.tc, 2.5 * dy);

        float4 c0 = evaluate(backgroundColor, textColor, factor);
        if (shade_played)
                c0 = played(cursorPos, input.tc, c0, factor);
        c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
        c0 = bar(seekPos,   input.tc, selectionColor, c0, seekWidth,     seeking      );
        return c0;
}

technique10 Render10
{
    pass P0
    {
        SetGeometryShader( 0 );
        SetVertexShader( CompileShader( vs_4_0, VS() ) );
        SetPixelShader( CompileShader( ps_4_0, PS() ) );
    }
}

technique Render9
{
    pass
    {
        VertexShader = compile vs_2_0 VS();
        PixelShader = compile ps_2_0 PS();
    }
}
Title: foo_wave_seekbar
Post by: TuNk77 on 06 January, 2013, 12:37:18 PM
I have a question, would it be possible to make foo_wave_seekbar not scan tracks rated 1?
I use foo_skip and tracks that is rated 1 is skipped and I usually have a large playlist, playing in random. So, sometimes a lot of skips, due to rating of 1, occur, leaving foo_wave_seekbar scanning many tracks in the background.
Title: foo_wave_seekbar
Post by: dinhjk on 15 January, 2013, 12:27:20 AM
Hi, just registered to ask this:

Is it possible to cut the wave form in half? I do not mean to merge the two into a mono track. I like that already, but was wondering instead of the single track being a vertical mirror, if I could simply view the top half of this. To keep the baseline at the bottom, instead of the middle of the wave form.

If not, that's okay -- Just thought I'd ask. I tried searching through this thread but it is quite hefty and some parts quite old. Thank you!
Title: foo_wave_seekbar
Post by: Zao on 15 January, 2013, 07:13:37 AM
If you're using the Direct3D frontend, you can kind of achieve a split in half by adding in the evaluate() function the line:
tc.y = tc.y * 0.5 + 0.5;
This will shift the waveform so that the center is along the bottom edge of that channel. It's not quite right as it discards the lower half of the track, but meh, close enough.

Historically there was an option for mirroring and halving, but it hasn't been in for many versions and can't really be retrofitted.
Title: foo_wave_seekbar
Post by: dinhjk on 15 January, 2013, 08:43:02 PM
Hm, I'm not very good with code, but pasting that in my only evaluate function that I found, it produced an error.

Code: [Select]
texture tex : WAVEFORMDATA;

sampler sTex = sampler_state
{
    Texture = (tex);
    MipFilter = LINEAR;
    MinFilter = LINEAR;
    MagFilter = LINEAR;
    
    AddressU = Clamp;
};

struct VS_IN
{
    float2 pos : POSITION;
    float2 tc : TEXCOORD0;
};

struct PS_IN
{
    float4 pos : SV_POSITION;
    float2 tc : TEXCOORD0;
};


float4 backgroundColor : BACKGROUNDCOLOR;
float4 highlightColor  : HIGHLIGHTCOLOR;
float4 selectionColor  : SELECTIONCOLOR;
float4 textColor       : TEXTCOLOR;
float cursorPos        : CURSORPOSITION;
bool cursorVisible     : CURSORVISIBLE;
float seekPos          : SEEKPOSITION;
bool seeking           : SEEKING;
float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
float2 viewportSize    : VIEWPORTSIZE;
bool horizontal        : ORIENTATION;
bool flipped           : FLIPPED;
bool shade_played      : SHADEPLAYED;

PS_IN VS( VS_IN input )
{
    PS_IN output = (PS_IN)0;

    float2 half_pixel = float2(1,-1) / viewportSize;
    output.pos = float4(input.pos - half_pixel, 0, 1);

    if (horizontal)
    {
        output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
    }
    else
    {
        output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);
    }

    if (flipped)
        output.tc.x = 1.0 - output.tc.x;

    return output;
}

float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
{
    float dist = abs(pos - tc.x);
    float4 c = (show && dist < width)
        ? lerp(fg, bg, smoothstep(0, width, dist))
        : bg;
    return c;
}


float4 evaluate(float4 bg, float4 fg, float factor)
{
        return saturate(lerp(bg, fg, factor));
}

float4 played( float pos, float2 tc, float4 bg, float factor)
{
        float4 c = bg;
        if (pos > tc.x)
        {
                c = evaluate(backgroundColor, highlightColor, factor);
        }
        return c;
}

float RMSfactor( float2 tc, float border )
{
        float4 minmaxrms = tex1D(sTex, tc.x);

        minmaxrms.rgb -= 0.5 * minmaxrms.a;
        minmaxrms.rgb *= 0.7 + minmaxrms.a;

        float belowWave = tc.y + border - minmaxrms.r;
        float aboveWave = tc.y - border - minmaxrms.g;
        float factorWave = min(abs(belowWave), abs(aboveWave));
        bool insideWave = (belowWave > 0 && aboveWave < 0);
      
        float diffRms = abs(tc.y) - border - minmaxrms.b;
        float factorRms = abs(diffRms);
        bool insideRms = diffRms < 0;
      
        float factor = insideRms ? (1.0 + 0.15 * saturate(factorRms / border / 2)): 1.0;
        factor = insideWave ? (factor * saturate(factorWave / border / 1)) : 0.0; //1 = max sharp
      
        return factor;
}

float4 PS( PS_IN input ) : SV_Target
{
        float dx, dy;
        if (horizontal)
        {
                dx = 1/viewportSize.x;
                dy = 1/viewportSize.y;
        }
        else
        {
                dx = 1/viewportSize.y;
                dy = 1/viewportSize.x;
        }
        float seekWidth = 1 * dx;
        float positionWidth = 1 * dx;

        float factor = RMSfactor(input.tc, 2.5 * dy);

        float4 c0 = evaluate(backgroundColor, textColor, factor);
        if (shade_played)
                c0 = played(cursorPos, input.tc, c0, factor);
        c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
        c0 = bar(seekPos,   input.tc, selectionColor, c0, seekWidth,     seeking      );
        return c0;
}

technique10 Render10
{
    pass P0
    {
        SetGeometryShader( 0 );
        SetVertexShader( CompileShader( vs_4_0, VS() ) );
        SetPixelShader( CompileShader( ps_4_0, PS() ) );
    }
}

technique Render9
{
    pass
    {
        VertexShader = compile vs_2_0 VS();
        PixelShader = compile ps_2_0 PS();
    }
}


I got this from an earlier post, about sound cloud something. I placed it where it has

Code: [Select]
float4 evaluate(float4 bg, float4 fg, float factor)
{
        return saturate(lerp(bg, fg, factor));
}


and it came up with the error "error: (X3004): undeclared identifier 'tc'"
Title: foo_wave_seekbar
Post by: Zao on 16 January, 2013, 05:21:18 PM
Unless you say otherwise, I have to assume you're using the default look.
Do it at the top of RMSFactor, I guess. Heaven knows what this shader does.
Title: foo_wave_seekbar
Post by: dinhjk on 17 January, 2013, 01:30:36 AM
ah wow, you're a genius  that worked! good job and thank you xD
Title: foo_wave_seekbar
Post by: jamps on 19 January, 2013, 12:33:56 PM
Hi!
Would it be possible to add scrollwheel function working on top of the waveform seekbar?
I like to use scrollwheel on top of the Seekbar, but it takes up space.
Thanks!
Title: foo_wave_seekbar
Post by: carpman on 19 January, 2013, 08:35:50 PM
I'm a little confused how to get waveform seekbar to display what I want. I've played around with a few of the configs that have been posted here, and I'm happy with how it's displayed. But not with the amplitude of the display. To be clear the problem is not with the component (that's great), the problem here is me.

As far as replay gain is concerned my music library is divided into 2:
The player is set to play according to Album Gain. So the loose files play at their "native" volume; the Collection tracks play according to their Album Gain data.

What I want Waveform Seekbar to produce is a waveform that reflects the waveform I hear.

Here's my current config:


Code: [Select]
    Texture1D tex : WAVEFORMDATA;
   Texture2D seekTex < string filename = "seekbar.png"; >;
    
   SamplerState sTex
   {
       Filter = MIN_MAG_MIP_LINEAR;
       AddressU = Clamp;
   };
    
   struct VS_IN
   {
           float2 pos : POSITION;
           float2 tc : TEXCOORD0;
   };
    
   struct PS_IN
   {
           float4 pos : SV_POSITION;
           float2 tc : TEXCOORD0;
   };
    
    
   float4 backgroundColor : BACKGROUNDCOLOR;
   float4 highlightColor  : HIGHLIGHTCOLOR;
   float4 selectionColor  : SELECTIONCOLOR;
   float4 textColor      : TEXTCOLOR;
   float cursorPos        : CURSORPOSITION;
   bool cursorVisible    : CURSORVISIBLE;
   float seekPos          : SEEKPOSITION;
   bool seeking          : SEEKING;
   float4 replayGain      : REPLAYGAIN; // album gain, track gain, album peak, track peak
   float2 viewportSize    : VIEWPORTSIZE;
   bool horizontal        : ORIENTATION;
   bool shade_played      : SHADEPLAYED;
    
   PS_IN VS( VS_IN input )
   {
           PS_IN output = (PS_IN)0;
    
           float2 half_pixel = float2(1,-1) / viewportSize;
           output.pos = float4(input.pos - half_pixel, 0, 1);
           if (horizontal)
                   output.tc = float2((input.tc.x + 1.0) / 2.0, input.tc.y);
           else
                   output.tc = float2((-input.tc.y + 1.0) / 2.0, input.tc.x);
    
           return output;
   }
    
   float4 bar( float pos, float2 tc, float4 fg, float4 bg, float width, bool show )
   {
           float dist = abs(pos - tc.x);
           float4 c = (show && dist < width)
                   ? lerp(fg, bg, smoothstep(0, width, dist))
                   : bg;
           return c;
   }
    
   float4 evaluate(float4 bg, float4 fg, float factor)
   {
           return saturate(lerp(bg, fg, factor));
   }
    
   float4 played( float pos, float2 tc, float4 bg, float factor)
   {
           float4 c = bg;
           if (pos > tc.x)
           {
                   c = evaluate(backgroundColor, highlightColor, factor);
           }
           return c;
   }
    
   float RMSfactor( float2 tc, float border )
   {
           // alpha 1 indicates biased texture
   float4 minmaxrms = tex.Sample(sTex, tc.x);
   if (replayGain.g != -1000) {
       minmaxrms.rgb *= pow(10,(replayGain.g) / 20) * 2; //use track gain
   } else if (replayGain.r != -1000) {
       minmaxrms.rgb *= pow(10,(replayGain.r) / 20) * 2; //use album gain
   }
   minmaxrms.rgb -= 0.5 * minmaxrms.a;
   minmaxrms.rgb *= 1.0 + minmaxrms.a;
    
           float belowWave = tc.y + border - minmaxrms.r;
           float aboveWave = tc.y - border - minmaxrms.g;
           float factorWave = min(abs(belowWave), abs(aboveWave));
           bool insideWave = (belowWave > 0 && aboveWave < 0);
          
           float diffRms = abs(tc.y) - border - minmaxrms.b;
           float factorRms = abs(diffRms);
           bool insideRms = diffRms < 0;
          
           float factor = insideRms ? (1.0 - 0.5 * saturate(factorRms / border / 2)): 1.0;
           factor = insideWave ? (factor * saturate(factorWave / border / 2)) : 0.0;
          
           return factor;
   }
    
   float4 PS( PS_IN input ) : SV_Target
   {
           float dx, dy;
           if (horizontal)
           {
                   dx = 1/viewportSize.x;
                   dy = 1/viewportSize.y;
           }
           else
           {
                   dx = 1/viewportSize.y;
                   dy = 1/viewportSize.x;
           }
           float seekWidth = 2.5 * dx;
           float positionWidth = dx;
    
           float factor = RMSfactor(input.tc, 2.5 * dy);
    
           float4 c0 = evaluate(backgroundColor, textColor, factor);
           if (shade_played)
                   c0 = played(cursorPos, input.tc, c0, factor);
           c0 = bar(cursorPos, input.tc, selectionColor, c0, positionWidth, cursorVisible);
           c0 = bar(seekPos,  input.tc, selectionColor, c0, seekWidth,    seeking      );
           return c0;
   }
    
   technique10 Render10
   {
           pass P0
           {
                   SetGeometryShader( 0 );
                   SetVertexShader( CompileShader( vs_4_0, VS() ) );
                   SetPixelShader( CompileShader( ps_4_0, PS() ) );
           }
   }
    
   technique Render9
   {
           pass
           {
                   VertexShader = compile vs_2_0 VS();
                   PixelShader = compile ps_2_0 PS();
           }
   }
Any ideas how I achieve this?
EDIT: Currently the Collection tracks (via AlbumGain) are displayed so they look much louder than the no-replaygain (loose tracks).

Any help much appreciated.

C.
Title: foo_wave_seekbar
Post by: carpman on 23 January, 2013, 11:49:31 PM
By the way - add me to the list of people who'd like to specify the location of wavecache.db.

C.
Title: foo_wave_seekbar
Post by: marc2003 on 25 January, 2013, 04:55:13 AM
By the way - add me to the list of people who'd like to specify the location of wavecache.db.


pretty sure you can do that yourself using the command line tool mklink which is built into windows (vista and newer).
Title: foo_wave_seekbar
Post by: carpman on 25 January, 2013, 05:27:38 AM
pretty sure you can do that yourself using the command line tool mklink which is built into windows (vista and newer).

Done. Thanks for that. Learn something new every day.

C.
Title: foo_wave_seekbar
Post by: Zao on 25 January, 2013, 08:48:06 AM
Yeah, if all you want is a single file elsewhere, a symlink will probably work, but it's nothing I've tested, so buyer beware and all that.

As for the lack of implementing movability in the component itself, it needs UI work, file move logic and of course, got intermingled with "having multiple databases all over the place".
Title: foo_wave_seekbar
Post by: carpman on 25 January, 2013, 07:07:31 PM
Hi Zao,

It works fine for me, no problems with the symlink. I think it may introduce a very slight delay, but that could also be because fb2k is on an SSD and now the wavecache.db resides on a normal sata HDD.

By the way, any advice on the replay gain / display issue mentioned in post 1161 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=77490&view=findpost&p=821273)?

C.
Title: foo_wave_seekbar
Post by: Zao on 30 January, 2013, 10:03:58 AM
It's most likely quite trivial to achieve based on the contents of the four components of the replaygain variable. Do some branching, scale stuff, pray.

I took a short look at it but my shader editor is so horrible, I lost the work
Title: foo_wave_seekbar
Post by: silkcut on 02 February, 2013, 06:25:30 PM
Does anyone know how to make the waveform a solid color?  I set the foreground color but it only affects the top and bottom edges of the waveform.

e.g.

(https://hydrogenaud.io/imgcache.php?id=cb15267ea376a0bb1ebbc11a8dbcbe27" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/PXaE0fP.png) (http://imgur.com/PXaE0fP)

Why is the waveform still white with shades of the foreground color?  Thanks.
Title: foo_wave_seekbar
Post by: Zao on 02 February, 2013, 08:31:09 PM
Because the default effect interpolates from the background color outside the waveform, into the foreground color at the waveform border, and past inside. If you want a different behavior, you can always write your own effect.
Title: foo_wave_seekbar
Post by: silkcut on 03 February, 2013, 01:32:19 AM
Okay and how do I do that?  Thank you.
Title: foo_wave_seekbar
Post by: mister.mabuse on 04 February, 2013, 11:29:01 AM
Hi Zao,
thank you for the nice component. it really adds some nice eyecandy.
however i have a problem. when im playing computer games with foobar in the background
the cpu usage of foobar spikes and introduces lags in the game. this happens when the track
changes to a track without a cached waveform. is there a way to make waveform generation
less priorotized? i already have only one thread running.
Title: foo_wave_seekbar
Post by: Zao on 04 February, 2013, 02:10:04 PM
The analysis threads are running at idle CPU priority already. I am not going to open the can of worms that is going conditionally for THREAD_MODE_BACKGROUND_BEGIN/THREAD_MODE_BACKGROUND_END on Vista and up, as that's likely to cause enough stalling and priority inversion to ruin the day.
Title: foo_wave_seekbar
Post by: mister.mabuse on 04 February, 2013, 02:53:46 PM
Thank you, maybe it's something different that's slowing me down. thanks for the nice plugin still
Title: foo_wave_seekbar
Post by: EpicForever on 04 February, 2013, 03:45:01 PM
I created playlist with about 1300 tracks/50GBytes, all from the same HDD. Maybe half of them were previously played and thus they could have their seekbars signatures already saved. I selected all of them and choose "extract seekbar signature". I changed coligation of foobar process to just single core (3,6 Ghz AMD Phenom). Whole procedure took about 20 or 30 minutes (I don't know exactly, I haven't noticed exact time). While seekbar signatures were extracted, foobar was normally playing music from that playlist. During whole this process CPU usage varied mainly from 12 to 17% and never went above 19%. Maybe there's something wrong with your HDD configuration (in BIOS or Windows?) - like slower transfer mode set?
Title: foo_wave_seekbar
Post by: Zao on 04 February, 2013, 11:29:45 PM
Resource usage is more complicated than a single percentage of resources consumed.

I/O is a big silent thief in performance, it has a tendency to stutter and delay things subtly, which I referred indirectly to by the THREAD_MODE_BACKGROUND_* priorities. Those affect the I/O behavior of a thread, unlike the usual priorities that are mostly just about CPU scheduling.

I'm not eager to touch I/O priority though, as it may very well end up ruining it for everyone.
Title: foo_wave_seekbar
Post by: silkcut on 05 February, 2013, 11:47:58 AM
Hi. Does anyone know how to script a wave with one color for the foreground and one color for the background?  Something like Sound Forge's default display....

I don't know how to code so any pointers on how to script this would be very much appreciated.
Title: foo_wave_seekbar
Post by: EpicForever on 07 February, 2013, 05:14:11 AM
In addition to my previous post in this thread ( http://www.hydrogenaudio.org/forums/index....st&p=823130 (http://www.hydrogenaudio.org/forums/index.php?showtopic=77490&view=findpost&p=823130) ) when foobar wasn't colligated with only one core and it could use all six cores of my CPU, then average CPU usage by foobar2000 process was around 66% with maximum of  74%. Wave seekbar is configured to concurrently process 4 tracks (same is prevoius test, when foobar utilized only single core). CPU was quite hot before I speeded up my cooler (61*C)... Just for develeoper information
Title: foo_wave_seekbar
Post by: Pixel Eater on 19 February, 2013, 07:35:37 AM
Are screenshots working now? I can't seem to find the files actually turning up anywhere. Certainly not in My Pictures or the song's directory.

EDIT: My bad, I just remembered this only works with Direct3D. Since I'm on a new Win 8 install it took me a minute to remember you literally have to install Direct X to enable this.
Title: foo_wave_seekbar
Post by: EpicForever on 21 March, 2013, 09:06:57 AM
I have one small sugesstion/request.

Zao - could you add another "display downmix" option? Currently we have "downmix display to mono" - could we have "downmix display to stereo (2ch)" additionally? It will be nice option for those, who often listen to multichannel tracks on headphones, and thus use "downmix multichannel to stereo" DSP plugin.
Title: foo_wave_seekbar
Post by: Zao on 22 March, 2013, 12:58:46 PM
Version 0.2.30 released today should have a dropdown adding downmix-to-stereo. As a bonus unrelated change, it also scans tracks way faster than previous version.
Title: foo_wave_seekbar
Post by: lvqcl on 22 March, 2013, 01:11:37 PM
http://www.foobar2000.org/components/view/foo_wave_seekbar (http://www.foobar2000.org/components/view/foo_wave_seekbar)

0.2.30, released on 2012-03-22
Title: foo_wave_seekbar
Post by: Zao on 22 March, 2013, 02:57:12 PM
 The digest in my mailbox was confusing, as there's no formatting in those.
Title: foo_wave_seekbar
Post by: EpicForever on 22 March, 2013, 03:40:50 PM
Thanks Zao
I got one question... How procedure of downmix is prepared in your plugin? Why I am asking: stereo display of 6ch/24bit/48kHz FLAC files ripped from DVD-A tracks look on downmixed display like they were clipped during nearly whole track... Like 0 dBFS was reached at one point and held during 30 sec. for example. Foobar's Peak Meter shows the same thing. Peaks reach up to +6 dB... But audio doesn't sound like it was clipped at any point of time... Does it mean that both visualisation routines doesn't work properly or is there something that I miss about 5.1 downmixing or 24 bit FLAC decoding?
Title: foo_wave_seekbar
Post by: Zao on 22 March, 2013, 05:32:20 PM
The coefficients used to mix-down can be found in the source code (https://github.com/zao/foo_wave_seekbar/blob/master/waveform_sdk/Downmix.h#L10) for that functionality.
They are scientifically taken from thin air, and might not quite match the "typical" downmix of many-channel content.
What it does is mix all the channels into left channel based on the coefficients, and similarly all the channels into the right channel. If mono is requested, the resulting stereo image is simply averaged.

What you have to realize is that you're asking for some sort of approximation of the original signal, and if you want to preserve energy in the mixdown, there's more energy in six channels than two. Feel free to contribute "better" mixdown matrices.
The following are the matrices for mixing from {mono, stereo, 4ch, 5ch, 5.1ch, 7.1ch} to stereo. The mono transformation is the same, but averaged at the end.

(https://hydrogenaud.io/imgcache.php?id=0819d0173f930ee56755582268de7b8f" rel="cached" data-warn="External image, click to view at original size" data-url="http://www.acc.umu.se/~zao/mixdown.png)
Title: foo_wave_seekbar
Post by: Propheticus on 22 March, 2013, 07:03:39 PM
I think above matrices are about right. A gain of 0.7 (root(1/2)=~0.7) is common.
My only concern is the 1 for LFE in both left and right downmixed channels. You're effectively doubling the low frequency channel, since normally this only gets fed to one sub-woofer.
I'd suggest completely ditching this channel all-together as normal stereo speakers/headphones can hardly produce sub-bass anyway. At the very least attenuate it by 3dB, cutting perceived volume in half to compensate for the fact you're using the LFE channel twice.
Title: foo_wave_seekbar
Post by: EpicForever on 22 March, 2013, 07:30:28 PM
Hmmm... Yes, coeffs are generally OK and conform with old ITU-R-BS775-1 for 6 ch (except LFE coeff - as noted by Propheticus). But something like "volume normalisation" should be used to avoid "clipping" on displayed waveform that isn't present in the reproduced sound. I mean that values of displayed waveform should be calculated as (raw values calculated from coefficients) divided by (maximal value calculated in whole file).
Title: foo_wave_seekbar
Post by: marc2003 on 23 March, 2013, 08:31:48 AM
i was just listening to a song and i noticed the waveform was blank. previous and next tracks in the playlist were ok so i went back to the track with the blank seekbar and it still wouldn't show.

i went to close foobar for a restart, but it just hung. i checked with process explorer and found it eating all the CPU.

(https://dl.dropbox.com/u/22801321/2013/march/wave%20seekbar.png)

not sure if you can do anything because i've killed the process now but i thought i'd mention it. there's nothing special about the track. it's just FLAC encoded from a normal CD. using latest component/foobar2000 1.2.4beta3/windows 7 x64.

after the restart, it now displays fine.
Title: foo_wave_seekbar
Post by: Zao on 23 March, 2013, 10:13:21 AM
There's min(cores,3) processing threads (by default) that act on tracks in a largely queue-like manner.
Files are added to it if:

The processing threads loop around (efficiently), picking tracks from the front(ish) of the queue, and once it has picked one, decodes and processes it from start to end.
They honor an abort callback raised at shutdown time whenever actively decoding, so your screenshot indicates that there's two threads that are stuck scanning some file(s), and these are most probably not the file that you're observing is missing a waveform, that's just a victim of a queue that never drains.
There's only one place in the analysis code where it could wedge like this, and it's one that I had to touch in the last speed optimization. Blargh.
Title: foo_wave_seekbar
Post by: marc2003 on 23 March, 2013, 10:31:41 AM
i'm guessing it's irrelevant but i forgot to mention i have downmix to mono enabled.

i've just been trying to abuse it by opening a playlist of files that are all 1-3 hours long and i'm skipping tracks/order and there is no problem at all.
Title: foo_wave_seekbar
Post by: Kasen on 23 March, 2013, 10:52:24 AM
My waveform seekbar was working fine up until today, when I tried to change the colours. Now, when "Mix-down to mono" is selected the seekbar is just the blank background colour; with no waveform, current time bar or highlight. Changing to "Mix-down to stereo" or "Keep as-is" everything displays fine, but I want the mono display. I tried updating to the latest version (0.2.30) and it hasn't helped. I tried changing the colours back to what they were, no colour combination is working. Any ideas?
Title: foo_wave_seekbar
Post by: derty2 on 23 March, 2013, 11:22:42 AM
I'm using foobar2000 v1.1.7 | foo_wave_seekbar 0.2.30 | OS: Windows XP SP3 | CPU: Intel Core 2 Quad Q9550 @ 2.83GHz | Memory: 4GB, 400MHz (DDR2 800)

I started playback of an album containing 11 tracks (24bit/96kHz FLAC)

Process Hacker (my task manager program) was showing red, indicating heavy CPU load caused by this process/thread:
(https://hydrogenaud.io/imgcache.php?id=b077d54072aa182bf3b6cdce29b54358" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/2J2EdlH.png)

I waited up to 10 minutes to see if CPU load would subside, but it did not!

CPU is continuing to hover at 25% even as I post this. This component has had plenty of time to scan and should not be using up 25% CPU indefinitely!

P.S. -- This waveform seekbar visualization lives in its own tab in my foobar2000, and the tab was not even active/showing when all the above was happening!

*EDIT*

30 minutes playback time has passed and 25% CPU usage continues . . . .
so I decided to click the "Stop" button, and track stopped playing . . . .
I then tried exiting fb2k by pressing the top right [X] button . . . . all foobar2000 exit functionality was immediately frozen and unusable!, in fact foobar2000 froze TOTALLY!, in fact other open windows are now being frozen and my desktop graphics are going to the dogs! . . . I am dragging an open notepad window around the desktop and it is leaving ghost images everywhere . . . I killed explorer.exe but it made no difference to the corrupted open windows . . . . BAD BAD CRASH! . . . I have one final quick look at foobar2000.exe process in Process Hacker before I "terminate" it . . .and CPU usage is frozen solid at 25% !!!!
Title: foo_wave_seekbar
Post by: Zao on 23 March, 2013, 11:39:23 AM
Analysis is a background task, and takes the opportunity to analyse files it doesn't know about when it finds out about them.
If you're afraid of it stealing your precious cycles, it runs with idle priority so the scheduler will never preempt something else to perform it.

The problem here isn't that it's scanning, that's a natural state of existence. The problem is that the scan is slightly broken and never terminates for some tracks.
Title: foo_wave_seekbar
Post by: gundelgauk on 23 March, 2013, 11:51:11 AM
I'm also having a problem with CPU load since updating to 0.2.30. With certain audio files no seekbar is displayed and at least one CPU core spikes to 100%, stays there and never finishes. The Foobar process then has to be stopped by force.

For me this has only occurred with FLAC files so far and not with mp3 or ogg (at least so far). Also, not all FLAC files show this problem, only certain ones. The screenshot shows the properties of one such file. Most other files of the same album do not have this problem, however, only some.
(https://hydrogenaud.io/imgcache.php?id=741178dc013fd403b7dbccb8c81e1f12" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/T1IQuer.png)

I have also tried deleting the waveform database file but that didn't seem to help. Any way we can help finding the problem?
Title: foo_wave_seekbar
Post by: Zao on 23 March, 2013, 11:57:14 AM
For you lads that get eternal scans, version 0.2.30.1 (http://www.acc.umu.se/~zao/foo_wave_seekbar-0.2.30.1.fb2k-component) should hackfix this.
Please test this and report back so I can push it live.
Title: foo_wave_seekbar
Post by: gundelgauk on 23 March, 2013, 12:18:44 PM
Thank you, Zao, I've tried one problematic file with 0.2.30.1. I still get an eternal scan and 100% core usage with the file but I've noticed one difference: when the CPU spikes, foobar can now be closed normally without killing the process.

(https://hydrogenaud.io/imgcache.php?id=06cd599ca8c7d220ef53e8e4480d3637" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/2aOHPhS.png)

Is there any way we can get you more information that may help?
Title: foo_wave_seekbar
Post by: derty2 on 23 March, 2013, 12:29:15 PM
Thanks for the prompt update Zao ++++++++++

I'm using the exact same configuration as (Post #1191) before . . . everything is running nicely! . . . CPU load is trivial now! . . . good fix +++++
Title: foo_wave_seekbar
Post by: marc2003 on 23 March, 2013, 01:48:49 PM
thanks for the update.
Title: foo_wave_seekbar
Post by: marc2003 on 23 March, 2013, 06:12:11 PM
unfortunately it's still very broken. it's rarely displaying waveforms for anything now and the CPU is being munched as before. the only difference is that i can close foobar normally. same as gundelgauk above really.

edit: i note the problem seems to start with very quiet tracks. if i start foobar with a problematic file as the only entry in the playlist. there is no CPU usage. i then start playback and the CPU usage jumps to max but there is no mention of any attempt to scan the file in the console. if i restart foobar and start playing a louder track, it behaves as normal and shows what it is doing in the console.

an example of a track that won't scan and causes the silly CPU usage. http://www.youtube.com/watch?v=IA0cjNTHlro (http://www.youtube.com/watch?v=IA0cjNTHlro)

edit2: saying it's very broken was a bit harsh.  after some more testing i can confirm it's definitely quieter tracks causing the issue. after a restart, playing normal tracks is fine.
Title: foo_wave_seekbar
Post by: gundelgauk on 23 March, 2013, 07:49:36 PM
marc2003, that seems to be an interesting discovery about quiet files, since my current test file is also rather quiet. However it gets a bit louder at the end (orchestra kicks in). Also, the track just before my problem file is even more quiet and does not show this problem. The waveform for it was generated very quickly with 0.2.30.1 and no noticeable CPU spike. So I'm not entirely convinced if the problem is only caused by quiet files, no offense meant.

Screenshot 1 is the waveform of the problem file.

(https://hydrogenaud.io/imgcache.php?id=ce7a6c38183f9184f806045103c8b367" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/KJq7cTz.png)

Screenshot 2 is the waveform of the track before it on the same CD, which scans normally.

(https://hydrogenaud.io/imgcache.php?id=9123a86c75502c9682fcff38085c50e9" rel="cached" data-warn="External image, click to view at original size" data-url="http://i.imgur.com/KH0N48e.png)
Title: foo_wave_seekbar
Post by: Zao on 23 March, 2013, 07:56:00 PM
As in that muxed MP4, or some rip of that track?
Title: foo_wave_seekbar
Post by: marc2003 on 23 March, 2013, 08:01:59 PM
if that question is for me about the youtube clip, my original file is FLAC which i encoded myself from CD. i just searched youtube for the same song. its creation has nothing to do with me.

edit: 20 second sample here: https://dl.dropbox.com/u/22801321/2013/marc...ing%20More.flac (https://dl.dropbox.com/u/22801321/2013/march/04.%20Nothing%20More.flac) (1.9MB)

@ gundelgauk, it seems i was a bit premature with my theory. i'm still getting the odd "normal" track which won't scan but then does on a restart. it's all a bit random really.
Title: foo_wave_seekbar
Post by: gundelgauk on 23 March, 2013, 08:15:23 PM
i'm still getting the odd "normal" track which won't scan but then does on a restart. it's all a bit random really.

I agree. While I was trying other files, I noticed that even files which scan and generate waveforms properly can cause one CPU core to spike and stay at 100% for me. This happens with MP3 and OGG as well as FLAC, at least for me. I also tried some "exotic" files like NSF and SID. Those cause more CPU cores to stay at 100% even though waveforms are generated, possibly because of multiple embedded tracks which are scanned in multiple threads (only speculation on my part)?

[EDIT]I tried your sample file. It does not generate a waveform with 0.2.30.1 and sends three cores through the roof for me.[/EDIT]
Title: foo_wave_seekbar
Post by: Zao on 23 March, 2013, 08:31:49 PM
That sample reproduces the problem here indeed, it's related to the format and length of the file. It gets stuck in a twilight zone where the sample generator thinks it has emitted enough samples, while the consumer still lacks a few thousand samples.
Title: foo_wave_seekbar
Post by: derty2 on 24 March, 2013, 01:14:42 AM
I tested the sample file from marc2003 . . .

Yes it breaks my foobar000 too. The waveform doesn't render and the CPU shoots to 25% and stays there permanently. The rest of foobar2000 is still usable and does not crash this time, however if I stop playing the marc2003 sample track and change playlists and start a new track, the CPU usage continues at 25% . . . . . . . in fact, I tried restarting foobar2000 and played a track, but CPU usage spiked to 25% again.

The offending sample needs to be permanently removed from any playlist to bring foobar2000 back to normal. . . . . Nope that doesn't work either! The offending track has caused foobar2000 CPU usage to permanently spike up to 25% no matter how many times I restart, no matter if I delete the track from all playlists.

Eventually, all went back to normal only when I did this: exit foobar2000, delete the track from my computer, start foobar2000.
Title: foo_wave_seekbar
Post by: Zao on 24 March, 2013, 02:42:32 AM
derty2: In order to let you restart foobar2000 freely when there are background scans in progress, the component helpfully stores the pending scans in the database, and restores the queue on startup. Normally this is desired behavior, and if you really don't want a job, you can close foobar2000, delete the offending job in the database with some surgery, and restart. There is way too much work to make a scan queue management interface, when the normal usage pattern has nothing that needs one.

Anyway, I've just uploaded 0.2.31, which handles all known problem tracks properly, by taking some morning hours to rewrite the offending snake's nest of code.
Title: foo_wave_seekbar
Post by: gundelgauk on 24 March, 2013, 03:56:32 AM
That's great work, Zao. I can confirm that for me the problem does not occur with marc's and my FLAC files. That also includes MP3 and OGG files which would generate a waveform but still cause permanent CPU usage. Thanks!

Some quick testing revealed that it still occurs with a SID (C64) file, however a NSF (NES) file works. But normal audio files seem to work perfectly. Thanks again!

[EDIT]Somehow I got foobar to crash by playing a midi file. Then after restarting foobar, it would crash on playing any file. Clearing the playlist in safe mode and deleting the waveform DB did not help. After uninstalling the component, deleting the DB and reinstalling the component it works normally again. I guess I just shouldn't play such strange files. [/EDIT]
Title: foo_wave_seekbar
Post by: EpicForever on 24 March, 2013, 03:58:16 AM
I got exactly the same situation like derty2 with marc2003 sample... When I restart foobar it opens the handle for this file, despite it isn't on any playlist nor in Library, and it continuously uses 17% of my CPU. That's exactly 1/6 of six core Phenom... In a minute I will try 0.2.31 to check it.

EDIT:
At least with marc's FLAC iv. 0.2.31 works 100% OK. I haven't noticed any file from my own Library that exposed such behaviour, as I forced foobar some time ago to calculate all seekbar signatures at one time  . I went to a job, and foobar did the thing when I was out
Title: foo_wave_seekbar
Post by: marc2003 on 24 March, 2013, 05:36:59 AM
rather bizarrely, the 20s sample still doesn't work for me. <<oops, i just remembered i have it configured not to scan waveforms outside my library. 

but the full length track does and that's all that matters. i've also tested the quietest track i can think of and that is also fine.

thanks for all your work Zao.
Title: foo_wave_seekbar
Post by: gundelgauk on 24 March, 2013, 05:51:57 AM
I actually got very curious so I tried to compile the component myself to be able to debug it. But I'm inexperienced with VS and after installing boost I found out that VS Express does not have ATL so I'm kind of stuck. Too bad, it seemed like a very interesting problem.

It works well enough with the latest version, so thanks again for your work!
Title: foo_wave_seekbar
Post by: Zao on 24 March, 2013, 01:36:42 PM
gundelgauk: Good luck with that, it was never planned for independent building, so it's kind of tied to my SDK directory and system-installed libraries.
I don't think I have modified the SDK or the Boost too much, but I can't be sure, my system install is shared between a bunch of projects.

The dependencies are pretty much:
In particular, June 2010 won't do, as there's bugs in the shader compiler.
The VS 2010 dependency is because all those filthy XP users won't stop crying if I migrate to 2012 and drop XP support 
Title: foo_wave_seekbar
Post by: lvqcl on 24 March, 2013, 02:56:31 PM
AFAIK MSVS 2012 Update 1 does support Win XP
Title: foo_wave_seekbar
Post by: Zao on 24 March, 2013, 03:00:38 PM
The v110_xp toolset is not usable in my world. For starters, Boost.Build will not ever target it, and it has lots of hidden caveats and is not as tested as a real compiler.
Not to mention that it doesn't _gain_ you anything but a slightly newer and untested mutilation of the toolchain. It's still using a bastardised WinSDK7.

To be really honest, I cannot trust a toolset that they put out in a hurry because people got their panties in a twist over not being able to target an EoL:d OS.
Title: foo_wave_seekbar
Post by: gundelgauk on 24 March, 2013, 03:15:03 PM
Zao, thanks for elaborating. It looks like I won't be able to set up a build environment in a reasonable time then, especially with not much VS experience. As an alternative, would it be possible for you to include debug information in a build or something, so that we can get you more helpful info with a standalone debugger or something to that account? It's just that I used to be able to play anything in foobar with your waveform seekbar up until recently and now that I seem to have problems with some file types, I really miss it.
Title: foo_wave_seekbar
Post by: EpicForever on 24 March, 2013, 03:56:26 PM
Zao - as I said before I think that there should be "normalization" applied (division every point of seekbar waveform by maximal value calculated in whole file) to waveform when it's downmixed to stereo. If my file was looking really like this:

(https://hydrogenaud.io/imgcache.php?id=7f3918e52f8be043d53a8a217c4c8321" rel="cached" data-warn="External image, click to view at original size" data-url="http://img189.imageshack.us/img189/2522/mmmmmnx.png)

it would be absolutely unlistenable (especially at the end).

The same file, after conversion to 2ch FLAC with Converter and "Downmix 5.1 to stereo" DSP enabled gives completely different waveform:

(https://hydrogenaud.io/imgcache.php?id=7f8557861e7f26008ac306c8bf5dc3a0" rel="cached" data-warn="External image, click to view at original size" data-url="http://img585.imageshack.us/img585/3556/nnnnne.png)

And this is listenable... And This is how I expect to Waveform Seekar look in "Downmix to stereo" mode, when I play regular 5.1 version. Of course I understand that accuracy may be limited, but definitely it isn't diplayed properly at this time.
Title: foo_wave_seekbar
Post by: Zao on 24 March, 2013, 04:06:56 PM
I will never normalize, as that destroys information as to the actual signal level of the waveform. If you want that, the best I can provide is a min/max parameter to the effects so that they may normalize.

The fundamental problem is two-fold.
The optimistic extraction means that I probably introduce some additional energy into the waveform.
I could try to use the standard DSP if present, but I doubt it'd do much good at this stage.
Title: foo_wave_seekbar
Post by: EpicForever on 24 March, 2013, 04:31:24 PM
Hmm... You are right about normalization performed on every waveform. This will destroy component functionality. Maybe it would be possible to trigger normalization only when there are 2 conditions met: source signal has more than 2 channels and user has chosen "downmix to stereo/mono" display mode? Or maybe it is possible to check how "Downmix 5.1 to stereo" DSP performs calculations of final track level, and use it to downmix final waveforms to resulting "downmixed" one ?

When I complain about functionalities of certain components I recall someone's forum signature... "This job would be great if it wasn't for the users." Haha... Peter is right. Good for me I am not programmer - I don't have to listen others complaints. Bad for me I am not programmer - I have to rely on others good will, free time and skills...
Title: foo_wave_seekbar
Post by: Zao on 24 March, 2013, 05:14:53 PM
I cannot reproduce any failure to scan with the test files I have for MID, MOD, NSF.
Whoever fails to analyse these, please provide files.

Edit: I got a repro on SID, yay.
Title: foo_wave_seekbar
Post by: Zao on 24 March, 2013, 05:36:19 PM
... include debug information in a build or something, so that we can get you more helpful info with a standalone debugger or something to that account ...

For a given release foo_wave_seekbar-X.fb2k-component, there's an archive of the debug symbols at http://www.acc.umu.se/~zao/foo_wave_seekbar-X-archive.fb2k-component, as an off-site backup. They should match the corresponding tag in the Github project.
Title: foo_wave_seekbar
Post by: Zao on 24 March, 2013, 05:46:39 PM
For all you LFE lads, there's 0.2.32 now, which drops the LFE channel on the floor. If you want to see it, don't use downmixing.
This release also fixes an accident in RMS computation which I didn't spot as I don't visualise RMS myself.
Title: foo_wave_seekbar
Post by: gundelgauk on 24 March, 2013, 05:59:21 PM
Wow, Zao, I don't know what you did but this is awesome. I just finished uploading some midi, mod and other files which caused crashes when I saw the new version. Now with 0.2.32, these crashes are gone and waveforms are generated normally. So far I could only find one file which still seems to cause high CPU load. It's a SID file, I'll send you a message with a link.

Thank you very much! It seems I can listen to all my weird stuff with waveform seekbars again!

Also, thanks for the hint about debug symbols.
Title: foo_wave_seekbar
Post by: Zao on 26 March, 2013, 09:15:39 AM
This should probably resolve your SID issues, turns out that my component brings out the worst in others 

foo_sid version 1.30 highlights: Fixed a race condition which affected starting a batch of conversions or wave seekbar scans without starting a single track for playback first.
Title: foo_wave_seekbar
Post by: tiptoetan on 26 March, 2013, 05:06:15 PM
hello and sorry for asking probably not something very very related - personally I found wave_seekbar really really useful - I use foobar + wave_seekbar to somewhat come closer to programs like vdj for basic dj-ing. there are various reasons for this and they are off-topic.. what I miss most and can't find any plugin to do is to insert custom mix points on the run - wave_seekbar helps to identify visually the place to start, and if you are fast enough, with long crossfade enabled you can skip lengths by clicking - but wouldn't it be great to be able to set track start point visually before activating it for play? I know this is quite beyond the reasons why wave_seekbar exists, and would probably call for another plugin entirely, possibly basing on wave_seekbar... but - was just wondering.. it would be interesting to hear your thoughts on the matter... thank you.
Title: foo_wave_seekbar
Post by: Dario on 27 March, 2013, 06:49:58 PM
There is something terribly wrong with this component. It was undoubtedly caused by the recent updates. Waveforms disappear randomly, tracks display wrong waveforms (for example, the second track of an album, when player after the first, displays the waveform of the first track)...
Title: foo_wave_seekbar
Post by: Propheticus on 27 March, 2013, 07:08:40 PM
Having no such problems here with the latest version. Maybe another component or settings causes this?
Title: foo_wave_seekbar
Post by: Manchesterer on 28 March, 2013, 02:48:51 AM
+1 for problems with latest update (0.2.33) - files (mp3) added to the library after component update have no waveform, trying to extract seekbar signature manually also does not help. Some waveforms appear after few plays, only to disappear on the next play.
Title: foo_wave_seekbar
Post by: Zao on 28 March, 2013, 03:45:55 AM
Dario, Manchesterer: Unlike in what version? 0.2.32? 0.2.31? 0.2.ancient? Kind of hard to pinpoint what might've gone wrong, if anything, if there's no baseline version to compare against. Give me something to work with here, previously working versions, OSes, components installed, frontend used, anything. Is the console so blank and boring that you both omitted it?

I'm not psychic, you know.

As for "second track displays the first waveform", the previous displayed waveform remains until the next one can be retrieved, IIRC.
Title: foo_wave_seekbar
Post by: EpicForever on 28 March, 2013, 03:51:45 AM
I got no problems with latest (.33) version of wave_seekbar even with files that are played through problematic foo_input_zxtune. Everything seems to be OK.
Title: foo_wave_seekbar
Post by: Manchesterer on 28 March, 2013, 04:07:04 AM
Dario, Manchesterer: Unlike in what version? 0.2.32? 0.2.31? 0.2.ancient? Kind of hard to pinpoint what might've gone wrong, if anything, if there's no baseline version to compare against. Give me something