It is currently September 16th, 2024, 7:20 pm

Audio Peak Level not dropping

Get help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Audio Peak Level not dropping

Post by sl23 »

:D No worries!

I am looking at resetting the mTime* measures, but how is that achieved? How to you reset a measure that is ticking up? It resets every time it is at '2', but once the Peak maxes out it seems to go over 2 and then can't reset itself.

Tried this without effect:

Code: Select all

IfCondition2=(mTimeRight > 2)
IfTrueAction2=[!UpdateMeasure mTimeRight]
57686174 77696C6C 6265 77696C6C 6265
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Audio Peak Level not dropping

Post by Yincognito »

sl23 wrote: July 1st, 2024, 11:26 am :D No worries!

I am looking at resetting the mTime* measures, but how is that achieved? How to you reset a measure that is ticking up? It resets every time it is at '2', but once the Peak maxes out it seems to go over 2 and then can't reset itself.

Tried this without effect:

Code: Select all

IfCondition2=(mTimeRight > 2)
IfTrueAction2=[!UpdateMeasure mTimeRight]
If you want to reset it to its initial value of 1 (as per its Formula option), disable the measure, update it, enable it again and update it again. If you want to reset it to 0, skip updating it again in the last step. Obviously, if needed, you can delay enabling it again and any potential update again as desired via !Delay.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Audio Peak Level not dropping

Post by sl23 »

This doesn't quite work, but do you see what I'm trying to do with it? On sensing a drop in volume, which can be made more or less sensitive by adding/removing zeros after the decimal, it will pause the meter to allow it to stay when dropped, but react straight away when increased in volume. See IfCondition2:

Code: Select all

[mPeakLeft]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=Peak
Channel=L
IfCondition=[mPeakLeft]=1
IfTrueAction=[!ShowMeter ClipL][!UpdateMeter ClipR][!Redraw]
IfFalseAction=[!Delay 1000][!HideMeter ClipL][!UpdateMeter ClipL][!Redraw]
DynamicVariables=1
;UpdateDivider=2
IfCondition2=([#CURRENTSECTION#]=[#CURRENTSECTION#]-0.001)
IfTrueAction2=[!DisableMeter PeakBarL][!Delay 1000][!EnableMeter PeakBarL][!Redraw]
Btw, your idea worked, of course, but still isn't right. :-(
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Audio Peak Level not dropping

Post by sl23 »

Actually, this seems more appropriate, but again, I've got something wrong as it doesn't work!

Code: Select all

[mPeakLeft]
Measure=Plugin
Plugin=AudioLevel
Parent=mAudio
Type=Peak
Channel=L
IfCondition=[mPeakLeft]=1
IfTrueAction=[!ShowMeter ClipL][!UpdateMeter ClipR][!Redraw]
IfFalseAction=[!Delay 1000][!HideMeter ClipL][!UpdateMeter ClipL][!Redraw]
DynamicVariables=1
IfCondition2=(#CURRENTSECTION#=#CURRENTSECTION# - 0.1)
IfTrueAction2=[!PauseMeasure "#CURRENTSECTION#"][!Delay 1000][!UnPauseMeasure "#CURRENTSECTION#"][!Redraw]
Again, IfCondition2.
How do you detect a lower value and respond to it?
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Audio Peak Level not dropping

Post by sl23 »

I think this is the way to go, but I just don't know how you specify it as a formula!

Code: Select all

IfCondition2=#CURRENTSECTION#= (#CURRENTSECTION#- 0.1)
IfTrueAction2=[!PauseMeasure "#CURRENTSECTION#"][!Delay 1000][!UnPauseMeasure "#CURRENTSECTION#"]
IfFalseAction2=[!UnPauseMeasure "#CURRENTSECTION#"]
Thing is, the #CURRENTSECTION# is never going to equal (#CURRENTSECTION# - 0.1). So how do I write a formula that can measure a decrease in peak volume? Then it can pause, delay, unpause on a decrease in volume and ignore on increase. :confused:

The only way I can think of is getting the value from the previous skin update. But I don't even know if that can be done, let alone how to do it! :lol:
57686174 77696C6C 6265 77696C6C 6265
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Audio Peak Level not dropping

Post by Yincognito »

sl23 wrote: July 1st, 2024, 1:54 pmThing is, the #CURRENTSECTION# is never going to equal (#CURRENTSECTION# - 0.1).
Obviously.
sl23 wrote: July 1st, 2024, 1:54 pmThe only way I can think of is getting the value from the previous skin update. But I don't even know if that can be done, let alone how to do it! :lol:
There you go, yes. Of course you know how to do it and that it can be done, just save (!SetVariable) that previous value to a variable, and compare it with the current measure value. Naturally, for this to work, the comparison must be done before the current measure value is saved as the previous value variable.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Audio Peak Level not dropping

Post by sl23 »

Yeah I did think of using a variable, but I don't know how you get the value before it changes. :???:

So this would be right?

Code: Select all

[mPeakLeft]
Measure=Calc
Formula=( Max ( mPeakLeft, mPeakLeft1 ))
OnChangeAction=[!SetVariable PeakDelay "[mPeakLeft]"][!DisableMeasure "mTimeLeft"][!UpdateMeasure "mTimeLeft"][!EnableMeasure "mTimeLeft"]
IfCondition=[#CURRENTSECTION#]=1
IfTrueAction=[!UpdateMeasure #CURRENTSECTION#][!UpdateMeasure mTimeLeft][!UpdateMeter #CURRENTSECTION#][!Redraw]

[mTimeLeft]
Measure=Calc
Formula=( mTimeLeft + 1 )
IfCondition=(#CURRENTSECTION#=#ResetTime#)
IfTrueAction=[!DisableMeasure "mPeakLeft"][!UpdateMeasure "mPeakLeft"][!EnableMeasure "mPeakLeft"]
IfCondition2=(#CURRENTSECTION# > #PeakDelay#)
IfTrueAction2=[!DisableMeasure "#CURRENTSECTION#"][!UpdateMeasure "#CURRENTSECTION#"][!EnableMeasure "#CURRENTSECTION#"]
UpdateDivider=40
DynamicVariables=1
I know I have to figure out where the [!SetVariable Peak "[mPeakLeft]"] needs to go and how to set a delay when updating that. Where it is now isn't updating the Variable for some reason.
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Audio Peak Level not dropping

Post by sl23 »

:? I feel like I'm just making a mess of this! :rolmfao:

This has fixed an issue with the Peak meters constantly zeroing out for an update every 2 seconds, but I'm lost trying to achieve my goal!

Code: Select all

[mPeakLeft]
Measure=Calc
Formula=( Max ( mPeakLeft, mPeakLeft1 ))
OnChangeAction=[!DisableMeasure "mTimeLeft"][!UpdateMeasure "mTimeLeft"][!EnableMeasure "mTimeLeft"][!SetVariable PeakDelayL "[mPeakLeft]"]

IfCondition=[#CURRENTSECTION#]=1
IfTrueAction=[!UpdateMeasure #CURRENTSECTION#][!UpdateMeasure mTimeLeft][!UpdateMeter #CURRENTSECTION#][!Redraw]
IfCondition2=(#CURRENTSECTION# < #PeakDelayL#)
IfTrueAction2=[!PauseMeasure mPeakLeft][!Delay 1000][!UnPauseMeasure mPeakLeft][!Redraw]


[mTimeLeft]
Measure=Calc
Formula=( mTimeLeft + 1 )

IfCondition=(#CURRENTSECTION#>=#ResetTime#)
IfTrueAction=[!DisableMeasure "#CURRENTSECTION#"][!UpdateMeasure "#CURRENTSECTION#"][!EnableMeasure "#CURRENTSECTION#"][!DisableMeasure "mPeakLeft"][!UpdateMeasure "mPeakLeft"][!EnableMeasure "mPeakLeft"]

UpdateDivider=10
DynamicVariables=1
57686174 77696C6C 6265 77696C6C 6265
User avatar
sl23
Posts: 1686
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Audio Peak Level not dropping

Post by sl23 »

Only issue with this, is that it's rather jittery in function. Increases in Peak are meant to be, but you don't get the nice smooth decrease as it would during normal functioning.

And also, refreshing the skin causes the Peak meters 'X' position to zero out instead of stay where they are.
57686174 77696C6C 6265 77696C6C 6265
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Audio Peak Level not dropping

Post by Yincognito »

sl23 wrote: July 1st, 2024, 3:58 pm :? I feel like I'm just making a mess of this! :rolmfao:

This has fixed an issue with the Peak meters constantly zeroing out for an update every 2 seconds, but I'm lost trying to achieve my goal!
sl23 wrote: July 1st, 2024, 4:01 pm Only issue with this, is that it's rather jittery in function. Increases in Peak are meant to be, but you don't get the nice smooth decrease as it would during normal functioning.

And also, refreshing the skin causes the Peak meters 'X' position to zero out instead of stay where they are.
I don't even remember what was your goal right now, lol - so many different questions at each step for things you should have known already, I'm lost in that spider net. Don't know how your skin should be written or why things zero out or not, it's your skin. So, do you still need that previous value vs current value thingy or not? :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth