Author Topic: VUMeter Plugin  (Read 58106 times)

boroda

  • Hero Member
  • *****
  • Posts: 5308
I could be wrong but I believe 4.6.2 is the highest you can go for plugins. If you target higher they won't initialise in Musicbee.

you are wrong. all my active plugins are targeted to 4.8. you can target plugin to any .Net 4.x version to get it working in MB.

I've had a few bourbons and bad things happen when I troubleshoot half tanked so I'll give it another crack tomorrow.

no problem.

Bee-liever

  • Member
  • Hero Member
  • *****
  • Posts: 3879
  • MB Version: 3.6.9318P
New Version - VUMeter_2.7.0

Have been using for most of today and have had no problems.
Old problem of lagging in AT&RT plugin gone, same with Hotkeys not always responding.
Around 30k files in library.
MusicBee and my library - Making bee-utiful music together

boroda

  • Hero Member
  • *****
  • Posts: 5308
New Version - VUMeter_2.7.0

...
Old problem of lagging in AT&RT plugin gone...

can you be more specific about this issue? i'm just curious.

Bee-liever

  • Member
  • Hero Member
  • *****
  • Posts: 3879
  • MB Version: 3.6.9318P
can you be more specific about this issue? i'm just curious.
I have a custom ASR preset, ticked to auto-run, that roughly equates to the last.fm most played albums/singles.
If I have been tagging playing tracks for a while, so that ASR is saving the file changes as play counts change, after approx 20-25 tracks if I tried to open the ASR window to run a different present (like trying to assign A or B sides to a single), the window would not open.  It would sit running in the background for 3 to 4 tracks and then it would somtimes open. Othertimes I would have to stop the player and it would then open.
This only occured with the VUMeter running. If I swapped it out for the volume visualizer there was never a problem.
Same for the Hotkeys
MusicBee and my library - Making bee-utiful music together

boroda

  • Hero Member
  • *****
  • Posts: 5308

BoringName

  • Sr. Member
  • ****
  • Posts: 951
you are wrong. all my active plugins are targeted to 4.8

Has it been like that for a while? I'm sure at one point I incrementally increased the net version until I got an entry point error to determine how high I could go. I guess that was probably a couple of years ago now.

Anyway, that didn't fix it but I have got it working on my other machine (PC2) although I'm not sure exactly what the problem was. I'll go through the steps I took.

PC2 had a portable install with an older version of Musicbee and the VUMeter plugin when it still had separate sharpGL DLL's.
I deleted the SharpGL dll's from Musicbee\plugins and copied over the mb_VUMeter.dll and Musicbee.exe from my main machine (PC1).
At this point it wasn't working.
I tried setting the output to Net 4.8, this worked fine on PC1 but still produced an error on PC2.
I deleted the entire Musicbee folder on PC2 and copied over the entire Musicbee folder from PC1.
It now works on both PC's.

The only thing I can think of is maybe there was another copy of SharpGL.wpf.dll in the Musicbee\appdata\plugins folder.

So maybe have a search for SharpGL.wpf.dll and delete any instances you find. If not create another fresh portable install and see if that works.

If you still don't get anywhere I'll send you a copy that will display an error if it's the same problem my PC2 had instead of just giving you a blank screen with no info. Just in case you are having a different problem than my PC2 had.

BoringName

  • Sr. Member
  • ****
  • Posts: 951
This only occured with the VUMeter running. If I swapped it out for the volume visualizer there was never a problem.

Based on the author comments on the patch that fixed this problem in the SharpGL library, it seems the old method made lots of manual Garbage Collection calls. I don't know why a large library is more effected but I think the constant Garbage Collection calls is what causes the Musicbee UI to bog down. I've used WPF to create the openGL element as I just went with what worked at the time, I don't know if that is the issue or the SharpGL library just isn't coded efficiently.

I found Silk.Net the other day which might be a better alternative to SharpGL as it seems to be regularly updated unlike SharpGL. But I don't think it supports WPF so I might have to rebuild from scratch....

Mr. Trev

  • Sr. Member
  • ****
  • Posts: 492
you are wrong. all my active plugins are targeted to 4.8

Has it been like that for a while? I'm sure at one point I incrementally increased the net version until I got an entry point error to determine how high I could go. I guess that was probably a couple of years ago now.

Anyway, that didn't fix it but I have got it working on my other machine (PC2) although I'm not sure exactly what the problem was. I'll go through the steps I took.

PC2 had a portable install with an older version of Musicbee and the VUMeter plugin when it still had separate sharpGL DLL's.
I deleted the SharpGL dll's from Musicbee\plugins and copied over the mb_VUMeter.dll and Musicbee.exe from my main machine (PC1).
At this point it wasn't working.
I tried setting the output to Net 4.8, this worked fine on PC1 but still produced an error on PC2.
I deleted the entire Musicbee folder on PC2 and copied over the entire Musicbee folder from PC1.
It now works on both PC's.

The only thing I can think of is maybe there was another copy of SharpGL.wpf.dll in the Musicbee\appdata\plugins folder.

So maybe have a search for SharpGL.wpf.dll and delete any instances you find. If not create another fresh portable install and see if that works.

If you still don't get anywhere I'll send you a copy that will display an error if it's the same problem my PC2 had instead of just giving you a blank screen with no info. Just in case you are having a different problem than my PC2 had.

I was having the same problem as Boroda. I did a search and couldn't find any leftover SharpGL files. I did try a clean portable install and the plugin was working correctly there. So I went back looking at my original MB install. I found once I uninstalled the 3DBee plugin (from the plugin menu) then VUmeter started working . I'm not sure if I had an outdated version of 3DBee or what because once I reinstalled it again everything is still working as intended.
For the record VUmeter is running nice and smooth now and my CPU usage is only topping out at 1.5% vs. the 9% I was getting before (with the stock AcuVU skin - single meter, it's under 1% CPU)
Thanks for your work
Last Edit: July 06, 2025, 12:07:37 AM by Mr. Trev

BoringName

  • Sr. Member
  • ****
  • Posts: 951
New Version - VUMeter_2.7.1

Changes
- Updated framework Net target to 4.8
- Compiled the SharpGL dependencies from the code on Github to make sure they are current as they haven't released an updated nuget package for the current version.

I have also released a new version of 3DBee with the updated SharpGL library and framework target. Aside from using less CPU it also seems a lot smoother to me but it's been a while since I played around with it so it could just be confirmation bias...

boroda

  • Hero Member
  • *****
  • Posts: 5308
@BoringName, thank you, all is working fine now.

p.s. also, i've deleted all SharpGL*.dll files from plugin's folder. don't know if it's important.

BoringName

  • Sr. Member
  • ****
  • Posts: 951
@BoringName, thank you, all is working fine now.

p.s. also, i've deleted all SharpGL*.dll files from plugin's folder. don't know if it's important.

Nice. No point leaving them there as they are not used anymore. Less chance of issues in future.

Looking at Silk.Net it requires net6.0 so I'm not sure if I would be able to use that. In any case, everything seems to be working smoothly now so I'll leave it alone unless something else breaks.

boroda

  • Hero Member
  • *****
  • Posts: 5308
Looking at Silk.Net it requires net6.0 so I'm not sure if I would be able to use that.

no, MB plugins must be targeted to .Net 4.x only. (not to 3.x-, not to 5.x+) at least at this moment.

ost

  • Jr. Member
  • **
  • Posts: 97
After updating to a latest version I see an empty window only

hiccup

  • Hero Member
  • *****
  • Posts: 9172
New Version - VUMeter_2.7.1
That's (a lot of) time and bourbon well spend ;-)
It's working beautifully.

I've changed the frame rate from 60 to 120.
I thought I would not be able to notice it, but it does make the needle action even smoother.
(perhaps add that as an Ultra Smoothâ„¢ option in the UI?)

edit:
Or make 120 the default?
I just ran that on a 12 yrs. old PC with on-board graphics (hmm, the exact same age as the Lagavulin that I am currently abusing) and it didn't break a sweat.


Thanks again, you are a gem.
Last Edit: July 06, 2025, 10:02:36 PM by hiccup

sveakul

  • Hero Member
  • *****
  • Posts: 3314
I've changed the frame rate from 60 to 120.
I thought I would not be able to notice it, but it does make the needle action even smoother.
(perhaps add that as an Ultra Smoothâ„¢ option in the UI?)
You're right, smooth as silk!  Others:  you can change this by opening the file mbVUMeter.Settings.xml in a text editor, line 4. (...\AppData\Plugins\VUMeter).