HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: Case on 2018-05-29 16:37:40

Title: Waveform Minibar (mod)
Post by: Case on 2018-05-29 16:37:40
A spin-off topic for foo_wave_minibar_mod from the original Waveform Seekbar (https://hydrogenaud.io/index.php/topic,77490.0.html) topic.

The component is downloadable for foobar2000 v1.4 series from the official repository (http://www.foobar2000.org/components/view/foo_wave_minibar_mod) and from my homepage (https://foobar.hyv.fi/?view=foo_wave_minibar_mod).
A version with statically linked C runtime for foobar2000 v1.3 is available here (https://foobar.hyv.fi/pre1.4/?view=foo_wave_minibar_mod).

This component shows a software rendered waveform for the playing track or optionally for the selected track. The waveform representation looks prettier than a static seekbar and often makes seeking to desired position easier.

Some differences to original components include the ability to start playback from the stopped state instantly just by clicking on the waveform and possibility to jump to a timestamp in another track just by viewing its waveform and clicking on it.

The latest version 1.0.14 that was just uploaded introduced an option to reverse the mouse wheel seeking direction.
Title: Re: Waveform Minibar (mod)
Post by: Hillfire on 2018-05-30 05:23:22
Thanks, Case
I just updated.
Waveform Seekbar is one of the best of foobar component to me.
Title: Re: Waveform Minibar (mod)
Post by: Nighted on 2018-05-30 06:23:23
Thanks for the reverse scroll option. Loving the mod even more now. Couldn't live without this.

(https://i.imgur.com/rsjSuZ6.png)
Title: Re: Waveform Minibar (mod)
Post by: nathanial on 2018-05-30 16:40:11
Excellent component! I have replaced the stock seekbar with this and am greatly enjoying it.

I have noticed that the rendered waveforms are saved and re-used. Where are the waveforms being saved? I had a brief look through the foobar2000 folder but couldn't find anything.
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2018-05-30 16:47:15
The waveforms are stored in the file minibar.db in the foobar2000 folder.
Title: Re: Waveform Minibar (mod)
Post by: BeLu on 2018-06-01 13:47:25
Beautifu!!!! Thanks a lot!

Is there a way to replace the seekbar in the tool-bar by the minibar? (Apologies for soo many 'bars')


Bernd
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-01 16:47:57
Unfortunately that is only possible when using Columns UI.
Title: Re: Waveform Minibar (mod)
Post by: EpicForever on 2018-06-02 09:29:13
Alternatively (in CUI) you can disable seekbar in toolbar and place waveform seekbar right below toolbar, as separate UI element. This is what I was doing some time ago. But now I just moved it to the bottom of window and made it much larger.
Title: Re: Waveform Minibar (mod)
Post by: BeLu on 2018-06-02 16:09:30
 :(
Thanks anyway!

Bernd
Title: Re: Waveform Minibar (mod)
Post by: Paul Eye on 2018-06-05 15:49:35
Thanks for the reverse scroll seeking, one thing that always bothered me with the original Waveform Seekbar :)
Could you add an optional stereo waveform?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-05 16:07:18
Is that really useful? In vast majority of my music the channels are so similar that separating them makes no sense. And to see any details the seekbar needs to use twice the space. Also currently the database stores downmixed content. Enabling stereo mode would require nuking existing data and rescanning everything.

I'd prefer not adding such option.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2018-06-05 16:24:48
When making the original minibar, a design choice I took was that it should only deal with downmixed audio and be as simple as possible with no excessive frills. I like that Case is continuing with that policy for his modified variant.

If you're playing audio with dissimilar channels like chiptunes or tracked Amiga music and really need the channels, there's always the stable-and-boring foo_wave_seekbar with all its complexity.

It's never been the goal of any of the components to fully represent the underlying waveform, as it's so extremely downsampled that everything visualised is a bit abstract to begin with. If you want to see the actual waveforms, I recommend Audacity or CoolEdit96.
Title: Re: Waveform Minibar (mod)
Post by: EpicForever on 2018-06-05 19:22:07
When making the original minibar, a design choice I took was that it should only deal with downmixed audio and be as simple as possible with no excessive frills. I like that Case is continuing with that policy for his modified variant.

If you're playing audio with dissimilar channels like chiptunes or tracked Amiga music and really need the channels, there's always the stable-and-boring foo_wave_seekbar with all its complexity.

It's never been the goal of any of the components to fully represent the underlying waveform, as it's so extremely downsampled that everything visualised is a bit abstract to begin with. If you want to see the actual waveforms, I recommend Audacity or CoolEdit96.

Amen.
Title: Re: Waveform Minibar (mod)
Post by: Paul Eye on 2018-06-05 21:41:26
Is that really useful? In vast majority of my music the channels are so similar that separating them makes no sense. And to see any details the seekbar needs to use twice the space. Also currently the database stores downmixed content. Enabling stereo mode would require nuking existing data and rescanning everything.

I'd prefer not adding such option.
Okay, fair enough :)
I'm just used to the stereo waveform of the original Seekbar, and I have a mono waveform now in the same (quite large) space as I had the stereo waveform (I might need to reduce the height a bit now).
Still the most important feature here is the reversed mousewheel seeking; I'll take functionality over form :)
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-06-14 09:44:08
I have a question - since Waveform Seekbar scans files at the beginning it creates very useful data to apply volume gain to real audio. Is it possible to use it in that way, to normalize music tracks?  By another plugin or ReplayGain? In theory at least...
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2018-06-14 10:39:59
The analysis is very crude.

It makes one pass across the audio data, splitting it into a few thousand sections. Each of those sections has min/max values and a rudimentary measure of energy computed.

While it could technically be possible to integrate a RG/R128 scan with the existing analysis pass, there's no point really. Just decode the files twice, once with the minibar and once with whatever RG scanners you have.

As for the waveform data itself and its min/max values, it's not exposed to any other components. I considered doing so with the `foo_wave_seekbar` component, but never really bothered. (Fun fact, it used to be two separate components, a database and an UI element.)

For the minibar and some hypothetical normalization component, that's up to Case to decide. I would just recommend using ReplayGain like the rest of us :D
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-06-14 11:06:44
Unfortunately Protracker tunes are RG incompatible :)

I'm aware of algorithm simplification and I don't expect studio precision. But observing huge differences in some material I listen to now Waveform Seekbar display seems to give more or less accurate information about the general level of particular tracks. While leaving  some safe overhead and sacrificing couple of trimmed peaks here and there it could be away to boost some really quiet tracks.

I think having couple of numbers exposed outside could open doors for some experiments.

Anyway - since I discovered it I find Waveform Seekbar one of the most useful things while checking a lot of audio material (not necessarily a musical one) so thanks to all you guys involved in creating it.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-14 12:06:20
Sure it would be theoretically possible. But the functionality is not something I'd put in the seekbar component. Also the database format isn't optimal for that as you'd still have to parse thousands of values to find the peak.

I haven't looked into the m-TAGS (https://www.foobar2000.org/components/view/foo_tags) component but shouldn't that allow storing ReplayGain data in external file? If it doesn't, I think it would be possible to make a component that allows storing any tag data in a database or external files.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-06-14 14:20:32
No, sure I wouldn't like to put any additional burden onto this plugin. I'm just talking about exposing data that's already there (if it is there).

m-TAGS stores meta data in it's own files but in order to apply RG you need to scan all files to create m-TAGS files, then put those files into the playlist and then scan them with RG. It is a little bit of a hassle if I'm doing it right :)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-14 20:30:45
@no9 , if you are on foobar2000 v1.4 beta you can test my latest experiment. A simple component that allows writing external tags to any file format.

Once you install it verify decoder preferences so that "External Tags (reader)" is the first decoder and "External Tags (writer)" is the last, like this:
(https://i.imgur.com/4Xz9xjH.png)

If the writer part is before other decoders, it will write external tag to formats that wouldn't need it. Should cause no other harm.

The external tag is written to the location the source file is at with ".tag" appended to its name. If something already exists by that name it will be overwritten.

Edit: Removed attachment.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-06-14 21:14:34
Checked. It works flawlessly. Thank you very much Case!
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-16 13:43:37
I removed the earlier attachment as I released the External Tags (http://www.foobar2000.org/components/view/foo_external_tags) component on the repository (and on my site (https://foobar.hyv.fi/?view=foo_external_tags)).

The new version also supports tagging subsongs.
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-06-16 20:52:31
Hi!
@Case, I tried your new component and I was able to edit the xm module tag. Thank you for your work!
Is it possible to work with packed files (zip, 7z or rar)?
I think most people (including me) store a music modules collection (for example) in packed form.

Thanks.
Title: Re: Waveform Minibar (mod)
Post by: スラッシュ on 2018-06-17 02:07:25
This is great, thank you so much for this component! I was wondering if it would be possible to use "follow cursor" mode when foobar is not playing, and "follow playback" when it is playing?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-17 12:03:32
I started a new topic for External Tags (https://hydrogenaud.io/index.php/topic,116141.0.html). Hopefully some moderator moves related posts there.

Is it possible to work with packed files (zip, 7z or rar)?
I changed the component to allow tagging files in archives.

I was wondering if it would be possible to use "follow cursor" mode when foobar is not playing, and "follow playback" when it is playing?
Sounds like a decent idea. I'll add it for the next version.
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-06-17 15:03:29
I started a new topic for External Tags (https://hydrogenaud.io/index.php/topic,116141.0.html). Hopefully some moderator moves related posts there.

Is it possible to work with packed files (zip, 7z or rar)?
I changed the component to allow tagging files in archives.
Dear @Case, I tested new version with zip and rar archive xm modules for edit tag - that works perfectly!
Maybe it be better to create a tag file inside an existing archive? but it's already good  :)
With pleasure I will wait for your new codes.

Thanks.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-17 17:57:37
For that it's best to extract the archive, tag, and re-compress with the tag files.
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-06-17 18:54:00
For that it's best to extract the archive, tag, and re-compress with the tag files.
Yes, it is quite suitable for me.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-06-18 16:16:06
Possibility to disable and enable rendering without removing it from interface would be great. It is a bit annoying when you jump quickly from one track to another and have to wait until plugin process all the data.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-18 20:47:59
I was wondering if it would be possible to use "follow cursor" mode when foobar is not playing, and "follow playback" when it is playing?
Possibility to disable and enable rendering without removing it from interface would be great.

New version uploaded with these features implemented. The ability to halt processing is found under the Library menu.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-06-18 21:25:06
Perfect!
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-06-21 20:36:52
@Case, I tried your new version by Waveform Minibar (mod) 1.0.15 (https://www.foobar2000.org/components/view/foo_wave_minibar_mod). The component progress is visible.
It's strange that you didn't react to this: Reply #2166 (https://hydrogenaud.io/index.php/topic,77490.msg957899.html#msg957899). Maybe you just didn't see this message.
Please could you comment on the possibility of implementation.

Thanks.

Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-06-22 09:16:23
I saw it but I had nothing to comment.

Empty UI elements suck but these components are waveform seekbars, not spectrogram visualizers. If I used streaming audio more than to quickly test something, I'd probably be more willing to hack together something.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-07-02 07:00:45
@Case Can you store 'halt minibar processing' setting?
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-07-02 09:05:02
One more thing: is it possible to render waveform of currently played track when processing is turned on (unhalted)?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-02 11:46:59
I thought the stop switch was for temporary use? Its state can be stored but I worry about people accidentally toggling it and then wondering why even restart doesn't fix things.

Showing results from the cache during halt is possible. I'll implement it for the next version.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-07-02 12:25:09
I thought so too, but after a couple of days of using it I found turning it on and off when needed is very handy (I placed button in the toolbar for that). And it's even not an issue since Foobar is restarted only when new components update require it, and on system startup, so not so often. But having auto resume and auto play after Foobar2000 starts turned on makes every start/restart a bit longer and interface unresponsive for a moment. It is not a big deal but would be nice.
Thanks again.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-07-06 10:14:10
I found that rendering of currently played track can be triggered by clicking on it's file name with CTRL key. After unhalt.
Title: Re: Waveform Minibar (mod)
Post by: Dr.Fuzz on 2018-07-09 10:59:59
I love this mod! It's so fast and looks great. Thank you so much for all the work you put into it. The one thing I miss from the original waveform seekbar is the ability to display more than one channel, or even downmix the display to mono/stereo from surround/quad. I suspect the single wave display cuts down on resources, but if not, could it be implemented? Thanks!
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-10 13:21:34
The component downmixes everything to mono. It is not configurable and there are no plans to change that.
Title: Re: Waveform Minibar (mod)
Post by: gnd on 2018-07-10 13:36:28
Is there a way so that waveform would be displayed as a column in playlist? It would be a great way to see which files are low volume, or even which are corrupted with missing data. Is there a pattern that can be used as custom column?

Also, how to use on selected files [rightclick]/Utilities/Regenerate Minibar Waveform on files that do not have waveform yet? If I use it, it starts calculation "Regenerating Minibar Waveforms". It takes a long time so it is doing something for sure, but then waveforms are not there for selected files, and wavecache.db file is not updated after it is done. Only clicking on individual files generates waveform and updates wavecache.db file. Is it a bug or am I doing something wrong?
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2018-07-10 13:40:55
Playlist renderers typically have no ability to display non-text fields. Things like album art are dedicated features in the renderers.

For the seekbar, I've tried exposing metadata for which files have signatures or not, and it tends to be quite icky when you're not in control of the files yourself.

Make sure you're looking at the correct database file - wavecache.db is for my seekbar component, minibar.db is minibar mod's file, minicache.db is my original minibar.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-10 13:42:12
Wavecache.db is the database of the old Waveform Seekbar component. This component's database is stored in minibar.db.

One feature that may not be mentioned anywhere is that the scanned waveforms are only saved for tracks that are in the media library. If you test files outside library the waveforms won't pollute the database as they are only stored temporarily in memory.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2018-07-10 13:49:23
As a tangent, the components could technically have a service to rasterise a small image of a waveform for a sufficiently competent playlist renderer, or expose the waveform dataset for someone to use.

No such playlist renderers or panels exist, and it'd definitely be out of scope of the minibars, and I don't work on my seekbar anymore.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-14 12:03:27
New version uploaded that implements the features @no9 wanted. Additionally there's an experimental speed monitoring feature that aborts the regular waveform processing if the average decoding speed drops below realtime speed. Library sync and context menu scanning bypass the speed check.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-07-14 18:58:31
Thank you @Case. Now when it is halted the progress display disappears together with waveform. Great thing about Waveform Minibar is that whether it renders waveform or not for me it is still better seekbar than the default one. Ability to halt rendering is great when working on battery and in some other cases. Really handy now.
Title: Re: Waveform Minibar (mod)
Post by: Vicas on 2018-07-14 23:18:36
In the latest version few times randomly I got a strange behavior (pic attached).
Don't know what caused it, halt option wasn't enabled (I don't use it), and foobar was playing minimized to tray.
After I replayed the same song it started to show normally.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-15 08:09:08
It's probably related to the experimental feature I added. If your machine is busy and hasn't managed to decode one second worth of audio data after one second since decoder was opened, the scanning gets aborted. After that one second marker the check is constantly in use. If average decoding speed drops below realtime speed things get aborted.

You should find mention about the situation in the console. A message right after "Minibar scanning" line.

I added the feature as I had received email from someone with a slow computer telling the scanning can delay track change for ages while multitasking. He requested adding pauses for the scanning but I don't want to slow things down for everyone. My hope is that this feature serves him better.

But if you have a fast machine and it's not busy - yet waveforms fail to show - the feature is bugged.
Title: Re: Waveform Minibar (mod)
Post by: Lucidae on 2018-07-15 17:07:51
Thanks Case for this modification, it's been very responsive so far. I think I've discovered a bug;
In my current layout (DUI) I have the wavebar placed in the bottom half of a panel splitter. If I lock the panel height and then close foobar, the next time I start foobar the wavebar panel expands vertically by itself.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-16 10:16:12
Do you mean default splitters used in the DUI? Default UI calls UI pieces "elements", Columns UI uses term panels and has third party panel splitter(s) available.
The component scales itself to any panel size it is given and doesn't resize anything. If you think there's a bug somewhere I need more clear instructions.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-07-16 10:43:42
Hi again, maybe it was missed or poorly phrased by me so I'll try to rise this again: can we have progress display/cursor back visible while scanning is halted? Like in previous version. Now when halted it displays nothing.
Title: Re: Waveform Minibar (mod)
Post by: Vicas on 2018-07-16 13:21:52
If your machine is busy and hasn't managed to decode one second worth of audio data after one second since decoder was opened, the scanning gets aborted. After that one second marker the check is constantly in use. If average decoding speed drops below realtime speed things get aborted.

That was probably a reason. I think my machine was busy at time that happened. But it isn't really a big problem as it seems to happen very rarely so far.
Title: Re: Waveform Minibar (mod)
Post by: Lucidae on 2018-07-16 15:05:27
Do you mean default splitters used in the DUI? Default UI calls UI pieces "elements", Columns UI uses term panels and has third party panel splitter(s) available.
The component scales itself to any panel size it is given and doesn't resize anything. If you think there's a bug somewhere I need more clear instructions.

Yes I was referring to default splitters and elements, sorry for any confusion. I have sent you a private message with more details.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-16 17:12:39
Got the PM and reproduced the issue. A bug in foobar2000, I replicated the issue with native UI elements too.

Edit: bug reported to Peter.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-16 17:58:01
@no9 - new version uploaded that only disables waveform rendering. Previous version turned the render loop fully off so cursor had to be blanked or it would have stayed in one place.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2018-07-16 20:32:58
Everything is in the place now, so thanks again :)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-07-20 07:44:28
@Lucidae foobar2000 v1.4 beta 21 has a fix for the resize bug.
Title: Re: Waveform Minibar (mod)
Post by: Dandruff on 2018-07-29 23:04:44
Thanks for this component! Perfect!
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2018-08-14 07:06:21
I want to report a bug.
In Preferences | Display | Columns UI | Colours and Fonts | Colours is in the Element dropdown list an random entry showing up twice. This is, because the component Waveform Minibar (mod) is not returning a name and one of the existing names ends up getting reused instead.
See the complete discussion on GitHub reupen/columns_ui, Issue #137.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-08-14 19:14:27
Thanks, nasty bug been there since I added the automatic coloring. Fixed versions uploaded.
Title: Re: Waveform Minibar (mod)
Post by: lalldrin on 2018-08-24 15:49:07
Case and Zao, I love the waveform components. Thanks for the great work!

I just added Minibar to a tab in the bottom of my interface, right next to the original Seekbar. Minibar works perfectly, but right-click brings up no configuration options (it does with all the other components). I'm not in layout editing mode. I've restarted foobar2000. Is there some other way to access the config?

foobar2000 1.4, Windows 10
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-08-24 15:52:35
Minibar doesn't have per-instance configuration. If you use the mod version you'll find all options under "Tools" -> "Waveform Minibar (mod)" preferences page.
Title: Re: Waveform Minibar (mod)
Post by: lalldrin on 2018-08-24 16:57:05
Ahh--that's it! Thanks so much.

A suggestion: audio waveforms are often displayed in a logarithmic scale to more closely match the way our ears hear acoustic energy. Could you add a log scale display option? Waveforms would be much fuller.

Somebody already did the math in a SoundCloud-looking mod for Seekbar, if you wanted to track that down.

Good info and graphs here: http://www.acoustics.salford.ac.uk/acoustics_info/decibels/
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-08-24 18:59:01
Minibar was supposed to be simple and now it starts to have more options than anything...

You want something like this:

Edit: Attachment removed as the component is now released.
Title: Re: Waveform Minibar (mod)
Post by: lalldrin on 2018-08-24 19:11:56
OK--that's just freaky. Yes, that's exactly what I was thinking. You nailed it!

Copious thanks, and apologies for requesting yet one more not-so-simple feature. At least it wasn't too hard to implement.

Alexander Graham Bell (and his ten little decibels) are forever in your debt...
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-11-18 11:46:26
@Case,
the Minibar doesn't display anything (except the cursor) for some YouTube links. Here are some links for testing:
Code: [Select]
www.youtube.com/watch?v=tSkkzOz5iLE
www.youtube.com/watch?v=60ItHLz5WEA
www.youtube.com/watch?v=M-P4QBt-FWw
Please take a look if there is time. Thanks!
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-11-18 12:01:51
There's a new experimental feature to prevent the component from wasting too much processing time on slow machines and/or prevent playback by stealing bandwidth from playback thread. If seekbar extraction happens at sub-realtime speed the component will abort the operation. I can add an option to disable it.
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-11-18 12:10:22
Please, if it's not difficult for you.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-11-18 12:54:38
New version with an option to disable the speed checking released.
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-11-18 13:22:31
Yes, the wave is now displayed. So far everything is super. Thanks!
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2018-11-18 17:02:39
Finally got around to getting this working and trying it out, absolutely fabulous, thank you so much for this!
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-11-30 17:01:56
@Case,
Please test the behavior of the component for long files such as YouTube clips.
1. Can you consider the possibility of implementing the component stop mode when playback is stopped? When I interrupt the playback, the component continues to draw the wave and uploading the file.

2. It is probably better to continue drawing the wave (or start drawing again) after the cancel of the "Halt minibar processing" mode for the same file.

The link for testing: www.youtube.com/watch?v=1-xGerv5FOk (http://www.youtube.com/watch?v=1-xGerv5FOk)
Thank you!
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-12-04 20:33:34
Works as it should as far as I can see. Do you want me to blacklist youtube?
Title: Re: Waveform Minibar (mod)
Post by: khashayar on 2018-12-05 11:27:31
Ability to right click on the track's waveform same as on playlists. since track might have been deleted or removed from the playlist view.
@Case
Thanks for the Great Work!

Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-12-05 15:20:49
Do you want me to blacklist youtube?
Of course not. I will explain.
1. If you start playback a clip, the Minibar starts drawing a wave.
If you stop playback the clip (before the end of the wave drawing), the Minibar will continue to draw the wave until it finishes. Right ?
Therefore should be a mode to stop wave drawing when the playback of the clip is stopped. Isn't it ?
Please test this behavior of the Minibar using for example this long clip:
www.youtube.com/watch?v=8PmMuPYeK08 (http://www.youtube.com/watch?v=8PmMuPYeK08)
Title: Re: Waveform Minibar (mod)
Post by: khashayar on 2018-12-05 21:50:39
Small Issue:

Seeking doesn't move the cursor on Pause, works only on resume.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2018-12-06 17:07:00
I don't like the idea of replicating playlist context menus on unrelated components, khashayar. If I'll add context menu it will be for waveform related actions. If you have a habit of removing files from playlists and still want to perform actions on them, you might wish to consider adding keyboard shortcuts for those actions.

I fixed the position indication with seeking while paused. Side effect of earlier wish to stop all rendering when paused not to consume resources.

And I added initial support for Sergey77's wishes. The rendering stopping is bugged when using waveform rendering that follows selection, and I'm not sure I like the behavior. I'll attach a test version so people can test.

This component and External Tags are getting too complex. Too many bugs sneak in.

Edit: attachment removed, changes included in new release.
Title: Re: Waveform Minibar (mod)
Post by: krabapple on 2018-12-06 22:31:11
sorry for being a dummy, but how do actually get this to display once I've installed the plugin?  I'm using Columns UI in Foobar v1.3  (I loaded the correct version of the plugin for v1.3)

Title: Re: Waveform Minibar (mod)
Post by: khashayar on 2018-12-07 09:33:20
I don't like the idea of replicating playlist context menus on unrelated components, khashayar. If I'll add context menu it will be for waveform related actions. If you have a habit of removing files from playlists and still want to perform actions on them, you might wish to consider adding keyboard shortcuts for those actions.

I agree this would overcrowd the plugin.

What I was looking forward to mostly was the "Open Containing Folder" action, it might not be too irrelevant to the Waveform since it would open the location of the file that the Graph was generated from.

Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-12-07 13:31:38
sorry for being a dummy, but how do actually get this to display once I've installed the plugin?  I'm using Columns UI in Foobar v1.3  (I loaded the correct version of the plugin for v1.3)
@krabapple, If you are using CUI then (as variant) right-click on toolbars and select it on drop-down menu as shown in the attached pic.
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2018-12-07 14:07:00
This component and External Tags are getting too complex. Too many bugs sneak in.
@Case,
but at the same time these components are improving, it is obvious. Thank you for your responsiveness to users! This is very precious for fb2k.
Title: Re: Waveform Minibar (mod)
Post by: krabapple on 2018-12-07 21:01:24
sorry for being a dummy, but how do actually get this to display once I've installed the plugin?  I'm using Columns UI in Foobar v1.3  (I loaded the correct version of the plugin for v1.3)
@krabapple, If you are using CUI then (as variant) right-click on toolbars and select it on drop-down menu as shown in the attached pic.

Ah, I see it now, thanks!

Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2019-01-03 11:53:41
The rendering stopping is bugged when using waveform rendering that follows selection, and I'm not sure I like the behavior. I'll attach a test version so people can test.
Hi there!
Case, It would be better to clear the wave when rendering is stopped, for this version.
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-01-04 23:00:06
What a nice looking and great working compotent! just found it by chance (https://hydrogenaud.io/index.php/topic,116509.msg966698.html#msg966698)! Its a good start for 2019 ;-)

I have a feature request:

would the dear developer mind to add another option to
a) only sync the selected files to the library, and (kinda redundant, but also useful)
b) sync playlist only to library

We have a huge library and scaning the whole library would never be required, also, it would take tage ages.
Those two (or only the first) option would quickly sync the current or chosen playlist or even only 50 selected tracks to the library in no time.

Thanks for the component! I always liked the soundcloud idea of jumping visually through a song while listening.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-01-05 07:47:25
Note that you shouldn't normally need to scan things in advance. Depending on your settings when you select or play a track it will get scanned automatically. If your machine is somewhat modern the scanning will be generally done in a split second.

But if you wish to scan specific tracks in advance you can do that. Just select the tracks and use 'Utilities' -> 'Regenerate minibar waveform' context menu command on them.
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-01-05 11:10:19
Note that you shouldn't normally need to scan things in advance. Depending on your settings when you select or play a track it will get scanned automatically. If your machine is somewhat modern the scanning will be generally done in a split second.

But if you wish to scan specific tracks in advance you can do that. Just select the tracks and use 'Utilities' -> 'Regenerate minibar waveform' context menu command on them.
Thanks.
Actually yeah, its not needed, you're right. I use f2k portable and sometimes I'm on a very old/slow/crappy computer, but I disabled the option were the compotent stops creating the wave when it takes too much time (something with realtime, I'm can't recall atm). So the wave was created sometimes slowly, and I wanted to speed it up a little bit, but thats not important at all. I'm very happy with navigating through the waveform and can now clearly see, where gaps or silence begins. Great!!!
Title: Re: Waveform Minibar (mod)
Post by: Strigoy on 2019-02-12 18:12:30
Hello Case, would it be possible for you to implement some kind of size threshold (height would make alot of sense) for the panel to stop renderring waveform and turn blank?

I use this little trick in DUI where I controll size of some panels modifying nearby javascript panel's size. This is very usefull when you want to make some compact mode for the UI and turn waveform bar off. With the old waveform component I was able to do that just fine, since we had full access to the frontend settings. Don't get me wrong, I don't ask for that :).

Adding something like that extra panel/splitter size check would be very trivial to implement, but add a tonn of flexibility to how we use this awesome mod. Adding the value to options is not even needed I guess, just hardcode something sensible like 3-5 pixels height or so.

I hope you understand what I try to explain here :) my English is kinda rusty, sorry for that ))
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-02-14 16:26:45
Case, It would be better to clear the wave when rendering is stopped, for this version.

Hello Case, would it be possible for you to implement some kind of size threshold (height would make alot of sense) for the panel to stop renderring waveform and turn blank?

Above suggestions implemented. If the element width or height drops below 6 pixels the minibar will blank itself.

New version available as an attachment here first. If there are no complaints or bugs I'll release it properly later.

Edit: attachment removed, new version released.
Title: Re: Waveform Minibar (mod)
Post by: Strigoy on 2019-02-14 21:32:33
Woah, that was quick! Thanks, Case, works like a charm :)
Title: Re: Waveform Minibar (mod)
Post by: srdn on 2019-02-15 13:22:39
Can i get this picture with this extension ?
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2019-02-15 14:29:45
@srdn No, the minibar is by design very limited in what it is capable of unless the current maintainer @Case has stopped having principles :D

My unmaintained foo_wave_seekbar in D3D9 mode with effect shaders can produce that kind of Soundcloud-like waveform if you find an old effect to adapt or author one from scratch, but it's not trivial.
Title: Re: Waveform Minibar (mod)
Post by: srdn on 2019-02-15 16:31:37
@srdn No, the minibar is by design very limited in what it is capable of unless the current maintainer @Case has stopped having principles :D

My unmaintained foo_wave_seekbar in D3D9 mode with effect shaders can produce that kind of Soundcloud-like waveform if you find an old effect to adapt or author one from scratch, but it's not trivial.

What about mono mode with the display of the sum form of two channels ?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-02-15 17:58:39
Everything is downmixed to mono. With two channels that means sum of left and right channels.
Title: Re: Waveform Minibar (mod)
Post by: srdn on 2019-02-15 18:15:30
Everything is downmixed to mono. With two channels that means sum of left and right channels.
I meant this form display
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-02-15 18:20:00
It only shows a traditional waveform.
Title: Re: Waveform Minibar (mod)
Post by: arch21 on 2019-02-17 05:52:21
Case, will you update Waveform Minibar (mod) on your website?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-02-17 09:19:55
Thanks for notifying. That's usually the first place I update but somehow forgot to do it now.
Title: Re: Waveform Minibar (mod)
Post by: Dandruff on 2019-02-21 02:23:56
Download link on http://foobar2000.com/components/view/foo_wave_minibar_mod is broken (leads to foobar2000 homepage).
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-02-21 06:11:57
Appears to affect all components. I notified Peter.

Edit: it seems to work now.
Title: Re: Waveform Minibar (mod)
Post by: Dandruff on 2019-02-22 04:10:57
Not fixed here. I end up at http://foobar2000.com/?page=Download
Title: Re: Waveform Minibar (mod)
Post by: arch21 on 2019-02-22 05:33:26
Not fixed here. I end up at http://foobar2000.com/?page=Download
foobar2000 website is .org, not .com
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2019-02-22 08:47:03
The component downloads appear to work when initiated from foobar2000.org, but not from foobar2000.com, which I wasn't even aware pointed at the correct site.
Title: Re: Waveform Minibar (mod)
Post by: Dandruff on 2019-02-23 22:44:37
Not fixed here. I end up at http://foobar2000.com/?page=Download
foobar2000 website is .org, not .com

Here both show the foobar2000 website.
Title: Re: Waveform Minibar (mod)
Post by: Dandruff on 2019-02-23 22:46:21
The component downloads appear to work when initiated from foobar2000.org, but not from foobar2000.com, which I wasn't even aware pointed at the correct site.

Fixed now.
Title: Re: Waveform Minibar (mod)
Post by: tomchr on 2019-03-08 11:23:46
Thanks for an excellent Foobar2000 component.

Would it be possible to have the 'mouse wheel notch seeks ahead/back' value at 1 second?
Secondly, the seekbar line/cursor is 3 pixels thick. How about an option to choose between thickness of 1-3 pixels?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-03-08 18:51:30
The cursor width was set that way as it looked most decent. Minibar was never meant to have too much configuration...
Allowing thinner cursor will require coming up with nicer alphablending method. I'll attach a modified version here that allows finer seek control and has hard-coded thin cursor for you to test. But it really requires a new renderer.

Edit: test version removed.
Title: Re: Waveform Minibar (mod)
Post by: tomchr on 2019-03-10 11:34:47
The cursor width was set that way as it looked most decent. Minibar was never meant to have too much configuration...
Allowing thinner cursor will require coming up with nicer alphablending method. I'll attach a modified version here that allows finer seek control and has hard-coded thin cursor for you to test. But it really requires a new renderer.


Many thanks for the mod. I highly appreciate it. I noticed that the cursor seems to be blinking, regardless of FPS settings.
I guess  this is the unintentional rendering effect that you are referring to, and by increasing the width of the cursor the blinking goes away.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-03-17 16:46:43
New version released with the seek accuracy improvements, cursor width configuration and improved cursor rendering.
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2019-03-17 17:00:32
Fab! Any chance right clicking on the actual waveform could automatically take us to its setting page? I reckon that could be quite handy.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-03-18 20:19:43
I have missed a quick method to switch between linear and logarithmic scales so I added a context menu with link to settings and a way to swap mode.
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2019-03-18 20:21:13
Excellent! Just tried it out, works like a charm, thank you!
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2019-03-19 12:41:27
Case,
Waveform Minibar (mod) component is perfect. I use it with pleasure.
Thank you very much!
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2019-03-23 09:37:58
@Case Cursor width changes in 'halt processing' mode like that:
(https://i.imgur.com/9zXYUh3.gif)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-03-23 11:30:20
Thanks, fixed. The no-waveform case still used old render code.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2019-03-23 16:40:43
Thanks go to you!
Title: Re: Waveform Minibar (mod)
Post by: Forfit on 2019-05-19 07:25:33
Do it is possible to add a option to disable minibar.db saving or reset it at fb2k end session, to avoid inflating file?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-05-21 16:21:15
How large database do you have? And you don't mind the scanning delay?

I can consider adding an option if you tell me you absolutely need it.

Note that you can make the database file read-only and it won't be altered anymore.
Title: Re: Waveform Minibar (mod)
Post by: Forfit on 2019-05-23 00:43:15
How large database do you have? And you don't mind the scanning delay?
i didn't go on to make it grow.  Delays are not a problem.
Quote
I can consider adding an option if you tell me you absolutely need it.
would be appreciated, also to avoid unnecessary writing on sd
Quote
Note that you can make the database file read-only and it won't be altered anymore.
I've already tried to make the file read-only but the plugin overwrites it anyway.
Title: Re: Waveform Minibar (mod)
Post by: dosed87 on 2019-06-02 12:33:03
Hi, I have a problem with latest version of foobar (1.4.4), I've installed minibar, restarted program, but it isn't visible in toolbar section?
Title: Re: Waveform Minibar (mod)
Post by: anamorphic on 2019-06-02 13:15:57
^ You have to add it to your layout. For DUI, see Layout Editing Mode (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode).
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2019-06-02 14:51:13
Waveform Minibar (mod) is present in the toolbar's context menu for Columns UI, but I can't find it in the Default UI toolbar. Should be fixed.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2019-06-02 15:08:42
In the Default UI, you cannot add custom UI elements to the toolbar, there's no SDK extension point for that.
Title: Re: Waveform Minibar (mod)
Post by: dosed87 on 2019-06-02 17:54:03
^ You have to add it to your layout. For DUI, see Layout Editing Mode (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode).

I''m currently to dummy for that, maybe some further explanation, I only know how to turn on editing mode :)
Title: Re: Waveform Minibar (mod)
Post by: anamorphic on 2019-06-03 12:55:28
^ With Layout Editing on, you right-click a section you want to change, select Replace UI Element, choose a Splitter (top/bottom) to divide the section in two. Then click the empty space and select Waveform Minibar from the list. You can also right-click and Cut/Copy/Paste to move elements around. Here is a quick video (https://youtu.be/BeI4u0vgcOo).

(Any further questions should be made in a new thread)
Title: Re: Waveform Minibar (mod)
Post by: dosed87 on 2019-06-03 17:55:09
Thank you very very much, great editing mode for be 8) ginners!
Title: Re: Waveform Minibar (mod)
Post by: Ottodix on 2019-06-13 13:13:38
Hi,
It may have been asked already: Would it be possible to have a transparency settings for custom colors, going from 0 to 255? It would allow a nice integration on custom-made themes.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-06-14 14:32:21
I don't quite understand the request. If you make foobar2000 transparent all elements respect that. If you wish to mix the colors with the background color you can just calculate the desired value yourself.
Title: Re: Waveform Minibar (mod)
Post by: Ottodix on 2019-06-14 16:54:43
Background image : ) I would like to put this waveform over the currently played cover artwork
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-06-14 21:43:57
Seems to be a hacky feature of some panel splitter component. I'll keep the request in mind but don't rely on it getting implemented.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2019-06-14 23:01:40
Case: There's some old posts regarding the CUI panel stack component over in the Waveform Seekbar thread somewhere.
Back there I pretty much dismissed it as I couldn't figure out how to blend my D3D9 render targets and didn't want to bother with D2D/GDI.
Title: Re: Waveform Minibar (mod)
Post by: Ottodix on 2019-06-14 23:12:33
Yep, I understand for sure, thanks
Title: Re: Waveform Minibar (mod)
Post by: Dandruff on 2019-07-06 12:05:22
The attached sample (WAV, 48 kHz, 32bit float, mono, 2 samples lenght) will make foobar2000 (1.4.5) hang when Waveform Minibar (mod) 1.0.25 is active:
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-07-07 15:56:20
Sorry for the trouble. The component was meant to upsample short tracks to get enough sample points but the feature was entirely broken. Uploaded a fixed version.
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-07-07 20:26:35
Hi Case!
Thanks for the update, works fine and troubleless :-)

I checked the new Cursor Width option and it is nice, but now, as we can change the width, we "need" another setting:
Code: [Select]
[x] transparent cursor
so a width 10 cursor looks fancy and not blocky 8-)
Title: Re: Waveform Minibar (mod)
Post by: Dandruff on 2019-07-07 21:56:06
Sorry for the trouble. The component was meant to upsample short tracks to get enough sample points but the feature was entirely broken. Uploaded a fixed version.

Thanks! Working fine now!
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-07-23 14:07:37
we "need" another setting:
Code: [Select]
[x] transparent cursor
so a width 10 cursor looks fancy and not blocky 8-)
I just uploaded a version with some configuration changes for that.
Title: Re: Waveform Minibar (mod)
Post by: candum on 2019-07-28 00:30:44
I read earlier that Case doesn't want to add a stereo option. But would adding the option to select a right or left wave form option have the same end result as giving the seekbar a stereo operation? In terms of nuking things, I mean. If so then I won't ask what I am sure you already know I want to ask.
Title: Re: Waveform Minibar (mod)
Post by: thisbanisnotsettoexpire on 2019-07-30 02:15:55
One feature that may not be mentioned anywhere is that the scanned waveforms are only saved for tracks that are in the media library. If you test files outside library the waveforms won't pollute the database as they are only stored temporarily in memory.
This is important information. I've been surprised that waveforms of (streamed) tracks decoded by foo_youtube are created again and again after every restart, even though (as it was directly observed) component allows to set some track identification option in preferences and introduces a database in foobar2000 directory.

Now I know why. And now I see that this behavior is described in many places: in quoted message, on component's homepage (https://foobar.hyv.fi/?view=foo_wave_minibar_mod) and in documentation (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components_0.9/foo_wave_minibar_mod), linked from component's page on foobar2000.org. But it somehow wasn't enough to reach me in time proper to prevent confusion.

Maybe it could be seen as unnecessary now, but basing on this experience and to ease understanding of component's limitations intended features for new users, could you please add this information in starting post of this topic and directly on component's page (https://www.foobar2000.org/components/view/foo_wave_minibar_mod) on foobar2000.org?

Thank you for component, it's usable anyway and it's good to have it and it's nice of you to support it.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-07-30 07:49:49
I read earlier that Case doesn't want to add a stereo option. But would adding the option to select a right or left wave form option have the same end result as giving the seekbar a stereo operation? In terms of nuking things, I mean.
Nuking the database isn't the biggest problem. No nuking would be required as configured channel could just be used for new scans. But picking only one channel of a multi channel track makes no sense to me. In the rare case when there are differences the waveform display could be a complete lie.

Maybe it could be seen as unnecessary now, but basing on this experience and to ease understanding of component's limitations intended features for new users, could you please add this information in starting post of this topic and directly on component's page on foobar2000.org?
Good point. Added. The component could perhaps also use a possibility of saving the scan results for streams.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-08-02 21:38:17
Do it is possible to add a option to disable minibar.db saving or reset it at fb2k end session, to avoid inflating file?
New version uploaded with the ability to select what gets saved in the database. Default behavior hasn't changed but it's now possible to additionally save results for streams, save everything, or save nothing. With the last option no database gets created and if one exists, it isn't loaded.

I also made the seek hack DSP hidden so it isn't messing the regular DSP config listing.
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-08-04 00:31:32
nice :)

I have created a junction of minibar.db (with Link Shell Extension by Hermann Schinagl (http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html)) to my C:\temp directoy, so it does not overgrow my f2k directory (backing up this folder regulary is fast, but not, if minibar.db gets >500MB, which happens very fast here.

Maybe it is useful for other user too, that you add a user definable directory (relative (..\bla) to f2k install dir, or fixed C:\bla)) to store the minibar.db ?

I'm wondering too, if you could put the preferences "track to prefer when showing waveform" to the contextmenu (when rightclicking on the waveform), so users can switch fastly and do not need to open prefs, change setting, press ok, and change it back when needed, and open the prefs again for it..
I often like to change to "selected track", while my default setting is "playing, selected when stopped", but I don't want to stop the music ;-)) It could be faster to accomplish, with rightclick on waveform and quickly click one of the four entries.

One small thing:
I had set up f2k from scratch and did not configured the library, though, your menu entry in menu->library->sync minibar with library was visible (not greyed out) but did nothing 8-]

Thank you, I enjoy your component every day (and actually, with every song)!
Title: Re: Waveform Minibar (mod)
Post by: candum on 2019-08-27 18:37:50
I read earlier that Case doesn't want to add a stereo option. But would adding the option to select a right or left wave form option have the same end result as giving the seekbar a stereo operation? In terms of nuking things, I mean.
Nuking the database isn't the biggest problem. No nuking would be required as configured channel could just be used for new scans. But picking only one channel of a multi channel track makes no sense to me. In the rare case when there are differences the waveform display could be a complete lie.

Fair enough, I just like stereo layouts and it has helped me out quite a lot. I learned an adapter I was using was actually switching the left and right, never really noticed it before as I didn't listen to anything I actually knew that intimately. I did find a way to use both of the seek bars I rather like. I remembered I could stick them into tabs and switch between them rather quickly.
Title: Re: Waveform Minibar (mod)
Post by: JoeBar on 2019-10-02 21:56:39
Hi, i can't display any Waveform, it's activated but i have no way to make it appearing.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-03 08:31:00
What do you mean by it being "activated"?

The "Waveform minibar (mod)" element needs to be added to the user interface and its processing must not be turned off. The off-switch is currently located under the Library main menu and it's called "Halt minibar processing".

Are you playing local files or streams? With streams the component can do nothing.

The waveform by default uses colors from the user interface. I think with Columns UI one could configure global colors to all be the same but use custom colors in elements to retain visibility. Doing such a thing would probably make the minibar appear blank with the default settings.

If none of these are the cause for the problem check console (main menu View -> Console) to see if there are any errors reported.
Title: Re: Waveform Minibar (mod)
Post by: JoeBar on 2019-10-03 11:01:01
What do you mean by it being "activated"?

The "Waveform minibar (mod)" element needs to be added to the user interface and its processing must not be turned off. The off-switch is currently located under the Library main menu and it's called "Halt minibar processing".

Are you playing local files or streams? With streams the component can do nothing.

The waveform by default uses colors from the user interface. I think with Columns UI one could configure global colors to all be the same but use custom colors in elements to retain visibility. Doing such a thing would probably make the minibar appear blank with the default settings.

If none of these are the cause for the problem check console (main menu View -> Console) to see if there are any errors reported.

I mean the plug-in is activated in Foobar to be sure.

So i must synchronize WFMB with all my media library (it will take hours) ? Or is it able to generate WF on the fly ? I only read local files.

I have no way to add it to the user interface (see the screenshot).

Thanks for your help.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-03 11:37:55
No need to synchronize anything in advance - the component will scan tracks as needed. The problem here is that you don't have the seekbar in your interface. Below are step-by-step instructions how to add it:

Title: Re: Waveform Minibar (mod)
Post by: JoeBar on 2019-10-03 11:53:18
No need to synchronize anything in advance - the component will scan tracks as needed. The problem here is that you don't have the seekbar in your interface. Below are step-by-step instructions how to add it:



Awesome, didn't know i had to get into the Layout Editing Mode to manually add that splitter, thanks a lot ;)
Title: Smoothing request
Post by: wharfinger on 2019-10-04 16:08:06
Hello! Firstly, thanks for developing and improving the original component!

I have a request. Is it possible to add some smoothing to the waveform like in the original component? I've added a screenshot for comparison.
(https://hydrogenaud.io/index.php?action=dlattach;topic=116045.0;attach=15623;image)

Best regards
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-04 19:17:22
Smoothing is unlikely to be added as I prefer the sharp look. Have you tried simulating it by setting the RMS color to black and regular color to dark gray?
Title: Re: Waveform Minibar (mod)
Post by: frogworth on 2019-10-05 06:15:45
Only just discovered that this exists.
It's really nice, but without stereo I'm not going to use it unfortunately. The ability to compare channels is something I use quite a lot. Is it definitely never going to be a feature?
Title: Re: Waveform Minibar (mod)
Post by: wharfinger on 2019-10-06 12:40:02
Have you tried simulating it by setting the RMS color to black and regular color to dark gray?
Yes, it makes no big difference, the sharp edges are still there.
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2019-10-07 07:34:00
I like how it looks now too, please don't change it!
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-10-17 14:26:28
Hello,

how can I temporarily DISABLE the components waveform generation?

Atm, I work wtih huge files on a network drive which is not the fastest.
It takes about 10-30 seconts per file to scan.

I have enabled "abort seekbar generation... realtime", but its not aborting and I don't want the generation to be started at all.

The option "track to prefer, when showing waveform" does not have a good solution for me. (I need to switch between playing, skipping, playing other sounds, etc.)

I just like to disable the generation completely, but it seems not to be possible w/o uninstalling?

A right-click option "✔ disalble waveform generation" on the wavebar panel would be nice. (as a feature request)

As well as this:
I'm wondering too, if you could put the preferences "track to prefer when showing waveform" to the contextmenu (when rightclicking on the waveform), so users can switch fastly and do not need to open prefs, change setting, press ok, and change it back when needed, and open the prefs again for it..
I often like to change to "selected track", while my default setting is "playing, selected when stopped", but I don't want to stop the music ;-)) It could be faster to accomplish, with rightclick on waveform and quickly click one of the four entries.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-17 15:24:44
how can I temporarily DISABLE the components waveform generation?
There's "Halt minibar processing" setting under the Library menu. It predates the context menu and I haven't yet remembered to add it there.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-18 21:28:55
New version out that includes the track preference selection and processing halting in the context menu. There are also some fixes.
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-10-19 13:13:24
You are top class! Thank you! Tested and it is now working "as it should". ;-)
(It is great, that the cursor is moving while the generation is turned off!)
Title: Cannot edit tags of file, while waveform is generated
Post by: fuffi on 2019-10-20 11:22:00
Well, there is another question/issue.

I often get the f2k Info
Code: [Select]
"Could not update tags (File is already in use) on:
C:\mp3\myfile.mp3"
when trying to change tags, while the waveform is still generated.

I change tags via scripts bound to keyboard shortcuts, so I usually change 2-3 tags very quickly, while the component is on its way to generate the waveform.
It happens on SSD, HD and Network too, no difference.  Keyboard-shortcuts are fast, waveform generation is not.

My options are,

a) halting the waveform generation

b) wait until the generation is finished, then press the shortcuts.
c) ?

I must say,
b) is out of question

a) will result in enjoying and using the waveform mainly when I do other work than tagging or moving files in f2k (which is only about 15% while the rest 85% is fetching/finetuning tags, etc.), so the fine waveform is mostly deactivated.
Which is a pitty IMHO, because it is so helpful to use (jumping visually, skipping parts) and very convenient (click=done) to work with.

c) Is something which did not come to my mind yet.... %-)

So the question is,
is there a way to omit this message (and of course enable editing/changing a file, while its beeing processed)?

The waveform generator opens the file in r/o mode (I guess), so why can't I edit that file?
Is this a Windows7 thing, or may this be canged in f2k somewhere, maybe any advanced setting?

Thanks for your ideas.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-20 12:48:17
is there a way to omit this message (and of course enable editing/changing a file, while its beeing processed)?

The waveform generator opens the file in r/o mode (I guess), so why can't I edit that file?
Is this a Windows7 thing, or may this be canged in f2k somewhere, maybe any advanced setting?
It's not a Windows 7 thing and you can't change that. foobar2000 wants exclusive write access to the file while tagging so an outside decoder having it open prevents this.

Only way that comes to mind to circumvent this is to read the file to memory and decode from there. But that would slow the waveform generation down and would consume a lot of memory. And wouldn't even work on large files.

Note that the faster your machine is the faster the waveform generation is. Typical tracks get scanned here in a fraction of a second so waiting for them to finish is not a problem. Also if you take advantage of the waveform cache and scan the files in advance there won't be any file locks later when showing the seekbar.

Since you like keyboard shortcuts you could map the '[main]' -> 'Library' -> 'Halt minibar processing' command to a key to be able to quickly turn it off if it gets in the way. And if you happen to use the 'playing track' mode hitting Stop will also stop incomplete waveform generation. It requires no further action, when you resume playback the waveform generation is restarted.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-21 14:55:28
Actually should have asked Peter sooner. New version out now that allows you to tag files while waveform is being generated. And if your file is unseekable it will get tagged once waveform generation is finished.
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-10-23 20:43:41
sounds good, will test and report :-) Thank you!

Meanwhile...

sometimes, the wavebar generation aborts and there is no way to see/know,
-if the file is broken
-if the file just has a very long silent part at the end
- ...
-or if the generation just stopped, because of the slowness of my computer/network. (so everything is "normal")

I wonder if it will be usefull to have a (user-colorable) "vertical abortion bar" (see screenshot), which will indicate to the user: "hey, nothing wrong with the file, I just aborted the generation, because....".

What do you think?

I do a lot with visuals, so for me every indicator of a broken file is an alert to my eyes :-)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-24 09:43:05
I don't like the idea of adding such feature to the component. It already has way too many configurable features for a supposedly simple minibar.
If the waveform generation stops because of too slow decoding speed there will be a note about it in the console.
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2019-10-24 13:42:39
If the waveform generation stops because of too slow decoding speed there will be a note about it in the console.
Ah, I never noticed such a message  in the crowded console, will take a deeper look 8-) Thanks!
Title: Re: Waveform Minibar (mod)
Post by: JoeBar on 2019-10-24 14:09:39
Hi, how can you lock the splitter between the WB and the playlist ? Thanks
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-10-24 15:40:39
I assume you use the Default UI. In layout editing mode right click on the splitter and you'll get 'Top pane' and 'Bottom pane' menu entries at the bottom. Select the appropriate submenu and click on 'Lock height' there. You need to be precise with the mouse to hit the splitter.
Title: Re: Waveform Minibar (mod)
Post by: JoeBar on 2019-10-24 18:58:25
I assume you use the Default UI. In layout editing mode right click on the splitter and you'll get 'Top pane' and 'Bottom pane' menu entries at the bottom. Select the appropriate submenu and click on 'Lock height' there. You need to be precise with the mouse to hit the splitter.
Perfect !
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2019-10-31 19:04:22
Hi there!
@Case, please consider the ability to add the feature "refresh wave" in the right-click menu. This is necessary when the wave is saved and the contents of the file have changed. To redraw the wave, I need to delete the entire base. Or I don’t know how to do it right.
Thank you!
Title: Re: Waveform Minibar (mod)
Post by: anamorphic on 2019-10-31 22:51:00
^ There is an option in right-click track > Utilities > 'Regenerate minibar waveform'.
Title: Re: Waveform Minibar (mod)
Post by: Sergey77 on 2019-11-01 01:17:23
^ There is an option in right-click track > Utilities > 'Regenerate minibar waveform'.
Oh thanks, @anamorphic!
I'll know.
Title: Re: Waveform Minibar (mod)
Post by: _Stevie_ on 2019-12-30 20:12:41
Hey all,

I have a problem: some tracks seem to share the same waveform. I already tried to re-index but with no luck. Any ideas?
Title: Re: Waveform Minibar (mod)
Post by: _Stevie_ on 2019-12-31 05:37:32
Okay, found the issue. For my use case I had to change the matching pattern to %filename%
Title: Re: Waveform Minibar (mod)
Post by: Case on 2019-12-31 07:01:46
The default match string intentionally combines some tracks. I have my main library as FLAC and I keep a lossy version for portable use. I want them both to be able to use the same waveforms generated from the FLACs.

I wouldn't recommend using just %filename%. It can easily be the same for tracks from different albums. %path% would be safer, but not so good if you move files around often.
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2019-12-31 09:16:58
Don't forget %subsong% in the pattern, if you use multi-track formats.
Title: Re: Waveform Minibar (mod)
Post by: khashayar on 2020-01-01 12:51:09
Hello everyone,
I have recently migrated to Linux for a plethora of reasons (e.g Privacy to say the least), really foobar was one of the few things (especially this very plugin!) that was keeping me at bay (i.e. Windows) for a while. I'm now using Audacious (the closest thing so far). So I was wondering if anyone knows an alternative Waveform Seekbar for Linux.



Thanks & Cheers to @Case for developing awesome plugins...
Happy New Year.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2020-01-01 23:11:08
@khashayar There exists a clone of my original foo_wave_seekbar for the Deadbeef music player: https://github.com/cboxdoerfer/ddb_waveform_seekbar
Title: Re: Waveform Minibar (mod)
Post by: frogworth on 2020-01-01 23:17:45
@khashayar There exists a clone of my original foo_wave_seekbar for the Deadbeef music player: https://github.com/cboxdoerfer/ddb_waveform_seekbar

Mmm stereo waveforms...
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2020-01-01 23:51:49
Unless someone has broken something recently, foobar2000 tends to run well enough under Wine as well.
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2020-01-02 00:14:51
Still no media key support for any desktop environment there, unless you manually add keyboard hotkeys in the desktop environment and point them to run Wine with the right prefix and foobar2000.exe with the right switches.
Title: Re: Waveform Minibar (mod)
Post by: Nojevah on 2020-01-03 23:08:53
IIRC, in original waveform minibar, it was possible to remove dead entries.
It was useful especially if I wanted to rescan a file (because I modified it for example).

1) I remove my file from library
2) I use "Remove dead entries" menu
3) I put back my file
4) I play the file, letting Waveform Minibar rescanning my new file

For now I have 2 solutions: using a database editor (complicated) or deleting minibar.db file (easy but whole database will be rescanned again). I use the second choice each time tbh.

So I hope you'll find motivation to put this menu entry.
At first I though it was what was doing "sync minibar with library" before to understand it would scan all database for waveforms.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-01-04 00:27:12
You can rescan a file from the right click context menu. Utilities -> Regenerate minibar waveform.
Title: Re: Waveform Minibar (mod)
Post by: Nojevah on 2020-01-04 13:17:51
Meh... I've never seen this submenu. :/
Maybe you can include this entry in the contextual menu of panel ? Just in case I forgot.  :-[
Thanks for the answer and this perfect plugin.
Title: Re: Waveform Minibar (mod)
Post by: krznv on 2020-01-22 09:07:31
Firstly thank you for the plugin, it works really well with a lot of customization.

Not sure how feasible this would be, it would be useful if I could only display the top half, one channel, of the waveform, as it works in rekordbox for example. So that's an option I request.
Title: Re: Waveform Minibar (mod)
Post by: krznv on 2020-01-23 13:24:10
Firstly thank you for the plugin, it works really well with a lot of customization.

Not sure how feasible this would be, it would be useful if I could only display the top half OF one channel, of the waveform, as it works in rekordbox for example. So that's an option I request.
Soundcloud dispays like this as well, only the top part of the channel waveform in case my typo was misunderstood.
Title: Re: Waveform Minibar (mod)
Post by: ct on 2020-01-29 15:11:29
For my use case I tried the match pattern %path% | %filesize% | %md5%
However the database track_id looks like Z:\path\file.flac | ? | ?
My files are all flac, so md5s are embedded, and either way the filesize should certainly be available. Am I missing something?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-01-29 17:07:18
The %filesize% field not working was a bug which is now fixed in the just released version. But %md5% field is not used correctly - use either $info(md5) or %__md5%.
Title: Re: Waveform Minibar (mod)
Post by: ct on 2020-01-29 17:21:44
The %filesize% field not working was a bug which is now fixed in the just released version. But %md5% field is not used correctly - use either $info(md5) or %__md5%.
Both of these fixes worked. Thanks for the help, and for writing this plugin - it's a great addition to foobar.
Another question just to satisfy my curiosity: what is the true_size field used for? Its value is 24580 in each row.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-01-29 17:40:17
I just released another update (v1.0.33). Should have tested the error reporting change. Removing a file mid-scan made the component crash. This is now fixed.
That true_size field tells how much memory is needed to uncompress the zipped waveform data. Not horribly useful at the moment but at least it's not taking much space.
Title: Re: Waveform Minibar (mod)
Post by: janne on 2020-02-08 16:40:28
is it intentional behavior that the component aborts the waveform processing when playing back tracks from matroska files with internal chapters with "abort when processing speed under realtime" on? this happens about 99% of the time.
Title: Re: Waveform Minibar (mod)
Post by: wcs13 on 2020-02-08 19:28:36
Hey @Case  :) I was using your great component today, and suddenly it hit me  :o  (assuming it hasn't been suggested before) :

Wouldn't it be great to optionally be able to display the elapsed time / remaining time, moving along with the cursor ?
It would look like this (see attached picture).

As you can see, the font colors would be automatically determined based on the "Played > Fill" and "Unplayed > Fill" colors. FYI there is also a 1-pixel black outline.
As for the beginning / end of the song, it wouldn't matter if the elapsed time / remaining time isn't fully displayed because it gradually appears from the lest / disappears in the right.

What do you think ?

Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-02-09 12:34:37
is it intentional behavior that the component aborts the waveform processing when playing back tracks from matroska files with internal chapters with "abort when processing speed under realtime" on? this happens about 99% of the time.
It is if the scanning speed is slower than realtime. I can replicate the problem at least by using FFmpeg Input Wrapper to handle DTS tracks. Seeking in this scenario takes so many seconds that the component gives up all hope.

If you have a fast machine you can safely disable the option.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-02-09 12:51:07
Wouldn't it be great to optionally be able to display the elapsed time / remaining time, moving along with the cursor ?
It might look nice but it would be another added configurable complexity for a component that is meant to be simple. Also I'm a bit worried about the resource requirements. Remember this is software rendered and smooth motion requires proper alpha blending.
It would be an interesting problem to solve if I had plenty of free time but I don't think it's a feature I'm willing to add.
Title: Re: Waveform Minibar (mod)
Post by: wcs13 on 2020-02-09 14:26:47
I agree with all that :) Here are some thoughts though :
- The configurable complexity could be just one checkbox : "Display Elapsed / Remaining Time", disabled by default.
- As for resources, I agree. But any modern / not too old CPU should do this in a breeze, and since the option is disabled by default, this shouldn't be a problem for anybody.

Of course you'd need to have some free time to crack this. I'll leave that up to you. Maybe someday you will. ;)
I suggested this not because of the eye-candy, but because it would be really useful to have all that info in the same place visually. Thanks anyway !
Title: Re: Waveform Minibar (mod)
Post by: Wolfbane on 2020-03-11 22:16:39
Howdy, thx for the mod, works nice.

Four Suggestions. I have read all pages, and know both have been mentioned before in some way, but I just wanted to mention there is another person that would be happy if these options was there.

*1* Is a timer in some way, personally don't want one displayed all the time like the person earlier mentioned, for me a "mouse over" timer would be enough.

*2* I think the "sharp" waveform, is not a personal preference for me, reminds me to much of 8-bit games, the old school games 256 colors.
So a smoother in some way would be nice, like lets say the 10 pixels on top/bottom of each color has more 10% transparency then the previous one. So 100%, 90%,80%,70%,60%,50%,40%,30%,20%,10%.

*3* the colors for "played" and "unplayed", possible to give the option for instead of a color have % transparent, so lets say I want the "played" color to be the same as the unplayed just 50% transparent instead.

*4* Zoom in on waveform that have tiny waveform, so it uses more of the space one have give to the waveform window.
I have some youtube songs in playlist, that have low waves, and just for a more visual pleasing, would be nice if they where increased/zoomed in.
( Image displays what Im refering to better. )



Your plugin, you do whatever you want. Just mentioning what option I would personally like, nothing else.

Have a great day and keep up the nice work.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-03-14 19:31:15
*1* Is a timer in some way, personally don't want one displayed all the time like the person earlier mentioned, for me a "mouse over" timer would be enough.
If you hold mouse button pressed over the minibar there will be a tooltip showing timestamp. You can prevent seeking by dragging the pointer far enough out of the window.

*2* I think the "sharp" waveform, is not a personal preference for me, reminds me to much of 8-bit games, the old school games 256 colors.
So a smoother in some way would be nice, like lets say the 10 pixels on top/bottom of each color has more 10% transparency then the previous one. So 100%, 90%,80%,70%,60%,50%,40%,30%,20%,10%.

*3* the colors for "played" and "unplayed", possible to give the option for instead of a color have % transparent, so lets say I want the "played" color to be the same as the unplayed just 50% transparent instead.
Sounds like the old Waveform Seekbar (http://www.foobar2000.org/components/view/foo_wave_seekbar) would suit you better. It is blurred by default and allows you to code effects you want.

*4* Zoom in on waveform that have tiny waveform, so it uses more of the space one have give to the waveform window.
I have some youtube songs in playlist, that have low waves, and just for a more visual pleasing, would be nice if they where increased/zoomed in.
There is the "waveform scale" option. You can manually enter a floating point scaling factor or use the "normalize" setting. Another option to make quiet tracks stand out more is to switch to the logarithmic scale.
Title: Re: Waveform Minibar (mod)
Post by: Wolfbane on 2020-03-19 05:57:39
There is the "waveform scale" option. You can manually enter a floating point scaling factor or use the "normalize" setting. Another option to make quiet tracks stand out more is to switch to the logarithmic scale.

I tested the Normalize, and not sure if its not working as you mentioned, http://prntscr.com/risk62
There is still 50% black space that is not utilized.

You mentioned "logarithmic scale"... Not sure where this option is, or what you are referring to.

I did test enabling "dB scale", that did partially work, it enlarge things, to the edges, but it did not do it in a good way,
for example, it enhanced some waves 200% but others 100%,
http://prntscr.com/rismpa <<<< into >>>> this http://prntscr.com/rismt3

What I was asking for, is that an option that enlargest the largest wave to the edges, lets say that is a 78% enlargement, then only 78% enlargement would be applied to the entire song,


Sounds like the old Waveform Seekbar (http://www.foobar2000.org/components/view/foo_wave_seekbar) would suit you better. It is blurred by default and allows you to code effects you want.

Yes, it might be, but my thought was to make a transition to this plugin instead since the other one is a few years without any update. So if the old plugin is abandoned, it would be nice to get one that is active.

If one swappes from an old game, and start playing a new game, but the new game is missing a few key features that made the old game great, then its not strange to request these features to the developers.... And here I am, doing just that...

If you hold the mouse button pressed over the minibar there will be a tooltip showing timestamp. You can prevent seeking by dragging the pointer far enough out of the window.

Nope, no such thing for, me. No info on mouse-over, or if the mouse button is pressed at hovered around, no info.
Even if that was the issue, by pressing the mouse I would make the song skip somewhere in the song, and would like to see timer without jumping in the song.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-03-19 07:47:29
I tested the Normalize, and not sure if its not working as you mentioned, http://prntscr.com/risk62
There is still 50% black space that is not utilized.
I suspect your track is highly dynamic. The scaling decision is made from the full waveform data before it's scaled down - your window is so narrow that scaling eats away all the spikes that should hit the borders. I can change this to work after scaling but then changing the window size will make the waveform change size strangely.

You mentioned "logarithmic scale"... Not sure where this option is, or what you are referring to.

I did test enabling "dB scale", that did partially work, it enlarge things, to the edges, but it did not do it in a good way
That is the setting I referred to. It changes the vertical scale logarithmic (which I had to shorten to dB due to lack of space). It shows the waveform closer to how the ear perceives them but indeed it's not so pretty for most tracks.

Sounds like the old Waveform Seekbar (http://www.foobar2000.org/components/view/foo_wave_seekbar) would suit you better. It is blurred by default and allows you to code effects you want.

Yes, it might be, but my thought was to make a transition to this plugin instead since the other one is a few years without any update. So if the old plugin is abandoned, it would be nice to get one that is active.
The minibar component was originally created because zao got tired of the waveform seekbar with its unmaintainable features. The original minibar had zero configuration and used hardcoded colors.
I have already brought the component quite far from the mini idea with all the options I have added. And I regret adding some options. I can add some ideas I like but you should know that I much prefer the precise look over the blurry look.

If you hold the mouse button pressed over the minibar there will be a tooltip showing timestamp. You can prevent seeking by dragging the pointer far enough out of the window.

Nope, no such thing for, me. No info on mouse-over, or if the mouse button is pressed at hovered around, no info.
Even if that was the issue, by pressing the mouse I would make the song skip somewhere in the song, and would like to see timer without jumping in the song.
I attached a short video clip showing how it should work.
Title: Re: Waveform Minibar (mod)
Post by: Wolfbane on 2020-03-19 11:45:56
Hmm... I do not see any numbers like you do.

Did record and upload.
https://www.youtube.com/watch?v=-DFofBSE2EQ
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2020-03-19 15:36:09
@Wolfbane My original component reached a critical mass of technical debt.
As Case mentioned, there's support constraints in there that make it impossible to move forward and work with. There's the old problem of that it requires very legacy toolsets (XP+DX9 SDK) to build, and that the customizability of effects via .fx files might have been a mistake as it's impossible to centrally adapt them to any new backend, as they're shared ad-hoc between users and touching anything is likely to break it for an unknown number of users.

I made the original minibar to provide a very lean software-rendered seekbar, which Case graciously took over after a period of mod maintainership. Every feature you add you have to support going forward, and as my original seekbar shows, it can creep quite a bit.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2020-03-19 15:39:49
Implementing a good auto-scaler is quite hard as Case touched on, as you've got to thread the needle between having a single fullscale sample throw the scale to undersampling so much that the display clips out everything of interest.

I've historically tried everything from using replaygain data to using the raw waveform to using the distilled buckets that the display is based on, and there's no one-size-fits-all solutions.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-03-19 17:25:12
@Wolfbane, you seem to have somehow disabled all tooltips. You should have seen tooltips in the foobar2000 UI when hovering over the buttons too.
Title: Re: Waveform Minibar (mod)
Post by: Just_Addict on 2020-03-21 04:11:53
There is the "waveform scale" option. You can manually enter a floating point scaling factor or use the "normalize" setting. Another option to make quiet tracks stand out more is to switch to the logarithmic scale.
Frag.... This was probably documented someplace but I never imagined/tried even, to enter a value in that dropdown ,especially since it is a dropdown, an element which normally wouldn't allow you to enter something other than the choices already present

Implementing a good auto-scaler is quite hard as Case touched on, as you've got to thread the needle between having a single fullscale sample throw the scale to undersampling so much that the display clips out everything of interest.
I've historically tried everything from using replaygain data to using the raw waveform to using the distilled buckets that the display is based on, and there's no one-size-fits-all solutions.
Don't I know it :D It took me quite some time while hacking away at my monster FX to realize that if a track only has a few high peaks there is a very real chance, almost a certainty, those peaks will not survive the downsampling and interpolation to make it into the final dataset without being considerably 'averaged' with the preceding and following few seconds in the track.
Another major factor is the length of a track, the longer the track, the higher the chance this occurs.

To those wanting to have multi-channel support and other bells and whistles... the original wavebar component is what you should be using, as long as you keep in mind it is purely intended as a visual gimmick. It never will be nor ever was intended as an analytical component, even though it may seem that way. As pointed out in this thread before, if you want to analyse a track or simply want a true waveform, use Audacity or comparable tools.

@Zao
I've seen mention in this thread about the scrolling back/forward with the mouse wheel being one of the features the minibar would have over yours? I'm confused by these claims, I know for a fact that yours also supports this (at least in the versions I'm using) was there ever a time this wasn't the case? I admit I've been out of the loop for a long time due to (mental) health reasons but I am sure that your latest(last) version existed already before this component saw the first light of day.
Title: Re: Waveform Minibar (mod)
Post by: Retrowave on 2020-04-10 22:16:05
Hi,

I dunno if this is the right place to report bugs but I have a problem with the component.
Playback stops while the component scans the file to create the waveform. This is quite annoying as it adds a gap of silence at the beginning of every track, which is particularly disruptive with gapless playback.
I have the latest FB and Minibar version and disabling it solves the issue.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-04-11 06:47:46
Is your machine perhaps very old? Like single-core old. The component doesn't stop playback - it simply opens a background thread to do the scanning. If there's not enough processing power left playback might be hindered.

Or do you use some source format that can only be accessed by a single reader at a time? I think for example Spotify input would be like that. If the source doesn't allow simultaneous decoding by two threads you'll have to scan the tracks in advance and store the waveforms in the database.
Title: Re: Waveform Minibar (mod)
Post by: Retrowave on 2020-04-11 22:59:53
Hi @Case ,

None of that. I have a quad-core i5 machine and I am decoding either mp3 or m4a files. Happens with both. CPU load is never beyond 5%.
I switched to @Zao's original version of the component and no problem there.
Title: Re: Waveform Minibar (mod)
Post by: Daeron on 2020-04-12 02:21:34
Maybe a combination of slow HDD and small playback buffer size?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-04-12 13:19:24
I tested the Normalize, and not sure if its not working as you mentioned, http://prntscr.com/risk62
There is still 50% black space that is not utilized.
I suspect your track is highly dynamic. The scaling decision is made from the full waveform data before it's scaled down - your window is so narrow that scaling eats away all the spikes that should hit the borders. I can change this to work after scaling but then changing the window size will make the waveform change size strangely.
I just released a new version where the waveform scale normalization is performed after the image is scaled to target resolution. It doesn't seem to cause the jumpy resizing I feared.
Title: Re: Waveform Minibar (mod)
Post by: Retrowave on 2020-04-12 15:15:35
Maybe a combination of slow HDD and small playback buffer size?
Don't think so. Buffer is 2 seconds, HDD is an SSD...
Title: Re: Waveform Minibar (mod)
Post by: muxx on 2020-05-04 19:12:00
Hello! From the description: "Lighter, fully software implemented..." What is lighter with a database of nearly 1GB? Is this only on my PC so large? The minibar.db database in C:\Users\Me\AppData\Roaming\foobar2000 have ca. 740MB - that's how it is on my hd. Is this normal?
Thank you.
Title: Re: Waveform Minibar (mod)
Post by: Vicas on 2020-05-04 21:10:08
@Case
Maybe an option to add to clear/remove cached minibar database if needed.
Or is it safe to just delete minibar.db file?
Title: Re: Waveform Minibar (mod)
Post by: fuffi on 2020-05-04 21:54:35
@Case
Maybe an option to add to clear/remove cached minibar database if needed.
Or is it safe to just delete minibar.db file?
it is safe to delete it, I do it every months, when it grows over 1GB.
removing automaticially old (user can chose between 1 month or 1 year old) data, would be nice though.
Title: Re: Waveform Minibar (mod)
Post by: Vicas on 2020-05-04 22:05:42
it is safe to delete it, I do it every months, when it grows over 1GB.

Ok, thanks.
Title: Re: Waveform Minibar (mod)
Post by: TuNk77 on 2020-05-04 23:05:10
If you don't want waveform minibar (mod) to take up space on your harddrive, can't you just select waveform minibar (mod) not to store anything in the database?
(https://i.imgur.com/zlmk8RU.png)
Title: Re: Waveform Minibar (mod)
Post by: dwmartin0906 on 2020-05-05 03:16:22
If you stop storing scans you might also want to delete the existing minibar.db file in your profile folder.  Scanning really doesn't take that long, usually under a half second.  A fifteen minute song only took 1.5 seconds.  Of course this will depend on your hardware.
Title: Re: Waveform Minibar (mod)
Post by: muxx on 2020-05-05 14:55:15
Save the tool every waveform of any song that I play? So that the waveform is instantly available when I start a audio track?
With not yet played tracks and/or without database must scan it the audio (CPU-laden) what takes some seconds?
Thanks.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-05-05 18:39:23
Hello! From the description: "Lighter, fully software implemented..." What is lighter [...]
It's lighter as it actually requires less processing power to operate than the original waveform seekbar component. And it doesn't require 3D accelerator and works perfectly over remote desktop connection. Also originally it was much lighter in options as it had none.

Save the tool every waveform of any song that I play? So that the waveform is instantly available when I start a audio track?
With not yet played tracks and/or without database must scan it the audio (CPU-laden) what takes some seconds?
It uses the match pattern query to try to group multiple copies of the same track behind single stored waveform scan result. It works that way for example if you have both lossless and properly encoded lossy collection of the same tracks - they will share the same scan result.
But if your files are all unique then the match method doesn't help you save space.

Default operation mode is to store the scan results for tracks you have in media library. But the preferences page allows you to choose to store also tracks outside media library, or if you wish, not store anything.
If you choose not to store the waveforms the component will have to rescan the same tracks every time you play them and it does use CPU power and delays the waveform display. The delay depends on how fast the track can be read from the media, how complex it is to decode and how fast your CPU is.

Personally I prefer having instant waveform display over worrying about a gigabyte or so of space being used. I would worry about such tiny usage only if my SSD was getting full and I had already removed everything else.
Title: Re: Waveform Minibar (mod)
Post by: muxx on 2020-05-07 23:12:58
Thank you for the info, Case! I think I let the plugin store the database on the hd. It's better than constantly CPU-load and consequential power consumption.
Title: Re: Waveform Minibar (mod)
Post by: kostis57 on 2020-05-13 17:07:19
As I see, Waveform Minibar (mod) is not compatible with UPnP Controller (foo_upnp component).
Or I am missing something?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-05-14 19:08:14
What makes you think that? I just installed foo_upnp and played some tracks from a BubbleUPnP served library and the component rendered waveforms without any issues.
Title: Re: Waveform Minibar (mod)
Post by: kostis57 on 2020-05-17 11:55:02
Thanks for answering
I am referring to "UPnP Controller”, not the “UPnP Browser” component of foo_upnp . My setup is:
Play with “UPnP Controller” panel, tracks included in the dedicated playlist named “Upon Controller Playback Queue”, casting to my network UPnP amplifier. Once the playback starts, nothing happens in the Waveform Minibar panel.
Title: Re: Waveform Minibar (mod)
Post by: minimaul on 2020-05-20 16:13:07
Hey!
Thanks for maintaining this - I've just migrated from the old foo_wave_seekbar component to this today, but I have a question - did the ability to show stereo tracks as a separate waveform per channel get removed from this updated version? Is there any way I can do this with this plugin?
Title: Re: Waveform Minibar (mod)
Post by: VainNihilist on 2020-05-29 13:55:49
Is it possible for the displayed waveform preference to follow the behaviour of the selection viewers (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Preferences:Display#Selection_viewers) (i.e. Album Art Viewer and Selection Properties), specifically the "Prefer current selection" option?

"Track to prefer when showing waveform:" = "Selected track" is probably closest but doesn't fallback to the currently playing track (when focus isn't on a track) so doesn't match up with the other selection viewers.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-06-02 08:04:25
did the ability to show stereo tracks as a separate waveform per channel get removed from this updated version? Is there any way I can do this with this plugin?
This component is purely mono. There is no way to configure that.

Is it possible for the displayed waveform preference to follow the behaviour of the selection viewers (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Preferences:Display#Selection_viewers) (i.e. Album Art Viewer and Selection Properties), specifically the "Prefer current selection" option?

"Track to prefer when showing waveform:" = "Selected track" is probably closest but doesn't fallback to the currently playing track (when focus isn't on a track) so doesn't match up with the other selection viewers.
I find that behavior buggy as the selection doesn't disappear when the player loses focus. But I would have added an option to mimic it if I could get it working. I don't seem to be able to get Windows messages about player losing focus to do that efficiently. If I learn how to get the required messages I'll add an option for this.
Title: Re: Waveform Minibar (mod)
Post by: roubchi on 2020-06-18 22:20:57
Hi all.

Oh. I installed it, it appears in File - Preferences - Components, and?.. I mean, how to make it shown?
the latest version of FooBar. I tried everything - component is installed Ok but no nothing reference to it.

Thanks.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-06-19 09:53:06
You need to add the element to the user interface. This guide should help: http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode).
Title: Re: Waveform Minibar (mod)
Post by: Dexter_prog on 2020-08-10 13:46:51
did the ability to show stereo tracks as a separate waveform per channel get removed from this updated version? Is there any way I can do this with this plugin?
This component is purely mono. There is no way to configure that.


Thanks for confirming this. I was going nuts, going back to waveform_seekbar. I'm not sure who plays mono music nowadays, but it's not useful for me not to be able to see both channels
Title: Re: Waveform Minibar (mod)
Post by: sammoth on 2020-09-22 19:37:41
I am having some issues with a multi-chapter mkv file. It seems that if I play anything except the first subsong, the scanning fails. The console just states that scanning has started, but the waveform is never updated with any peak information. Also, once I have selected or played such a subsong, foobar will hang on exit, so I guess the broken scan thread is still stuck. If I select the first subsong, the waveform is generated OK though.

edit: I have a different multi-subsong mkv file which doesn't cause this issue. When I select a non-1 subsong of the OK file, the waveform is not drawn but a single horizontal line is drawn across the wavebar (as if it's decided scanning failed or the song is silent), however on the problematic mkv, the wavebar remains completely black
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-09-23 07:01:12
I have seen slow scanning with at least DTS in Matroska when using FFmpeg input to handle the format. The first subsong doesn't require seeking and thus scans fast but all the others are slow. Blank minibar could be explained by the decoder hanging or the optional slow decode check giving up the scan job.
You probably can't share your problem file but it might be helpful to know which audio format it uses.
Could you verify with Process Explorer's Threads view that minibar threads are the cause for the player hanging on exit? I recall I have pretty extensive error checking and abort features everywhere.
Title: Re: Waveform Minibar (mod)
Post by: sammoth on 2020-09-23 12:19:47
After playing around I think it is just caused by any file that is very large, choosing a chapter far into the file. The hang time depends on the distance into the file and the slowness of the drive it's on. Looking at ProcMon, foobar is slowly reading the whole file when it's hung. I can reproduce this using the default MKV decoder or ffmpeg input wrapper on the same files. The audio codec in the file doesn't seem to matter, two examples were PCM and AAC.

Shouldn't seeking into the file be quite fast though? Foobar is able to seek to where it needs to start decoding almost instantly so why would the scanning need to seek any other way?

I tried looking at the threads in process explorer, there is always one thread using ~0.3% CPU while foobar is unresponsive, but it's in ntdll.dll and the stack seems to be different every time because it's doing something or other, so I'm not sure what's going on. The only stacks with anything interesting I got from this thread were ones with foo_input_std like:

0x0000000000000000
foobar2000.exe+0x2fc38
0x0000000000000000
foo_input_std.dll!foobar2000_get_interface+0x42164
0x0000000000000000

My only reason for thinking it's something to do with this component is because I tried on a clean portable install and 10/10 times with it enabled it will happen, and 0/10 times without.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-09-23 19:50:29
I can't replicate player hanging but I could replicate slow scanning. Minibar didn't specify input_flag_allow_inaccurate_seeking and apparently Matroska can't be sample-accurately seeked without parsing the entire file. New version released where decoder is allowed to use inaccurate seeking.
Title: Re: Waveform Minibar (mod)
Post by: sammoth on 2020-09-23 19:56:59
Thank you very much, that seems to have fixed it
Title: Re: Waveform Minibar (mod)
Post by: eddie.zato on 2020-09-30 13:54:47
Case
When using the minibar with CUI, you can add it to the toolbars area. Is it possible to make this work for DUI as well?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-09-30 17:42:54
Unfortunately Default UI doesn't support that.
Title: Re: Waveform Minibar (mod)
Post by: sammoth on 2020-10-02 13:08:48
I am noticing some more weird behaviours with chaptered MKVs. With normal separate audio files and nothing playing, if I select one file and then another, each time the wavebar will clear whatever it was showing and start generating the waveform for that file and displaying it as it's generated, even if it interrupted the generation of the previous file, as expected.

If I select different tracks from within the same chaptered MKV file with a cleared minibar.db, the first chapter I select will start generating visually and correctly from the beginning, and then if I interrupt it by selecting a new track, the waveform will stop updating but will not clear. Then only once the waveform for the new track is generated just beyond the point (% in the track) that the previous track was interrupted at will the waveform refresh with the new track's waveform. ie. the new waveform data only replaces the old one in the bar once it is longer (in %) than the previously showing waveform. Once a waveform for a track is generated completely, it won't be replacable, so whatever track you select in the MKV, the waveform won't change until you select a different file completely.

Sorry this explanation is so verbose  :-X
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-10-03 12:53:53
I have tried my best to reproduce this issue but switching subsongs in slow-to-decode MKV file doesn't trigger such problems here. I see the scan progress for each subsong in realtime when I switch between the parts.
Title: Re: Waveform Minibar (mod)
Post by: sammoth on 2020-10-03 13:14:42
Hmm, thank you for investigating. I just tried on a clean install and I couldn't reproduce it either, so I tried just deleting the *.cfg file for the component and now it works, even after restoring my settings. Strange!
Title: Re: Waveform Minibar (mod)
Post by: wcs13 on 2020-10-05 19:37:30
Feature request made in another topic and confirmed by Case as a possibility (I'm leaving this here just as a reminder) :

Minibar is blocked by foo_spotify, it doesn't allow opening decoders for any other purpose but realtime playback. I could circumvent that but as Spotify only allows a single decoder at a time it would break actual playback.
Building the waveform afterwards from data that has been played is a possibility. I may consider looking into it if I ever get too much spare time.
Title: Re: Waveform Minibar (mod)
Post by: incifinci on 2020-10-14 10:15:46
Thanks to the developer for this really nice plugin mod.
Suggestion: it would be nice to have an option in the context menu, as in original:
Title: Re: Waveform Minibar (mod)
Post by: wcs13 on 2020-10-17 01:43:50
Unexpected behaviour : using Affix Silence DSP component to insert a n seconds silence at the beginning of a track, when clicking on Play, Minibar cursor immediately starts travelling through the waveform. Then when it reaches n seconds (when the music starts to play), it stops for n seconds (the time for the music to catch up), then resumes normal operation. I don't think that's to be expected. Expected would be for the Minibar cursor not to show up until n seconds, then start travelling. What do you think @Case ?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-10-17 09:26:03
The position is reported by the core. If you enable standard seekbar you'll see it behaves identically. DSPs that manipulate playback length can cause such small glitches.
Title: Re: Waveform Minibar (mod)
Post by: wcs13 on 2020-10-17 09:57:39
Sounds great. It's not an important issue in any way. I still believe the core should be modified to report the correct position, but it won't keep me from sleeping.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-10-18 10:52:30
Suggestion: it would be nice to have an option in the context menu, as in original:
  • Extract waveform signature, if missing
New version out with added context menu command for generating waveform only for new tracks. Also added Columns UI button state support for the "Halt minibar processing" option.
Title: Re: Waveform Minibar (mod)
Post by: incifinci on 2020-10-18 14:43:32
Sorry, i was not able to send a private letter.

Thank you for so rapid implementation. Unfortunately, using it gives me a constant error:

failure_00000001.txt (http://crawlers.uw.hu/failure_00000001.txt)
Title: Re: Waveform Minibar (mod)
Post by: incifinci on 2020-10-18 14:44:10
__
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-10-18 15:06:26
It looks like you didn't submit a crash. Could you share the minidump that crash creates?
Edit: Actually it's probably not needed. I could replicate the crash when testing the feature on a larger set.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-10-18 15:26:11
Sorry about that, very silly bug. Fixed version uploaded.
Title: Re: Waveform Minibar (mod)
Post by: incifinci on 2020-10-18 17:29:45
Fixed version uploaded.
Yes, thank you -- it works fine.
Title: Re: Waveform Minibar (mod)
Post by: Vicas on 2020-11-18 19:19:42
Maybe this is not intended behavior.
I noticed that cursor movement is not smooth (there is some stuttering) when scrolling through playlist only if smooth scrolling is enabled at advanced DUI display settings.

foobar2000 1.6.2
waveform minibar 1.0.40
Title: Re: Waveform Minibar (mod)
Post by: Case on 2020-11-19 16:52:35
That is certainly not a bug in the component and I'm not sure if it can be circumvented. All other motion in foobar2000 seems to be halted while the smooth scroll event is being processed. Built-in seekbar stops, toolbar visualizations stop, visualization components stop, playback time display in status bar stops...
Title: Re: Waveform Minibar (mod)
Post by: Vicas on 2020-11-19 16:59:17
I see. Thanks for clarification.
Title: Re: Waveform Minibar (mod)
Post by: Jak90 on 2021-01-03 00:00:00
I found a somewhat decent workaround for those who need to see stereo waveform from time to time (see attachment).
1. Enter layout editing mode
2. Replace waveform element with splitter (top/bottom)
3. Add foo_wave_seekbar (old component) and foo_wave_minibar_mod (this component) to newly created splitter.
4. Exit layout editing mode

Now you can drag splitter's middle line up and down to "switch" between foo_wave_seekbar and foo_wave_minibar_mod
Some additional tips:
1. Lock splitter's height so you don't accidentally change whole element's height when switching between waveforms
2. Disable writing to DB for waveform component you use less. For foo_wave_minibar_mod there's a setting, for foo_wave_seekbar you need to change wavecache.db file to read-only
Title: Re: Waveform Minibar (mod)
Post by: 5236987410 on 2021-01-03 14:17:45
Awesome! This minibar is so much optimized compared to the old one in term of speed and size of the db file generated.
I've a demand on multichannel browsing. Would it be possible to add an option of multichannel support to cater this need?
Please consider as I believe this feature would be very useful for many users. Thanks.
Title: Re: Waveform Minibar (mod)
Post by: stevehero on 2021-02-21 15:44:49
Thanks for this. Looks great.


Sorry for all the questions.

(https://i.imgur.com/HKLaYwj.png)
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2021-02-22 06:16:44
It's the same horizontal resolution. The vertical resolution is made up, the top one is just using a linear gradient between the rms value and the peak value.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2021-03-04 12:54:41
@Case I have a cache issue for non mp3 files. Two files with same time lenght but different file size share the same generated waveform. I mean playing or clicking on the second one doesn't cause new waveform to be generated. Comparing them by the file name and file size should do the job.

Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2021-03-04 22:34:57
Are you sure they're not otherwise bit identical to each other? Or at least similar enough to produce the same waveform data? The waveforms in the original waveform seekbar only had 4096 samples for the entire file, in the form of min/max/rms.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2021-03-05 00:37:15
@kode54 acutally they are mod files with exactly the same pattern data but different samples.

 For example

http://amp.dascene.net/downmod.php?index=94286
http://amp.dascene.net/downmod.php?index=137206
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2021-03-05 02:03:21
Oh no, I think it's because the seekbar doesn't support Amiga filenames like my module plugins do, so it thinks they're both named "MOD".
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2021-03-05 07:46:20
It recognizes the difference with any other two mod files. I checked filenames before.
Title: Re: Waveform Minibar (mod)
Post by: stevehero on 2021-03-05 10:34:50
It's the same horizontal resolution. The vertical resolution is made up, the top one is just using a linear gradient between the rms value and the peak value.
 
 Would it be possible to get a linear option to display like the original? 
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2021-03-05 22:36:45
It's the same horizontal resolution. The vertical resolution is made up, the top one is just using a linear gradient between the rms value and the peak value.

 Would it be possible to get a linear option to display like the original?
I was only describing it. I'm not the author.
Title: Re: Waveform Minibar (mod)
Post by: stevehero on 2021-03-06 15:09:58
I was only describing it. I'm not the author.
 Oh, I thought you were, I should have double-checked the starting post. Sorry about that.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2021-03-06 18:43:29
@no9 you can change the match pattern to take size into account if you wish. It's the very first configuration setting on the preferences page. The default string uses metadata + length as the anchor as I want original lossless source and any lossy encodes to share the waveform.
The two files you linked both show up with title "the first sun" without any additional metadata to differentiate them. If the "alt" variant had the alt part in its title there would be no problem.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2021-03-06 18:50:58
It's the same horizontal resolution. The vertical resolution is made up, the top one is just using a linear gradient between the rms value and the peak value.
Would it be possible to get a linear option to display like the original?

Small clarification, minibar actually has higher horizontal resolution than the original seekbar. Minibar stores 4096 samples where the original stored 2048 samples.
It's unlikely that I'd add an option to simulate the blurred look. I don't like it and there are already way too many options.
Title: Re: Waveform Minibar (mod)
Post by: stevehero on 2021-03-06 19:38:39
Small clarification, minibar actually has higher horizontal resolution than the original seekbar. Minibar stores 4096 samples where the original stored 2048 samples.
It's unlikely that I'd add an option to simulate the blurred look. I don't like it and there are already way too many options.
It does look more blocky but I suppose that's the natural look of the waveform.

I do like the blurred look but no worries, thanks for the explanation.
Title: Re: Waveform Minibar (mod)
Post by: no9 on 2021-03-06 20:17:16
The two files you linked both show up with title "the first sun" without any additional metadata to differentiate them. If the "alt" variant had the alt part in its title there would be no problem.

Thanks! I didn't know what is this matching for. I  just added %filesize% to the pattern and it does the job.

Btw. I do find use for your plugin to compare such files and spot the differences (sometimes there are none). Timesaver.
Title: Re: Waveform Minibar (mod)
Post by: Seymour on 2021-03-07 16:16:35
Hello.
Is there a way to stack a couple of Minibars in a Columns UI and make them with different settings that will display different waveforms: one should show the currently playing item, and the other - selected?
It might be useful.
Title: Re: Waveform Minibar (mod)
Post by: TOPMuk on 2021-05-09 11:38:38
Hello, Case!
Thanks for the helpful component.
When installing the component version 1.0.44, there was a problem:
Failed to load DLL: foo_wave_minibar_mod.dll
Reason: the specified procedure was not found.

The previous version of the component worked.
How can resolve this error?
P.S. OS is Windows xp sp3 x86 and Foobar v 1.5.7
Title: Re: Waveform Minibar (mod)
Post by: Case on 2021-05-09 14:25:13
Sorry about that, I didn't realize Peter changed the SDK to include Vista+ API use. I recompiled with the same old SDK used for all the recent versions. I also reverted SQLite as the new one doesn't seem to offer any benefits but increases the file size by almost 100 KB.
Title: Re: Waveform Minibar (mod)
Post by: TOPMuk on 2021-05-09 19:58:41
Sorry about that, I didn't realize Peter changed the SDK to include Vista+ API use. I recompiled with the same old SDK used for all the recent versions. I also reverted SQLite as the new one doesn't seem to offer any benefits but increases the file size by almost 100 KB.
Thank you, dear Case!
You are amazing professional developer!
Title: Re: Waveform Minibar (mod)
Post by: Stone-D on 2021-05-19 01:35:24
This is really good, Case. No messing around configuring, and it took me five minutes to "good enough" match my visuals with the setup I had with the original.

There's just one thing. In the original, I could pause the track and click the waveform to seek to a location to continue playing at without actually resuming play. Ie it behaved like a seekbar. I use this a lot for online teaching and I miss it sorely.

Could you please allow the play-on-click feature you added in 1.0.3 to be disabled via an option?
Title: Re: Waveform Minibar (mod)
Post by: n0stalgia on 2021-08-17 13:03:47
Thanks for creating this, it's good to have a modernized version of the old plugin with much more options!

Is there a possibility to modify this plugin somehow to only show a thin line at the border of the waveform (akin to the Direct2D style of the original waveform seekbar)?
(https://i.imgur.com/QAJ0D00.png)
Title: Re: Waveform Minibar (mod)
Post by: Lucidae on 2021-09-06 10:19:14
A possible bug? The "draw border" option doesn't persist between foobar sessions in my DUI layout.
What I mean is, the option is still enabled but the appearance is that of no border drawn.
I have the waveform displayed directly below the top toolbar inside a locked panel.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2021-09-06 10:45:33
Not sure how borders are implemented with this component but with my own component, one of the first things I discovered when fb2k v1.4 came out a few years back is that my own borders no longer worked.

I inherited this code from WSH Panel mod and I explicitly don't even try to enable borders in DUI knowing it didn't work.

https://github.com/marc2k3/foo_jscript_panel/blob/33a88fd1fe8be5138469dee65abc92d7ba5b2cb2/src/Panel/PanelWindow.cpp#L333-L339

I only support them in CUI.

Title: Re: Waveform Minibar (mod)
Post by: tonez on 2021-09-06 15:07:30
@Case, can waveform calculation be skipped when waveform minibar is not displayed? Every waveform calculation does complete decoding of entire track. It doesn't make sense to utilize CPU so much when the result is not visible.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2021-09-07 07:55:17
A possible bug? The "draw border" option doesn't persist between foobar sessions in my DUI layout.
The Default UI overrides the component's window style nowadays. You can ignore the setting when using DUI and instead enable border for the host element. You can find the setting by right clicking a splitter in layout edit mode. The change in behavior must have come in foobar2000 v1.4, as snotlicker mentioned.

@Case, can waveform calculation be skipped when waveform minibar is not displayed? Every waveform calculation does complete decoding of entire track. It doesn't make sense to utilize CPU so much when the result is not visible.
It could, but I don't want to add that. If you make the minibar visible you would then have to wait for it to do its job. Also the main point is to let it scan the tracks and keep them in the cache so the task won't have to be done again in the future. If you don't want to use the component, disable it in the menu or uninstall it.
Title: Re: Waveform Minibar (mod)
Post by: tonez on 2021-09-07 13:03:25
I have too many music to cache all tracks. So I set "store nothing".

I want to use the component sometimes.
Title: Re: Waveform Minibar (mod)
Post by: st1krOne on 2021-12-05 16:11:29
$lower([%album artist%]|[%album%]|[$year(%date%)]|[$num(%discnumber%,1).][$num(%tracknumber%,2)]|%title%|[%length%]) - the standard rule in the mod, but how to make it appear when you listen to internet radio?

radio link - http://95.216.194.68/12_love_128
Title: Re: Waveform Minibar (mod)
Post by: Case on 2021-12-06 07:20:03
The component is a seekbar replacement. It is intentionally not doing anything with live streams since there is nothing sensible it could do.
Title: Re: Waveform Minibar (mod)
Post by: st1krOne on 2021-12-06 12:54:13
The component is a seekbar replacement. It is intentionally not doing anything with live streams since there is nothing sensible it could do.
thanks
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-01-04 07:52:33
Great component! I'm going to use this instead of the old waveform seekbar that I had in my layout for years.

There's a minor problem: I've set the option "Track to prefer when showing waveform" to "Playing, selected when stopped". However, when I use "Stop after current" and the track stops, the waveform from the track just played still shows instead of the one from the selected track.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-01-04 12:21:28
Thank you!

Unless you use the "cursor follows playback" option the selection will still remain in the stopped track. This is visible at least with Default UI and Columns UI. This doesn't look like a bug to me.
Title: Re: Waveform Minibar (mod)
Post by: gryph0n on 2022-01-12 09:23:43
Is this component open-source?
I could not find any links to Github (or other public code repositories), so I would guess it's not. Any plans to make the code public ?

Whether you open-source it or not, thank you for sharing the binary component. I've just started using it, and find it an excellent tool. Appreciated !!

PS: FWIW, i've been a longtime lurker here (almost 10 years), but have only now created an account.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-01-13 13:35:04
All my components are closed source, apart from the few based on GPL-licensed code. I don't have accounts on any git sites.

I haven't had good experience with open sourcing components so I decided long ago not to do that anymore. Sorry.
Title: Re: Waveform Minibar (mod)
Post by: StealthX on 2022-01-14 22:35:20
How do I replace the old waveform with this one? I am using https://github.com/catlinman/foobar2000 and can't figure out to edit panels.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2022-01-14 22:48:28
Well it's using Columns UI so look under File>Preferences>Display>Columns UI>Layout.

With normal CUI layouts, it should be easy as replacing the panel like for like using the right click menu (remove then add)

Things can be a lot more complicated if the parent node is Panel Stack Splitter. Removing/adding panels may break things unless you really know what you are doing.
Title: Re: Waveform Minibar (mod)
Post by: StealthX on 2022-01-14 23:33:37
Well it's using Columns UI so look under File>Preferences>Display>Columns UI>Layout.

With normal CUI layouts, it should be easy as replacing the panel like for like using the right click menu (remove then add)

Things can be a lot more complicated if the parent node is Panel Stack Splitter. Removing/adding panels may break things unless you really know what you are doing.

You're a legend, I risked it and removed the old one and added the one and I think everything is okay. It's been like 10 years since I've used foobar and I remember editing "themes" being a lot easier on the old foobar config I downloaded from someone back then.
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-01-15 00:32:05
I risked it and removed the old one

You can first backup the .fth file in fb2k's AppData folder. You can also use fb2k's menu function "View > Layout > Create scratchbox" and import the .fth file there to play around with changes to your layout.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2022-01-15 02:40:44
.fth files and the scratch box are purely default UI only. The above posts were about Columns UI.
Title: Re: Waveform Minibar (mod)
Post by: Lesmo16 on 2022-02-01 12:05:24
I friendly like to suggest an additional setting for this superb component:

Track to prefer when showing waveform: Playing, blank at startup & end

With this setting the waveform would be removed after stop or after playing the last track of a list.
So the waveform would be shown only while playing/pausing.
Title: Re: Waveform Minibar (mod)
Post by: Function on 2022-03-03 13:03:25
Generating the waveform seems to block some parts of the GUI until it's down. I have Cursor follows playback enabled and when playback moves to the next song, or i skip to the next song, the GUI doesn't update until the waveform is done rendering.
Would it be possible to make this non-block or asynchronous so that the GUI can update immediately? That would be really good because i work a lot with files outside my library where i don't have the minibar processed beforehand.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-03 14:35:22
All processing is done in another thread and UI updates are already rate-limited. But the current rate limiting is meant to prevent fast machines from trying to update the UI too often. I can see how it could still cause problems on a slower machine if all the processing power gets wasted on UI update attempts.

Here's a test version that automatically reduces UI update speed if it detects stalling. It seems to work fine on my emulated Pentium 2. Please report if it helps with your UI stalls too.

Edit: obsolete attachment removed.
Title: Re: Waveform Minibar (mod)
Post by: sevensenses on 2022-03-04 17:03:58
Hello

I have a question for the developer of this wonderful plugin for Foobar 2000.
Is it possible for the next release to select a view that only shows half of the waveform.

Here is the original picture:
https://i.postimg.cc/Bv0PrKkZ/foobar2000a.jpg (https://i.postimg.cc/Bv0PrKkZ/foobar2000a.jpg)

And this is how I would like it:
https://i.postimg.cc/wBg3fdR7/foobar2000b.jpg

That would be great because I think it would save a lot of space.
Thank you, greetings from Vienna.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-05 12:26:32
I may be crazy for adding more options but here's a new build with requests from @Lesmo16 and @sevensenses implemented. Still no proper release as I'm waiting for mr @Function to report if the change helped.
Title: Re: Waveform Minibar (mod)
Post by: incifinci on 2022-03-05 12:30:56
...I'm waiting for mr @Function to report if the change helped.
As a little data: at least, i did not have a problem after installing it. Win7x64hun
Title: Re: Waveform Minibar (mod)
Post by: Lesmo16 on 2022-03-05 17:48:37
@Case: Thank you very much for "Playing, blank when stopped". :)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-06 08:34:33
Released version 1.0.46 (https://www.foobar2000.org/components/view/foo_wave_minibar_mod) with the recent changes. It also includes fixes for the half wave mode. Initial version rendered super short tracks incorrectly.

I hope a moderator or an admin removes the old attachments as the forum no longer allows me to do that myself.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2022-03-06 08:41:28
Speaking of which.... why aren't you a moderator? There's a lot of dead wood on that "staff" list.... people who haven't been seen for 10 years plus. :P
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-03-06 08:56:42
@Case:

The half-wave option doesn't work quite correctly. If the signal contains a DC component (which is the case with some microphone recordings), some information may be hidden or presented with the wrong proportions (the negative values). I attached a sample audio file with waves in the positive, negative, then again positive range (followed by silence). And I attached an image how SoundCloud renders that file.

EDIT:

I think, in this mode, the peak and RMS value of a pixel column should be calculated from all positive sample values and all negative values treated as positive values, lumped together in one pool for the pixel column's time frame.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-06 09:48:59
Speaking of which.... why aren't you a moderator? There's a lot of dead wood on that "staff" list.... people who haven't been seen for 10 years plus. :P
I suppose I'm not worthy.

The half-wave option doesn't work quite correctly. If the signal contains a DC component (which is the case with some microphone recordings), some information may be hidden or presented with the wrong proportions (the negative values). I attached a sample audio file with waves in the positive, negative, then again positive range (followed by silence). And I attached an image how SoundCloud renders that file.
The half wave mode is correct. It simply renders the top half of the wave form. Before implementing it I verified that this is exactly how Audacity's half wave mode works too.

SoundCloud's interpretation isn't half wave, it's some visually pleasing semi-random presentation. It doesn't seem to be based on waveform or RMS. It for example shows non-existing fade in, a supposedly quieter portion near the beginning and it makes the -84 dBFS background noise appear audible.
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-03-06 10:09:50
The half wave mode is correct. It simply renders the top half of the wave form. Before implementing it I verified that this is exactly how Audacity's half wave mode works too.

But how can this be what the user wants - hiding information? What do you say to my previous edit: "I think, in this mode, the peak and RMS value of a pixel column should be calculated from all positive sample values and all negative values treated as positive values, lumped together in one pool for the pixel column's time frame." Such an algorithm should be the only behavior in my opinion, but at least an option.

What SoundCloud does additionally is a separate topic. Not everything has to be replicated. And Audacity should also change its behavior.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-06 10:41:31
I don't know if that's a good idea. It gives more visible data but the data is a lie. Here's a link to a test version that turns negative sample values positive in the half wave mode: <edit: obsolete version removed>.
Here's additional test samples.

Edit: I updated the test version just now. I got distracted with food earlier and the initial version missed two "< 0" checks.
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2022-03-06 13:50:19
Thanks for continually updating this amazing component Case. Half wave mode looks great to me. I'm no coder or EE, but I heard that when things like compressors want to derive the average signal to apply gain reduction to, etc., they use something called 'half wave rectification' which I think looks similar to this 'half wave' display style. Not sure if it's pertinent to the current discussion, but just thought I'd mention it in case it might be helpful. Keep up the great work!
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-03-07 11:56:54
@Case:

I tested the test version. There seems to be something wrong with the algorithm. See attached images and their filenames (long one: "better than showing silence, but why only RMS.png"). In my understanding, the half-wave peaks should be the result of pseudocode max(pos_px_col_peak, abs(neg_px_col_peak)). Regarding RMS: Audacity seems to ignore (and not assume as zero) sample values with different sign than the waveform half that the RMS value is calculated for. It also doesn't use the same value above and below the zero line. I guess that's how you do it also, since RMS is about the surface of the waves in the respective waveform halves. (Also, RMS needs to be restricted by the peaks.) If negative sample values are treated as positive, I wonder if it's because of this that the surface increases and the RMS value is unexpectedly large. So maybe the half-wave RMS value, derived from abs(sample) values, should be divided by 2 as a conceptual average, or, alternatively, calculate RMS as before for lower and upper half and build the average of that. Or is there a more direct mathematical way to not calculate an average of an average?

The short audio files you attached of course look strange with their bouncy shape. But showing silence half of the time would also be a bit off toward the signal reality. It's a simplification after all and, most importantly, these very short files aren't real-world data the component was made for.

BTW: Here's an article about waveform asymmetry. (https://www.soundonsound.com/sound-advice/q-why-do-waveforms-sometimes-look-lop-sided) Apparently, some instruments are especially prone to it.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-07 19:19:11
The first alternative mode from the previous post was a bit of a hybrid. It only converted negative samples positive if there was nothing on the top half of the waveform to show.
Here's another variant that always shows the larger peak of the two: <edit: obsolete version removed>.
I'm trying to use the existing render function as much as possible and only do minimal amount of variable toggling, that caused the RMS logic bug shown in your screenshot. At least things look better now with the sample you provided.
Note that RMS and all other data is pre-calculated, this is just manipulating rendering. And yes, rendering RMS is restricted between the waveform shape.
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-03-07 20:46:58
That looks good -- peak and RMS, as far as I can tell! If you want to investigate: Your "sine.flac" unexpectedly looks different than before. There's the bouncy shape, but with some peak color decor on top of the RMS color and less free space below the shape in some places. But it's not a concern for me.
Title: Re: Waveform Minibar (mod)
Post by: razielanarki on 2022-03-08 11:02:19
wow, great to see this plugin still being so actively worked on!

so, pardon me, but i wanna seize the occassion, and suggest a (relatively) small feature:
per-instance config, just for the things available from the context menu (ie: playing/selected track displayed, etc), with one minor addition: the option to disable seeking and/or clicking, and just use it as a waveform display.
being a (nowadays mostly) hobby-dj, i find the display immensely useful when selecting tracks and comparing possible duplicates while organizing my music library - however now i have to switch between the currently playing track, and the playlist selected one....
so it would be nice to be able two of these in a setup, with diiferent behavior, one for the playing track, and one for the playlist selection.

Thank you!

(ive tried the other waveform panels, but the original dx shader one seems laggy, and I could not get an exact shader (albeit got very close), and pondered modding the old non-mod version of this plugin, but tnen i would miss all the fixes and optimizations optimizations made to it since...)
Title: Re: Waveform Minibar (mod)
Post by: Nighted on 2022-03-08 12:58:23
Ooooooooo....liking the half wave mode. Keep up the great work!
Title: Re: Waveform Minibar (mod)
Post by: sevensenses on 2022-03-09 19:01:34
Hello, everyone  :)

Unfortunately, I didn't have time to look back earlier, but as I can see, wonderful programming art was done here.
I'm blown away, exactly what I wanted and in record time thanks to your commitment.
It's nice that others also share my opinion and find this display mode quite good.
This plugin may be getting old, but it's still the best for Foobar, and it's nice to see that it still has so many users.

I'm looking forward to the official new release.
I've currently updated from to the release of Case.

Many thanks
SevenSenses
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-10 10:10:42
so, pardon me, but i wanna seize the occassion, and suggest a (relatively) small feature:
per-instance config, just for the things available from the context menu (ie: playing/selected track displayed, etc), with one minor addition: the option to disable seeking and/or clicking, and just use it as a waveform display.
Unfortunately I have not taken this kind of use into account and the entire thing is based on globally tracking which tracks to follow and render. I'd have to do a lot of redesigning to support this.

But I may be able to fulfil your request other way. Here's an experimental Waveform Minibar (viewmod) (http://www.saunalahti.fi/~cse/temp/foo_wave_minibar_viewmod.fb2k-component) version that you can install on the side. It's a view-only version of the component with its own configuration but it still uses the same waveform database.
Title: Re: Waveform Minibar (mod)
Post by: razielanarki on 2022-03-18 07:53:52
Unfortunately I have not taken this kind of use into account and the entire thing is based on globally tracking which tracks to follow and render. I'd have to do a lot of redesigning to support this.

But I may be able to fulfil your request other way. Here's an experimental Waveform Minibar (viewmod) (http://www.saunalahti.fi/~cse/temp/foo_wave_minibar_viewmod.fb2k-component) version that you can install on the side. It's a view-only version of the component with its own configuration but it still uses the same waveform database.

ah somehow i missed this, checking it out now thanks!

edit:
works like a charm, seriously thank you good sir! 8)

quick screenshot:
Title: Re: Waveform Minibar (mod)
Post by: sevensenses on 2022-03-18 08:13:33
Hello together

Your plugin is already in full use :-) Thank you

(https://i.postimg.cc/8cn1sqyx/IMG-20220318-090425.jpg)
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-03-22 12:00:53
@Case: I have set "Track to prefer when showing waveform" set to "Playing, selected when stopped". It would be great if you'd still be able to view other waveforms while playing a track, e.g., to compare another track with the playing one to judge whether they're duplicates, or just general interest. Since Alt+click and Alt+arrow keys don't seem to have special meaning (as opposed to Ctrl or Shift), this could be used to switch over to the waveform of the selected track. I think it would be ideal if the other waveform would be displayed again as soon as Alt is released. Ideally, Alt-clicking the already selected track would again show its waveform.
Title: Re: Waveform Minibar (mod)
Post by: Air KEN on 2022-03-28 03:28:16
Hi Case :)

Some parts are not displayed in settings dialogs.
"Use half wave mode" cannot be checked on Linux (Ubuntu Cinnamon).

Ubuntu Cinnamon 21.04 + Wine 7.5 (Development)
foobar2000 v1.6.10
Waveform Minibar (mod) 1.0.46
https://hydrogenaud.io/index.php?PHPSESSID=v9tce2geuc644cghdbl056o562&topic=116045.msg1008942#msg1008942
(https://i.imgur.com/PRgHONR.png)

Thanks.




Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-03-28 07:29:57
Your Wine is configured to use custom fonts with different sizes instead of normal Windows fonts. Dialog sizes are computed from fonts. Here's a test version that uses the old default dialog font and should solve your issue: <edit: obsolete version removed>.
This is newer alternative from alt2 test mode linked earlier. Includes half-wave mode in right click context menu.
Title: Re: Waveform Minibar (mod)
Post by: Air KEN on 2022-03-28 08:40:41
Thanks Case.
> Dialog sizes are computed from fonts.
Yes, But this component only.

> This is newer alternative from alt2 test mode linked earlier.
OK. The problem has been solved.
Many Thanks.
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-04-03 13:46:47
@Case: After running the context menu's "Utilities > Regenerate minibar waveform" of a playlist item, the component isn't updated. You have to select another item and then the updated item again.

Also, when I use MP3Gain to achieve clipping (confirmed by audio editor), the component still displays free space up to it's outermost edges.
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2022-04-04 03:01:58
The component is likely normalizing the peaks as it scans, in that case. foobar2000 does not clip lossy audio formats, it will decode them to whatever incredibly high peak level the codec decodes to, since it decodes most of them in floating or fixed point, depending on the decoder.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-04-06 14:56:06
The component has an option to normalize the waveform, but that isn't used by default. The track is split into 4096 slices and each slice is scanned for smallest and highest sample values. This data gets resized to the UI element's size further limiting the visibility of single peaks.
I released version 1.0.47 (https://www.foobar2000.org/components/view/foo_wave_minibar_mod) with all the changes from the test versions along with a tweak to force regenerated waveform to become instantly visible.
Title: Re: Waveform Minibar (mod)
Post by: TOPMuk on 2022-04-20 12:39:11
Hello Case!
Thanks for your component. It is very useful.
But I got a problem when I installed the new version 1.0.47 of mod: CPU load 29-99%.
You can reproduce the situation, for example, by adding location: tone://1500 and trying to play it.
P.S. Mod settings: "track to prefer when showing waveform->Selected track"
     foobar v.1.5.9
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-04-20 17:00:35
Thank you. Fixed version uploaded.
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2022-04-24 09:26:15
Glitch: Preferences window cut off (right side). Windows 10, Scale: 125%
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-04-24 14:38:26
Thanks for letting me know. I don't understand why the contents got scaled disproportionally. But it's fixed now with slight style adjustment to the dialog resource file.
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2022-04-24 14:45:34
Confirmed. Thank you.
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2022-05-03 17:54:53
Hello Case,
please enable automatic switch between dark and light mode of Waveform Minibar (mod) in CUI.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-05-03 18:47:29
It should already work if you don't use custom colors. Does it not work for you?
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2022-05-03 19:00:05
It works, I used custom colors. But now the contrast in Dark mode is too low
Title: Re: Waveform Minibar (mod)
Post by: DJ Graco on 2022-05-15 19:27:47
Hello,
I have question. Is it possible to seek with keyboard shortcuts? I am a blind user and the seeking option seems interesting especially for the raw aac.
Title: Re: Waveform Minibar (mod)
Post by: kode54 on 2022-05-15 22:41:56
I think default controls for foobar2000 itself already support seeking forward and back by using the left and right arrow or cursor keys, but raw AAC doesn't support seeking in foobar2000. The argument is that it becomes prohibitively expensive to scan every file on every open for its length and to build a seek table.
Title: Re: Waveform Minibar (mod)
Post by: DJ Graco on 2022-05-19 15:39:41
OK, thank you very much for answer.
Title: Re: Waveform Minibar (mod)
Post by: Seymour on 2022-06-14 11:18:07
Here's an experimental Waveform Minibar (viewmod) (http://www.saunalahti.fi/~cse/temp/foo_wave_minibar_viewmod.fb2k-component) version that you can install on the side. It's a view-only version of the component with its own configuration but it still uses the same waveform database.
Dear Case,

Please make a version like "viewmod" but with click-to-search control like the standard version.

Thank you!
Title: Re: Waveform Minibar (mod)
Post by: Sickid on 2022-06-18 12:38:06
Whether you can add an option to the settings page to block the right-click menu.
Title: Re: Waveform Minibar (mod)
Post by: Gabohar on 2022-06-28 04:18:49
I have been using this mod for a just a week and I think that looks and works even better than the original, thanks and keep going! 💪‍
Title: Re: Waveform Minibar (mod)
Post by: mooee on 2022-07-06 19:26:29
This is an excellent component.
There is a tiny bug though. When I'm playing a track from an idle USB HDD that takes a few seconds to spin up, then the waveform is not displayed, even if I played this track before. Here's what it looks like: https://imgur.com/nlb1Uxt
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-07-07 07:59:36
I don't think you have found a bug. Note that the component by default doesn't cache waveforms for tracks that aren't in media library. But it by default aborts waveform generation for tracks that can't be decoded in realtime. Both behaviors can be adjusted in preferences.
Title: Re: Waveform Minibar (mod)
Post by: Tony Hawk on 2022-07-09 12:03:23
How to update the minibar.db of the entire media library at once? Is it possible to add this feature?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-07-10 07:19:27
That is already possible. There's a main menu command "Sync minibar with library" in the Library menu.
Title: Re: Waveform Minibar (mod)
Post by: Vicas on 2022-07-11 01:23:54
Would it be possible to add an optional user input option to limit cache size? Once limit is reached waveform would stop caching new files.
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2022-07-12 15:13:09
That is already possible. There's a main menu command "Sync minibar with library" in the Library menu.

Not seeing that option here, FB2K 1.6.11 Win 11 Pro.
Title: Re: Waveform Minibar (mod)
Post by: Mikko_H on 2022-07-12 16:05:26
Hi, I'm running foobar2000 on linux with wine. Clicking the seekbar causes foobar2000 window to lose focus. It's behaving like a popup panel instead of normal embedded panel, none of my other panels do this.

This is not a huge issue but I can't set special kwin (window manager) settings for foobar2000 as Waveform Minibar is treated like a normal window, causing settings for foobar2000 to also affect the seekbar.

Tested on both default and columns ui.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-07-15 10:24:24
Hi guys, I've just started using Waveform Minibar along with Replay Gain.  What I notice is substantial differences in the amplitude of tracks on the minibar, which of course replay gain is evening out.

Feature request: have the waveform display optionally take replay gain into account when displaying the track.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-07-18 08:53:04
Feature request: have the waveform display optionally take replay gain into account when displaying the track.

Aha!  Have discovered the "normalise" option in the relevant preferences section.  An annoyance is that if a track is supposed to be silence (such as my guard tracks, although I won't need to use them much), the replay gain can be made +0.00dB but normalisation by Waveform Minibar fills the space with "noise" instead of showing a flat line.  Having a replay gain option which can be used instead of normalise would cure that.

I've also discovered that I can change the database index to something more appropriate for how I organise my music.  Excellent.
Title: Re: Waveform Minibar (mod)
Post by: fb2k_user on 2022-08-03 02:28:51
Hello! Is it possible to add a feature to display a custom string somewhere in the waveform bar, like %playback_time%[ / %length%]?

Here is an example to illustrate https://imgur.com/a/hh4S8Rc (https://imgur.com/a/hh4S8Rc)

Thank you!
Title: Re: Waveform Minibar (mod)
Post by: Terence on 2022-08-03 04:42:24
Hello! Is it possible to add a feature to display a custom string somewhere in the waveform bar, like %playback_time%[ / %length%]?
Hello, It's not exactly what you're asking, but I've seen an answer that's close.
https://hydrogenaud.io/index.php/topic,122658.msg1012698.html#msg1012698
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-08-20 10:34:26
Feature request: have the waveform display optionally take replay gain into account when displaying the track.
New version uploaded with ReplayGain added to the scale options.
Title: Re: Waveform Minibar (mod)
Post by: Squeller on 2022-08-20 11:22:22
Feature request: have the waveform display optionally take replay gain into account when displaying the track.
New version uploaded with ReplayGain added to the scale options.
Hey thx Case. RG track gain now looks like everything is clipping, see attachment, visually in every track the graph exceeds the top border.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-08-20 11:48:33
That's because your track is clipping with track-based RG. Boost of 9.36 dB means each sample value is multiplied by about 2.94. The track's peak becomes 1.2. Anything over 1.0 is clipped.
Title: Re: Waveform Minibar (mod)
Post by: h-h on 2022-08-25 09:42:12
@Case:

Would it be possible that you enable the kind of seeking back to the start of the track with the mouse that my attached drawing illustrates? You click on the seekbar, hold the button and drag the mouse to the left of the seekbar, so that the playing position is reset to 0:00. Currently, this maintains the current playing position, so is a no-op as far as the audio is concerned.

EDIT:

Wouldn't be bad if aborting seeking by going above or below the seekbar would still be possible. That would mean just support for going over the left and right edge.

BTW: Aborting seeking by right-clicking while left-clicking shows the context menu, and when you get rid of the context menu with Esc, the seekbar acts as if the left mouse button was still pressed.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-25 10:06:06
Would it be possible that you enable the kind of seeking back to the start of the track with the mouse that my attached drawing illustrates? You click on the seekbar, hold the button and drag the mouse to the left of the seekbar, so that the playing position is reset to 0:00. Currently, this maintains the current playing position, so is a no-op as far as the audio is concerned.
I don't understand.  It does exactly that for me.

Click on waveform: playback jumps to that point
Click-hold-drag-release: playback jumps to the release point
Drag to extreme left: playback jumps to zero

Maybe you're looking at the waveform for a selected track rather than a playing track?  File > Preferences > Tools > Waveform Minibar (mod) > Track to prefer when showing waveform > Playing track

Win7 Starter
FB2K 1.6.11
Waveform Minibar (mod) 1.0.49
Title: Re: Waveform Minibar (mod)
Post by: askold on 2022-08-29 12:20:02
version 1.2.51 released on 2022-08-27
foobar 1.6.12, windows 7 sp2 x64
Quote
Failed to load DLL: foo_wave_minibar_mod.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.
previous version 1.0.50 works perfectly
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2022-08-29 12:22:11
It's quite clear where it says...  Versions starting from 1.2.x require foobar2000 v2.0.

edit: I see 1.6.12 is final now and that might mean v2 public beta is coming soon.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-29 13:14:58
Feature request: have the waveform display optionally take replay gain into account when displaying the track.

Prompted by the last couple of posts, I went to review the change log for 1.0.50 compared with the 1.0.49 I have installed, to find this:
Quote
1.0.50 (2022-08-20):   Added option to scale waveform by ReplayGain values.
That's great, thanks (but why not alert us to the update via the forum?).
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2022-08-29 13:18:30
Eh? You got a direct response from Case here...

https://hydrogenaud.io/index.php/topic,116045.msg1013945.html#msg1013945
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-08-29 13:38:56
I was under the impression foobar2000 v2.0 beta would be live very soon. I uploaded the new version targetting it in part to test auto update feature and in part to have 64-bit and dark mode supporting version ready in time.

Off topic, but once 2.0 is live you can find the other components I have prepared for it here (https://foobar.hyv.fi/2.0/).
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-29 14:01:41
Eh? You got a direct response from Case here...

https://hydrogenaud.io/index.php/topic,116045.msg1013945.html#msg1013945
Oh.  Sorry.  I don't recall seeing that.  Or perhaps I did, and dismissed it from my mind... I've slept since then.  MY BAD.

Update: I've worked it out.  The big reason for my original feature request was that Waveform Minibar (mod)'s normalise option was making my silence tracks look like noise, but since then I've found the stop-after-track options so I no longer need silence tracks (mostly), so I ignored the update and forgot why I had ignored the update (or that there had been an update).  Yes, I am long in the tooth and the brain isn't very retentive...

I was under the impression foobar2000 v2.0 beta would be live very soon. I uploaded the new version targetting it in part to test auto update feature and in part to have 64-bit and dark mode supporting version ready in time.

Off topic, but once 2.0 is live you can find the other components I have prepared for it here (https://foobar.hyv.fi/2.0/).
I'll be sticking with 1.6.11 (or maybe 1.6.12) for the foreseeable future, so it's pre-2.0 components only for me!
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-29 14:12:40
Question: I have scanned all my tracks into WBM(mod), but still some seem to be analysing the waveform on select instead of just fetching from the cache.  And then, playback is delayed a few seconds until the waveform has populated.  Yes, I do have the option set to prioritise play over waveform display, so what could be causing both or either of these issues?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-08-29 14:23:52
Is the component configured to store those results? Remember that by default only results for tracks in media library get cached.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-29 15:40:13
Is the component configured to store those results? Remember that by default only results for tracks in media library get cached.
Yes indeed, and most tracks come up instantly.  I've just done a limited spot check using a random library search and importing the result into a playlist, and the odd thing is that this seems to only affect the bottom 15 or so of the 65 entries.  I will investigate further, but I'm now thinking that the items in the search result might be listed in the order they are stored on disk, and for some reason only the "top half" of the library has been cached.  Is there a limit on the number of entries in the cache?

As to the playback being delayed, I'm not seeing this now.  Maybe I was wrong, that's how it seemed at the time, but I have since updated to 1.0.50.

Regarding the replay gain setting: great, except the waveform now only fills about a third of the bar height.  I acknowledge there will be some variation according to the dynamics of the content, but I think it could do with a bit more "boost", maybe double.
Title: Re: Waveform Minibar (mod)
Post by: Air KEN on 2022-08-29 16:37:43
I was under the impression foobar2000 v2.0 beta would be live very soon. I uploaded the new version targetting it in part to test auto update feature and in part to have 64-bit and dark mode supporting version ready in time.

Off topic, but once 2.0 is live you can find the other components I have prepared for it here (https://foobar.hyv.fi/2.0/).
Hi :) @Case
Case's Conponents for foobar2000 v2.0
https://foobar.hyv.fi/2.0/

> support both 32-bit and 64-bit  / require foobar2000 v2.0 (64bit)

Does it make sense?
Thanks.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2022-08-29 17:03:46
No text anywhere says anything about requiring 64 bit. So no, it does not "make sense".

If anyone is confused by the single component download, it's because both DLLs are packaged inside following this advice...

https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Development:Overview#Different_CPU_architectures
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-29 17:08:03
Is the component configured to store those results? Remember that by default only results for tracks in media library get cached.
Yes indeed, and most tracks come up instantly.  I've just done a limited spot check using a random library search and importing the result into a playlist, and the odd thing is that this seems to only affect the bottom 15 or so of the 65 entries.  I will investigate further, but I'm now thinking that the items in the search result might be listed in the order they are stored on disk, and for some reason only the "top half" of the library has been cached.  Is there a limit on the number of entries in the cache?
Having investigated the minibar.db file, I find it has stored only the first roughly 2000 results of what should have been a scan containing almost 4000 tracks.  I'll have another go...
Title: Re: Waveform Minibar (mod)
Post by: Air KEN on 2022-08-29 17:16:18
No text anywhere says anything about requiring 64 bit. So no, it does not "make sense".

If anyone is confused by the single component download, it's because both DLLs are packaged inside following this advice...

https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Development:Overview#Different_CPU_architectures

> require foobar2000 v2.0 (64bit)
Why not "Works with foobar2000 v1.6 and newer"?
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2022-08-29 19:25:10
@Case any chance we can get your Meier Crossfeed component in 64 bit too? No hurry, but it's a real fave of mine!
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-08-29 19:36:48
> require foobar2000 v2.0 (64bit)
Why not "Works with foobar2000 v1.6 and newer"?
I have usually made components that work on ancient foobar2000 version and all but WASAPI (for obvious reasons) even still supported Windows XP. But with foobar2000 v2.0 I decided to finally utilize newer compiler and enjoy the benefits of the latest SDK features. This is much simpler and I like making small components as I don't need to bundle so much support code, I can for example rely on SQLite coming with the player. I went with new versioning with 2.0 compatible Minibar so I can still easily backport fixes and possibly features to old version.

@Case any chance we can get your Meier Crossfeed component in 64 bit too? No hurry, but it's a real fave of mine!
foobar2000 v2.0 actually has Meier Crossfeed built-in.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-29 21:44:19
Having investigated the minibar.db file, I find it has stored only the first roughly 2000 results of what should have been a scan containing almost 4000 tracks.  I'll have another go...
Having deleted the .db and run sync again, I confirm there is as many entries in the new .db as there are tracks in the library.  Phew!

I guess the previous run must have terminated early for some reason.
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2022-08-30 06:45:07

@Case any chance we can get your Meier Crossfeed component in 64 bit too? No hurry, but it's a real fave of mine!
foobar2000 v2.0 actually has Meier Crossfeed built-in.

Fantastic news!
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-30 12:40:02
Regarding the replay gain setting: great, except the waveform now only fills about a third of the bar height.  I acknowledge there will be some variation according to the dynamics of the content, but I think it could do with a bit more "boost", maybe double.
Can I appeal to the author to release a 1.0.51 with a user setting for scale/magnification, pretty please? (No, I don't mean 2.whatever)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-08-30 13:56:44
foobar2000 v2.0 beta 1 is out: https://www.foobar2000.org/download (https://www.foobar2000.org/download)

Regarding the replay gain setting: great, except the waveform now only fills about a third of the bar height.  I acknowledge there will be some variation according to the dynamics of the content, but I think it could do with a bit more "boost", maybe double.
Can I appeal to the author to release a 1.0.51 with a user setting for scale/magnification, pretty please? (No, I don't mean 2.whatever)
I kind of knew adding the option to scale by ReplayGain was a bad idea. Dynamic music can clip and highly compressed music appears quiet. I don't think adding more scaling options will make anyone happy. But if you can convince me that some new option can save the day, I can consider it. What kind of setting you do have in mind?
Personally I use the "Original" option. Showing the actual scale of the source makes the most sense.
Title: Re: Waveform Minibar (mod)
Post by: Air KEN on 2022-08-30 14:20:05
> foobar2000 v2.0 beta 1 : 32-bit | 64-bit
> Supported processor architectures: x86 32-bit, x86 64-bit.

I understand.
Thanks.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-08-30 15:51:23
I kind of knew adding the option to scale by ReplayGain was a bad idea.
Don't say that, I think it's a useful option.  It's just that using it, the waveform display shows my tracks as occupying only a fraction of the available space.

Dynamic music can clip and highly compressed music appears quiet.
So the usefulness of ReplayGain depends on the nature of the content, in which case those for whom it is not useful won't be using it and won't use that option in WMB(mod).

I don't think adding more scaling options will make anyone happy. But if you can convince me that some new option can save the day, I can consider it.
Well, it will make me happy, if that's good enough...

What kind of setting you do have in mind?
Just a scaling option to set the level which corresponds to the full height of the waveform display, defaulting to "1.0" but user configurable between 0.1 and 9.9 (say), independent of the Original, ReplayGain (etc) options.

Maybe it doesn't need a user setting for scale – maybe you miscalculated what the correct scale should be once the ReplayGain has been taken into account?  From my observations, the waveform amplitude (when using ReplayGain) needs increasing by a factor of somewhere between 2 and 3.

Personally I use the "Original" option. Showing the actual scale of the source makes the most sense.
Suppose the whole track is quiet.  What is the point of seeing (essentially) a flat line in the minibar?  Use a VU meter to see the source level.  But each to his own.

I would be perfectly happy with Normalise if it had a gain limit or squelch so it didn't expand low level noise to fill the screen (my silence tracks again - I still have some use for them).  I guess you're taking the maximum amplitude in the whole track and then dividing all the amplitudes by that value, so the maximum amplitude is always "1".  When the maximum amplitude is 0, dividing by 0 leads to a problem.  You could just tweak the Normalise function so it ignores amplitudes less than (eg) +/-128.

I am using the minibar to see the overall dynamics of a track, because (for my use-case, ballroom dancing music) that often means I can see where an intro ends, outro starts, and the phrasing in between.  I can do that best with Normalise, but with the irritation of silence tracks.  The music is "normalised" using ReplayGainTrack (which saves me having to adjust the volume for every track), so ReplayGain is an effective alternative to Normalise and overcomes the silence track irritation were it not for the irritation of WMB now displaying an attenuated waveform.

BUT: this is a First World problem.  I'm grateful for what I've got.  "Improvements" are just icing on the cake.
Title: Re: Waveform Minibar (mod)
Post by: Shinsekai on 2022-09-03 01:12:07
There is a minor glitch:
Color change isn't displayed immediately, in the screenshot, all are set to red but remain the same.
Clicking again sets the correct color tho.
(https://i.imgur.com/SX7iUm9.png)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-09-03 10:37:09
What kind of setting you do have in mind?
Just a scaling option to set the level which corresponds to the full height of the waveform display, defaulting to "1.0" but user configurable between 0.1 and 9.9 (say), independent of the Original, ReplayGain (etc) options.

Maybe it doesn't need a user setting for scale – maybe you miscalculated what the correct scale should be once the ReplayGain has been taken into account?  From my observations, the waveform amplitude (when using ReplayGain) needs increasing by a factor of somewhere between 2 and 3.
Scale isn't miscalculated unfortunately. It's just that modern music is so loud. You may not know it, but original ReplayGain target playback level was even 6 dB quieter.
If you have any classical music you can see the ReplayGain scale option filling the area more evenly. And some posts back you have an example where the ReplayGain scale even clips heavily: https://hydrogenaud.io/index.php/topic,116045.msg1013946.html#msg1013946 (https://hydrogenaud.io/index.php/topic,116045.msg1013946.html#msg1013946).
Also you can easily verify that the shown waveform matches ReplayGained output. Just use Converter to write a track with applied ReplayGain and compare the waveform.

But that said I can consider allowing additional scale here. The scale selection dropdown list has allowed entering manual scale factor in floating point number since the early days. I could just move that option to a multiplier edit box and make the dropdown into regular static dropdown selection list. Then you could use custom multiplier combined with the initial scale.

Personally I use the "Original" option. Showing the actual scale of the source makes the most sense.
Suppose the whole track is quiet.  What is the point of seeing (essentially) a flat line in the minibar?
That is exactly the point. I want to see what is in the file. When the waveform displays a near flat line I know immediately that the source file is quiet.

I would be perfectly happy with Normalise if it had a gain limit or squelch so it didn't expand low level noise to fill the screen (my silence tracks again - I still have some use for them).  I guess you're taking the maximum amplitude in the whole track and then dividing all the amplitudes by that value, so the maximum amplitude is always "1".  When the maximum amplitude is 0, dividing by 0 leads to a problem.  You could just tweak the Normalise function so it ignores amplitudes less than (eg) +/-128.
Your silence tracks aren't silent. If they were the normalize wouldn't touch them - digital silence shows up as a flat line with the option. Your tracks have analog noise in them. If you used Audacity to create them, it by default applies dither. You can disable the setting in Audacity or use for example foobar2000 to create actual silence.

There is a minor glitch:
Color change isn't displayed immediately, in the screenshot, all are set to red but remain the same.
Thanks, fixed versions uploaded.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-09-03 23:09:32
Your silence tracks aren't silent. If they were the normalize wouldn't touch them - digital silence shows up as a flat line with the option. Your tracks have analog noise in them. If you used Audacity to create them, it by default applies dither. You can disable the setting in Audacity or use for example foobar2000 to create actual silence.
That's interesting, thanks.  I'll look into it.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-09-04 16:03:49
If you used Audacity to create them, it by default applies dither. You can disable the setting in Audacity
Progress: I can't find a setting for dither, but if I normalise in Audacity it reveals the low level noise that WMB picks up.  I originally created the tracks in Audacity 1.2.6... but now with 3.1.3 the generate silence operation seems to produce a proper flat line.

I've recreated my silence tracks and copied them into my library (replacing the originals), but I can't figure out how to make WMB re-scan them - sync doesn't know anything's changed.  Do I have to delete the .db and re-scan the whole library, or is there an easier way?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-09-04 16:55:17
Glad you got the silence issue sorted.
You don't need to wipe the database. There is a rescan command, but it is hidden by default to keep the context menu cleaner. If you hold shift-key while right clicking, you will see all the hidden commands.

The command is 'Utilities' -> 'Regenerate minibar waveform'.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2022-09-04 17:13:08
Perfect, thanks.
Title: Re: Waveform Minibar (mod)
Post by: Valetos2 on 2022-09-24 18:46:57
I've been using Waveform Seekbar for a long time. Since everything moves to 64 bit I've tried this mod.

The only thing I do really need is viewing all channels waveform: if it's stereo I prefer to see two channels, if 5.1 there should be 6. It shows a lot of useful information. I guess it won't be implemented? So I'd stay with 32 bit foobar and older plugin.
Title: Re: Waveform Minibar (mod)
Post by: karasuhebi on 2022-09-30 09:06:49
Any way to add back in the feature from the original component that lets you see all of the channels?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2022-10-02 17:46:06
No.
Title: Re: Waveform Minibar (mod)
Post by: Fool_on_the_hill on 2022-10-04 15:41:57
separate channels view would be nice. otherwise I stick with old foobar2000 :(
Title: Re: Waveform Minibar (mod)
Post by: baloneyboy on 2022-10-04 19:39:00
separate channels view would be nice. otherwise I stick with old foobar2000 :(
Yes, that's the only missing feature which keeps me from updating.
Add separate channel view please.
Title: Re: Waveform Minibar (mod)
Post by: Studio 308 on 2022-10-18 13:12:22
There's a component called WSH Panel (foo_uie_wsh_panel). It is windows script host, but its default function was (before _mod version) a simple seekbar that was filling with color during playback. But the main and only important thing it has over all seekbars - it shows cursor time position while seeking, total time and current bitrate (for variable) and also artist and title. If you can add at least current time position - that would be awesome and I will no longer need that outdated component that won't be updated anyway.
Title: Re: Waveform Minibar (mod)
Post by: a on 2022-11-06 17:18:59
Would it ever be possible to have the normalize setting but for album gain? As in, the loudest points on the album will always be peaking on the seekbar, contrary to how the normalize setting will be peaking on the seekbar for the loudest points on each track.
Title: Re: Waveform Minibar (mod)
Post by: a on 2022-11-24 20:45:34
I would love to see a moodbar feature sometime as well.
Title: Re: Waveform Minibar (mod)
Post by: Squeller on 2022-12-24 10:39:42
What I just noticed. When player is stopped, I can still click and move the "playhead" in your minibar, and upon release it starts playback.
THIS IS AWESOME BEHAVIOUR. So thanks for your addon and all the best wishes.
Title: Re: Waveform Minibar (mod)
Post by: tomchr on 2023-04-01 04:25:19
Feature request:

- 0.5 second mouse wheel notch seek.

I do not know if it is possible, but how about totalizer time display such as elapsed/remaining/total down to hundredths of a second?
Title: Re: Waveform Minibar (mod)
Post by: tomchr on 2023-05-05 00:05:44
Feature request:

- 0.5 second mouse wheel notch seek.


Just to expand on the 0.5 second mouse wheel notch seek request  ;)  As it stands, the smallest usable increment seems to be 1 second and that feels just a bit too coarse.
Next lower setting is 60 milliseconds or 0.006 seconds which is way too small an increment.

A good option would to be include centiseconds as an option in the drop down list (i.e. 1/100th of a second). This way we get 1/10, 1/4, 1/2 second notch seek using the existing drop down list of increments.

- Thanks

 
Title: Re: Waveform Minibar (mod)
Post by: grimes on 2023-05-05 00:39:12
60ms = 0.06s. You are right, can't choose between 0.06s and 1s.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2023-05-05 11:42:31
The scroll wheel selection has been a silly oversight. Uploaded a new version to the repository that offers better options.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-05-05 19:18:23
The scroll wheel selection has been a silly oversight. Uploaded a new version to the repository that offers better options.
I take it that's not available for fb2k v1?
Title: Re: Waveform Minibar (mod)
Post by: esa372 on 2023-05-05 21:25:42
Thanks for the update today, Case.   8)
Title: Re: Waveform Minibar (mod)
Post by: Case on 2023-05-06 08:45:45
I take it that's not available for fb2k v1?
The component description page contained obsolete information. I updated it now, though it still lies a bit. The component works on foobar2000 v1.5 if the user has Windows 7 and CPU supports SSE2 instructions. I set minimum version to 1.6 so XP users won't get incompatible version with auto update.

Initially all my x64 and dark mode enabled components used non-public SDK that created pure foobar2000 2.0 supporting components that couldn't run on anything older. The components were converted to foobar2000 v2.0 mode a long time ago when the plan was that 2.0 would only be released as x64 version and wouldn't run legacy components.

But as things stand now the current SDK can create components that work on foobar2000 v1.5 and v1.6 and there's even a way to downgrade foobar2000 v2.0 SQLite-based configuration settings back to 1.x .cfg files. So I reworked all my components to only use pure 2.0 mode on 64-bit foobar2000 and use the 1.x compatible mode on 32-bit foobar2000. And the 32-bit components will import the SQLite config so no data should be lost in transition.

Unfortunately I can't maintain XP compatibility with these hybrid components. Not only doesn't compiling the SDK work on XP-supporting Visual Studio out of the box but the SDK uses Windows API features that just aren't present on anything older than Windows Vista.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-05-06 10:18:02
So I reworked all my components to only use pure 2.0 mode on 64-bit foobar2000 and use the 1.x compatible mode on 32-bit foobar2000. And the 32-bit components will import the SQLite config so no data should be lost in transition.
That's fantastic, thanks.  It seems to me to represent the gold standard.
Title: Re: Waveform Minibar (mod)
Post by: tomchr on 2023-05-07 23:57:28
The scroll wheel selection has been a silly oversight. Uploaded a new version to the repository that offers better options.

Many thanks for updating such a great component. Waveform Minibar represents the gold standard of seekbars :-)
Title: Re: Waveform Minibar (mod)
Post by: karasuhebi on 2023-05-09 03:58:44
No.

Not that you need to give one but I'm curious as to what the reason is. No interest in the feature or is it some sort of technical hurdle?
Title: Re: Waveform Minibar (mod)
Post by: frogworth on 2023-05-09 04:18:35
Not that you need to give one but I'm curious as to what the reason is. No interest in the feature or is it some sort of technical hurdle?

We've been through this a number of times now. Case is not interested.
Last year Zao talked about looking into a rebuild of his original component (https://hydrogenaud.io/index.php/topic,77490.0.html) but it's obviously quite a bit of work.
Title: Re: Waveform Minibar (mod)
Post by: karasuhebi on 2023-05-09 04:35:17
Thanks for your response! I was actually just reading the very first page of posts from this thread and saw someone asking for it. Came back here to edit my post to say "never mind" but your post was already here. I guess I'll just have to stick with the old component for now. Thanks again!
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2023-05-09 06:30:27
Last year Zao talked about looking into a rebuild of his original component (https://hydrogenaud.io/index.php/topic,77490.0.html) but it's obviously quite a bit of work.
Sneaking a bit off topic but still touching an audience that might care:

I did some tech exploration for a "v2" Waveform Seekbar there in October where I was trying all sorts of neat stuff like a more capable UI library, more customization of seekbar effects without having to touch shader code, and bringing it up to current supported graphics APIs and OS releases.

That ended up stuck in the mists of design and I stashed it away - instead doing a more straightforward port of the project which just targeted D3D11 effects in legacy mode. That prototype port handles the default effects fine and seems to run well on all platforms, but the work needed to ship and support it and the multitude of existing effects that users have authored puts it in "maybe someday" territory.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2023-05-18 15:23:37
Super low priority request but it would be cool if tooltips were light/dark depending on UI settings.


Title: Re: Waveform Minibar (mod)
Post by: PES on 2023-06-11 18:02:10
Have a good day,

The Waveform Minibar is a very good component. I'm used to it.

I learned my lesson a bit and enabled full file buffering in the preview version of foobar2000.

I often play from the internet and send my music via UPNP to Foobar2000 (UPnP/DLNA Renderer component). I thought I would take a look at the data flow. Full file buffering works, tracks are downloaded from the internet and then played without any problems. However, the data bypass corresponds to twice the size of the song. I assume Foobar2000 reads the data into full file buffering and Waveform Minibar reads the data separately for waveform.

Couldn't the Waveform Minibar component use the data from full file buffering if this is active?

Best regards PES
Title: Re: Waveform Minibar (mod)
Post by: JohnnyFire on 2023-07-09 15:58:49
Super low priority request but it would be cool if tooltips were light/dark depending on UI settings.

that will be awsome to match the UI better, but an option to disable the tooltips will be great too!
hope this can be happend in next update!



MOD edit: Improper quote fixed
Title: Re: Waveform Minibar (mod)
Post by: DClaville on 2023-07-09 16:29:18
This is almost the perfect component only thing missing is the option to have separated Left and Right channel waveforms same as the good old component offered.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2023-07-11 07:51:52
Super low priority request but it would be cool if tooltips were light/dark depending on UI settings.
I hadn't even realized the tooltips didn't support dark more until your request. I see you create custom tooltips manually in JScript, those look a bit different than the OS native ones. Minibar will get dark tooltips when foobar2000 adds support for them. At the moment neither Default UI nor Columns UI has them. In my opinion it is best for the entire UI to use the same style and avoid creating custom workarounds in individual components.

Couldn't the Waveform Minibar component use the data from full file buffering if this is active?
All file access depends on foobar2000 behavior. I have forwarded the enhancement request to Peter.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2023-07-11 09:52:19
My tooltips are OS native. It might look different because I use a slightly larger font size by default. Users can also specify any font they want.

I use SetWindowTheme whenever dark mode is toggled like this...

Code: [Select]
SetWindowTheme(m_tooltip, m_is_dark ? L"DarkMode_Explorer" : nullptr, nullptr);

Title: Re: Waveform Minibar (mod)
Post by: Case on 2023-07-11 15:25:29
Thanks marc2k3. I didn't expect tooltip darkening to be that simple.
Released version 1.2.55 with dark mode aware tooltips. I still believe entire UI should have the same looks so I broke my own principle.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2023-07-13 11:03:14
Thanks for the updated component.

One minor niggle though. I noticed it doesn't support dark mode tooltips when using Columns UI on fb2k 1.6.x. There is a method in the CUI SDK...

https://columns-ui-sdk.readthedocs.io/en/latest/appearance/colours.html#_CPPv4NK3cui7colours6helper19is_dark_mode_activeEv

edit: I have a dev related question for you. I noticed your colour preferences can detect which UI is active and get the colours. I can get colours from within DUI elements/CUI panels but I'm curious as to how you do it from the preferences.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2023-07-13 16:04:28
I am confused. I use the foobar2000 Core Dark Mode stuff to detect dark mode as both Default UI and Columns UI should be in sync with the mode. I believe that is also how Preferences window knows to be in dark vs light mode. It works here exactly as it is supposed to.

My preferences color code handling can probably be considered cheating. I copy colors from the UI element's/panel's color update function to a global structure.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2023-07-14 11:28:23
CUI supports its own dark mode on fb2k 1.6.x but it does not integrate with fb2k core dark mode because it's obviously not present pre 2.0.  That's why I posted a link the CUI SDK method which is completely independent of fb2k native dark mode support.

It's probably a bit niche to consider so you can forget it if you like. I only implementeed it because CUI dark mode was public way before fb2k 2.0 was released to the great unwashed like me.
Title: Re: Waveform Minibar (mod)
Post by: markhavemann on 2023-08-07 05:16:57
First of all thanks for making this, it's been really useful for me.

I wonder if there is some way to zoom in on the waveform? I primarily use it for listening to speech, and often need to pause between utterances. If the file is too long then the waveform is too cramped up to be useful for seeing when there is about to be a pause, without being zoomed in.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-08-07 07:44:14
I wonder if there is some way to zoom in on the waveform?
What you see is all there is, a "digest" of the track dynamics as however-many samples taken over whatever the length of the track is.  That digest is stored in a database so that it doesn't have to be re-generated each time.

I think you need to use something else, such as Audacity.  With that, you can load a track and play it, and display the waveform in whatever detail you wish.
Title: Re: Waveform Minibar (mod)
Post by: Drybonz on 2023-08-10 02:59:08
I love this mod, but I notice that when I'm using ASIO, the playback indicator on the waveform is choppy, sometimes pausing before starting.  Is this the ASIO or the mod, or both?  I tried changing to various buffer settings in output, but it didn't seem to help.  Thanks for any advice.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2023-08-15 08:49:12
The progress should be quite smooth but as it's not tied to the monitor's vertical sync it's not 100% perfect.
But if it works worse with ASIO than using other output methods, your ASIO implementation has some weird latency reporting. Are you using the official ASIO output (https://www.foobar2000.org/components/view/foo_out_asio) by Peter? Not sure if ASIO drivers can affect that but just curious, which audio device and drivers are these?
Title: Re: Waveform Minibar (mod)
Post by: JohnnyFire on 2023-08-28 15:00:13
Please i really really hope for a option to disable the seekbar tooltip!
Title: Re: Waveform Minibar (mod)
Post by: TOPMuk on 2023-10-14 14:58:44
Hi Case!
Thank you for a very useful Waveform Minibar (mod) component for the Foobar2000 player.
I found a problem with high CPU usage (see attached image). The problem can be reproduced when the component is set to "Track to prefer when showing waveform->Selected track" and "Scanned waveforms to store in database: Store nothing" and I hold down the arrow down (or arrow up or PageDown or PageUp) key in the playlist for a few seconds to scroll through the list of tracks.
Maybe the solution of this problem is to set (optionally in the component settings) a time interval: if during this interval another track in the playlist is not selected, then processing by the Waveform Minibar (mod) component begins.

I use foobar2000 v1.5.11, Waveform Minibar (mod) v1.2.53 (Last for Windows XP)
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-10-14 17:32:07
The problem can be reproduced when the component is set to "Track to prefer when showing waveform->Selected track" and "Scanned waveforms to store in database: Store nothing"
The solution to your problem is to allow it to cache waveforms, so it doesn't have to scan each track you touch every time you touch them!
Title: Re: Waveform Minibar (mod)
Post by: TOPMuk on 2023-10-14 18:45:11
The problem can be reproduced when the component is set to "Track to prefer when showing waveform->Selected track" and "Scanned waveforms to store in database: Store nothing"
The solution to your problem is to allow it to cache waveforms, so it doesn't have to scan each track you touch every time you touch them!
Hello, fooball.
I'm sorry but this is not good solution. You propose to use the component in your own way (by saving waveforms in the component's database) and do not assume that others are using it differently (without saving). But even if you enable saving, the problem remains. If the tracks in the playlist have not been processed previously and saved to the component database, then the load on the central processor is just as high (see attached image).

I also note that this problem exists on a powerful computer (Intel i5 with 3.4GHz, 16Gb RAM, SAMSUNG EVO SSD 2TB), and on a weak PC (acer one ZG5 netbook) the problem is worse (even playback is interrupted, so you have to turn off the component when searching for a song)
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-10-14 19:45:37
You have to pay the piper.  If you want to use the waveform bar, then you have to allow that the CPU will be required to create it.  The point of the cache is not to have to do that every time, so if you don't want to use the cache be prepared for a heavy processor load - simple as that.  Your choice.

My choice is to sync the database once, in slow time, then it's only new tracks which need to be added when first encountered.

You're right, you can use it your way if you want, but there is that compromise.
Title: Re: Waveform Minibar (mod)
Post by: DClaville on 2023-10-16 11:37:08
when ever i add new music i select it and right click for generate missing waveform data and this way i have the waveforms for every song and never have any lag I think everyone should just do this unless they for some reason dont have more storage
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-10-16 13:00:14
I think everyone should just do this unless they for some reason dont have more storage
The cache doesn't take much storage, compared with the file size of the tracks!  My library contains 5,500 tracks which occupy something like 54GB, but the size of my minibar.db is a mere 180MB, ie 0.3%.

It's not that everyone should do this, it's their choice, but if they don't there's no point complaining about how long it takes or how much CPU load there is when generating the waveforms live.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2023-10-16 13:05:16
@TOPMuk
Back when designing the original waveform seekbar (and minibar) component there has been the assumption that consuming some CPU in low priority worker threads is fine. The expectation there is that at least two cores on the system so that the background analysis can be performed with little impact on the interactive use of the system.

If live scanning isn't acceptable, there's indeed the option of scanning tracks intentionally ahead of time which is intended for that kind of purpose. In the original seekbar it was possible to tune the number of background threads, but that option seems to not be available in minibar as it's a simpler tool.

Design-wise for a workaround, one could do something like a delay before a scan job is pushed on to the queue on highlight, but that also means that it needs to be optional as intentionally delaying previews would hurt most users. As the component is supposed to not have a lot of knobs, I'm not sure if Case is keen on doing anything like that.
I don't think that adding such a feature would help you anyway as you're stuck on an older version as you're on a discontinued OS.

It's hard to judge what the actual impact is on your big machine is, as the i5 series has existed since 2010 and without knowing roughly which generation it is there is a huge span of possible processors with significantly varying performance.
One should also remember that using CPU cycles is typically not a problem if it is low enough priority - OSes are built to schedule work and ultimately, you need to compute what you need to compute.

It's unfortunate that the netbook is not powerful enough to play music while decoding a track at maximum speed in the background, but there's not much room design-wise to do anything else there. If paths are the same you could copy the database from a machine where you've pregenerated waveforms or generate some for your whole library overnight.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2023-10-16 13:08:40
It doesn't take much storage, compared with the file size of the tracks!
Amusingly enough, one of the problems I faced with the original components and a reason why I made the effort to compress waveforms was that it could take noticeable space as for a system installation the foobar2000 profile is located in the user's roaming profile.
When you start taking up gigabytes there, it can get impractical. :D
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-10-16 13:13:41
I use netbooks running Win7 pre-SP1, with a SSD and a portable FB2K 1.16 (so my profile stuff is where I choose rather than where the OS decides).  Works fine for me, even better with a cache.
Title: Re: Waveform Minibar (mod)
Post by: ears on 2023-10-28 20:12:14
Case,
Thank you for an excellent plugin.
I'm wondering if you might consider adding an integration with another of your other indispensible plugins, foo_skip.

A right click on the waveform might have the options to:
set SKIP in point
set SKIP out point
and then automatically write those tags to the file.

Additionally, if SKIP tags are found with a file's metadata, perhaps some sort of marker or visual indicator could be shown on the waveform.

Thanks for considering this request.
Cheers.
Title: Re: Waveform Minibar (mod)
Post by: meg on 2023-10-29 06:41:29
Hi, I spent several hours just to ENABLE Waveform minibar. Why foobar is so user-friendly (not)? Any docs, or FAQ in first post (of this (or every) plugin)?

And waveform is different from waveform in audio-editors. I don't know is it a good or not. Firstly, its vertical scale is lower than 100%, secondly, it's maybe smoothed. Maybe, it's easier to seek, but it's not exact waveform. I don't know.
The most of the modern tracks are clipped at 100%, and remain look like clipped (but not at 100%) when zoomed out by y axis, but the Waveform Minibar displays them smooth and as if not clipped.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-10-29 07:03:31
Hi, I spent several hours just to ENABLE Waveform minibar. Why foobar is so user-friendly (not)? Any docs, or FAQ in first post (of this (or every) plugin)?
It's free.  People put in their effort for free.  Tell you what, if you think you can improve the documentation then by all means join the team and contribute.  A user forum is (effectively) an alternative to maintaining documentation – beginners ask questions, experienced users help them out.

I don't recall having any particular problem adding the waveform minibar to my screen layout, once I understood the general method.  Look back through my early posts on this forum – you'll see what help I needed... but yes, I was fiddling around for several hours (or more) to get *my personal* user interface the way I wanted it.  What other player offers that flexibility?

Quote
And waveform is different from waveform in audio-editors. I don't know is it a good or not. Firstly, its vertical scale is lower than 100%, secondly, it's maybe smoothed. Maybe, it's easier to seek, but it's not exact waveform. I don't know.
The most of the modern tracks are clipped at 100%, and remain look like clipped (but not at 100%) when zoomed out by y axis, but the Waveform Minibar displays them smooth and as if not clipped.
It's not meant to be an oscilloscope view, it just gives an impression of the track dynamics.
Title: Re: Waveform Minibar (mod)
Post by: DClaville on 2023-10-29 12:05:38
@meg

as always the best things are rarely the easiest. it just takes some learning to learn how to use Foobar and that its endlessly customizable, which is why we use it.

have you tried the different options for the waveform displaying?
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2023-10-29 15:58:43
And waveform is different from waveform in audio-editors. I don't know is it a good or not. Firstly, its vertical scale is lower than 100%, secondly, it's maybe smoothed. Maybe, it's easier to seek, but it's not exact waveform. I don't know.
The most of the modern tracks are clipped at 100%, and remain look like clipped (but not at 100%) when zoomed out by y axis, but the Waveform Minibar displays them smooth and as if not clipped.
The waveform shown is an approximation of the true signal as decoded. It's generated on the fly from the full signal by cutting the track up into a few thousand buckets and in each bucket computing the minimum sample value, maximum sample value and the root-mean-square (RMS) of the samples.

This retains several relevant pieces of information like the peaks where decoding clips as the extents always include the extreme values. It will tend to show brickwalled audio as a bit more solid than it may truly be but that's what the RMS metric is for, to judge the contained energy.
The number of buckets are chosen to provide around one pixel of resolution in typical desktop resolutions while also not exploding disk storage requirements for cached waveforms. Similar derived plugins in other media players have similar approaches where they even pregenerate images of the data.

While it differs from what you may see in a typical audio editor like Audacity or Audition, the purposes of the programs are different and these components are able to leverage the constraints into providing a good experience across your whole library with minimal latency.
The vertical extent can be influenced by settings like replaygain and normalization. It's supposed to confer information at a glance and let you do informed seeking, not be "accurate" beyond usability. Any waveform you see in components or editors is going to be processed in some way, nothing shows "the exact waveform".

They're wide audio thumbnails, pretty much.
Title: Re: Waveform Minibar (mod)
Post by: Stem75 on 2023-11-03 08:02:03
hello!

Is there a chance to make it stereo with a choice for mono?

I am asking this as a lot of others, i think and i have seen an explanation why it won't be, but (as an example of why it should be) i am using foobar2000 as a quick sample viewer with (Waveform Seekbar) to explore my samples and have a quick view of them (as a free alternative), but it hasn't been updated from 2014 and foobar has moved to x64 so it's time for an updated setup.

It would be very helpful if i could set it like this (currently with Waveform Seekbar) replaced with (Waveform Minibar (mod)) witch i think it should be faster and more stable due to the updates:

Mono file

X

Stereo file

X
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-11-03 09:37:47
Is there a chance to make it stereo with a choice for mono...?
If Waveform Seekbar does what you want but Waveform Minibar doesn't, then simply keep using Waveform Seekbar (even if than means 32-bit).  The whole point of Waveform Minibar is to be a Waveform Seekbar Lite, and you want it to become Waveform Seekbar (one person's "must have" is another person's unwanted bloat).

Similarly, there are obsoleted features (other add-ons) I use which are no longer maintained and will never be ported to the 64-bit platform, so I will remain 32-bit.  Not only that, but the hardware I use won't support V2 at all!  I'm, not whinging about it, I accept that for what it is and remain grateful that it is still possible to use old versions of the software at all.

Quote
as an example of why it should be
"Should"??  So your particular use-case makes it an essential?!!

As a non-coding user, all you (and I) can do is ask nicely and hope those who put in their effort for free will look kindly on the request.  But there are things we can do to avoid irritating people and giving ourselves a black mark, such as not asking when similar previous requests have been refused (with or without explanation).

For one thing: Waveform Minibar is creating what was described only a couple of posts ago as a "waveform thumbnail", and that is all that is stored in the cache database.  Making that stereo-capable would involve a major rehash (apart from making Waveform Minibar something it was never intended to be): analyse L & R separately instead of L+R, store two thumbnails per track, retrieve and display two thumbnails for the current track...
Title: Re: Waveform Minibar (mod)
Post by: Case on 2023-11-03 09:41:00
Your example image only proves my point that multi-channel display is utterly useless. Your layout uses so much space to show three channels and the example stereo file you have, even though it's more different between the channels than majority of files are, is still showing a sample with almost identical channels. Just slight volume difference.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2023-11-03 09:51:32
Your example image only proves my point that multi-channel display is utterly useless.
It's not useless if that's what somebody happens to want, I got into that argument with the contributing developers for OpenOffice being more interested in their software than how people (in my case an experienced word processor user) need to use it ("why would you want to do that??").  There are always reasons, just that they don't necessarily apply to any one individual.

Nonetheless, there is no compulsion to provide when there is no contractual relationship, and in this case the user has an alternative.
Title: Re: Waveform Minibar (mod)
Post by: Stem75 on 2023-11-03 10:40:25
fooball you took me all wrong and i don't blame you.

My mother language is not English, so fair enough reaction about "should" and i apologize.

But i am only showing an example of how someone might need to use it so the developer could have some other perspective about his work.

I am not saying that i will comet a suicide if it won't be stereo or this and that, but i thing that anyone can have his opinion and suggestions about how it could be better.

There are always ears to hear someone speaking don't they?

As for becoming a replica, why that? Is it bad to take good features for something else and use it for your own good. Isn't that what we are doing in our every day life?
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2023-11-03 12:41:34
@Stem75 I should note that there's a x64 alpha build of the Waveform Seekbar which hasn't been published to the components repository.
I prepared it to bring all my components into the future of v2/x64 to avoid my components being the reason that someone holds off upgrading their player.
The accelerated mode now runs on D3D11 and supports most of the effects people have used, it should be a drop-in update unless you've done something fancy.

https://hydrogenaud.io/index.php/topic,77490.msg1030109.html#msg1030109
Title: Re: Waveform Minibar (mod)
Post by: Stem75 on 2023-11-03 13:13:06
That is very good news!

Thank you very much. I'll be watching the progress.

Again thanks.
Title: Not Seeing Waveform Minibar (foo_wave_minibar_mod)
Post by: Case on 2023-11-29 08:48:43
Quote from: alansharon on 2023-11-28, 23:17:14
I installed Waveform Minibar but don't see it in the UI. What am I doing wrong?
You need to add it to the user interface. Here's documentation how to add elements to the Default UI: https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Layout_Editing_Mode).


MOD edit: Added quote
Title: Re: Waveform Minibar (mod)
Post by: Defender on 2024-01-12 08:01:00
Hi,

I just implemented the minibar in my skin because I needed a full width seekbar with neutral colors. Looks good already.

Would it be possible to at pseudo transparancy awareness (at least for background)?
I like to control how the panel looks before the plugin is displayed on top of that background (art / gradient).

In the attached screenshot I also enabled a Channel Spectrum analyzer with pseudo on. That's kind of what I'm looking for.
For comparison I also enabled two original waveseekbars (one of which I use in case of multichannel audio).

Thx
Title: Re: Waveform Minibar (mod)
Post by: Case on 2024-01-14 15:40:44
I'm not at all familiar with this transparency hack stuff, but I attempted adding support for it.
Currently version with the feature implemented is only available from https://foobar.hyv.fi/?view=foo_wave_minibar_mod (https://foobar.hyv.fi/?view=foo_wave_minibar_mod).
Title: Re: Waveform Minibar (mod)
Post by: Defender on 2024-01-14 18:09:32
I'm not at all familiar with this transparency hack stuff, but I attempted adding support for it.
Currently version with the feature implemented is only available from https://foobar.hyv.fi/?view=foo_wave_minibar_mod (https://foobar.hyv.fi/?view=foo_wave_minibar_mod).

Thank you! Works like a charm.

BTW. It's not a hack, standard functionality of CUI PSS.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2024-01-16 10:32:00
New version released to both my site (https://foobar.hyv.fi/?view=foo_wave_minibar_mod) and the official component repository (https://www.foobar2000.org/components/view/foo_wave_minibar_mod).
I had to tweak the transparency mode a bit and only enable it when running on Columns UI.
I also implemented Default UI button state support for the "halt" status, in case someone needs it.
Tooltips now support dark mode on Columns UI even on old foobars (thanks marc2k3).
And there's a fix for a crash if memory allocation for a waveform render target buffer failed.
Title: Re: Waveform Minibar (mod)
Post by: palash on 2024-01-21 15:44:05
Hi there!

Each waveform shows darked central part and lighter top and bottom sides. Is there some mathematical sense or it just a pretty-thing?
X

Thank you in advance.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2024-01-22 06:21:01
The darker inside part is RMS (short for Root Mean Square), it shows the loudness of the audio.
Title: Re: Waveform Minibar (mod)
Post by: palash on 2024-01-24 10:47:55
And what does the outer lighter part stand for?
Thanks in advance.
Title: Re: Waveform Minibar (mod)
Post by: darkflame23 on 2024-01-24 11:35:14
I'd assume it was a representation of the PCM sample peak level.
Title: Re: Waveform Minibar (mod)
Post by: onthejazz on 2024-01-27 01:51:05
I am trying to figure out how to increase the height of the waveform bar 2-3 times from my default settings.  I don't see any options in the settings, yet some here seem to have a much taller waveform.  I'm running a very minimal version of foobar2000 2.1 (x64) on Windows 10.  I have attached a screenshot.  Any help would be much appreciated.
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2024-01-27 02:04:08
Since you're using Columns UI, you should add it via the Layout section in the preferences like the screenshot. It will then be a resizeable panel instead of the toolbar you currently have.

Title: Re: Waveform Minibar (mod)
Post by: vhli on 2024-01-31 16:52:50
Is there a way to flip "half wave mode" so it's upside down?
Title: Re: Waveform Minibar (mod)
Post by: Case on 2024-01-31 17:46:40
No there isn't.
Title: Re: Waveform Minibar (mod)
Post by: onthejazz on 2024-02-01 10:00:09
Since you're using Columns UI, you should add it via the Layout section in the preferences like the screenshot. It will then be a resizeable panel instead of the toolbar you currently have.


Thank you for the reply.  For the life of me, I can't seem to figure out how to replace or add a second waveform minibar that runs across the top like the original installed, but 2-3x taller.  Anyone have any tips?  Yes, I have columns UI but I haven't done much outside the standard layout options.  I've been playing with it for a couple days now without success. 
Title: Re: Waveform Minibar (mod)
Post by: marc2k3 on 2024-02-01 10:09:33
First, you want to right click the existing waveform and remove it from your toolbar.

Now in your current layout, you have a horizontal splitter as the base and that means any "childen" you add to it are laid out left to right. You probably don't want that.

You want a vertical splitter and then any panels you add to that will take the whole width. You can then add a horizontal splitter below that for having the playlist switcher side by side with the playlist like this...

Title: Re: Waveform Minibar (mod)
Post by: onthejazz on 2024-02-01 11:02:34
First, you want to right click the existing waveform and remove it from your toolbar.

Now in your current layout, you have a horizontal splitter as the base and that means any "childen" you add to it are laid out left to right. You probably don't want that.

You want a vertical splitter and then any panels you add to that will take the whole width. You can then add a horizontal splitter below that for having the playlist switcher side by side with the playlist like this...



Ok, that's awesome.  Much better.  Thank you so much for the kind instruction marc2k3.  I was beginning to think I wasn't gonna figure it out.   Cheers
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2024-02-10 11:02:32
Say I update a track because of a previously undiscovered bad rip or something.  Is there a better way to update the waveform cache than nuking it and rebuilding from scratch (which I just did, overnight)?
Title: Re: Waveform Minibar (mod)
Post by: Defender on 2024-02-10 11:22:54
Say I update a track because of a previously undiscovered bad rip or something.  Is there a better way to update the waveform cache than nuking it and rebuilding from scratch (which I just did, overnight)?

This ?
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2024-02-10 12:27:02
Say I update a track because of a previously undiscovered bad rip or something.  Is there a better way to update the waveform cache than nuking it and rebuilding from scratch (which I just did, overnight)?
This ?
Aha!

I looked at that and thought "WTF?", then the penny dropped.  It might have been useful to mention that is on the shift+right click menu!

Thanks.
Title: Re: Waveform Minibar (mod)
Post by: Defender on 2024-02-14 17:01:27
Feature request:
Doubleclick on the minibar plays/pauses the track at the (double)clicked position.
Title: Re: Waveform Minibar (mod)
Post by: Case on 2024-02-15 07:07:26
I have been thinking of that feature request over the night and I still don't really see it being useful. Making the seek respond differently to double click would make the main functionality, quick seeking with a single click, worse. I don't see upsides. You can already seek while paused.
Title: Re: Waveform Minibar (mod)
Post by: Defender on 2024-02-15 12:27:53
I've been experimenting a lot to give your wavebar a prominent role in my UI.

Let me rephrase ...

1) Bug?
I'm using "Playing track, selected when stopped", which works fine except for the following.
I'm playing a track and the wavebar of this track is shown as expected. Now I click another track in my playlist and then stop playing. Wavebar does NOT change to the selected track. It still shows the wavebar of the previously playing track. If I click the currently selected track once more the wavebar still shows the previously playing track. If I select another track in the playlist the wavebar of that track is selected as expected.

When playback is stopped and the wavebar of the selected track is not shown (the above situation) and I click inside this wrong wavebar playback starts of the selected track and the correct wavebar is shown.

2) Feature request
When playback is stopped and I click inside the wavebar playback is started of the selected track at the clicked position (which is very nice). So from STOP you do issue a PLAY command starting from clicked position.
When playback is paused however, a click in the wavebar just changes the position and does not issue a PLAY (UnPause) command. Then I have to travel the mouse to the Play/Pause button to start playing from the selected position. Makes no sense imo.
Can you change the behavior of a click in the paused wavebar so that it starts playing, just like a click in the stopped wavebar does?

3) Feature request
Since you already issue a PLAY command from STOP via the wavebar and hopefully implement the above feature request (PLAY from PAUSE), the only thing missing would be the possibility to PAUSE playing from the wavebar. Most convenient would be a double leftclick (and not an extra option in the rightclick menu) and thus save a lot of mouse travelling. I hope this kinda makes sense.
Title: Re: Waveform Minibar (mod)
Post by: ANDREW007CZ on 2024-02-22 12:55:04
Feature request:
Checkbox to have:
Silent part of sound file (0 at waveform) would render RED line to indicate that there is complete silence.

Why?
I use foobar for various usages. One of them is checking sound assets that will be used in game. I need to sometimes check whether there is complete silence in files or there is faint sound that is shown in waveform as 0 (no peaks visible) but something is still playing back.

Thank you!!
Title: Re: Waveform Minibar (mod)
Post by: wojak on 2024-03-11 14:35:23
Hi,

I played some test audio files and when playing a sound that was anti-phased (the same signal but in the opposite phase in both speakers) the wavebar showed nothing (just like silence).
Shouldn't it show a signal? Or if that behaviour is intended how to make the wavebar show something in such circumstances? Maybe there should be seperate bar for each channel?
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2024-03-11 16:11:01
It's using a mono mix to generate the waveform.  If your artificial stereo signal is such that a mono mix (A/2 +B/2 ) results in silence, that's what will get saved as the waveform thumbnail.

If you need test signals of that nature, what you could do is temporarily remove one channel and submit the snapshot of that to the database.  Then restore the channel (without changing any of the file details).  So long as you don't then rebuild the thumbnail database, the waveform will be fetched from the database cache and not regenerated from the actual file.
Title: Re: Waveform Minibar (mod)
Post by: wojak on 2024-03-11 18:12:37
It's using a mono mix to generate the waveform.  If your artificial stereo signal is such that a mono mix (A/2 +B/2 ) results in silence, that's what will get saved as the waveform thumbnail.

If you need test signals of that nature, what you could do is temporarily remove one channel and submit the snapshot of that to the database.  Then restore the channel (without changing any of the file details).  So long as you don't then rebuild the thumbnail database, the waveform will be fetched from the database cache and not regenerated from the actual file.

If it uses mono mix of the signal what do the upper and lower parts mean? It seems that they aren't just mirror images because sometimes I can see that ex. bottom spikes are different than the upper ones.
How does this component behave when multichannel files are being played - does it downmix all channels to mono or does it downmix just fronts and disregards all the others?
Title: Re: Waveform Minibar (mod)
Post by: Cannonaire on 2024-03-11 18:44:05
I would think it's a waveform - music isn't just increases in sound pressure, but a wave with increases and decreases.
Title: Re: Waveform Minibar (mod)
Post by: fooball on 2024-03-11 19:08:58
I would think it's a waveform - music isn't just increases in sound pressure, but a wave with increases and decreases.
Obviously not the waveform of the actual audio data, but a plot of the peak and average amplitude over time.  Got a better name?

If it uses mono mix of the signal what do the upper and lower parts mean? It seems that they aren't just mirror images because sometimes I can see that ex. bottom spikes are different than the upper ones.
Dunno, but I think you're trying to get more meaning from it than there is.  It's useful to see the upcoming dynamics of a track, especially as a DJ.  It's also more decorative than a plain seek bar.

How does this component behave when multichannel files are being played - does it downmix all channels to mono or does it downmix just fronts and disregards all the others?
No idea.  Is the answer not somewhere in this thread?
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2024-03-11 19:17:45
If it uses mono mix of the signal what do the upper and lower parts mean? It seems that they aren't just mirror images because sometimes I can see that ex. bottom spikes are different than the upper ones.

Assuming that Case's modified minibar works the same way that my original components did, the way it processes a waveform is that it divides it up into a fixed number of chunks of roughly even sizes. For each chunk it then finds the minimum and maximum signed value and records that as "min" and "max". It also computes the "RMS" energy of the chunk by squaring all elements, taking their average and then taking the root of that value, a bog-standard "root-mean-square" measurement.

A sequence of those values, however many there are these days, 2048-4096, are used to draw the waveform image as an approximation of the true waveform. For longer waveforms it's going to be a bit biased towards girth, as it's taking the very maximum and minimum values of chunks, and for very short waveform clips it's going to be extremely narrow.

My original seekbar had the ability to process and store individual channels, this primarily driven by that synthetic music like chiptunes and 8-bit NES music tended to have both DC biases and phase cancellation; while the minibars tend to simplify things by downmixing in some manner and consider it Good Enough.

No idea on what happens to multichannel audio for minibars, haven't touched code that since Case gracefully took over development.

Edit: Found my original code on a source host, it did a straight-up channel average of non-mono audio with no consideration of channel purpose.
Title: Re: Waveform Minibar (mod)
Post by: Cannonaire on 2024-03-11 19:24:52
Definitely looks pretty neat for very short tracks. This is from a .umx file that is only about 18 seconds long. Normalized linear scale. I feel like this is somehow relevant. The second one is perhaps even more interesting to look at, and only about 8 seconds long.
Title: Re: Waveform Minibar (mod)
Post by: Zao on 2024-03-11 19:32:28
That's still a healthy amount of samples at ~800k (assuming 18s at 44.1 kHz) which becomes around 194 samples per bucket. It gets worse below that and for clips that have fewer samples than buckets, you're doomed whatever you do.  :D