Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_vis_vumeter (Read 22124 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_vis_vumeter

Reply #225
It's a bit heavy for my configuration, I don't know if tests have been done but with flac at 48 khz I encounter notable problems, it's true that I have several animations, but on mp3 I don't encounter problems on flac....

TEST FLAC 44,1 - 48 kHz

Re: foo_vis_vumeter

Reply #226
Very, very quick observation. Background: For simplicity the visualization uses the Win32 timer since no one really needs to run this at crazy frame rates. Something might be blocking the window's message pump and that is a possible reason why you don't see refreshes. As to what that might be, you should remove the other stuff you have running to root cause. Oh, and make sure to reset the tuning parameters in case one of them is set strangely before you go down the rabbit hole.

Re: foo_vis_vumeter

Reply #227
I understood the problem and it was also solved, however the foobar management of the images tagged in the audio file really leaves something to be desired.

The problem is caused by the .png image which is heavier than the .jpg and this creates enormous problems not only for the vu meter plugin but also for the seek bars, the waveform etc..

I solved it by not tagging the audio files with the images, but I have the problem of the icon image which has a different management from the others and I don't understand the reason for this.

So in my tool I am forced to tag the icon image in order to view it.

Absurd to say the least.

Test

Re: foo_vis_vumeter

Reply #228
Thanks for posting Version: 0.8.0. I don't know if you worked on the skinloader or not but in this version it still only loads one instance. (VU's in the corners should change color as well).

Plus sometimes it won't even load that one instance as you can see when I load the color cyan, at the end of the animation.


Re: foo_vis_vumeter

Reply #229
Can you tell me why foobar doesn't see the plugin update? I have to download and install it manually.
Since I assume only Peter's components get updated automatically, here is the release notice for 0.8.0.

When foobar is started, it will throw the error below, and get stuck in an infinite loop throwing the same error. foobar cannot start.
This is fixed now. It will append the backslash now if not added. I made a copy/paste mistake when I copied the same function from foo_vis_milk2.

Thanks for posting Version: 0.8.0. I don't know if you worked on the skinloader or not but in this version it still only loads one instance. Plus sometimes it won't even load that one instance as you can see when I load the color cyan, at the end of the animation.
Try now. I tried to replicate the original's behavior. There are a few skins that take a longer time to load where all might not change together. Mainly it's the ones where the BIN is packed inside a RAR with the settings. The way this works is using a mailbox. So, try adding a delay in between the two fb.* commands. I'm going to take a shot in the dark and guess that the reason only VU is changing is that it clobbers the PEAK change before the render/uncompress thread opens the mailbox.

In addition, I added a few extra things. Let me elaborate:
  • There is now a EBU R 128 mode that uses libebur128. So, if you prefer an alternative loudness calculation to my implementation of BS.1770 that is it. It is a bit leaky. I squashed some of the issues with the CRT memory debugger and address sanitizer. There may still be some more, and I cannot vouch for the accuracy of the calculations. Use at your discretion.
  • I found a "tap and press" gesture in the original component to change skins when testing how skins changed in groups, so I implemented it.
  • The skin change menu will ONLY change skins within the group. It is a NOP otherwise. I put a watchdog timer of 2 seconds on it to avoid issues.
  • Since I got tired of right clicking the menu to change the tuning parameter, holding Esc, Right Alt or AltGr while moving the mouse wheel with do the same. Also, mouse buttons 4 and 5 will change it but since foobar2000 grabs those by default to move to the prev/next track in the playlist it might not be as good as the modifier methods. One small issue is that I didn't have time to fix the tooltip to reflect the change in real-time since I got sidetrack searching for the EBU R 128 memory leaks. I'll get to it soon.
  • To try to keep some loose feature parity with the BoringName's MusicBee plugin, I added ability to open separate left/right panel files (ending in 1.bin or 2.bin). I finally found the explanation for the curve adjustment parameter so that should work as well. But if you don't like any of the RAR skin's INI file overriding your settings, there is now the option to ignore the INI file.
  • Do not expect write back of the custom settings into the INI file due to the licensing restrictions of the RAR format.

Re: foo_vis_vumeter

Reply #230
I thank you for your plugin but soon I will completely abandon foobar2000 because it does not allow correct management of embeddeb image files, especially if they are .png, I have to use these, because without internal images everything works perfectly as soon as I insert a png image, let alone 5 vu meter waveform seekbar all go jerky and this has always been foobar2000's problem.

Re: foo_vis_vumeter

Reply #231
@ApacheReal : Nothing about your config is related to PNG handlig in foobar2000. You use only third party components and hacks to render your UI. The transparency hack for example is very inefficient, especially if the component behind there drawing the image was only designed to render the image on resize. It may keep re-decompressing and rescaling it a hundred times per second.

@oops : you keep making claims that everything leaks memory. I'm confident SDK exposed methods don't leak memory, but when used incorrectly your component can. If you disagree, should be simple to show what leaks. Your current claim is equal to saying Visual C runtime leaks memory because it has malloc and new.
Also I haven't noticed any leaks in libebur128. If it indeed does, I'd appreciate you telling the source file name and line where memory is allocated that then isn't freed?

Re: foo_vis_vumeter

Reply #232
@ApacheReal : Nothing about your config is related to PNG handlig in foobar2000. You use only third party components and hacks to render your UI. The transparency hack for example is very inefficient, especially if the component behind there drawing the image was only designed to render the image on resize. It may keep re-decompressing and rescaling it a hundred times per second.

I thank you for your reply, you are always kind and courteous and I understand that foobar2000 was created for a certain management of internal covers. I can't say anything about this. Therefore there are two possible solutions. I have the author of the skin definitively put his hand to the artwork management in order to ensure that the internal images are managed considering that a 1200x1200 png can reach 2 MB or more, or those who create plugins and develop tools take this into account. Because I assure you that the two things are incompatible.


Re: foo_vis_vumeter

Reply #233
lly, here is the release notice for 0.8.0.

Thanks for posting Version: 0.8.0. I don't know if you worked on the skinloader or not but in this version it still only loads one instance. Plus sometimes it won't even load that one instance as you can see when I load the color cyan, at the end of the animation.
Try now. I tried to replicate the original's behavior. There are a few skins that take a longer time to load where all might not change together. Mainly it's the ones where the BIN is packed inside a RAR with the settings. The way this works is using a mailbox. So, try adding a delay in between the two fb.* commands. I'm going to take a shot in the dark and guess that the reason only VU is changing is that it clobbers the PEAK change before the render/uncompress thread opens the mailbox.

In addition, I added a few extra things. Let me elaborate:
  • There is now a EBU R 128 mode that uses libebur128. So, if you prefer an alternative loudness calculation to my implementation of BS.1770 that is it. It is a bit leaky. I squashed some of the issues with the CRT memory debugger and address sanitizer. There may still be some more, and I cannot vouch for the accuracy of the calculations. Use at your discretion.
  • I found a "tap and press" gesture in the original component to change skins when testing how skins changed in groups, so I implemented it.
  • The skin change menu will ONLY change skins within the group. It is a NOP otherwise. I put a watchdog timer of 2 seconds on it to avoid issues.
  • Since I got tired of right clicking the menu to change the tuning parameter, holding Esc, Right Alt or AltGr while moving the mouse wheel with do the same. Also, mouse buttons 4 and 5 will change it but since foobar2000 grabs those by default to move to the prev/next track in the playlist it might not be as good as the modifier methods. One small issue is that I didn't have time to fix the tooltip to reflect the change in real-time since I got sidetrack searching for the EBU R 128 memory leaks. I'll get to it soon.
  • To try to keep some loose feature parity with the BoringName's MusicBee plugin, I added ability to open separate left/right panel files (ending in 1.bin or 2.bin). I finally found the explanation for the curve adjustment parameter so that should work as well. But if you don't like any of the RAR skin's INI file overriding your settings, there is now the option to ignore the INI file.
  • Do not expect write back of the custom settings into the INI file due to the licensing restrictions of the RAR format.

I did come up with a work around (we were on the same track as I came up with it before reading your post).

This is what I came up with...
Quote
         if (name == "DisplayColour") {
          window.SetProperty("DisplayColour", info);
          display_system.InitColours();
          display_system.setColours();
         fb.RunMainMenuCommand("View/Visualizations/Analog VU Meter skins/DarkOne4PEAK/" + vu_style + " " + display_system.display_arr[display_system.display_combi_colour]);
         setInterval(() => {
             fb.RunMainMenuCommand("View/Visualizations/Analog VU Meter skins/DarkOne4PEAK/" + vu_style + " " + display_system.display_arr[display_system.display_combi_colour]);
          }, 200);
          setInterval(() => {
             fb.RunMainMenuCommand("View/Visualizations/Analog VU Meter skins/DarkOne4VU/" + vu_style + " " + display_system.display_arr[display_system.display_combi_colour]);
          }, 200);
          window.Repaint(g_all);
      }
   }

Oddly, I still need that extra fb.RunMainMenuCommand for DarkOne4PEAK, outside the interval. But I don't need the extra for DarkOne4VU.


Re: foo_vis_vumeter

Reply #234
Since I assume only Peter's components get updated automatically, here is the release notice for 0.8.0.
Thanks for 0.8.0 and the ability to play the hiccup BIN meters directly from the RAR files, incl. the ability to use or not use the internal *.ini file settings!  All working fine so far.

BTW, the "Check for updates" automatically feature does not only apply to components written by Peter, some by Case do (e.g. External Tags), Mudlord (Effect DSP), Florian (foo_run), etc.  There is some kind of procedure you need to do make that happen I'm sure Case or Peter could let you know.

Re: foo_vis_vumeter

Reply #235
@oops : I just noticed in 0.8.0 that while RAR files containing a BIN and an *.ini settings file will show the option to "Ignore defaults", those skins that were previously extracted from the original RAR into the skins folder as a separate .BIN and .INI file do not give the option to ignore the .INI--the "Ignore defaults" choice is greyed out.

I'd like to request that fo_vis_vumeter have the ability to recognize user-extracted RAR's of this type and have the ability to recognize the BIN's same-name INI file in the skins folder and apply the same ignore/not ignore defaults to them.

Re: foo_vis_vumeter

Reply #236
I fixed automatic updates for this component. The reason they weren't working is because the component is listed with a different name than it actually uses.

Re: foo_vis_vumeter

Reply #237
you keep making claims that everything leaks memory. I'm confident SDK exposed methods don't leak memory, but when used incorrectly your component can. If you disagree, should be simple to show what leaks. Your current claim is equal to saying Visual C runtime leaks memory because it has malloc and new.
Also I haven't noticed any leaks in libebur128. If it indeed does, I'd appreciate you telling the source file name and line where memory is allocated that then isn't freed?
Perhaps I'm using them incorrectly and you've told me before to read some more SDK code. I've tried to follow that advice. However, if I need to refer to the implementation details to figure something out, we have a broken process.
With that said, not "everything" leaks; let's stay grounded. The foobar2000 SDK is great but not perfect and the application itself must be several times the size of the SDK--plenty of surface area for a minor issue as this. I think these specific leaks are inside the foobar2000 implementation code so I can't provide you with the exact lines. For the record I build with /W4 /WX /analyze for a bare minimum baseline quality and I've instrumented everything I have access to override malloc/new (including third-party libraries which is far more than most are willing to go). I get stuff that is not get freed at exit at some random locations that "my" stuff didn't allocate. It can also see it using the Heap Profiler towards the end of the .exe exit. Often it is only 16 bytes, but it is definitely there. Almost always happens when doing layout/live editing and many times my component(s) has no instances/windows created, removed or active. Furthermore, when scanning the reports/tables it points to offsets/addresses which are not inside any of the code I wrote, I'm left to conclude that it is elsewhere. If I were to guess (total shot in the dark), it is in whatever deals with the FTH files or where splitters are created.
I've definitely made mistakes, and when these tools have embarrassingly shown me my lack skills, I have tried to correct them. When I've created the many problems through the past couple of years working on these components through my ignorance, lack of expertise or misuse of the libraries, it has been clear and obvious I'm at fault. And in my profession, I've learned to assume I'm always at fault first before seeking other root causes. Last but not least, if I could have already root caused it and fixed it or avoid whatever I might be doing that causes a problem, I would have already and it would have never come up--but anyone who "trusts me" enough to run executable code that I wrote on their machine deserves to be at least aware of 2 things: a) that if there is a problem that I know of it is not getting swept away or ignored and disclosing such issues is part of the burden of that responsibility, and b) that I'm actively making a serious effort to make it better.

If there is a better way to go about this than forum discussions and help narrow down the source, let me know. It would be a good day if this can go away. And I really do wish it is my fault because that is the easiest and quickest way to get a fix out.

On libebur128, I'm putting together a PR but it is related to different queue implementations (Glibc, OpenBSD, FreeBSD--these are not as "drop in" as claimed in the code comments) and only happens on ARM64 (not ARM64EC) builds. Most likely that is why you've not seen it. But looking through the lack of activity on external PRs, I wouldn't be too hopeful that it will get merged in.

I fixed automatic updates for this component. The reason they weren't working is because the component is listed with a different name than it actually uses.
Thank you, sir. If it is the "s" and "z" difference. I tried to match the convention of the context around it. Sorry for whatever I did that caused mismatched expectations.

I'd like to request that foo_vis_vumeter have the ability to recognize user-extracted RAR's of this type and have the ability to recognize the BIN's same-name INI file in the skins folder and apply the same ignore/not ignore defaults to them.
I found out that was also a thing yesterday. Should be straightforward to add this. Side comment: I'm trying to document all of these different methods because they've been coming in in a fast and ad hoc way. I personally would not have used RAR for the combo. Keeping configuration separate is messy, though, so it is an OK compromise; I don't like dealing with NFO files in media libraries :) One other thing, INI has no schema so it will be a mystery if it got parsed correctly, especially when I had to guess at what each parameter was. So, let's not keep using that.

Re: foo_vis_vumeter

Reply #238
The name mismatch was bigger. In the code your component is called "VU Meter Visualisation" and in the repository "Analog VU Meter Visualisation". This makes the update checker think it's a different component.

Btw, the libebur128 has a crash bug with extreme samplerates as st->d->needed_frames can be larger than st->d->audio_data_frames and it will read beyond allocated memory. My quick fix was to add a simple check "st->d->needed_frames = st->d->samples_in_100ms * 4; if (st->d->audio_data_frames < st->d->needed_frames) st->d->audio_data_frames = st->d->needed_frames;" to ebur128_init between the "st->d->audio_data_frames = st->samplerate * st->d->window / 1000;" and "if (st->d->audio_data_frames % st->d->samples_in_100ms) {" lines.

Re: foo_vis_vumeter

Reply #239
In 0.8.0 I'm having a problem with the Tuning menu when selecting an option and then using the scroll wheel. With the exception of ZERO and GAIN, the scroll wheel does not operate properly.

Instead of changing the levels it instead cycles through the menu choices. So if FPS is selected and I scroll the mouse (without pressing anything), it will cycle through the Tuning menu options. Then it eventually stays on GAIN.  So in other words I can only change the level of ZERO and GAIN.

I tested this on 0.7.7 and it works perfectly fine.

Re: foo_vis_vumeter

Reply #240
In 0.8.0 I'm having a problem with the Tuning menu when selecting an option and then using the scroll wheel. With the exception of ZERO and GAIN, the scroll wheel does not operate properly.

Instead of changing the levels it instead cycles through the menu choices. So if FPS is selected and I scroll the mouse (without pressing anything), it will cycle through the Tuning menu options. Then it eventually stays on GAIN.  So in other words I can only change the level of ZERO and GAIN.

I tested this on 0.7.7 and it works perfectly fine.
Yikes, I just noticed the same thing here.  Oops mentioned that he added different ways of accessing the tuning menu ("Add `Escape` and `RAlt/AltGr` as modifier keys on the mouse wheel to change tuning parameter") but the once you get there you can only change the VALUE of "gain", otherwise the wheel just cycles the parameter NAMES without allowing a value change.

Hopefully a quick fix??

Re: foo_vis_vumeter

Reply #241
The name mismatch was bigger. In the code your component is called "VU Meter Visualisation" and in the repository "Analog VU Meter Visualisation". This makes the update checker think it's a different component.

Btw, the libebur128 has a crash bug with extreme samplerates.
Thank you. Integrated workaround into 0.8.1.

In 0.8.0 I'm having a problem with the Tuning menu when selecting an option and then using the scroll wheel. With the exception of ZERO and GAIN, the scroll wheel does not operate properly.
Try 0.8.1. Zero and Gain are special because they can use all of the other modifier keys. Sorry for the breakage.

Yikes, I just noticed the same thing here.  Oops mentioned that he added different ways of accessing the tuning menu ("Add `Escape` and `RAlt/AltGr` as modifier keys on the mouse wheel to change tuning parameter") but the once you get there you can only change the VALUE of "gain", otherwise the wheel just cycles the parameter NAMES without allowing a value change.
Try 0.8.1. I rewrote the state machine. Apologize for the inconvenience. Also, added reading the INI file placed besides the BIN.

Re: foo_vis_vumeter

Reply #242

I think I got it close enough. Sharing the tuning parameters in case it helps others:

Code: [Select]
Mode	Stereo
Levels RMS
Range 0.00
Decay 1.25
Rise   0.17
Jitter 0.11
Gain +9dB
Window 40ms
FPS      25


I'm a little perplexed by this. I thought the Tuning option that had the check mark would be the only active one. These settings imply otherwise. Does it really matter what the non selected Tuning option is set to?

Re: foo_vis_vumeter

Reply #243
In 0.8.0 I'm having a problem with the Tuning menu when selecting an option and then using the scroll wheel. With the exception of ZERO and GAIN, the scroll wheel does not operate properly.
Try 0.8.1. Zero and Gain are special because they can use all of the other modifier keys. Sorry for the breakage.

Thanks! The issue seems to be fixed.

Re: foo_vis_vumeter

Reply #244
I'm a little perplexed by this. I thought the Tuning option that had the check mark would be the only active one. These settings imply otherwise. Does it really matter what the non selected Tuning option is set to?
The implication that all the settings matter and apply is the correct interpretation. So, it definitely matters what the non-selected tuning option is set to. The "check mark", only means this is the one that will be affected by the mouse wheel and middle mouse button. The combination of all settings is what sets the behavior. The "Reset" option sets most of the non-layout settings back to their defaults. I tried using/making a custom bitmap, the square radio mark, to hint that this menu selection is selected for modification but still mutually exclusive with the others in the same popup menu.

There is a bit more logic that goes into this. Four specific examples might help illustrate some special behaviors:
  • If you select a skin that is not a BIN (i.e., ZIP from AIMP or LVU), then the Zero option is grayed out and disabled implying it is not used.
  • If you select one of the loudness modes (i.e., BS.1770 or R 128), then the Zero and Range options are grayed out and disabled.
  • The newly-added tuning parameter switching through the mouse wheel is aware of these special behaviors. It would not allow moving into a disabled tune setting. However, it does allow moving out.
  • Locking the tune, disables that popup menu freezing all of the settings at their current values.

I'll add some wording to the documentation to make this point and hopefully clear up confusion going forward.

Re: foo_vis_vumeter

Reply #245
I'm a little perplexed by this. I thought the Tuning option that had the check mark would be the only active one. These settings imply otherwise. Does it really matter what the non selected Tuning option is set to?
The implication that all the settings matter and apply is the correct interpretation. So, it definitely matters what the non-selected tuning option is set to. The "check mark", only means this is the one that will be affected by the mouse wheel and middle mouse button.

Got it, thanks.

Re: foo_vis_vumeter

Reply #246

I think I got it close enough. Sharing the tuning parameters in case it helps others:

Code: [Select]
Mode	Stereo
Levels RMS
Range 0.00
Decay 1.25
Rise   0.17
Jitter 0.11
Gain +9dB
Window 40ms
FPS      25


It's funny, this doesn't work for me unless I put gain to +17. Is there something in my fb2k prefs that isn't set right? If I use Peak instead of RMS I can set it to +9.


Re: foo_vis_vumeter

Reply #247
Minor bug... The radio button in the Decay menu is rarely displayed.


Re: foo_vis_vumeter

Reply #248
It's funny, this doesn't work for me unless I put gain to +17. Is there something in my fb2k prefs that isn't set right? If I use Peak instead of RMS I can set it to +9.
The gain setting is content-dependent. Meaning for example, if you don't care about the exact accuracy, playing classical music means you might need to have higher gain to get the needle in the middle of the range vs. pop/rock music.

Minor bug... The radio button in the Decay menu is rarely displayed.
Intentional. Will only have the radio dot next to the named setting if the current setting is that value. If I recall correctly, it is 0.75 for Slow, 1.00 for Normal and 1.50 for Fast. Little details :)

 

Re: foo_vis_vumeter

Reply #249
Minor bug... The radio button in the Decay menu is rarely displayed.
Intentional. Will only have the radio dot next to the named setting if the current setting is that value. If I recall correctly, it is 0.75 for Slow, 1.00 for Normal and 1.50 for Fast. Little details :)

Well, that makes sense. Good to know. :)