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: JSP3 Script Analog VU Meter (Read 8828 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

JSP3 Script Analog VU Meter

This new thread is for the discussion of the "JSP3 Analog VU Meter" script and its meter displays.  Thank you to ilovefb2k, marc2k3, and Case.

Re: JSP3 Script Analog VU Meter

Reply #1
JScript Panel script discussion/help
Reply #2044: https://hydrogenaud.io/index.php/topic,110516.msg1054501.html#msg1054501

hi @all,
another weekend is coming, friYaY and also another holiday season to come.
please find a script attached, named JSP3 Analog VU Meter, version 1.0.0 DT-N 23-Nov-24 for easy reference.
   - features :
      + load analog/needle AIMP Vu meter (after unziping)
       + load FB2K VU Meter (after extracting by @BoringName 's tool).
      + free allocation in panel
      
   - AIMP VU Meter types covered:
      1 > AIMP VU Meter:
      + analog NEEDLE only (not analog LED) =>  vertical/horizontal needle, up/down needle arrow ,>< V & /\ needle shape.
         * type 1 : 1 image set for both channels
         * type 2 : 2 image sets, each for each channel.
      + LED (LVU) :  vertical/horizontal bar
      - how to :
      + download AIMP Vu Meter skin file e.g.
         * analog NEEDLE : https://www.aimp.ru/forum/index.php?topic=52865.0
         * LED (Led VU) : https://www.aimp.ru/forum/index.php?topic=54005
      + unzip AIMP Vu Meter skin into a folder and copy this [folder] to specific directory as indicated by this script.
      + load this script into a JSP3 /UI/ panel
      2> FB2K VU Meter:
      - step 0: get a FB2k Vu meter skin (e.g. https://audio-file.org/foobar2000-vu-meter-skins-gallery)
      - step 1: extract bin file by employing @BoringName's tool: https://getmusicbee.com/forum/index.php?topic=41692.msg230008#msg230008
            (re-post by @BoringName 's permission https://getmusicbee.com/forum/index.php?topic=41692.msg229964#msg229964)
            we may get 1024 needle image files (needle0000.png, . . . needle1023.png), 1024 LED image files (LED0000.png, . . LED1023.png),
            background.png per channel.
            => 1024 + 1024 + 1 = 2049 files /channel x 2 channels = 4098 files.
            
      - step 2: create a folder named after 'name.bin' (name is fb2k skin name, e.g. 'fisher', 'accuphase', 'sony'...).
      - step 3: if skin has 1 set needle, 1 set LED images : create a sub folder 'VU' for needle images, a subfolder 'VU_LED' for LED images
              if skin has 2 needle sets, 2 LED image set: create a sub folder 'VU_L' for left needle images, a subfolder 'VU_LED_L' for left LED images
              then, 'VU_R' folder for all right needle images, 'VU_LED_R' for all right LED images.
              all these subfolder are right under 'name.bin' folder.
      - step 4: copy/move 'name.bin' folder into specfic folder as indicated in the script,line 140  [fb.ProfilePath + "skins\\viking\\images\\vnav_fb2k\\beat_audio_vu_meter\\"];       
            we can change this path to any other for convinience.
      note: we recognised this folder as FB2k VU Meter skin by its '.bin' characters, so make sure to have this text in the folder name.       
   - limitation:
      + options: MobilityNegative, MobilityPositive > could not take MobilityPositive into account.
      + meter range (in the skin) is quite inaccurate based on fb2k's audio engine.
      + Fb2k's VU Meter skins are currently consumed high RAM memory.
         note: refer to fb2k , @oops's, Analog VU Meter Visualisation/foo_vis_vumeter component [https://www.foobar2000.org/components/view/foo_vis_vumeter]
         for more options    
   - credit and acknowledgment:
      + @marc2003 for rich-feature and powerful, rapid-updated JSP3 component.
      + @Case and @marc2003 for their JSP3 VU Meter.
      + @Artem and contributors /AIMP VU Meter - analog NEEDLE/ for their beautiful analog VU Meters.
      + @xrEngine and contributors /AIMP VU Meter - LED / for their elegant LED VU Meters.
      + @BoringName at https://getmusicbee.com/forum/index.php?topic=41692.msg230008#msg230008 for BinExtractor.exe tool to extract fb2k VU Meter bin skins.
      + @Defender, @sveakul and @Air KEN for nice suggestions and positive feedbacks.
   - special JSP3 features:
      + IJSImage.CreateBitmap() : (3.8.4++) to reduce memory consumed before caching.
      + gr.PopLayer()  : (3.8.5++) set a boundary to be visualied.
      + gr.DrawBitmap() : (3.8.4++) improve rendering image due to  image-converted Bitmap in advance, more efficient CPU-load.

wish you all a very nice weekend and happy holiday season to come.
hope that you all can find this humble script a little bit joyful.
regards,
@ilovefb2k
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: JSP3 Script Analog VU Meter

Reply #2
frankly, how hard we have tried, we could not figure out how these parameter related to each others (INI file of AIMP analog Vu Meter):
MinAngle, MinLevel
ZeroAngle,ZeroLevel
MaxAngle, MaxLevel

MinLevel - The minimum level displayed by the meter in decibels. eg) -40, -20 etc..
MinAngle - The angle of the needle when the peak level is at or below the Minlevel
ZeroLevel - What level should be classed as zero. It's nearly always set to zero. It's a method to offset the meter for AIMP users as AIMP doesn't allow you to adjust the decibel level like Foobar and my plugin in Musicbee do with the mousewheel.
ZeroAngle - The angle of the needle when the peak level is 1.0 (zero decibels).
MaxLevel - The max level displayed on the meter in decibels eg) 5, 10 etc...
MaxAngle - The angle of the needle when the peak level is at or above the MaxLevel.

This is the code I use in C#. The reason it's not just maxAngle - minAngle * peak is some meters use a different scale for each side of zero.
Code: [Select]
if (peak > 1.0)
{
    rotOffset = (zeroAngle - minAngle) + (peak - 1.0f) * (maxAngle - zeroAngle);
} else {
   rotOffset = peak * (zeroAngle - minAngle);
}
rotation = minAngle * Constants.radian + rotOffset * Constants.radian;

Sorry if I added to the dumpster fire. I did warn about the insane amount of image files that method would create......but who am I to judge.

If you want any more info ilovefb2k just send me a PM and I'll see if I can help.
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: JSP3 Script Analog VU Meter

Reply #3
frankly, how hard we have tried, we could not figure out how these parameter related to each others (INI file of AIMP analog Vu Meter):
MinAngle, MinLevel
ZeroAngle,ZeroLevel
MaxAngle, MaxLevel

MinLevel - The minimum level displayed by the meter in decibels. eg) -40, -20 etc..
MinAngle - The angle of the needle when the peak level is at or below the Minlevel
ZeroLevel - What level should be classed as zero. It's nearly always set to zero. It's a method to offset the meter for AIMP users as AIMP doesn't allow you to adjust the decibel level like Foobar and my plugin in Musicbee do with the mousewheel.
ZeroAngle - The angle of the needle when the peak level is 1.0 (zero decibels).
MaxLevel - The max level displayed on the meter in decibels eg) 5, 10 etc...
MaxAngle - The angle of the needle when the peak level is at or above the MaxLevel.

This is the code I use in C#. The reason it's not just maxAngle - minAngle * peak is some meters use a different scale for each side of zero.
Code: [Select]
if (peak > 1.0)
{
    rotOffset = (zeroAngle - minAngle) + (peak - 1.0f) * (maxAngle - zeroAngle);
} else {
   rotOffset = peak * (zeroAngle - minAngle);
}
rotation = minAngle * Constants.radian + rotOffset * Constants.radian;

Sorry if I added to the dumpster fire. I did warn about the insane amount of image files that method would create......but who am I to judge.

If you want any more info ilovefb2k just send me a PM and I'll see if I can help.
hi @BoringName ,
wow, we will have something to chill this weekend.
thank you very very very much for your valuable information and see if we can digest this to not bothering you again.
P/S. @marc2003 just said so, but @marc2003 is kind and nice inside. without recent JSP3 updated, we still struggle with an annoying bug of the JSP3 Analog Vu Meter.

best regards and nice weekend,
@ilovefb2k  
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: JSP3 Script Analog VU Meter

Reply #4
new script
First look ... first findings (and very pleased btw).
I'm running my original AIMP skin based on VU Editor project and did not extract a thing.

Proper transparency support (like it already was).
Music stopped, needle goes to the defined MinLevel in all scalings now. Fixed.
No more needle ghosting outside of glass L_2/R_2, cutoff btw should be one pixel higher.
There's lights/lamps in scaling mode with standard aspect ratio. Lights are not shown in H:Maximize though.

What's the reason that I only see one needle in V/H:Maximize (old issue)?

So it seems all the visuals are in place, just needs some tweaking.
Still missing a much needed mouse scrollwheel though to adjust the needle(s).

I won't be able to test for the upcoming month. Only access to a laptop with probably limited/no internet access and I'll be submerged a lot of the time.
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: JSP3 Script Analog VU Meter

Reply #5
@ilovefb2k

JSP3 Analog VU Meter, version 1.0.0 DT-N 23-Nov-24



"Fisher.bin" appears fine.
But, If you select a different skin, you will need to restart foobar to see "Fisher.bin" again.

Task Manager CPU: 6.5 - 9.0

Windows 11 Home 24H2
Processor: AMD Ryzen 7 5700X 8-Core Processor 3.40 GHz
RAM: 48GB
GPU: NVIDIA GeForce RTX 4060
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: JSP3 Script Analog VU Meter

Reply #6
My friends, for the AIMP meters you need to throw mathematics at the problem. The ad hoc approach is not going to get you good results. In the AIMP forum someone mentioned using the Photoshop ruler to get the angles to draw the meter graduations accurately (Black & AVP & Bim). Use the point-slope formula as this is the math that Photoshop is using for that tool and the answer to your calculation. That will result in perfectly measuring test tones in that and similar properly designed original skins (and most ones based on properly squared pictures of actual meters).

Also, you shouldn't blindly assume and compare against 1.0, use the data in the INI file.

Lastly, why are you using the extraction tool to draw the `.bin` files? Just redraw the background and apply the difference. You will have no memory issues that way as the entire memory footprint of most panels is between 1.5 and 10 MB uncompressed. For general knowledge this difference approach is used extensively in media compression. What DRON implemented is a basic video compression technique to achieve good data compression. You can think of the background as an I-frame and the various needle pictures as P-frames. You only need the deltas vs. the I-frame to draw an entire frame for any given position. So, so, so much nicer to work with these pre-composited frames than the nastiness of the AIMP image juggling/transformation/cropping/rotation/translation/matrices.

Let me know if I can be of any help.

Re: JSP3 Script Analog VU Meter

Reply #7
Reply #1814: https://hydrogenaud.io/index.php/topic,110499.msg1054529.html#msg1054529
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: JSP3 Script Analog VU Meter

Reply #9
@ilovefb2k :

Despite the news above, wanted to compliment you on the performance of your new "{deployed} AIMP Analog VU Meter-1.0.23 DT-N 23-Nov-24" script with AIMP analog and VU meters.

I found out that by adjusting the Peak Decay speed relative to the Peak Hold in the Properties window I could get a perfect subjective decay rate for the LED indicators in LED/Needle mix AIMP skins when using LED Peak mode. On the DejaVu Compact LED Calibrated Elemental-mod2, that is Peak Decay .77 and Peak Hold 1.

Meter bodies are nice and sharp; RMS needles responsive as are LVU meter indicators.

I'm afraid the instructions for adding BIN meters have scared me away for now, but maybe in the future a more user-friendly method using VUEditor can be found.

I plan on keeping JSP3 3.8.5 around for the foreseeabale future.  Thanks again for all your efforts on this cool alternative to meter display.

Re: JSP3 Script Analog VU Meter

Reply #10
An example of the rendition clarity with ilovefb2k's "1.0.23 DT-N 23-Nov-24" version script with the successful addition of showing Peak values separately with the LEDs while RMS is shown on the needles for combo-type AIMP analog meters:



Re: JSP3 Script Analog VU Meter

Reply #11
A reminder that the ilovefb2k JSP3 Script Analog VU Meter requires the installation of a Javascript Panel 3 version not exceeding 3.8.5.  Support for this meter display format was withdrawn by the JSP3 author after that version.  The 3.8.5 version is attached to this post.  At this time, the latest version of the meter script itself is 1.0.23 DT-N 23-Nov-24 and is also attached.  Full support for AIMP analog and AIMP LVU meters is provided.  BIN support is still in an experimental stage, and I recommend sticking with foo_vis_vumeter for BINs.

Re: JSP3 Script Analog VU Meter

Reply #12
A reminder that the ilovefb2k JSP3 Script Analog VU Meter requires the installation of a Javascript Panel 3 version not exceeding 3.8.5.  Support for this meter display format was withdrawn by the JSP3 author after that version.  The 3.8.5 version is attached to this post.  At this time, the latest version of the meter script itself is 1.0.23 DT-N 23-Nov-24 and is also attached.  Full support for AIMP analog and AIMP LVU meters is provided.  BIN support is still in an experimental stage, and I recommend sticking with foo_vis_vumeter for BINs.

hi @sveakul ,
thank you for creating this thread and for your reminding that we still own @BoringName an implementation of BinExtractor 1.1 as a fb2k's VU meter BIN command-line utility extracting https://hydrogenaud.io/index.php/topic,110516.msg1054445.html#msg1054445. or https://getmusicbee.com/forum/index.php?topic=42174.msg230008#msg230008
it is so quick that another friYaY is coming and we definitely have something for this weekend.
let see what we can do 'cracking' BIN on-the-fly. 
as thing goes by, people are nice by nature and, sometimes, we have to do things that we really do not at all.

regards,
@ilovefb2k

Re: JSP3 Script Analog VU Meter

Reply #13
My friends, for the AIMP meters you need to throw mathematics at the problem. The ad hoc approach is not going to get you good results. In the AIMP forum someone mentioned using the Photoshop ruler to get the angles to draw the meter graduations accurately (Black & AVP & Bim). Use the point-slope formula as this is the math that Photoshop is using for that tool and the answer to your calculation. That will result in perfectly measuring test tones in that and similar properly designed original skins (and most ones based on properly squared pictures of actual meters).

Also, you shouldn't blindly assume and compare against 1.0, use the data in the INI file.

Lastly, why are you using the extraction tool to draw the `.bin` files? Just redraw the background and apply the difference. You will have no memory issues that way as the entire memory footprint of most panels is between 1.5 and 10 MB uncompressed. For general knowledge this difference approach is used extensively in media compression. What DRON implemented is a basic video compression technique to achieve good data compression. You can think of the background as an I-frame and the various needle pictures as P-frames. You only need the deltas vs. the I-frame to draw an entire frame for any given position. So, so, so much nicer to work with these pre-composited frames than the nastiness of the AIMP image juggling/transformation/cropping/rotation/translation/matrices.

Let me know if I can be of any help.
hi @oops
sorry for late reply.
 1. Also, you shouldn't blindly assume and compare against 1.0, use the data in the INI file : no, we do not and prefer to INI data, if nay.
otherwise, we use the formular providing by @BoringName and @Black_AVP.  
Code: [Select]
function dbToAngle(db,c){
var angle= 0;
var offset_angle0 ZeroAngle[c] - MinAngle[c] ;
var offset_angle1 MaxAngle[c] - ZeroAngle[c] ;
var offset_angle3 offset_angle0 + offset_angle1;

if ( (ZeroAngle[c] != null )
&& ( ZeroAngle[c] >= MinAngle[c] && ZeroAngle[c] <= MaxAngle[c] )  )
{ //[member=166016]BoringName[/member] , https://hydrogenaud.io/index.php/topic,110516.msg1054405.html#msg1054405
var signal_level = dBToPct(db > 0 ? db+3 : db);
angle = MinAngle[c] +
(signal_level <= 1
? signal_level * offset_angle0
: offset_angle0 + (signal_level - 1) * offset_angle1);

} else {  //@Black_AVP , https://www.aimp.ru/forum/index.php?topic=52865.msg325067#msg325067
var ratio = Math.abs(MinAngle[c]/offset_angle3);
angle = (offset_angle3 * (  dBToPct(db - MaxLevel[c]) - ratio )) ;
};

return angle;
}

2.  why are you using the extraction tool to draw the `.bin` files : because we can not and , so far, have not figured out the way  to decode/extract or  the BIN file by JSP3. as such, we hope @marc2003 (or fb2k team !?) can have a method with JSP3 to play around with binary data/file.
we employ @BoringName's BIN-extracting tool to see if we can let the script handle fb2k BIN file on the fly.

lastly, this script is developed as an environment - independent widget (as Java), in terms of OS  and more, as long as that environment supports methods: drawing/painting and getting audio signal as chunk data (ffmpeg can help). 
and, as such, the ultimate goal is : for those people as us can play around with VU Meter skin, even their own unique customized and creative
 skins
, tailor (this plain text, easy-understanding javascript with ) to meet their requirement and to actively  keep it updating later on, themself.
again, thank you for your kindness and wish you all the best. your vu_meter and vu_milk2 are fantastic.
@ilovefb2k

Re: JSP3 Script Analog VU Meter

Reply #14
You can parse binary data via activeX. For example I use this to parse .fpl native playlist on my playlist manager. (at least on SMP/JSplitter)
https://github.com/regorxxx/Playlist-Manager-SMP/blob/main/helpers/helpers_xxx_playlists_files_fpl.js
Code: [Select]
		
readFile: function (path) {
const file = new ActiveXObject('ADODB.Stream');
const doc = new ActiveXObject('Msxml2.DOMDocument.3.0');
const element = doc.createElement('temp');
element.dataType = 'bin.hex';
file.Type = 1;
file.Open();
file.LoadFromFile(path);
const hexArr = [];
let i = file.Size;
while (i--) {
element.nodeTypedValue = file.Read(1);
hexArr.push(String.fromCharCode(parseInt(element.text, 16)));
}
file.Close();
return hexArr;
},

Re: JSP3 Script Analog VU Meter

Reply #15
@ilovefb2k :  thanks for your first posts in your project's dedicated thread!

A feature request:  please add the ability to read AIMP analog and LVU meters directly from a ZIP file, instead of having to unzip them to a folder first.  As the MusicBee VUMeter plugin and foo_vis_vumeter already do this, this would allow being able to use one shared skin folder for all three players.

Re: JSP3 Script Analog VU Meter

Reply #16
@ilovefb2k :  thanks for your first posts in your project's dedicated thread!

A feature request:  please add the ability to read AIMP analog and LVU meters directly from a ZIP file, instead of having to unzip them to a folder first.  As the MusicBee VUMeter plugin and foo_vis_vumeter already do this, this would allow being able to use one shared skin folder for all three players.
hi @sveakul ,
well-noted.
for the time being, due to end-year time constraint and holiday season, we may be lazy a little. sorry for that.
merry Xmas and a very happy new year 2025,  @sveakul.
@ilovefb2k

Re: JSP3 Script Analog VU Meter

Reply #17
You can parse binary data via activeX. For example I use this to parse .fpl native playlist on my playlist manager. (at least on SMP/JSplitter)
https://github.com/regorxxx/Playlist-Manager-SMP/blob/main/helpers/helpers_xxx_playlists_files_fpl.js
Code: [Select]
		
readFile: function (path) {
const file = new ActiveXObject('ADODB.Stream');
const doc = new ActiveXObject('Msxml2.DOMDocument.3.0');
const element = doc.createElement('temp');
element.dataType = 'bin.hex';
file.Type = 1;
file.Open();
file.LoadFromFile(path);
const hexArr = [];
let i = file.Size;
while (i--) {
element.nodeTypedValue = file.Read(1);
hexArr.push(String.fromCharCode(parseInt(element.text, 16)));
}
file.Close();
return hexArr;
},
hi @regor ,
thank you for your valuable information.
we still struggle with BIN file. basically, we follow your instruction to hack binary file,  bit shifting  & binary AND operations to deal with data but still no luck.
we will take this as top to go with JSP3 Analog VU Meter. 
hope we can get through it soon. it is just  fun then we can think of it during coming holiday season.  
merry Xmas and a very happy new year 2025.
regards,
@ilovefb2k   

Re: JSP3 Script Analog VU Meter

Reply #18
@ilovefb2k

JSP3 Analog VU Meter, version 1.0.0 DT-N 23-Nov-24



"Fisher.bin" appears fine.
But, If you select a different skin, you will need to restart foobar to see "Fisher.bin" again.

Task Manager CPU: 6.5 - 9.0

Windows 11 Home 24H2
Processor: AMD Ryzen 7 5700X 8-Core Processor 3.40 GHz
RAM: 48GB
GPU: NVIDIA GeForce RTX 4060
hi @Air KEN ,
thank you for your feedback, we can reproduce this bug.
it is fixed already, please refer to next update.
regards
@ilovefb2k

Re: JSP3 Script Analog VU Meter

Reply #19
@ilovefb2k :  thanks for your first posts in your project's dedicated thread!

A feature request:  please add the ability to read AIMP analog and LVU meters directly from a ZIP file, instead of having to unzip them to a folder first.  As the MusicBee VUMeter plugin and foo_vis_vumeter already do this, this would allow being able to use one shared skin folder for all three players.
I don't think that's possible in JS without extra binaries. i.e. a copy of 7z should then be shared along the script (1.8MB) to unzip the file automatically without user intervention (I do this on some of my scripts). But it must be unzipped anyway, either by the JS script or you.

Re: JSP3 Script Analog VU Meter

Reply #20
A reminder that the ilovefb2k JSP3 Script Analog VU Meter requires the installation of a Javascript Panel 3 version not exceeding 3.8.5.  Support for this meter display format was withdrawn by the JSP3 author after that version.  The 3.8.5 version is attached to this post.  At this time, the latest version of the meter script itself is 1.0.23 DT-N 23-Nov-24 and is also attached.  Full support for AIMP analog and AIMP LVU meters is provided.  BIN support is still in an experimental stage, and I recommend sticking with foo_vis_vumeter for BINs.


hi @sveakul ,
thank you for creating this thread and for your reminding that we still own @BoringName an implementation of BinExtractor 1.1 as a fb2k's VU meter BIN command-line utility extracting https://hydrogenaud.io/index.php/topic,110516.msg1054445.html#msg1054445. or https://getmusicbee.com/forum/index.php?topic=42174.msg230008#msg230008
Spoiler (click to show/hide)
hi @sveakul, @Air KEN , @Defender , @BoringName  and @all,
please find the 'JSP3 3.8.5 Analog VU Meter' script attached, version named after  '1.0.29 DT-O 29-Nov-24' for convenient reference.
it is 1 month already from day 1 (29Oct24), and today is 1 month. may we take this opportunity to thank @marc2003, @Case, @Defender ,   @sveakul, @Air KEN , @BoringName, @regor , @oops , among others , for their support and nice feedbacks. without them, we could not get to this point.
although this is just a humble script to deal with a simple task and just be fun to us,  you are all still give us help, valuable information, the script then grows up step by step.

this update is to reflected @BoringName 's utility to extract fb2k bin on the fly, we owed @BoringName for that. and here we have this tool integrated with the script.
we consider this as a major update, then please be patient to go through the following text:

   - features :
      + load LED or Analog needle AIMP Vu meter
      + load FB2K VU Meter (after extracting by @BoringName's utility ). more details as following
      + free allocation in panel
      + customized wallpaper image/colour :
         * opacity  (for background/skin frame): edit this properties, value from 0.2 to 1 (no opacity): HA.background.opacity [0.2-1]
           this feature allow us to enjoy a beautifull walpaper while still have the VU Meter up front.   
         * wallpaper images path:  edit this properties to your images path: HA.wallpaper.image.path (relative,absolute path)
            we can select wallpaper image via context menu.
            
         note: we can set a default wallpaper image by editing this properties: HA.wallpaper.image.priority (relative,absolute path)
         this default wallpaper image is TOP priority. just in case the script can not locate this image, then we can select 1 from 
            above image pool.
colour is the last priority.
      
   - VU Meter types covered:
      1 > AIMP VU Meter:
      + analog NEEDLE only (not analog LED) =>  vertical/horizontal needle, up/down needle arrow ,>< V & /\ needle shape.
         * type 1 : 1 image set for both channels
         * type 2 : 2 image sets, each for each channel.
         note: analog LED : currently not supported cause we can not draw such a BID image for LED image (it is a part of the
                        arc length, where the diameter is very long).
      + LED (LVU) :  vertical/horizontal bar
      - how to :
      + download AIMP Vu Meter skin file e.g.
         * analog NEEDLE : https://www.aimp.ru/forum/index.php?topic=52865.0)
         * LED (Led VU) : https://www.aimp.ru/forum/index.php?topic=54005
      + unzip AIMP Vu Meter skin into a folder and copy this [folder] to specific directory as indicated by this script.
      + load this script into a JSP3 /UI/ panel
      
      2> FB2K VU Meter: 2 ways:  ---- <@BoringName, https://getmusicbee.com/forum/index.php?topic=42174.msg230008#msg230008 > 29Nov24
      WARNING: can be up to 5000 image files created under fb2k profile folder : skins\viking\images\vnav_fb2k\beat_audio_vu_meter\
          (we just need 1/5 number of these files).
 
      2.1 manual approach: we manually extract the BIN file (by BinExtractor.exe or BinExtractor1.1.exe)
      - step 0: get a FB2k Vu meter skin (e.g. https://audio-file.org/foobar2000-vu-meter-skins-gallery)
      - step 1: extract bin file by employing @BoringName's tool: https://getmusicbee.com/forum/index.php?topic=41692.msg230008#msg230008
            we may get 1024 needle image files (needle0000.png, . . . needle1023.png), 1024 LED image files (LED0000.png, . . LED1023.png),
            background.png per channel.
            => 1024 + 1024 + 1 = 2049 files /channel x 2 channels = 4098 files at max.
            
      - step 2: create a folder named after 'name.bin' (name is fb2k skin name, e.g. 'fisher', 'accuphase', 'sony'...).
      - step 3: if skin has 1 set needle, 1 set LED images : create a sub folder 'VU' for needle images, a subfolder 'VU_LED' for LED images
              if skin has 2 needle sets, 2 LED image set: create a sub folder 'VU_L' for left needle images, a subfolder 'VU_LED_L' for left LED images
              then, 'VU_R' folder for all left needle images, 'VU_LED_R' for all right LED images.
              all these subfolder are right under 'name.bin' folder.
      - step 4: copy/move 'name.bin' folder into specfic folder as indicated in the script,  [fb.ProfilePath + "skins\\viking\\images\\vnav_fb2k\\beat_audio_vu_meter\\"];       
            we can change this folder to any other folder.
      note: we recognized this folder as FB2k VU Meter skin by its '.bin' characters, so make sure to have this text in the folder name.       
   
      2.2: automatically extracting BIN file:
      - step 0: get the BinExtractor1.1.exe from https://hydrogenaud.io/index.php/topic,110516.msg1054445.html#msg1054445. or https://getmusicbee.com/forum/index.php?topic=42174.msg230008#msg230008
      - step 1: copy BinExtractor1.1.exe into dest folder : fb.ProfilePath + 'skins\\external_helper\\BinExtractor1.1.exe'
      - step 2: get FB2k Vu meter skins (e.g. https://audio-file.org/foobar2000-vu-meter-skins-gallery).
               if we already have these skins copied, then ignore this step.
      - step 3: input path where 'FB2k vumeter skins' located by editing the PROPERTIES 'HA.fb2k_vumeter_path (relative,absolute path)'. just copy this path
             from file explorer and paste as absolute path or a relative path also supported.
      - step 4: access these/this fb2k vumeter bin skin(s) via context menu from the script. these skins should be there as menu itesm for us to
             seclect. it will takes a while to extract (from seconds to around minute or more, be patient) for the 1st time extracting.
             those are already extracted, they are marked.
      
      note: BinExtractor1.1.exe extracts bin files {and does NOT hold file during extrating} into => {'left', 'right' sub_folders
                     under 1 'skin name' folder}
                      
          - if mono skin: 'right' folder is EMPTY. we use images from 'left' folder for both channel
          - if dual skin:
            + 'left' folder: all images for left channel, 'Background.png' for left background image
            + 'right' folder: all images for right channeel, 'RBackground.png' for right background image
            + 'skin name' folder is the name of the 'skin 1' VU meter.
                  e.g. we have 'skin 1.bin', 'skin 2.bin' files => folder 'skin name' == 'skin 1'
            we need all bin files placed in the SAME folder (e.g 2 files if dual skin, 1 file if mono skin),
                  then just extract the 'skin 1.bin' file. tool will automatically look for the other file (if any).
         
            example: c:\utilities\BinExtract.exe 'd:\vumeter\fb2k skins\skin 1.bin'
                  => folder:    d:\vumeter\fb2k skins\skin 1\left\ {files}
                           d:\vumeter\fb2k skins\skin 1\right\ {files if dual skin, otherwise EMPTY}
            

   - limitation:
      + options: MobilityNegative, MobilityPositive > could not take MobilityPositive into account.
      + meter range (in the skin) is quite inaccurate based on fb2k's audio engine.
      + Fb2k's VU Meter skins are currently supported by employing @BoringName  's tool.
   note: refer to fb2k , @oops's, Analog VU Meter Visualisation/foo_vis_vumeter component [https://www.foobar2000.org/components/view/foo_vis_vumeter]
         for more options    

   - credit and acknowledgment:
      + @marc2003 for powerful JSP3 component
      + @Case and @marc2003 for their JSP3 VU Meter.
      + @Artem and contributors /AIMP VU Meter - analog NEEDLE/ for their beautiful analog VU Meters.
      + @xrEngine and contributors /AIMP VU Meter - LED / for their elegant LED VU Meters.
      + @BoringName at https://getmusicbee.com/forum/index.php?topic=41692.msg230008#msg230008 for BinExtractor.exe tool
         to extract fb2k VU Meter bin skins.
      + @Defender, @sveakul, @Air KEN for their nice suggestions, positive feedbacks
   - special JSP3 vesrion and methods: All these methods must be on at the same time.
      + JSP3 verion: --3.8.5, otherwise we need help from ffmpeg (x64) or 3rd ActiveObject to provide audio signal (as foo_vis_vumeter x32 plugin)
      + IJSImage.CreateBitmap() : (3.8.4++) to reduce memory consumed before caching.
      + gr.PopLayer()  : (3.8.5++) set a boundary to be visualied.
      + gr.DrawBitmap() : (3.8.4++) improve rendering image due to  image-converted Bitmap in advance, more efficient CPU-load.
      + fb.GetAudioChunk() : audio signal.

as usual, we have zipped some files , including script and 1 ready-extracting fb2k vumeter, default wallpaper to retain folder structure.
please
- unzip the attached file into 'profile' or root folder of FB2k.
- get the BinExtract tool and copy it to the specific folder as above indicated.

hope that, this humble, simple script can bring a little joy to us all and serve as a starting point to have our own creative , unique and beautiful VU Meter skin for this holiday season to come.    
due to constraint time during year end, we may lack of time to reply to the thread and, sorry for that.
wish you all a merry Xmas and very happy new year 2025.
@ilovefb2k

 
  

Re: JSP3 Script Analog VU Meter

Reply #21
amazing! great work.

Sharp GF9000
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: JSP3 Script Analog VU Meter

Reply #22
Thanks for the new "{deployed} JSP3 Analog VU Meter-1.0.29 DT-O 29-Nov-24" script, iovefb2k!  Some hints for others on its installation follow.

I found that if you just import the script on top of an existing version in the JSP3 Configuration window, the resulting "Properties" window for a running Analog VU meter shows a mix of some of the entries from the old version.  While this is fine in that it results in a carry-over of the meter settings from the old version, probably from Foobar entries in metadb.sqlite, purists may want a "clean install" of this major new revision.  If you are one:

1.  First "Reset to default" the existing old version (the second context menu at the bottom of the frame).
2.  Enter Layout Editing Mode in Foobar, and cut the existing element from the meter panel; exit Layout Editing Mode and restart Foobar.
3.  Go back into Layout Editing Mode, add the JSP3 element to the panel.  Exit Layout Editing Mode.
4.  Now click on the JSP3 panel, and use the "Import" button at the bottom to add the new meter script.**
5.  You may get a one-time warning about not being to find default skin, after which the first skin in alpha order will be added.

**Important:  If you are using a different default folder for JSP3 analog vumeter skins (AIMP analog and LVU), the place in the script to change the path to the folder has changed.  The place to make that change is now on line 135 of the script--example:

Script path for AIMP skins from default:
jsp3_vumeter_path : window.GetProperty("HA.jsp3_vumeter_path (relative,absolute path)","skins\\viking\\images\\vnav_fb2k\\beat_audio_vu_meter\\"), // JSP3 analog vumeter skin

Script path for AIMP skins changed to a new folder location on the E: drive:
jsp3_vumeter_path : "e:Installs\\beat_audio_vu_meter\\", // JSP3 analog vumeter skin

I did not make any changes relative to the "fb2k_vumeter_path" used for the experimental BIN meter compatibility as I use the foo_vis_vumeter plugin for BIN.

Performance is wonderful--accurate and responsive with plenty of user options especially in the "Properties" window which is called up by holding shift/right-click, where you can adjust LED peak decay/peak hold values, etc.

I had a struggle initially getting the DejaVu Compact LED Calibrated Elemental-mod2 to load properly at first getting a "not compatible" message when choosing H-Center align, etc.  Changing to a different round meter and then back "fixed" this and normal options were restored.


Re: JSP3 Script Analog VU Meter

Reply #23
While there are a treasure trove of original AIMP analog and LVU meters to use with the ilovefb2k  JSP3 script, at one time the customized, calibrated AIMP analog skins created by hiccup for the BoringName VUMeter plugin over at MusicBee were available too.  These have since all been changed over to BIN format and a specially tuned *ini file.

I do have a backup of most of the hiccup meters when they were still in AIMP non-BIN format, that can be used with the JSP3 Script Analog VU Meter without needing to explore the script's BIN meter compatibility there.  If anyone is interested let me know; otherwise the new BIN format versions are freely available at the MusicBee forum here: https://getmusicbee.com/forum/index.php?topic=41696.0

Re: JSP3 Script Analog VU Meter

Reply #24
> 2.2: automatically extracting BIN file:
     > - step 0: get the BinExtractor1.1.exe from https://hydrogenaud.io/index.php/topic,110516.msg1054445.html#msg1054445. or https://getmusicbee.com/forum/index.php?topic=42174.msg230008#msg230008
     > - step 1: copy BinExtractor1.1.exe into dest folder : fb.ProfilePath + 'skins\\external_helper\\BinExtractor1.1.exe'

BinExtractor.exe → BinExtractor1.1.exe Rename


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)