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
hi @Defender;
thanks to recent JSP3 updated by @marc2003 (3.8.4, 3.8.5), we now can address the 'weird tail' of the skin and reduce RAM consumed (but not much).
LAMP/LIGHT: i already enclosed this in the script, but may not as your suggestion, please make changes if any and refer to later post for a full script. navigate to line 3398, the main script is there.
we have to change the filename of that lamp from L_3.png, R_3.png into L_4.png, R_4.png as @sveakul already uses these filenames for another skin (DejaVU Compact LED Calibrated Elemental-mod2)
// layer 2.2 > turn peak LED on, if any
//-----------------------------------
for (c = 0; c < channels_count; c++) {
opacity[c] = 0;
if ( Peak_LED_levels[c] > 0 && aimp_peak_LED_img[c] ){
db_ = _clamp(db_peak_LED[c], lowlight_dB[c], highlight_dB[c]);
minOpacity = highlight_perc[c]/100; maxOpacity = 1-lowlight_perc[c]/100;
opacity[c] = ( db_ - lowlight_dB[c])/(highlight_dB[c] - lowlight_dB[c]) ;
if (db_ >= highlight_dB[c] || db_ >= MaxLevel[c]) opacity[c] = maxOpacity;
else if (db_ <= lowlight_dB[c] ) opacity[c] = minOpacity;
else
opacity[c] = minOpacity + opacity[c] * (maxOpacity - minOpacity);//linear scale
opacity[c] = _clamp(opacity[c],0,1);
}
try {
if (opacity[c] != null )
gr.DrawBitmap (aimp_peak_LED_img[c],
x_[c],y_[c],ww_[c],wh_[c],
0,0,wwc[c],whc[c],opacity[c]);
} catch (e) {
console.log('\n\n-------------',window.Name, ' : Error line 3300, /AIMP_VU_Meter_needle_render/ = ',e);
}
}
hope this helps.
regards
@ilovefb2k