It is currently April 27th, 2024, 5:29 pm

A default image for my visualizer

Get help with creating, editing & fixing problems with skins
User avatar
Alloutofmercy
Posts: 142
Joined: November 17th, 2021, 5:51 am

A default image for my visualizer

Post by Alloutofmercy »

Hi, I'm back

I need an image to be showing when the visualizer isnt active. Now I think I could do this with the nowplaying plugin but is there any way I could do this with the audiolevel plugin maybe with if conditions
I've checked the plugin docs and I cant find something that returns a value of 1 or 0 if audio is detected
BOOTY
User avatar
balala
Rainmeter Sage
Posts: 16177
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: A default image for my visualizer

Post by balala »

Alloutofmercy wrote: December 30th, 2023, 6:01 am I need an image to be showing when the visualizer isnt active. Now I think I could do this with the nowplaying plugin but is there any way I could do this with the audiolevel plugin maybe with if conditions
I've checked the plugin docs and I cant find something that returns a value of 1 or 0 if audio is detected
There is such a possibility. Even if the code you're using would have been nice, since you didn't post it, here is a general approach:

Code: Select all

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=100
RMSDecay=300
RMSGain=2.5
IfCondition=(#CURRENTSECTION#<0.00001)
IfTrueAction=[!ShowMeter "TheMeterToBeShown"][!Redraw]
IfFalseAction=[!HideMeter "TheMeterToBeShown"][!Redraw]
Theoretically the IfCondition=(#CURRENTSECTION#<0.00001) option should be IfCondition=(#CURRENTSECTION#=0), but it seems this way it doesn't work always. I assume even when there is no audio the plugin still returns an extremely small, but not zero value. I'm not sure, have no enough experience with this plugin, but this is my guess. However the above solution seems to be working for me.
If you can't get it to work, post your code please.
User avatar
Alloutofmercy
Posts: 142
Joined: November 17th, 2021, 5:51 am

Re: A default image for my visualizer

Post by Alloutofmercy »

Absolutely works. Thankyou for the quick reply

Code: Select all

[defaultimage]
meter=string
Text=Play something
X=30
Y=440
FontFace=Jetbrains mono
Fontsize=20
Fontcolor=217, 106, 142
AntiAlias=1

Code: Select all

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTSize=1024
FFTAttack=15
FFTDecay=250
Bands=31
Sensitivity=25
IfCondition=(#CURRENTSECTION#<0.00001)
IfTrueAction=[!ShowMeter "defaultimage"][!Redraw]
IfFalseAction=[!HideMeter "defaultimage"][!Redraw]
BOOTY
User avatar
balala
Rainmeter Sage
Posts: 16177
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: A default image for my visualizer

Post by balala »

Alloutofmercy wrote: December 30th, 2023, 8:53 am Absolutely works. Thankyou for the quick reply
You're welcome. And just a nitpick, even if doesn't matter at all: [defaultimage] is not an Image meter. But obviously as said, this is not important at all. Glad you got it working as expected.