It is currently March 28th, 2024, 1:33 pm

audio / visualizer question.

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

audio / visualizer question.

Post by JamX »

I have a bar visualizer inside my spotify dedicated webnowplaying skin.
The visualizer get's its data from the AudioLevel plugin
Since the AudioLevel plugin detects ALL sounds I want to stop the measure based on the conditions of (Play/Pause) from WebNowPlaying measure [MeasurePlayPause] like:

Code: Select all

[MeasurePlayPause]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=State
Substitute="0":"Play","1":"Pause","2":"Play","3":"Replay"
IfCondition=2
IfTrueAction=[!DisableMeasure "MeasureAudio"]
IfCondition2=1
IfTrueAction2=[!EnableMeasure "MeasureAudio"]

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FreqMin=30
FFTSize=1024
FFTAttack=15
FFTDecay=250
Bands=15
So when I "Pause" the player the visualizer should stop displaying the bars since the measure has been disabled, but this does not work :???:
Other sounds from the computer are still triggering the visualizer.

Anybody an idea?
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: audio / visualizer question.

Post by balala »

JamX wrote: August 1st, 2020, 7:25 pm Anybody an idea?
Yep. The IfConditions are mistaken in your code. IfCondition=2 and IfCondition2=1 I suppose should have to be IfCondition=(#CURRENTSECTION#=2) and IfCondition2=(#CURRENTSECTION#=1) accordingly. Try replace them and let us know if this helped.
User avatar
JamX
Posts: 207
Joined: October 4th, 2019, 2:46 pm

Re: audio / visualizer question.

Post by JamX »

Sorry, fixed it already.
Stupide mistake.

Code: Select all

[MeasurePlayPause]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=State
Substitute="0":"Play","1":"Pause","2":"Play","3":"Replay"
IfCondition=MeasurePlayPause=2
IfTrueAction=[!log " Pause"][!DisableMeasure "MeasureAudio"]
IfCondition2=MeasurePlayPause=1
IfTrueAction2=[!log " Play"][!EnableMeasure "MeasureAudio"]
I forgot IfCondition=MeasurePlayPause=2


I suppose #Currentsection# is the same as addressing the measure name by itself.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: audio / visualizer question.

Post by balala »

JamX wrote: August 1st, 2020, 7:55 pm I suppose #Currentsection# is the same as addressing the measure name by itself.
Yes, #CURRENTSECTION# returns always the name of the section where it is used. In your case, if it is used into the [MeasurePlayPause] measure, #CURRENTSECTION# represents MeasurePlayPause.
I'm glad if you got it working.
Post Reply