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.
I have tried adding this to the mPeakLeft measure, which fails:
Code: Select all
IfCondition=[mPeakLeft] = 1
IfTrueAction=[!UpdateMeasure mPeakLeft][!UpdateMeasure mTimeLeft][!UpdateMeter PeakLeft][!Redraw]
Code: Select all
[Rainmeter]
Update=25
BackgroundMode=2
SolidColor=0,0,0,20
AccurateText=1
MiddleMouseUpAction=[!Refresh]
[Variables]
Player=CAD
ResetTime=2
VolLow=40
VolMax=100
Green=128,255,0
Orange=255,170,0
OrangeDark=255,128,0
Red=255,100,100
White20=255,255,255,20
========================================
; Measures
========================================
[mAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=52
RMSDecay=300
RMSGain=2.0
PeakAttack=50
PeakDecay=3000
PeakGain=2.0
[mLeft]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=RMS
Channel=L
[mRight]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=RMS
Channel=R
[mPeakLeft]
Measure=Calc
Formula=( Max ( mPeakLeft, mLeft ))
OnChangeAction=[!DisableMeasure "mTimeLeft"][!UpdateMeasure "mTimeLeft"][!EnableMeasure "mTimeLeft"]
IfCondition=[mPeakLeft] = 1
IfTrueAction=[!UpdateMeasure mPeakLeft][!UpdateMeasure mTimeLeft][!UpdateMeter PeakLeft][!Redraw]
[mPeakRight]
Measure=Calc
Formula=( Max ( mPeakRight, mRight ))
OnChangeAction=[!DisableMeasure "mTimeRight"][!UpdateMeasure "mTimeRight"][!EnableMeasure "mTimeRight"]
IfCondition=[mPeakRight]=1
IfTrueAction=[!UpdateMeasure mPmPeakRighteakLeft][!UpdateMeasure mTimeLeft][!UpdateMeter mPeakRight][!Redraw]
[mTimeLeft]
Measure=Calc
Formula=( mTimeLeft + 1 )
IfCondition=(mTimeLeft=#ResetTime#)
IfTrueAction=[!DisableMeasure "mPeakLeft"][!UpdateMeasure "mPeakLeft"][!EnableMeasure "mPeakLeft"]
UpdateDivider=40
[mTimeRight]
Measure=Calc
Formula=( mTimeRight + 1 )
IfCondition=(mTimeRight=#ResetTime#)
IfTrueAction=[!DisableMeasure "mPeakRight"][!UpdateMeasure "mPeakRight"][!EnableMeasure "mPeakRight"]
UpdateDivider=40
[mClipLeft]
Measure=Plugin
Plugin=AudioLevel
Port=Output
Sensitivity=35
Channel=L
RMSAttack=50
RMSDecay=1000
RMSGain=2.0
IfCondition=[mClipLeft]=1
IfTrueAction=[!ShowMeter ClipBarL][!UpdateMeter ClipBarL][!Redraw]
IfFalseAction=[!HideMeter ClipBarL][!UpdateMeter ClipBarL][!Redraw]
DynamicVariables=1
[mClipRight]
Measure=Plugin
Plugin=AudioLevel
Port=Output
Sensitivity=35
Channel=R
RMSAttack=50
RMSDecay=1000
RMSGain=2.0
IfCondition=[mClipRight]=1
IfTrueAction=[!ShowMeter ClipBarR][!UpdateMeter ClipBarR][!Redraw]
IfFalseAction=[!HideMeter ClipBarR][!UpdateMeter ClipBarR][!Redraw]
DynamicVariables=1
========================================
; Meters
========================================
[sBar]
BarOrientation=Horizontal
SolidColor=#White20#
DynamicVariables=1
W=200
H=5
[OutBarL]
Meter=Bar
MeasureName=mLeft
MeterStyle=sBar
BarColor=#Green#,100
X=0
Y=0
[ClipBarL]
Meter=Bar
MeasureName=mClipLeft
MeterStyle=sBar
BarColor=#Red#
W=5
X=5R
Y=r
[PeakBarL]
Meter=Bar
MeasureName=mPeakLeft
MeterStyle=sBar
BarColor=#OrangeDark#
W=2
X=([OutBarL:W]*[mPeakLeft])
Y=r
[OutBarR]
Meter=Bar
MeasureName=mRight
MeterStyle=sBar
BarColor=#Green#,100
X=0
Y=2R
[ClipBarR]
Meter=Bar
MeasureName=mClipRight
MeterStyle=sBar
BarColor=#Red#
W=5
X=5R
Y=r
[PeakBarR]
Meter=Bar
MeasureName=mPeakRight
MeterStyle=sBar
BarColor=#OrangeDark#
W=2
X=([OutBarR:W]*[mPeakRight])
Y=r
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