Late to see your post... but here are a few thoughts...sl23 wrote: ↑June 30th, 2024, 4:19 pm I'm wanting to use the Peak Level meter in my current skin. So I've resurrected an old version. I can remember there is an issue with the Peak metering, it doesn't hold the position, it basically acts like the RMS metering, but just gets the highest value. But a proper Peak meter holds it's value for 2-3 seconds.
I have a version of that code still that someone helped with. But the issue was that onced it peaked at 0db for a few seconds it never dropped once the volume got lower. It works well, until that point, then it stops responding. I was hoping to get this fixed if anyone has a clue about it.
{clipped code}
I've changed the whole thing to use shape meters instead of graphics, in case you want to try it.
Seems to work ok, just that problem with the Peak indicators 'sticking' which I tried to find a way to reset them on max but not working out for me!
Appreciate any help![]()
The reason your Peak level is 'sticking' is because you have the PeakGain (and RMSGain) set to 2.0 (displaying twice the actual level).
Reduce that to a lower level (1.0 ~1.5) to show normal Peak reactions in your skin.
Trying to hold the max peak level using IfConditions is not the way I would suggest.
There are 40 updates per second to the value that need to be tested for higher values then the last while you are pausing or disabling the display... not really a practical or efficient method.
A better approach to control the Peak display would be to create a second AudioLevel parent measure with the same Attack and Gain as the RMS measure for the Peak values, but set the PeakDelay to your desired level (3000~5000).
Something like this should give close to your desired result:
Code: Select all
[Rainmeter]
Update=25
BackgroundMode=2
SolidColor=255,255,255,20
AccurateText=1
MiddleMouseUpAction=[!Refresh]
[Metadata]
Author=sl23
Description=VU Metre
Version=2024.6.30
[Variables]
AquaDark=0,255,255,200
Green=128,255,0
Orange=255,170,0
OrangeDark=255,128,0
Red=255,100,100
White20=255,255,255,20
PeakDelayL=0
PeakDelayR=0
ActiveGainLevel=1.5
========================================
; Measures
========================================
[mAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=25
RMSDecay=300
RMSGain=#ActiveGainLevel#
PeakAttack=0
PeakDecay=0
PeakGain=1.0
[mAudioPeak]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=0
RMSDecay=0
RMSGain=1.0
PeakAttack=25
PeakDecay=5000
PeakGain=#ActiveGainLevel#
[mLeft]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=RMS
Channel=L
[mRight]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=RMS
Channel=R
[mPeakLeft]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudioPeak
Type=Peak
Channel=L
[mPeakRight]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudioPeak
Type=Peak
Channel=R
========================================
; Meters
========================================
[sClip]
Shape=Rectangle 0,0,5,5 | Fill Color #Red# | StrokeWidth 0
Y=r
Hidden=1
[sPeak]
Shape=Rectangle 0,0,2,5 | Fill Color #AquaDark# | StrokeWidth 0
DynamicVariables=1
Y=r
[sBar]
BarOrientation=Horizontal
BarColor=#Green#,70
SolidColor=#White20#
W=200
H=5
Y=r
;-------------------------------------
[OutBarL]
Meter=Bar
MeasureName=mLeft
MeterStyle=sBar
[ClipL]
Meter=Shape
MeterStyle=sClip
X=5R
[PeakBarL]
Meter=Shape
MeterStyle=sPeak
X=([OutBarL:X]+[OutBarL:W]*[mPeakLeft])
;-------------------------------------
[OutBarR]
Meter=Bar
MeasureName=mRight
MeterStyle=sBar
Y=2R
[ClipR]
Meter=Shape
MeterStyle=sClip
X=5R
[PeakBarR]
Meter=Shape
MeterStyle=sPeak
X=([OutBarR:X]+[OutBarR:W]*[mPeakRight])