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: JScript Panel script discussion/help (Read 524017 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Re: JScript Panel script discussion/help

Reply #2000
@Defender : thanks you for such a detailed report/commentary on the newest ilovefb2k script, much appreciated!  Was disappointed to hear about the spread of the needle bottom protrusions and the memory spikes on certain scalings (yikes!).  I'm sure lovefb2k will be working on those.  I was happy to hear about the increased quality of the upscaled meter image though. I didn't know about the use of the HA.RMS setting in Properties, thanks to you I will be experimenting with that.

@ilovefb2k :  thanks for the new revision, haven't even loaded it yet but need to get some sleep first, haha..   Can't wait to try out the new addition of the LVU format, lots of cool designs available there!!

Re: JScript Panel script discussion/help

Reply #2001
@sveakul

Awaiting an answer by @ilovefb2k about finding optimal PivotPoint and needle length, I had a "bright" idea. VU Editor does the job perfectly with the provided needle of it's project. So basically I am now using the information from the saved VU Editor project to find the values to use in skin.ini.

Method:
0.) Use VU Editor to create a project based on back L_0, needle and glass L_2, finding correct angles and offsets for current needle. Save project.
1.) Take original needle. Change canvas width to width of L_0, keeping the needle dead center and the height to the original height of the needle. Save as L_1.
2.) Set MinAngle and MaxAngle in skin.ini to the ones that are found in the saved VU Editor project (which is a textfile).
3.) Set MinLevel to -60 (not -22) and MaxLevel to +4.
4.) Set PivotPointX to the width of L_0 divided by 2.
5.) Load the skin while not playing and scaling set to H:Center (important), because of the HA.RMS.gain (dB) display bug.
6.) Use trial and error to find the correct PivotPointY where the needle goes straight through MinLevel. Do not change the angle which is already correct.
7.) When found, make the needle shorter to your liking by shifting it down keeping the containing canvas at the same dimensions.
8.) As a result the needle when playing will have the same length at MaxLevel as it has at MinLevel.

9.) Finding ZeroAngle at ZeroLevel=0 is a bit hard since fooBar cannot be playing when you want to find the correct angle. So I abuse MinAngle temporarily for that. You also cannot enter a positive angle. First I use magnifier to have the full left VU Meter as large as possible on the screen. Then I measure the distance between +0 and +4 (MaxLevel) with a ruler. Now change MinAngle so that the distance between the original MinLevel point is the same as distance between +0 and +4. When the angle is found use the absolute value of this found (negative) angle as ZeroAngle and reset MinAngle to the original value from VU Editor.

The check settings within rightclick on the JSP3 panel don't give me any values I can actually use.

For reference I added the skin build by using the above. In skin.ini I also included the text of the VU Editor project.

NB. I like the eye candy of a nice moving needle. I have ReplayGain on, peak needle is disabled and PROPERTY HA.RMS.gain (dB) is set to 19. Resulting red needles are similar to the black ones I have in the BIN, but a bit more nervous. Tempering with PROPERTIES HA.RMS.decay.Overridden or the MobilityNegative in skin.ini have no effect.

Re: JScript Panel script discussion/help

Reply #2002
@ilovefb2k : Some things noticed first try with the "1.0.16 DT-M 16-Nov-24" script", DUI, Foobar 2.24 x64 :

1.  If an LVU meter is loaded first, or is switched to from an AIMP meter, it works fine.  If you then try to switch back to LVU from the AIMP meter, you end up with a white empty space, and cannot then change to any meter.  Only a restart of Foobar temporarily fixes it, but behavior immediately reverts.

2.  Whenever playback begins with a meter active, a file "~JSP_AIMP_VU_Meter_temp.ini" file is created in the beat_audio_vu_meter skins folder with the contents of:
[error]
number=0

3.  Is there a setting that functions the same way as "var peak_hold = 10; // in frames" does in the JSP3 Sample VU Meter?

Re: JScript Panel script discussion/help

Reply #2003
AIMP Analog VU Meter deployed, version named 1.0.16 DT-M 16-Nov-24
@ilovefb2k

Thanks for actively developing this script.

I like transparency and since the original foo_vis_vumeter does not support it and the new foo_vis_vumeter is DUI only/not transparent, your script is the only way to  use this nice feature properly.

Nice you mention features, how to and limitations with new versions in your post, but could you also include a todo and version changes in the post. Especially the last one would be an improvement for me, since I then know what to test. Maybe also an idea to include the version name in the attached source rar itself?

I currently use:
fooBar 2.24 preview 2024-11-14 x86 - CUI/PSS 790MB typical memory usage
AIMP Analog VU Meter 1.0.16 DT-M 16-Nov-24

I did some testing on your current version:


ALIGNMENT:

I noticed in this version that the quality of the upscaled displayed image in all modes is now the same as foo_vis_vumeter.
All good except for the needle stuff mentioned below.

BTW. The original foo_vis_vumeter also has a mono choice besides only left and only right. It combines/adds L+R signals before using the left vu meter to display the results.


MEMORY USAGE:

When using any of the H and C scalings except H:Maximize and switching between them your script hardly uses any extra memory. All of these scalings however display part of the needle below L_0 & R_0 (and L_2 & R_2). Only H:Bottom looks fine because it probably paints the lower part of the needle outside of the panel.

The moment you switch to H:Maximize or any of the V and R scalings the needle is displayed correctly within image boundaries.
However memory uses goes up by a lot. Lowest value I have seen is +400MB, but sometimes it goes up by +1000MB. CPU usage stays low.
Any switch in scaling you do after you selected a high memory scaling, keeps the memory at those elevated levels even when playing stops or plugin is not displayed.
I also encountered some very infrequent freak spikes up to +2000MB while testing before fooBar became unstable and had to be killed.


NEEDLE CALIBRATION/MINIMAL ANGLE:

You mention easy tuning in your post. I still struggle a whole lot by trial and error to calibrate the position of the needle and the length of the needle. In the end I find the minimal angle (and maximum angle=-minimum angle). But the needle is a whole lot shorter when reaching the maximum value. Looks ok'ish at best. I hoped that the VU editor I use for making BIN's could provide me with values to use within the skin.ini file, but those values don't work.
How do you easy tune the needle? What tools do you have available?

While not playing I calibrate (by a lot of trial and error) the needle angle and position with one of the H:scalings (not H:Maximize), so the aspect ratio is the same of te L_0 & R_0 dimensions. Works fine when not playing and switching to any of the other H/C scalings except H:Maximize.
The moment I switch to H:Maximize or V/R scalings when not playing the needle moves from the position I calibrated to a slightly different position. Apparently in these modes the value is corrected by the value of PROPERTY HA.RMS.gain (dB). Can you disable this behavior so that the needle stays at 0 also in these scaling modes when not playing?


NEEDLE MOVEMENT:

In PROPERTIES you can set HA.RMS.gain (dB) which alters the movement of the needle. In foo_vis_vumeter this value is dynamic and can be changed by using the mouse scrollwheel.
I noticed that your script does not have a on_mouse_wheel(s) callback.
Can this be added so that you can also dynamically adjust the value of HA.RMS.gain (dB) PROPERTY in your script?


LAMP/LIGHT:

With VU Editor you can add a light/lamp overlay (with has the same dimensions as L_0 & R_0), that starts to be displayed as an overlay from a certain peak level to a maximum with increasing opaqueness.  I use two knots in VU Editor values +0,0% and +4,100% with linear scale in between.
Can this be implemented in your script by adding the lights as L_3 & R_3 with PROPERTIES such as lowlight_dB, lowlight_perc and highlight_dB, highlight_perc?

I attached current version of my transparent AIMP style skin (red needles) with proposed lamp/light overlays included. Also a gradient BIN style (black needles) with red light/lamp. Also a small video with both VU meters running and show the light/lamp on the BIN.
hi @Defender,
thank you very much for your very detail feedback, in terms of the script's functionality and performance.
I reckoned, playing around with this  VU meter is as playing a game of tradeoffs. not to mention my limited knowledge of VU meter.
1. ALIGNMENT: well-noted.
2. MEMORY USAGE : as @marc2003 has just introduced  IJSBitmap interface https://jscript-panel.github.io/docs/interfaces/IJSBitmap/ along with JSP3 3.8.4 https://jscript-panel.github.io/docs/changes/#384, we will apply this and make some refactoring to see any improvement.
3. NEEDLE CALIBRATION/MINIMAL ANGLE:
How do you easy tune the needle? What tools do you have available?
I completely have no idea about this. 'easy tuning' means playing around with aligning only.
as such, please accept my apology for giving a text that is not clear meaning. i will remove that text and consider have it back when we can enable such truly useful tuning as this vague feature:  there may be a VU Meter, where the wallpaper is none, the background is transparent but meter range. then, the script can change the background/needle color, draw the meter range .

3. NEEDLE MOVEMENT: well - noted.
4. LAMP/LIGHT: well-noted.
best regards,
@ilovefb2k

Re: JScript Panel script discussion/help

Reply #2004
@ilovefb2k : Some things noticed first try with the "1.0.16 DT-M 16-Nov-24" script", DUI, Foobar 2.24 x64 :

1.  If an LVU meter is loaded first, or is switched to from an AIMP meter, it works fine.  If you then try to switch back to LVU from the AIMP meter, you end up with a white empty space, and cannot then change to any meter.  Only a restart of Foobar temporarily fixes it, but behavior immediately reverts.

2.  Whenever playback begins with a meter active, a file "~JSP_AIMP_VU_Meter_temp.ini" file is created in the beat_audio_vu_meter skins folder with the contents of:
[error]
number=0

3.  Is there a setting that functions the same way as "var peak_hold = 10; // in frames" does in the JSP3 Sample VU Meter?
hi @sveakul ,
thank you for your feedback,
well-noted.
1- we will have that bug (1) cleared next round.
2 - that file is for error manipulation on purpose.
3- var peak_hold = 10 : can you shed me a light on what you are after  ? we can have this back or make it as an option.

regards
@ilovefb2k

Re: JScript Panel script discussion/help

Reply #2005
3. NEEDLE CALIBRATION/MINIMAL ANGLE:
How do you easy tune the needle? What tools do you have available?
I completely have no idea about this. 'easy tuning' means playing around with aligning only.
as such, please accept my apology for giving a text that is not clear meaning. i will remove that text and consider have it back when we can enable such truly useful tuning as this vague feature:  there may be a VU Meter, where the wallpaper is none, the background is transparent but meter range. then, the script can change the background/needle color, draw the meter range .
@ilovefb2k

Such a tool already exists in the existent VU Editor.

Because of current incompatibility between skin.ini and BIN project files you have to do a lot of tedious transformations by hand/eye in the needle png, adjusting length and finding of PivotPointY. See my previous post about this process and particularly the attached skin.ini.
https://hydrogenaud.io/index.php/topic,110516.msg1054186.html#msg1054186

Instead of putting effort in writing your own VU Editor for this JSP3 script, it might be a better approach to make this script compatible with and accept the values from the existing VU Editor project files as is.

EDIT: I'm pretty sure the compiled BIN files hold no magic. It just contains the L_0, L_2 and L_3 files as is and a number of prerendered (anglecount) needle png's rendered to the same dimensions as L_0. Therefore there's hardly a performance impact on CPU and memory displaying/scaling a running BIN VUmeter. The only thing needed is a decent scaling/rendering engine supporting alpha and brightness, such as JSP3 already has.

 

Re: JScript Panel script discussion/help

Reply #2006
3.  Is there a setting that functions the same way as "var peak_hold = 10; // in frames" does in the JSP3 Sample VU Meter?
hi @sveakul ,
thank you for your feedback,
3- var peak_hold = 10 : can you shed me a light on what you are after  ? we can have this back or make it as an option.
@ilovefb2k
I thought it might help visually with the extremely slow decay rate of LEDs when "LED follows Peak" is selected.  On the JSP3 bar meters it controls how long the peak line holds before beginning the decay of the line.  May or may not be relevant here but maybe worth an optional inclusion.  Just to clarify, the NEEDLE meter decay rate has always looked fine, but I assume that RMS is what is being used by default with AIMP meters?

Re: JScript Panel script discussion/help

Reply #2007
Does anyone have a working last.fm love button script? Thanks in advance.

Re: JScript Panel script discussion/help

Reply #2008
@Jacob91

As requested a working "Text Display + Album Art + Seekbar + Buttons, added Art mousewheel, ReplayGain button and rightclicks" script for JSP3 3.8.5.

EDIT: Needs the cui-configs.rar with stub images to be extracted in the foobar roaming folder, if not already present.

Re: JScript Panel script discussion/help

Reply #2009
@Jacob91

As requested a working "Text Display + Album Art + Seekbar + Buttons, added Art mousewheel, ReplayGain button and rightclicks" script for JSP3 3.8.5.

EDIT: Needs the cui-configs.rar with stub images to be extracted in the foobar roaming folder, if not already present.

It works, thanks a lot ! :))  :D

X

Re: JScript Panel script discussion/help

Reply #2010
3. NEEDLE CALIBRATION/MINIMAL ANGLE:
How do you easy tune the needle? What tools do you have available?
I completely have no idea about this. 'easy tuning' means playing around with aligning only.
as such, please accept my apology for giving a text that is not clear meaning. i will remove that text and consider have it back when we can enable such truly useful tuning as this vague feature:  there may be a VU Meter, where the wallpaper is none, the background is transparent but meter range. then, the script can change the background/needle color, draw the meter range .
@ilovefb2k

Such a tool already exists in the existent VU Editor.

Because of current incompatibility between skin.ini and BIN project files you have to do a lot of tedious transformations by hand/eye in the needle png, adjusting length and finding of PivotPointY. See my previous post about this process and particularly the attached skin.ini.
https://hydrogenaud.io/index.php/topic,110516.msg1054186.html#msg1054186

Instead of putting effort in writing your own VU Editor for this JSP3 script, it might be a better approach to make this script compatible with and accept the values from the existing VU Editor project files as is.

EDIT: I'm pretty sure the compiled BIN files hold no magic. It just contains the L_0, L_2 and L_3 files as is and a number of prerendered (anglecount) needle png's rendered to the same dimensions as L_0. Therefore there's hardly a performance impact on CPU and memory displaying/scaling a running BIN VUmeter. The only thing needed is a decent scaling/rendering engine supporting alpha and brightness, such as JSP3 already has.
hi @Defender ,
we have just bothered @BoringName at MB 4rum to compile a command-line tool to extract fb2k Vu meter's BIN. https://getmusicbee.com/forum/index.php?topic=41692.msg229960#msg229960
If things go fine, then Santa Claus already brings us present for this coming Xmas .

note: @marc2003 released JSP3 3.8.5 https://jscript-panel.github.io/docs/changes/,  the last 2 updates with  IJSGraphics.PushLayer()  and  IJSBitmap interface surely add a lot of values:
-  IJSGraphics PushLayer : remove the 'weird tails' of VU Meter.
- IJSBitmap interface : we believe this will reduce memory consumed after triggering IJSImage.ReleaseGraphics()

hope that we can have the last piece of the puzzle on place this weekend and then just script refactored.
regards
@ilovefb2k

Re: JScript Panel script discussion/help

Reply #2011
EDIT: I'm pretty sure the compiled BIN files hold no magic. It just contains the L_0, L_2 and L_3 files as is and a number of prerendered (anglecount) needle png's rendered to the same dimensions as L_0. Therefore there's hardly a performance impact on CPU and memory displaying/scaling a running BIN VUmeter. The only thing needed is a decent scaling/rendering engine supporting alpha and brightness, such as JSP3 already has.

I don't really know how much time I'll have to monitor this thread so no guarantees on how much engagement I'll have here down the track.

The BIN files contain the background image as is. The needle and LED information is stored as pixel data and there are offsets stored for each frame that points to this data which contains what position in the background image it needs to replace. So the process is to start with the background image, look up the offset for the specific frame being drawn, use that data to replace pixels in the background image with the needle/led pixels, then draw the final image. It's a bit more complicated than that but it's not too far off.

There is a zeroFrame value stored which designates which frame should be used when the peak level is 1.0 (zero decibels).

Some frames use the same data and that's how the bin file creates a scale for the meter. If a meter starts at -40 decibels and another starts at -20, you will find the -20 meter will have a lot more frames with the needle pointing to -20 than the other meter will have pointing to -40. I hope that makes sense.
The calculation to determine which frame to use is Peak Value * zeroFrame. Assuming Foobar returns peak values between 0-1.0

we have just bothered @BoringName at MB 4rum to compile a command-line tool to extract fb2k Vu meter's BIN. https://getmusicbee.com/forum/index.php?topic=41692.msg229960#msg229960

Now I'm up to speed on what you want it for, I'm even more sure it's not going to do what you want. Aside from the issue I already mentioned about VUEditor appearing to anti-alias the needle image when it stores the data in the BIN file, the other problem is you are planning on caching thousands of images. Most bin files are 1024 frames. So you're talking over 2000 images if it has a needle and LED components.

It's been a decade since I've dabbled in javascript and I don't know what limitations you have with the jscript panel but for AIMP skins in my plugin, I just cache the background image and the needle image. Then each frame I draw the background, rotate the needle image based on the peak value and draw it over the top.

I might have it wrong but it looks like you are caching all the possible angles of the needle up front, wouldn't that be using large amounts of VRAM?

I initially tried that method with BIN files and it didn't end well.

If you are intent on supporting BIN files I'd suggest you have a read of the info oops provided and work on drawing them with the approach I mentioned at the start of this post. While you might be able to extract a fully intact needle image with the binExtractor program for some BIN files, I think you will find they will be in the minority.

Re: JScript Panel script discussion/help

Reply #2012
Am I blind or is there no way to edit posts?

Anyway, one other issue is the VUEditor stores the glass and needle pixels together so that will also give undesirable results with your approach.

Re: JScript Panel script discussion/help

Reply #2013
Am I blind or is there no way to edit posts?
For reasons known only to someone else, once posts here reach a certain limited age (an hour??) they cannot be edited.  Until then if you press the "More" button it offers the ability to edit.

Re: JScript Panel script discussion/help

Reply #2014
EDIT: I'm pretty sure the compiled BIN files hold no magic. It just contains the L_0, L_2 and L_3 files as is and a number of prerendered (anglecount) needle png's rendered to the same dimensions as L_0. Therefore there's hardly a performance impact on CPU and memory displaying/scaling a running BIN VUmeter. The only thing needed is a decent scaling/rendering engine supporting alpha and brightness, such as JSP3 already has.

I don't really know how much time I'll have to monitor this thread so no guarantees on how much engagement I'll have here down the track.

The BIN files contain the background image as is. The needle and LED information is stored as pixel data and there are offsets stored for each frame that points to this data which contains what position in the background image it needs to replace. So the process is to start with the background image, look up the offset for the specific frame being drawn, use that data to replace pixels in the background image with the needle/led pixels, then draw the final image. It's a bit more complicated than that but it's not too far off.

There is a zeroFrame value stored which designates which frame should be used when the peak level is 1.0 (zero decibels).

Some frames use the same data and that's how the bin file creates a scale for the meter. If a meter starts at -40 decibels and another starts at -20, you will find the -20 meter will have a lot more frames with the needle pointing to -20 than the other meter will have pointing to -40. I hope that makes sense.
The calculation to determine which frame to use is Peak Value * zeroFrame. Assuming Foobar returns peak values between 0-1.0

we have just bothered @BoringName at MB 4rum to compile a command-line tool to extract fb2k Vu meter's BIN. https://getmusicbee.com/forum/index.php?topic=41692.msg229960#msg229960

Now I'm up to speed on what you want it for, I'm even more sure it's not going to do what you want. Aside from the issue I already mentioned about VUEditor appearing to anti-alias the needle image when it stores the data in the BIN file, the other problem is you are planning on caching thousands of images. Most bin files are 1024 frames. So you're talking over 2000 images if it has a needle and LED components.

It's been a decade since I've dabbled in javascript and I don't know what limitations you have with the jscript panel but for AIMP skins in my plugin, I just cache the background image and the needle image. Then each frame I draw the background, rotate the needle image based on the peak value and draw it over the top.

I might have it wrong but it looks like you are caching all the possible angles of the needle up front, wouldn't that be using large amounts of VRAM?

I initially tried that method with BIN files and it didn't end well.

If you are intent on supporting BIN files I'd suggest you have a read of the info oops provided and work on drawing them with the approach I mentioned at the start of this post. While you might be able to extract a fully intact needle image with the binExtractor program for some BIN files, I think you will find they will be in the minority.
hi @BoringName,
It is very kind of you to give us very valuable information about fb2k-VU-meter-BIN file format.
I have tried to unzip BIN file by 7zip https://7-zip.org, then following @oops 's instruction to manipulate  that file content by utilizing an  ActiveX Object ADODB.Stream (which can read binary content), but no luck except for very strange characters. 

you are totally right about VRAM consumed during rendering the AIMP VU Meter skins. we, as much as we can, avoid caching all the possible angles of the needle up front until struggling with some special layouts (e.g. maximize to have VU Meter skin filled the whole panel). however, we will have to figure out a formula ultimately or play around with that to reduce very high VRAM consumed.

dealing with fb2k VU Meter BIN is almost the last piece of the puzzle. step by step, we have tried our best.
as such, someone may think we are stubborn , try to mimic something that has been already done by professional people as @BoringName and @oops  done, . . . and this VU script could not be compared with foo_vis_vumeter in every aspects. But, think twice, as we have already undergone a very long time that the fb2k vu_meter component staying no updated until @oops gave it a try. as such, we just want to have Vu meter done in JSP3 script as plain text here, then people as us can make any changes to this as long as @marc2003 keeps this component updated and been there no matter other real Vu meter. by then, VRAM and CPU power should not something for us to consider.

wish you all the best and very happy Xmas season to come.
regards
@ilovefb2k.

Re: JScript Panel script discussion/help

Reply #2015
3.  Is there a setting that functions the same way as "var peak_hold = 10; // in frames" does in the JSP3 Sample VU Meter?
hi @sveakul ,
thank you for your feedback,
3- var peak_hold = 10 : can you shed me a light on what you are after  ? we can have this back or make it as an option.
@ilovefb2k
I thought it might help visually with the extremely slow decay rate of LEDs when "LED follows Peak" is selected.  On the JSP3 bar meters it controls how long the peak line holds before beginning the decay of the line.  May or may not be relevant here but maybe worth an optional inclusion.  Just to clarify, the NEEDLE meter decay rate has always looked fine, but I assume that RMS is what is being used by default with AIMP meters?
hi @sveakul,
we will have this peak_hold setting back this weekend updated.
thank you for your feedback.
@ilovefb2k

Re: JScript Panel script discussion/help

Reply #2016
I have tried to unzip BIN file by 7zip https://7-zip.org, then following @oops 's instruction to manipulate  that file content by utilizing an  ActiveX Object ADODB.Stream (which can read binary content), but no luck except for very strange characters. 

Removing compression is definitely the first step. Finding a C# library that could unzip BZIP2 files properly was one of my biggest hurdles.

Let's see if you can decode the header using javascript and go from there. The first 8 bytes (64 bits) of the file contain the background image width, height, number of frames and zero frame. Each value is 2 bytes.

In C# I use BitConverter.ToUInt16(value,0);
Where value is a byte array containing the 2 bytes I want to convert.

If you can find a javascript equivalent of that command and extract the 4 values from the header that will be a good start.

Re: JScript Panel script discussion/help

Reply #2017
@Defender
"Text Display + Album Art + Seekbar + Buttons, added Art mousewheel, ReplayGain button and rightclicks"
Thanks for this script.

Request:
Could you please add "Custom Text" to the Contestmenu?
Thank you.

 
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #2018
@Defender
"Text Display + Album Art + Seekbar + Buttons, added Art mousewheel, ReplayGain button and rightclicks"
Thanks for this script.

Request:
Could you please add "Custom Text" to the Contestmenu?
Thank you.
It already has, when you rightclick on the text (rightclicking the image will give a different menu).

Re: JScript Panel script discussion/help

Reply #2019
Oops, when I right-clicked on the bottom of the image, the original "Text Display + Album Art" context menu appeared.
"Text Display + Album Art" displays a context menu even on images.
I am deeply remorseful.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #2020
Oops, when I right-clicked on the bottom of the image, the original "Text Display + Album Art" context menu appeared.
I am deeply remorseful.
It's a small glitch in my (old) script (which I do not use myself), where I manually added support for mousewheel on art including stub image support (and extra buttons, optional font/size with rightclick support).

The current version of the sample script now has built-in a lot of the stuff I originally added including mousewheel support on art and image support for buttons.

I took current version of the sample script and applied the things I still miss like optional transparency, stub art, extra buttons with optional font/size support and rightclick functions.

Hereby attached the upgraded version (v11). It needs the (same old) stub art of course to be extracted as well.

Let me know if it works as intended.

Re: JScript Panel script discussion/help

Reply #2021
Perfect, thank you

SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD620S, SENNHEISER HD 490 Pro Plus, beyerdynamic DT 1990 PRO, HiFiMAN Edition XS, HIFIMAN ANANDA, Bowers & Wilkins P7, FiiO FT5, FiiO FT1 Pro, 水月雨 (MOONDROP) 空鳴 - VOID, SONY WH1000XM5 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel script discussion/help

Reply #2022
I have tried to unzip BIN file by 7zip https://7-zip.org, then following @oops 's instruction to manipulate  that file content by utilizing an  ActiveX Object ADODB.Stream (which can read binary content), but no luck except for very strange characters. 

Removing compression is definitely the first step. Finding a C# library that could unzip BZIP2 files properly was one of my biggest hurdles.

Let's see if you can decode the header using javascript and go from there. The first 8 bytes (64 bits) of the file contain the background image width, height, number of frames and zero frame. Each value is 2 bytes.

In C# I use BitConverter.ToUInt16(value,0);
Where value is a byte array containing the 2 bytes I want to convert.

If you can find a javascript equivalent of that command and extract the 4 values from the header that will be a good start.

hi @BoringName,
We think Santa Claus is true and He just bought us a Xmas present.
tonight, employing your tool https://getmusicbee.com/forum/index.php?topic=41692.msg229228#msg229228 ,  i could extract McIntosh.bin fb2k VU Meter bin into a folder, then applying a db-angle calculation, we can get the VU meter:
- every needle image is scattered along meter range and each has its own position on the scale.
- we then apply a formula to convert decibel into angle, then figure out the index number of the needle image.
quick observation show that it is very promising.
we will have it in detail tomorrow evening and hope that this is true, then we can release the 1st candidate.

again, thank you for your help and valuable inside information to finish the last piece of the puzzle ultimately.
regards,
@ilovefb2k
P/s. attached is the screenshot of the VU Meter: top is @oops 's Analog VU Meter Visualisation , bottom is JSP3_VU_Analog_Meter.  i am on CPU: AMD Ryzen 7 4700U, 8  threads,  OS: Windows 10, x64.

Re: JScript Panel script discussion/help

Reply #2023
xmas present
Great news. This is also one of my preferred BIN's.

But I am puzzled by this post. Were you able to retrieve the back (L_0), needle (L_1) and glass (L_2) from the BIN?
You state, "we then apply a formula to convert decibel into angle" ... how and what?

Nice screenshot. Can you send a working extracted set of L_0, R_0, L_1, R_1, L_2. R_2 with skin.ini from this BIN?

Re: JScript Panel script discussion/help

Reply #2024
But I am puzzled by this post. Were you able to retrieve the back (L_0), needle (L_1) and glass (L_2) from the BIN?
You state, "we then apply a formula to convert decibel into angle" ... how and what?

ilovefb2k's method will only work for certain skins. When the BIN file is created with the VUEditor, it merges the needle and glass pixels so you can't separate them.

You can extract the background image without any problems.
You can extract a full needle image only if there is at least one angle where it will not be covered by a glass element.
You can extract full LED images.

The problem with just extracting images is you have to manually configure the pivot point and scale of the meter. While it's a lot more complicated up front, decoding the BIN file properly will produce a much better result.