Author Topic: VUMeter Plugin  (Read 49186 times)

BoringName

  • Sr. Member
  • ****
  • Posts: 916
New Version VUMeter1.1.zip

Changes
- VUMeter now works in WASAPI Exclusive mode.
- Minimum Musicbee version required  3.6.9018. You can get the patched version here - https://getmusicbee.com/patches/MusicBee36_Patched.zip
- Peak values are now retrieved directly from Musicbee instead of the audio device.
- Removed NAudio library. Naudio.dll can be deleted from the plugin folder once updated. This should fix Phred's problem.
- Peak sampling is no longer linked to the framerate.
- Lowered the playstate check to 15 seconds. This is still linked to framerate. ie) at 30FPS it will check every 30 seconds.

The playstate check is just in place so VUMeter isn't using CPU when nothing is playing.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I'm going to wait to while just to make sure the AIMP skins are working ok and no major errors reported.

Then moving forward I will look at supporting the LVU Skins. Supporting those skins should also make it possible for LAMP/LEDS to be added to the AIMP skins as well as the needle.

As far as the Foobar skins go, I've hit a bit of a dead end there. While it shouldn't be difficult to convert them to the AIMP format, they most likely will lose any accuracy and it would be a very manual process. Unless someone comes up with a way to unpack the BIN files (other than the editor extraction method) I don't think I'm going to be able to do much there.

I've stuck the bin files in every online file analyzer I could find, I've de-compiled the DLL and EXE of the plugin but I know nothing about Delphi and don't really know what I'm looking at. It gave me some hints but not enough to get anywhere useful.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10262
Thanks BoringName, but there's still no joy here.

Using MB 3.6.9018 and VUMeter 1.1

Set the meter to be in the lower part of the right sidebar and using any skin from the ZIP. Launched a track and there's still no movement of the needles. Tried the other three skins and the same result - no movement. Typically I use WASAPI shared. But also tried exclusive and DirectSound with no difference.

I then put the meters in a floating window. Still no movement. Then I dragged the meters from the floating window to the lower right sidebar and got this error...

Code
MusicBee v3.6.9018.33710P  (Win10.0), 9 Sep 2024 8:14:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: '#=z8$pAChtyNR9TsebcPA=='.
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.ControlCollection.Add(Control value)
   at System.Windows.Forms.Form.ControlCollection.Add(Control value)
   at #=zlaX4bVxzSN1gY8OokRxL8x0=.#=zIFRO0Jw=(Control #=zu_XQi8k=)
   at #=zWS4fE84iG023zFm61fWoVnk=.#=zIFRO0Jw=(Control #=zu_XQi8k=)
   at #=z09qWh4vN1pxXik4I5_AJNu9yIDR5.#=zh7WzTcSnBG_m(#=zx9khceqPIm5Y #=zp_P$VYw=, Boolean #=ztnynhcXxlmCs5KeFxQ==)
   at #=z09qWh4vN1pxXik4I5_AJNu9yIDR5.#=zm9tdxp6y9smd(Boolean #=zcRWjBoLPvNxR0R7G1w==, Boolean #=zFqDNeoCoUVnu)
   at #=z09qWh4vN1pxXik4I5_AJNu9yIDR5.#=z40T2IVGLSEusAJT4wLxmQyEe9LzA.#=zCUyzp6vHgqYe.#=zyMxeqLuA4ulg()
   at #=z09qWh4vN1pxXik4I5_AJNu9yIDR5.#=z40T2IVGLSEusAJT4wLxmQyEe9LzA.#=zCUyzp6vHgqYe.#=zQvlir00vvCvh(Object #=zTiuP_8k=, EventArgs #=zYI1p7L0=)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at #=z4KQEmLYFKcS8h5G3MN3v5Jc=.OnClick(EventArgs #=zYI1p7L0=)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I didn't take the time to see if this is the same error as I first reported when moving from a floating window back to a panel within MB, but the behavior is the same.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I haven't done anything about the floating window problem. I'm not sure if that's my issue or Musicbee.

As for the needle not moving there is only 2 things I can think of and if they don't solve it I'm stumped.
1. Make sure the player volume in Musicbee isn't set to zero.
2. Hover the mouse pointer over the VUMeter window and roll the mouse wheel. It should display a small tooltip showing an adjustment value like 1.00db, 2.00db etc.... make sure this is set to zero.

boroda

  • Hero Member
  • *****
  • Posts: 5171
@BoringName, only hiccup's meters are working for me ("AcuVU", "DejaVU", and "SPL MK2" series). all included meters (except for "AcuVU") are not moving at all (for both linear and logarithmic scales). mouse wheel changes nothing for them.  :-\

btw, could you add the option to always show only 1  meter (average of left and right channels)?

aktor

  • Sr. Member
  • ****
  • Posts: 336
Can confirm Boroda's problem. Ver.1 worked for me. Excessive CPU usage still there.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Made a silly mistake.  >:(
Updated the original link - VUMeter1.1.zip

I haven't changed the version number.

That should fix the issue of the needle not working on some skins.

The excessive CPU usage isn't something I am able to replicate. If you look in task manager, does the GPU usage go up when it's running? I can't get my CPU to go over 5% and the GPU goes up 1-2% when it's running. At this point it's either a windows 11 issue and/or an issue with your particular machine.

edit: The angry emoji doesn't work.  Need to replace the > with >
Last Edit: September 09, 2024, 04:22:29 PM by BoringName

aktor

  • Sr. Member
  • ****
  • Posts: 336
Now it works.
GPU usage around 5%.
CPU around 20%
When playing stops it goes down gpu 0% and cpu 0%. In task manager.
Tried 3 different cpu monitor winglets. So inconsistent one 5% other 100%.

Users please report your CPU/GPU usage and your Windows version.

Wishlist: Option to hide header bar.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10262
The updated 1.1 got the earth needles moving again. With all skins.

At first I tried the two suggestions offered earlier (MB volume not at 100% and mouse wheel over meter window to 0db. Neither changed anything.

Then I saw the message regarding someone making a silly mistake  ;) . Downloaded and overwrote the DLLs and all is well.

When playing CPU runs 30-40% and GPU is fairly steady at 11% on Win10. When playing is stopped, CPU runs 10-15% and GPU at 2-3%.

I would also like an option to hide the VUMeter header bar.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

hiccup

  • Hero Member
  • *****
  • Posts: 9106
Thanks again for your fantastic work and effort on this plugin BoringName, it's much appreciated.
Things are working pretty well for these initial versions already.

What is not so great yet is the needle action.
It's quite jerky, and is also seriously 'behind the beat'.

AIMP on top, which is pretty much spot on on the beat:





There is also a small graphics flaw when using VU meters that use 'two needles on top of eachother' trickery.
As you can see here, the bottom needle does not get covered by the glass:




And:

Would it be possible to have the plugin panel using the colour of the skin for the background instead of being black?

Also notice that the VU meter here has been cut off a couple of pixels on the right side:




edit:

about CPU load:

AIMP playing without VU meter:
0 – 1%
activating the VU meter makes no difference and doesn't seem to increase load

MusicBee playing without VU meter:
0 – 0.2%
with VUMeter active 0 – 2%

Last Edit: September 09, 2024, 06:35:11 PM by hiccup

Mr. Trev

  • Sr. Member
  • ****
  • Posts: 487
On my system I get 10%CPU and 1%GPU using VU meter. Without VU meter MB typically draw less than 1%CPU (I typically use WASAPI exclusive, but also tried directsound and got the same load). The needle movement seems pretty slow compared to the clips hiccup posted

For the record, I'm running Win 10 (build 19044.4412) and using a AMD Ryzen 7 6800H CPU

aktor

  • Sr. Member
  • ****
  • Posts: 336
To me it seems way to much resource consuming. 5500U gets 20%.

sveakul

  • Hero Member
  • *****
  • Posts: 3260
btw, could you add the option to always show only 1  meter (average of left and right channels)?
Getting ready to try out the new plugin, but wanted to add my +1 to Boroda's wish above. a lot of us don't have the screen real estate to show double meters.  For L/R displays, bar-type displays are a better choice, like the new javascript Foobar meters below:




BoringName

  • Sr. Member
  • ****
  • Posts: 916
What is not so great yet is the needle action.
It's quite jerky, and is also seriously 'behind the beat'.
AIMP on top, which is pretty much spot on on the beat:

I've increased the sample rate which should hopefully improve the delay. I had lowered it a bit when I changed to querying musicbee while I was testing out the RMS data. Looking at that GIF, mine also peaks a little higher so increasing the number of samples averaged should improve that and possibly the jerkiness. I'll have a play around.

There is also a small graphics flaw when using VU meters that use 'two needles on top of eachother' trickery.
As you can see here, the bottom needle does not get covered by the glass:

Can you give me links to these two Skins, I can't see them on the AIMP page. I assume you have tried altering the size a little bit, sometimes that fixes visual glitches.

Would it be possible to have the plugin panel using the colour of the skin for the background instead of being black?

I assume you mean make the black part the colour of the Musicbee skin?

You can just resize the panel to remove that black part but I should be able to do that for people that want to create a skin using a background image with transparent areas.

Having an option for displaying a single meter is on the to-do list. I had planned on doing that before moving on to trying to support the LVU skins,  I should have mentioned the previous post.

I will also add an option to remove the header.

I have no idea whats going on with the CPU usage. I can understand it being high on old machines but 20% on a modern machine seems bonkers to me, there is just nothing there that should be chewing through that much CPU. I do have another machine here running an old Xeon with a very low spec GPU, I'll see how it runs on there and it might give me some clues but if that also runs low I really have no way of testing to sort that problem out.

edit: tested it out on my other machine. It's running a Xeon E5-2640 v3. This CPU had it's 10 year anniversary 2 days ago. The CPU doesn't get above 4%, that's with a Geforce GT 1030 graphics card which gets to about 40% but 10% of that seems to be from using VNC to connect to it.

I assume the posters stating the CPU hitting 20% are talking about the Musicbee process specifically and not overall CPU usage?
Last Edit: September 09, 2024, 10:55:02 PM by BoringName

Mr. Trev

  • Sr. Member
  • ****
  • Posts: 487
My MB process will sit between 9.5-10% with VU running.
Some further playing around I did. I had MB running with music playing. CTRL-ALT-DEL to bring up the task manager and MB completely crashed. If task manager is already running before I start MB I can switch back and forth no prob.
I also discovered that if VU meter is active (I have it currently in the right sidebar) MB will launch with the same 10% CPU load - even before I start playing music.

Could it be a conflict with any other plugins? In your first post you mentioned possible issues with 3Dbee. I did have it installed, but not being used. I uninstalled it just to see if that'd help, but no change