Author Topic: VUMeter Plugin  (Read 50482 times)

BoringName

  • Sr. Member
  • ****
  • Posts: 916
1.  'use skin colour'
2. bar-type VU meters
3. prevent needles from displaying outside the designated VU meter area.
4. allow subfolders for VU meter skins
5. minimum duration of LEDs lighting up.
6.

1. It's currently using the background of the SkinTrackAndArtistPanel element. I can see a use for either colour as your suggestion wouldn't suit my layout. I'll see if I can put a toggle selector on there.
2. I don't believe your statement is correct. Why does it have to be wider than the background image? It just needs to be wide enough to fill the bar area. The rest is done with the angle and pivotpoint settings. The minAngle needs to be set low enough so the bar is completely off to the left when the level is less than -50. The maxAngle needs to be set so 100% of the bar is visible at 6+.
If it's not going to use LED's, you can set the needle images to blank files and just use the LED method to create the bars.
3. Yes, I still need to fix this. It's going to be fiddly to implement so I've been putting it off.
4. I currently scan the skin folder and any skins it finds gets added to the context menu and it's set to go through the appdata folder and the musicbee\plugins folder. When a skin is selected it uses the text in the context menu to find the skin file,  checking both locations. It's quick and easy. What you're suggesting complicates it a bit, I can make a context menu based on a folder structure but retrieving the skins location is a bit tricky. I either have to store the path of every skin or iterate over the directories looking for it. Or maybe have 2 trees for the different folders mentioned above and use the context menu tree structure to build the path when it's selected. I might be overthinking it but I want to make sure whatever way it's done won't be a problem if someone decides to have 1000 skins in sub folders..... although who would do that?  ;)
5. Not sure I will do this. I guess it's a requirement if someone wanted to make a skin simulating a bulb instead of an LED. We'll see.
6. Have we hit peak ideas?

edit: For 4 it looks like I can use the "Tag" property to store a file path, that simplifies things.
Last Edit: September 29, 2024, 03:05:42 AM by BoringName

hiccup

  • Hero Member
  • *****
  • Posts: 9107
2. I don't believe your statement is correct. Why does it have to be wider than the background image? It just needs to be wide enough to fill the bar area.
The needles can't get wide enough to fill the bar area, since these kind of meters are constructed from separate left and a right segments.
And neither of the two needles can be made long enough to cover the whole area.
(check out my Smooth Slider skin to see what I mean)

Quote
5. Not sure I will do this. I guess it's a requirement if someone wanted to make a skin simulating a bulb instead of an LED. We'll see.
OK, but that is a different principle.
For glow-bulbs, that would mean the light fading out.
My request for LEDs is not for them fading out, but keeping them lit at least as long as the human eye can properly see them lighting up.
Some fade-out option could also serve a purpose for LEDs, but it is a little bit different from what I am suggesting.
Last Edit: September 29, 2024, 07:59:30 AM by hiccup

BoringName

  • Sr. Member
  • ****
  • Posts: 916
(check out my Smooth Slider skin to see what I mean)

This one works
https://www.aimp.ru/forum/index.php?topic=52865.msg338035#msg338035

But it seems R_1.png isn't the same size as the other R_*.png files....... I've had too many drinks tonight to understand why it works. I'll check it out more tomorrow but that should give you some ideas. The creativity required to make some of these skins work does blow my mind a little.

OK, but that is a different principle.

Maybe, but if I setup a decay setting, at very low levels I think it would give the effect you are after and higher settings would make it look like the LED was fading out. I won't know until I test it.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
This one works
https://www.aimp.ru/forum/index.php?topic=52865.msg338035#msg338035
It only works because the area where the indicators are is is half the size of what the VU meter is occupying, which is a large waste of space.

Quote
The creativity required to make some of these skins work does blow my mind a little.
Then try to figure out what I did with Smooth Slider to make better use of the available space ;-)

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Then try to figure out what I did with Smooth Slider to make better use of the available space ;-)

I've sobered up a bit. That is clever. I didn't figure out what the problem was until I played the left channel test file.

This meter can be made using the LVU method and that is probably the best method for this type of skin. So the actual issue is making a skin like this that also has LEDs for both channels. I believe you could make a skin like this with bars for both channels and LEDs for one channel if you used a needle as a cover. Actually you could make one with 2 LED channels if they didn't span the whole width of the meter so it's a very specific issue.

And just to make sure I'm not missing anything, this is currently something that can't be done with AIMP/LVU so it would be something unique to Musicbee?

Without putting too much thought into it, I really don't want to deal with different sized image files for the AIMP skins but I'll think about it more in the morning when I'm thinking a bit clearer.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
I've sobered up a bit. That is clever. I didn't figure out what the problem was until I played the left channel test file.
Try playing some Beatles stereo masters ;-)

Quote

This meter can be made using the LVU method and that is probably the best method for this type of skin.
I don't think that would work very well, because it would require a very large amount of dB steps to make the lightbars move at least a little bit smooth.
Also I had tried that before, but I think the ini does not accept fractions for the dB values.

Quote

And just to make sure I'm not missing anything, this is currently something that can't be done with AIMP/LVU so it would be something unique to Musicbee?
Correct. It can currently not be done with AIMP.
It can be done with foobar2000, it has the 'vertical' option for that.
And there are a lot of foobar2000 skins that make use of that.



Eventhough the foobar2000 solution is easier for skinners, a 'longer needle' solution would be better for the end user.
 (no need to switch between H and V modes)

Also I am wondering:
The plugin currently already accepts LED bars to be longer than the background image.
I am guessing these skins will not be compatible with AIMP either? (I haven't tested that yet)
Last Edit: September 29, 2024, 03:11:05 PM by hiccup

BoringName

  • Sr. Member
  • ****
  • Posts: 916

I don't think that would work very well, because it would require a very large amount of dB steps to make the lightbars move at least a little bit smooth.
Also I had tried that before, but I think the ini does not accept fractions for the dB values.

I just did a test converting that skin to the LVU method and you are correct. It's not very smooth. I can change it to support decimal DB values but it's not very practical having to create a large dbs list.

Also I am wondering:
The plugin currently already accepts LED bars to be longer than the background image.
I am guessing these skins will not be compatible with AIMP either? (I haven't tested that yet)

Yes and it complicates things quite a bit. When all the files are the same size you can do it all with one set of vertices, once you start resizing things you have to create separate vertices for everything and make sure all the positioning is correct so it works regardless of what axis the aspect is locked to.

No, they will not be compatible once you add LED settings to an AIMP skin.
LVU type skins will work with AIMP if you have the LVU plugin installed, they will also work in Musicbee
AIMP skins will work with AIMP and Musicbee. I think the plugin for these is installed by default in AIMP?
AIMP skins with LVU style LEDs added will only work in Musicbee.  AIMP does load them and the needle will work but it ignores the LED settings and doesn't display them

AIMP style skins with a larger needle file don't display properly, AIMP just squishes the image down to make it the same size as the background. There is also a risk if I allow different sized needles that some existing AIMP skins won't display correctly anymore. The way it's setup, it will shrink or expand the needle image to match the background. If someone inadvertently made a needle image at half the size, it would probably still display correctly but if I allow different sized needles it won't anymore, I won't be able to check if it's size was intentional or a mistake.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
If someone inadvertently made a needle image at half the size, it would probably still display correctly but if I allow different sized needles it won't anymore, I won't be able to check if it's size was intentional or a mistake.
That's a thorough analysis of things.
So one thing seems clear: 100% out-of-the-box compatibility between MusicBee with AIMP skins is not a realistic (or even a desirable) goal.

Do you have any idea if there are many AIMP skins that have needles where the creator has taken some lazy approach and did not size them properly?
Since that wouldn't work for traditional needles to begin with, I'm guessing there won't be that many?

So it looks like there are two options?
1. allow for wider needles with the consequence that some (very few?) AIMP skins won't work well. (which skins could very easily be modified to correct the needle size)
2. implement the foobar2000 option for L+R (V)

Choose wisely ;-)

PS
It's a pity that there is no input from other MusicBee users about using existing AIMP skins with your your plugin.
It makes it more of a guessing game for you and me about the importance of compatibility and possible challenges with that.
Ah well, perhaps they are only using my VU meter skins. If so, we can forget about compatibility completely ;-)

And if there are some very nice AIMP skins that prove not to be fully compatible with MusicBee that someone wants to use, it shouldn't be difficult to create a MusicBee mod of them.
Which is what will need to be done for any and all foobar2000 skins (which are the source of the majority of AIMP skins) to begin with.

Cut to the chase, my standpoint would be that getting your plugin the best as it can be is much more important than any possible considerations for staying compatible with AIMP.
You, sveakul and I have put in a lot of time and effort in this.
It's only fair that an end-user that wants to use an AIMP skin that doesn't work perfectly in MusicBee puts in a little effort himself and creates (and shares) a mod of it.
Last Edit: September 30, 2024, 08:14:18 AM by hiccup

sveakul

  • Hero Member
  • *****
  • Posts: 3262
LVU type skins will work with AIMP if you have the LVU plugin installed, they will also work in Musicbee
AIMP skins will work with AIMP and Musicbee. I think the plugin for these is installed by default in AIMP?
AIMP skins with LVU style LEDs added will only work in Musicbee.  AIMP does load them and the needle will work but it ignores the LED settings and doesn't display them

Good summary.  Yes, the "AIMP skin" plugin is installed by default in AIMP--"aimp_analogMeter.dll"

I assume the Foobar "BIN" meters are still indecipherable for use elsewhere?  I finally downloaded and installed that old plugin ("foo_vis_vumeter.dll") in my 32-bit Foobar 1.6.18 and a few of the huge amount of BIN meters and am surprised at how nice they look--hard to tell how accurate, however.  While advertised as "analog" the available skins include a large amount of LED types along with the needle meters.

BoringName

  • Sr. Member
  • ****
  • Posts: 916

So one thing seems clear: 100% out-of-the-box compatibility between MusicBee with AIMP skins is not a realistic (or even a desirable) goal.

Well that kind of was the plan initially. Just get all the different skins working in Musicbee. It's just evolved now which I'm fine with.
Do you have any idea if there are many AIMP skins that have needles where the creator has taken some lazy approach and did not size them properly?

I don't but I've found a few skin not setup correctly. It's not a big deal, I was just trying to come up with an excuse not to do the changes :)

So it looks like there are two options?
1. allow for wider needles with the consequence that some (very few?) AIMP skins won't work well. (which skins could very easily be modified to correct the needle size)
2. implement the foobar2000 option for L+R (V)

While it's probably going to be a very major change just because of how everything is structured, I think option 2 is the way to go. It solves a problem and also adds another display option for users without needing to change the format of the image files. It will just be similar to the Single meter option where some merged skins won't display correctly unless set to correct orientation.

It makes it more of a guessing game for you and me about the importance of compatibility and possible challenges with that.

Might be a good sign, people tend to only speak up if they disagree with something so maybe they are onboard with all the changes.

Cut to the chase, my standpoint would be that getting your plugin the best as it can be is much more important than any possible considerations for staying compatible with AIMP.

Yeah I'm in this camp now really. If they can't edit the skins themselves I'm sure they can get help here.

I'll probably post a new version soon with the option to ignore any volume modifications plus a few other improvements. Then work on the vertical option. That's going to take a while.

I assume the Foobar "BIN" meters are still indecipherable for use elsewhere?

Yeah, I hit a dead end there unfortunately.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I just did a test converting that skin to the LVU method and you are correct. It's not very smooth. I can change it to support decimal DB values but it's not very practical having to create a large dbs list.

I just had a light bulb moment on this one. I could set it up so if the dbs field just contained the text "auto" or something like that instead of values. It could use the minlevel and maxLevel settings as a range and display a percentage of the bar image based on that range. eg) If the range was -20 (0.1) and +6 (1.42). -4 decibels (0.63) would display ~50% of the meter image. That would create a much smoother meter. It would be trickier to calibrate though.

edit: Might be obvious but this would only be good for a bar type meter using the LVU method. It's not going to work where you want the appearance of an LED turning on and off as it would look like the LED is filling up/emptying.
Last Edit: October 01, 2024, 02:45:50 AM by BoringName

sveakul

  • Hero Member
  • *****
  • Posts: 3262

I assume the Foobar "BIN" meters are still indecipherable for use elsewhere?

Yeah, I hit a dead end there unfortunately.
I saw this just recently posted at the Foobar forum, not sure how it may help here but interesting:

https://hydrogenaud.io/index.php/topic,124454.msg1051481.html#msg1051481

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I saw this just recently posted at the Foobar forum, not sure how it may help here but interesting:

Interesting indeed! I've asked if they would be willing to share some info on how to do it. Cross all your appendages.

hiccup

  • Hero Member
  • *****
  • Posts: 9107
I saw this just recently posted at the Foobar forum, not sure how it may help here but interesting:
Interesting indeed! I've asked if they would be willing to share some info on how to do it. Cross all your appendages.
Well spotted sveakul!
Wow, so there is a chance that the 14 yr. old Riddle of the Bin may have been solved?
That gives some hope indeed, also because I believe foobar2000 is coded in C++, and if I am not mistaken, that is also BoringName's weapon of choice?

BoringName

  • Sr. Member
  • ****
  • Posts: 916
That gives some hope indeed, also because I believe foobar2000 is coded in C++, and if I am not mistaken, that is also BoringName's weapon of choice?

Nah, I'm using C# but 3Dbee originated from c++ source code that I converted to C# and this plugin uses quite a bit of that code. Apart from a few quirks it's not too hard to convert.

The foobar vu meter plugin seems to be written in delphi which I have no idea about. oops is re-writing it for 64 bit foobar so that might be in more modern code I can get my head around, if they are willing to share.