It is currently July 13th, 2020, 3:44 pm

How to hide visualizer when there's no audio playing

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Posts: 1920
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to hide visualizer when there's no audio playing

Post by Yincognito »

balala wrote:
March 19th, 2020, 9:56 am
Well in Edge it didn't happened to me so far, but if you say, obviously it probably may happen. Don't know...
Yeah, well, I said that "I bet", because I don't use Edge, so if you do and it didn't happen, then you are right. ;-)
User avatar
jsmorley
Developer
Posts: 21019
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to hide visualizer when there's no audio playing

Post by jsmorley »

We have seen this issue with the forums from time to time, and while we can't quite put our finger on it yet, it seems to be related to using two different devices to connect to the forums from the same IP address. So like getting on with your PC and then your phone, or even just using two different browsers to connect. Somehow, the "cookie" stuff the forums are using is getting confused and befuddled about the "session id", and a conflict is created.

I can "fix" the problem for you if you are having trouble with logging on, or if you get errors when you try to save a post and such. Just get on IRC at:

https://webchat.freenode.net/?channels=#rainmeter

And let me know you are having an issue. I have a way to get to the "back end" of things and reset all sessions so you get a fresh, new cookie and all will be well.

Alternatively, I think it can help if you entirely clear your browser cache, including and particularly any cookies that are related to Rainmeter.

I'm hoping we tumble on the root cause of this soon.
User avatar
Yincognito
Posts: 1920
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to hide visualizer when there's no audio playing

Post by Yincognito »

jsmorley wrote:
March 19th, 2020, 12:39 pm
We have seen this issue with the forums from time to time, and while we can't quite put our finger on it yet, it seems to be related to using two different devices to connect to the forums from the same IP address. So like getting on with your PC and then your phone, or even just using two different browsers to connect. Somehow, the "cookie" stuff the forums are using is getting confused and befuddled about the "session id", and a conflict is created.

I can "fix" the problem for you if you are having trouble with logging on, or if you get errors when you try to save a post and such. Just get on IRC at:

https://webchat.freenode.net/?channels=#rainmeter

And let me know you are having an issue. I have a way to get to the "back end" of things and reset all sessions so you get a fresh, new cookie and all will be well.

Alternatively, I think it can help if you entirely clear your browser cache, including and particularly any cookies that are related to Rainmeter.

I'm hoping we tumble on the root cause of this soon.
I will speak for my case, and let the OP speak for his, if he deems it necessary. I didn't use multiple browsers / devices to login when the issue happened. However, I do usually "pin" the forum page in the browser and periodically refresh the page to see "what's new" - so in this case maybe the cookie expiration period had something to do with it (just a thought). That being said, as far as I recall, I think I encountered the issue even when trying to log in "cleanly" in one morning (after the computer was off). Clearing the cookies - sometimes doing it multiple times and coupled with closing and reopening the browser - seems to help (but not necessarily clearing them from the forum button at the bottom!), and also what did help - albeit for a short period of time, after which it reverted to the issue - is logging in while checking to "Remember Me". I'm not using that checkbox in my logins on various sites, but here it did help for a while when I had issues.

Hopefully this info will help in narrowing down the cause of this. ;-)

P.S. I guess if the posts on this topic develop, it would probably be good to create a separate thread for it, in order to not mix things up.
rina
Posts: 6
Joined: March 18th, 2020, 3:03 pm

Re: How to hide visualizer when there's no audio playing

Post by rina »

Woah, so many replies today haha, first of all, thanks everyone for the help! :) really appreciate it.
eclectic-tech wrote:
March 19th, 2020, 2:38 am

Code: Select all

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=WinAmp.exe
; Value will be '1' when the process is running, '-1' when it is not running
IfCondition=([MeasureProcess]=-1)
IfTrueAction=[!DeactivateConfig "Lasix\Visualizer"]
UpdateDivider=66
As for your intermittent response to hide/show when paused, I would try to change balala's code to:

Code: Select all

IfCondition=([#CURRENTSECTION#]<=0.00001)
IfTrueAction=[!HideFade]
IfFalseAction=[!ShowFade]
IfConditionMode=1
DynamicVariables=1
Your change to balala's code fixed the issue I mentioned earlier! Though now the skin doesn't fade out and just disappears instantly, sometimes blinking a bit before doing so too, but that's a minor issue, not too important ^^ But I'm not sure if the first code you sent is working because the visualizer still works with all programs, not only the one specified in ProcessName :( dunno if it's not working at all, or if it still deactivates the skin when it is not in use despite the fact that it activates with all programs. I tried creating a new skin too with the other code you added in your edit and the problem persists :???:
jsmorley wrote:
March 19th, 2020, 12:39 pm
We have seen this issue with the forums from time to time, and while we can't quite put our finger on it yet, it seems to be related to using two different devices to connect to the forums from the same IP address. So like getting on with your PC and then your phone, or even just using two different browsers to connect. Somehow, the "cookie" stuff the forums are using is getting confused and befuddled about the "session id", and a conflict is created.

I can "fix" the problem for you if you are having trouble with logging on, or if you get errors when you try to save a post and such. Just get on IRC at:

https://webchat.freenode.net/?channels=#rainmeter

And let me know you are having an issue. I have a way to get to the "back end" of things and reset all sessions so you get a fresh, new cookie and all will be well.

Alternatively, I think it can help if you entirely clear your browser cache, including and particularly any cookies that are related to Rainmeter.

I'm hoping we tumble on the root cause of this soon.
Yincognito wrote:
March 19th, 2020, 1:00 pm
I will speak for my case, and let the OP speak for his, if he deems it necessary. I didn't use multiple browsers / devices to login when the issue happened. However, I do usually "pin" the forum page in the browser and periodically refresh the page to see "what's new" - so in this case maybe the cookie expiration period had something to do with it (just a thought). That being said, as far as I recall, I think I encountered the issue even when trying to log in "cleanly" in one morning (after the computer was off). Clearing the cookies - sometimes doing it multiple times and coupled with closing and reopening the browser - seems to help (but not necessarily clearing them from the forum button at the bottom!), and also what did help - albeit for a short period of time, after which it reverted to the issue - is logging in while checking to "Remember Me". I'm not using that checkbox in my logins on various sites, but here it did help for a while when I had issues.

Hopefully this info will help in narrowing down the cause of this. ;-)

P.S. I guess if the posts on this topic develop, it would probably be good to create a separate thread for it, in order to not mix things up.
jsmorley, thank you! Fortunately I was able to log in today, but if it happens again, I will let you know :bow:
And my situation is pretty similar to Yincognito's. I use chrome, I didn't use multiple browsers or devices either, and also kept a tab open and refreshed once in a while to check for new replies.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4040
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: How to hide visualizer when there's no audio playing

Post by eclectic-tech »

rina wrote:
March 19th, 2020, 3:40 pm
But I'm not sure if the first code you sent is working because the visualizer still works with all programs, not only the one specified in ProcessName :( dunno if it's not working at all, or if it still deactivates the skin when it is not in use despite the fact that it activates with all programs. I tried creating a new skin too with the other code you added in your edit and the problem persists :???:
My bad! Remove "IfConditionMode=1" from the code and the fade should work as before.

As for activating/deactivating, I need to know media player are you using; the code will need to modified so it tests for your player process.

I have a monitoring skin that runs in the background and controls a selected visualizer. If I know which media player you use, I can suggest an edit (Code is on the Spoiler for controlling Lasix Visualizer when AIMP is running)

Code: Select all

[Variables]
PlayerExecutable=aimp.exe

ConfigName1=Lasix\Visualizer
SkinName1=visualizer.ini
ConfigName2=AudioDimensia_III\Shape2
SkinName2=shape.ini
ConfigName3=AudioDimensia_III\Shape3
SkinName3=shape.ini
ConfigName4=AudioPulsarRay\OutwardRays
SkinName4=APR_Outward.ini
ConfigName5=AudioPulsarRay\InwardRays
SkinName5=APR_Inward.ini
ConfigName6=AudioPulsarRay\CenterRays
SkinName6=APR_Center.ini
ConfigName7=Picturalizer
SkinName7=picturalizer.ini
ConfigName8=Opus
SkinName8=opus.ini
ConfigName9=LaserLight
SkinName9=laserlight.ini
ConfigName10=SoundSquare
SkinName10=soundsquare.ini
ConfigName11=SoundSquare\Ellipse\EllipseXY
SkinName11=soundellipseXY2.ini
ConfigName12=SoundRings
SkinName12=SoundRings.ini
ConfigName13=Stereo-Optic\Rays\Rays-Centered-Spheres
SkinName13=Optic-Rays-Centered-Spheres.ini
ConfigName14=Splice
SkinName14=splice.ini
ConfigName15=Reflections\Amplitude
SkinName15=HorzBassLeft.ini
ConfigName16=Versa-Visualizer-II\Visualizer
SkinName16=Versa-Visualizer.ini
ConfigName17=monstercat-visualizer
SkinName17=visualizer.ini
ConfigName18=ManicPlayerOrgan
SkinName18=ManicPlayerOrgan.ini
ConfigName19=LavaLamp
SkinName19=LavaLamp.ini
ConfigName20=Frost
SkinName20=frost.ini
ConfigName21=Fizzualizer
SkinName21=Visualizer.ini
ConfigName22=BarsVisualizer3D
SkinName22=BarsVisualizer3D.ini
ConfigName23=AudioWireframe\WF0
SkinName23=wf0.ini
ConfigName24=VibratingString
SkinName24=VibratingString.ini
ConfigName25=UFO
SkinName25=UFO.ini

Current=1

[Rainmeter]
ContextTitle=[\x25cb] [#ConfigName1]
ContextAction=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 1][!Refresh]
ContextTitle2=[\x25cb] [#ConfigName2]
ContextAction2=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 2][!Refresh]
ContextTitle3=[\x25cb] [#ConfigName3]
ContextAction3=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 3][!Refresh]
ContextTitle4=[\x25cb] [#ConfigName4]
ContextAction4=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 4][!Refresh]
ContextTitle5=[\x25cb] [#ConfigName5]
ContextAction5=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 5][!Refresh]
ContextTitle6=[\x25cb] [#ConfigName6]
ContextAction6=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 6][!Refresh]
ContextTitle7=[\x25cb] [#ConfigName7]
ContextAction7=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 7][!Refresh]
ContextTitle8=[\x25cb] [#ConfigName8]
ContextAction8=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 8][!Refresh]
ContextTitle9=[\x25cb] [#ConfigName9]
ContextAction9=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 9][!Refresh]
ContextTitle10=[\x25cb] [#ConfigName10]
ContextAction10=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 10][!Refresh]
ContextTitle11=[\x25cb] [#ConfigName11]
ContextAction11=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 11][!Refresh]
ContextTitle12=[\x25cb] [#ConfigName12]
ContextAction12=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 12][!Refresh]
ContextTitle13=[\x25cb] [#ConfigName13]
ContextAction13=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 13][!Refresh]
ContextTitle14=[\x25cb] [#ConfigName14]
ContextAction14=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 14][!Refresh]
ContextTitle15=[\x25cb] [#ConfigName15]
ContextAction15=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 15][!Refresh]
ContextTitle16=[\x25cb] [#ConfigName16]
ContextAction16=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 16][!Refresh]
ContextTitle17=[\x25cb] [#ConfigName17]
ContextAction17=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 17][!Refresh]
ContextTitle18=[\x25cb] [#ConfigName18]
ContextAction18=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 18][!Refresh]
ContextTitle19=[\x25cb] [#ConfigName19]
ContextAction19=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 19][!Refresh]
ContextTitle20=[\x25cb] [#ConfigName20]
ContextAction20=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 20][!Refresh]
ContextTitle21=[\x25cb] [#ConfigName21]
ContextAction21=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 21][!Refresh]
ContextTitle22=[\x25cb] [#ConfigName22]
ContextAction22=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 22][!Refresh]
ContextTitle23=[\x25cb] [#ConfigName23]
ContextAction23=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 23][!Refresh]
ContextTitle24=[\x25cb] [#ConfigName24]
ContextAction24=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 24][!Refresh]
ContextTitle25=[\x25cb] [#ConfigName25]
ContextAction25=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 25][!Refresh]

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=#PlayerExecutable#
; Substitute="-1":"not running","1":"running"
IfCondition=(MeasureProcess<>1)
IfTrueAction=[!DeactivateConfig "[#ConfigName[#Current]]"]
IfFalseAction=[!ActivateConfig "[#ConfigName[#Current]]" "[#SkinName[#Current]]"]

[MeterDummy]
Meter=String

[mCurrent]
Measure=Calc
Formula=#Current#
IfCondition=(#Current#=1)
IfTrueAction=[!SetOption Rainmeter ContextTitle "[\x25c9] [#ConfigName1]"]
IfFalseAction=[!SetOption Rainmeter ContextTitle "[\x25cb] [#ConfigName1]"]
IfCondition2=(#Current#=2)
IfTrueAction2=[!SetOption Rainmeter ContextTitle2 "[\x25c9] [#ConfigName2]"]
IfFalseAction2=[!SetOption Rainmeter ContextTitle2 "[\x25cb] [#ConfigName2]"]
IfCondition3=(#Current#=3)
IfTrueAction3=[!SetOption Rainmeter ContextTitle3 "[\x25c9] [#ConfigName3]"]
IfFalseAction3=[!SetOption Rainmeter ContextTitle3 "[\x25cb] [#ConfigName3]"]
IfCondition4=(#Current#=4)
IfTrueAction4=[!SetOption Rainmeter ContextTitle4 "[\x25c9] [#ConfigName4]"]
IfFalseAction4=[!SetOption Rainmeter ContextTitle4 "[\x25cb] [#ConfigName4]"]
IfCondition5=(#Current#=5)
IfTrueAction5=[!SetOption Rainmeter ContextTitle5 "[\x25c9] [#ConfigName5]"]
IfFalseAction5=[!SetOption Rainmeter ContextTitle5 "[\x25cb] [#ConfigName5]"]
IfCondition6=(#Current#=6)
IfTrueAction6=[!SetOption Rainmeter ContextTitle6 "[\x25c9] [#ConfigName6]"]
IfFalseAction6=[!SetOption Rainmeter ContextTitle6 "[\x25cb] [#ConfigName6]"]
IfCondition7=(#Current#=7)
IfTrueAction7=[!SetOption Rainmeter ContextTitle7 "[\x25c9] [#ConfigName7]"]
IfFalseAction7=[!SetOption Rainmeter ContextTitle7 "[\x25cb] [#ConfigName7]"]
IfCondition8=(#Current#=8)
IfTrueAction8=[!SetOption Rainmeter ContextTitle8 "[\x25c9] [#ConfigName8]"]
IfFalseAction8=[!SetOption Rainmeter ContextTitle8 "[\x25cb] [#ConfigName8]"]
IfCondition9=(#Current#=9)
IfTrueAction9=[!SetOption Rainmeter ContextTitle9 "[\x25c9] [#ConfigName9]"]
IfFalseAction9=[!SetOption Rainmeter ContextTitle9 "[\x25cb] [#ConfigName9]"]
IfCondition10=(#Current#=10)
IfTrueAction10=[!SetOption Rainmeter ContextTitle10 "[\x25c9] [#ConfigName10]"]
IfFalseAction10=[!SetOption Rainmeter ContextTitle10 "[\x25cb] [#ConfigName10]"]
IfCondition11=(#Current#=11)
IfTrueAction11=[!SetOption Rainmeter ContextTitle11 "[\x25c9] [#ConfigName11]"]
IfFalseAction11=[!SetOption Rainmeter ContextTitle11 "[\x25cb] [#ConfigName11]"]
IfCondition12=(#Current#=12)
IfTrueAction12=[!SetOption Rainmeter ContextTitle12 "[\x25c9] [#ConfigName12]"]
IfFalseAction12=[!SetOption Rainmeter ContextTitle12 "[\x25cb] [#ConfigName12]"]
IfCondition13=(#Current#=13)
IfTrueAction13=[!SetOption Rainmeter ContextTitle13 "[\x25c9] [#ConfigName13]"]
IfFalseAction13=[!SetOption Rainmeter ContextTitle13 "[\x25cb] [#ConfigName13]"]
IfCondition14=(#Current#=14)
IfTrueAction14=[!SetOption Rainmeter ContextTitle14 "[\x25c9] [#ConfigName14]"]
IfFalseAction14=[!SetOption Rainmeter ContextTitle14 "[\x25cb] [#ConfigName14]"]
IfCondition15=(#Current#=15)
IfTrueAction15=[!SetOption Rainmeter ContextTitle15 "[\x25c9] [#ConfigName15]"]
IfFalseAction15=[!SetOption Rainmeter ContextTitle15 "[\x25cb] [#ConfigName15]"]
IfCondition16=(#Current#=16)
IfTrueAction16=[!SetOption Rainmeter ContextTitle16 "[\x25c9] [#ConfigName16]"]
IfFalseAction16=[!SetOption Rainmeter ContextTitle16 "[\x25cb] [#ConfigName16]"]
IfCondition17=(#Current#=17)
IfTrueAction17=[!SetOption Rainmeter ContextTitle17 "[\x25c9] [#ConfigName17]"]
IfFalseAction17=[!SetOption Rainmeter ContextTitle17 "[\x25cb] [#ConfigName17]"]
IfCondition18=(#Current#=18)
IfTrueAction18=[!SetOption Rainmeter ContextTitle18 "[\x25c9] [#ConfigName18]"]
IfFalseAction18=[!SetOption Rainmeter ContextTitle18 "[\x25cb] [#ConfigName18]"]
IfCondition19=(#Current#=19)
IfTrueAction19=[!SetOption Rainmeter ContextTitle19 "[\x25c9] [#ConfigName19]"]
IfFalseAction19=[!SetOption Rainmeter ContextTitle19 "[\x25cb] [#ConfigName19]"]
IfCondition20=(#Current#=20)
IfTrueAction20=[!SetOption Rainmeter ContextTitle20 "[\x25c9] [#ConfigName20]"]
IfFalseAction20=[!SetOption Rainmeter ContextTitle20 "[\x25cb] [#ConfigName20]"]
IfCondition21=(#Current#=21)
IfTrueAction21=[!SetOption Rainmeter ContextTitle21 "[\x25c9] [#ConfigName21]"]
IfFalseAction21=[!SetOption Rainmeter ContextTitle21 "[\x25cb] [#ConfigName21]"]
IfCondition22=(#Current#=22)
IfTrueAction22=[!SetOption Rainmeter ContextTitle22 "[\x25c9] [#ConfigName22]"]
IfFalseAction22=[!SetOption Rainmeter ContextTitle22 "[\x25cb] [#ConfigName22]"]
IfCondition23=(#Current#=23)
IfTrueAction23=[!SetOption Rainmeter ContextTitle23 "[\x25c9] [#ConfigName23]"]
IfFalseAction23=[!SetOption Rainmeter ContextTitle23 "[\x25cb] [#ConfigName23]"]
IfCondition24=(#Current#=24)
IfTrueAction24=[!SetOption Rainmeter ContextTitle24 "[\x25c9] [#ConfigName24]"]
IfFalseAction24=[!SetOption Rainmeter ContextTitle24 "[\x25cb] [#ConfigName24]"]
IfCondition25=(#Current#=25)
IfTrueAction25=[!SetOption Rainmeter ContextTitle25 "[\x25c9] [#ConfigName25]"]
IfFalseAction25=[!SetOption Rainmeter ContextTitle25 "[\x25cb] [#ConfigName25]"]

[Metadata]
Name=Audio Visualizer Monitor
Author=Eclectic Tech
Information=Monitors your media player process and only activates a specified visualizer config when the player is active. Run this invisible skin all the time and it will load/unload your visualizers without you having to touch anything. Can control up to 25 visualizer configs.
License=CC BY-NC-SA 3
Version=1.2019.10.14

User avatar
balala
Rainmeter Sage
Posts: 11017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to hide visualizer when there's no audio playing

Post by balala »

eclectic-tech wrote:
March 19th, 2020, 2:38 am
Alternately, you could created a new skin, have it loaded first, and use the Process measure to activate/deactivate the visualizer when your media player is running.
In most cases, this is a much better solution, because with the code having the Process measure into the visualizer skin, it unloads the skin when there is case for this, but never reloads it. This has to be done manually. Usually not a practical approach, but obviously this depends on the needs of the user.
rina
Posts: 6
Joined: March 18th, 2020, 3:03 pm

Re: How to hide visualizer when there's no audio playing

Post by rina »

eclectic-tech wrote:
March 19th, 2020, 4:01 pm
My bad! Remove "IfConditionMode=1" from the code and the fade should work as before.

As for activating/deactivating, I need to know media player are you using; the code will need to modified so it tests for your player process.

I have a monitoring skin that runs in the background and controls a selected visualizer. If I know which media player you use, I can suggest an edit (Code is on the Spoiler)

Code: Select all

[Variables]
PlayerExecutable=winamp.exe

ConfigName1=Lasix\Visualizer
SkinName1=visualizer.ini
ConfigName2=AudioDimensia_III\Shape2
SkinName2=shape.ini
ConfigName3=AudioDimensia_III\Shape3
SkinName3=shape.ini
ConfigName4=AudioPulsarRay\OutwardRays
SkinName4=APR_Outward.ini
ConfigName5=AudioPulsarRay\InwardRays
SkinName5=APR_Inward.ini
ConfigName6=AudioPulsarRay\CenterRays
SkinName6=APR_Center.ini
ConfigName7=Picturalizer
SkinName7=picturalizer.ini
ConfigName8=Opus
SkinName8=opus.ini
ConfigName9=LaserLight
SkinName9=laserlight.ini
ConfigName10=SoundSquare
SkinName10=soundsquare.ini
ConfigName11=SoundSquare\Ellipse\EllipseXY
SkinName11=soundellipseXY2.ini
ConfigName12=SoundRings
SkinName12=SoundRings.ini
ConfigName13=Stereo-Optic\Rays\Rays-Centered-Spheres
SkinName13=Optic-Rays-Centered-Spheres.ini
ConfigName14=Splice
SkinName14=splice.ini
ConfigName15=Reflections\Amplitude
SkinName15=HorzBassLeft.ini
ConfigName16=Versa-Visualizer-II\Visualizer
SkinName16=Versa-Visualizer.ini
ConfigName17=monstercat-visualizer
SkinName17=visualizer.ini
ConfigName18=ManicPlayerOrgan
SkinName18=ManicPlayerOrgan.ini
ConfigName19=LavaLamp
SkinName19=LavaLamp.ini
ConfigName20=Frost
SkinName20=frost.ini
ConfigName21=Fizzualizer
SkinName21=Visualizer.ini
ConfigName22=BarsVisualizer3D
SkinName22=BarsVisualizer3D.ini
ConfigName23=AudioWireframe\WF0
SkinName23=wf0.ini
ConfigName24=VibratingString
SkinName24=VibratingString.ini
ConfigName25=UFO
SkinName25=UFO.ini

Current=1

[Rainmeter]
ContextTitle=[\x25cb] [#ConfigName1]
ContextAction=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 1][!Refresh]
ContextTitle2=[\x25cb] [#ConfigName2]
ContextAction2=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 2][!Refresh]
ContextTitle3=[\x25cb] [#ConfigName3]
ContextAction3=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 3][!Refresh]
ContextTitle4=[\x25cb] [#ConfigName4]
ContextAction4=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 4][!Refresh]
ContextTitle5=[\x25cb] [#ConfigName5]
ContextAction5=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 5][!Refresh]
ContextTitle6=[\x25cb] [#ConfigName6]
ContextAction6=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 6][!Refresh]
ContextTitle7=[\x25cb] [#ConfigName7]
ContextAction7=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 7][!Refresh]
ContextTitle8=[\x25cb] [#ConfigName8]
ContextAction8=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 8][!Refresh]
ContextTitle9=[\x25cb] [#ConfigName9]
ContextAction9=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 9][!Refresh]
ContextTitle10=[\x25cb] [#ConfigName10]
ContextAction10=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 10][!Refresh]
ContextTitle11=[\x25cb] [#ConfigName11]
ContextAction11=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 11][!Refresh]
ContextTitle12=[\x25cb] [#ConfigName12]
ContextAction12=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 12][!Refresh]
ContextTitle13=[\x25cb] [#ConfigName13]
ContextAction13=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 13][!Refresh]
ContextTitle14=[\x25cb] [#ConfigName14]
ContextAction14=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 14][!Refresh]
ContextTitle15=[\x25cb] [#ConfigName15]
ContextAction15=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 15][!Refresh]
ContextTitle16=[\x25cb] [#ConfigName16]
ContextAction16=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 16][!Refresh]
ContextTitle17=[\x25cb] [#ConfigName17]
ContextAction17=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 17][!Refresh]
ContextTitle18=[\x25cb] [#ConfigName18]
ContextAction18=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 18][!Refresh]
ContextTitle19=[\x25cb] [#ConfigName19]
ContextAction19=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 19][!Refresh]
ContextTitle20=[\x25cb] [#ConfigName20]
ContextAction20=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 20][!Refresh]
ContextTitle21=[\x25cb] [#ConfigName21]
ContextAction21=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 21][!Refresh]
ContextTitle22=[\x25cb] [#ConfigName22]
ContextAction22=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 22][!Refresh]
ContextTitle23=[\x25cb] [#ConfigName23]
ContextAction23=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 23][!Refresh]
ContextTitle24=[\x25cb] [#ConfigName24]
ContextAction24=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 24][!Refresh]
ContextTitle25=[\x25cb] [#ConfigName25]
ContextAction25=[!DeactivateConfig "[#ConfigName[#Current]]"][!WriteKeyValue Variables Current 25][!Refresh]

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=#PlayerExecutable#
; Substitute="-1":"not running","1":"running"
IfCondition=(MeasureProcess<>1)
IfTrueAction=[!DeactivateConfig "[#ConfigName[#Current]]"]
IfFalseAction=[!ActivateConfig "[#ConfigName[#Current]]" "[#SkinName[#Current]]"]

[MeterDummy]
Meter=String

[mCurrent]
Measure=Calc
Formula=#Current#
IfCondition=(#Current#=1)
IfTrueAction=[!SetOption Rainmeter ContextTitle1 "[\x25c9] [#ConfigName1]"]
IfFalseAction=[!SetOption Rainmeter ContextTitle1 "[\x25cb] [#ConfigName1]"]
IfCondition2=(#Current#=2)
IfTrueAction2=[!SetOption Rainmeter ContextTitle2 "[\x25c9] [#ConfigName2]"]
IfFalseAction2=[!SetOption Rainmeter ContextTitle2 "[\x25cb] [#ConfigName2]"]
IfCondition3=(#Current#=3)
IfTrueAction3=[!SetOption Rainmeter ContextTitle3 "[\x25c9] [#ConfigName3]"]
IfFalseAction3=[!SetOption Rainmeter ContextTitle3 "[\x25cb] [#ConfigName3]"]
IfCondition4=(#Current#=4)
IfTrueAction4=[!SetOption Rainmeter ContextTitle4 "[\x25c9] [#ConfigName4]"]
IfFalseAction4=[!SetOption Rainmeter ContextTitle4 "[\x25cb] [#ConfigName4]"]
IfCondition5=(#Current#=5)
IfTrueAction5=[!SetOption Rainmeter ContextTitle5 "[\x25c9] [#ConfigName5]"]
IfFalseAction5=[!SetOption Rainmeter ContextTitle5 "[\x25cb] [#ConfigName5]"]
IfCondition6=(#Current#=6)
IfTrueAction6=[!SetOption Rainmeter ContextTitle6 "[\x25c9] [#ConfigName6]"]
IfFalseAction6=[!SetOption Rainmeter ContextTitle6 "[\x25cb] [#ConfigName6]"]
IfCondition7=(#Current#=7)
IfTrueAction7=[!SetOption Rainmeter ContextTitle7 "[\x25c9] [#ConfigName7]"]
IfFalseAction7=[!SetOption Rainmeter ContextTitle7 "[\x25cb] [#ConfigName7]"]
IfCondition8=(#Current#=8)
IfTrueAction8=[!SetOption Rainmeter ContextTitle8 "[\x25c9] [#ConfigName8]"]
IfFalseAction8=[!SetOption Rainmeter ContextTitle8 "[\x25cb] [#ConfigName8]"]
IfCondition9=(#Current#=9)
IfTrueAction9=[!SetOption Rainmeter ContextTitle9 "[\x25c9] [#ConfigName9]"]
IfFalseAction9=[!SetOption Rainmeter ContextTitle9 "[\x25cb] [#ConfigName9]"]
IfCondition10=(#Current#=10)
IfTrueAction10=[!SetOption Rainmeter ContextTitle10 "[\x25c9] [#ConfigName10]"]
IfFalseAction10=[!SetOption Rainmeter ContextTitle10 "[\x25cb] [#ConfigName10]"]
IfCondition11=(#Current#=11)
IfTrueAction11=[!SetOption Rainmeter ContextTitle11 "[\x25c9] [#ConfigName11]"]
IfFalseAction11=[!SetOption Rainmeter ContextTitle11 "[\x25cb] [#ConfigName11]"]
IfCondition12=(#Current#=12)
IfTrueAction12=[!SetOption Rainmeter ContextTitle12 "[\x25c9] [#ConfigName12]"]
IfFalseAction12=[!SetOption Rainmeter ContextTitle12 "[\x25cb] [#ConfigName12]"]
IfCondition13=(#Current#=13)
IfTrueAction13=[!SetOption Rainmeter ContextTitle13 "[\x25c9] [#ConfigName13]"]
IfFalseAction13=[!SetOption Rainmeter ContextTitle13 "[\x25cb] [#ConfigName13]"]
IfCondition14=(#Current#=14)
IfTrueAction14=[!SetOption Rainmeter ContextTitle14 "[\x25c9] [#ConfigName14]"]
IfFalseAction14=[!SetOption Rainmeter ContextTitle14 "[\x25cb] [#ConfigName14]"]
IfCondition15=(#Current#=15)
IfTrueAction15=[!SetOption Rainmeter ContextTitle15 "[\x25c9] [#ConfigName15]"]
IfFalseAction15=[!SetOption Rainmeter ContextTitle15 "[\x25cb] [#ConfigName15]"]
IfCondition16=(#Current#=16)
IfTrueAction16=[!SetOption Rainmeter ContextTitle16 "[\x25c9] [#ConfigName16]"]
IfFalseAction16=[!SetOption Rainmeter ContextTitle16 "[\x25cb] [#ConfigName16]"]
IfCondition17=(#Current#=17)
IfTrueAction17=[!SetOption Rainmeter ContextTitle17 "[\x25c9] [#ConfigName17]"]
IfFalseAction17=[!SetOption Rainmeter ContextTitle17 "[\x25cb] [#ConfigName17]"]
IfCondition18=(#Current#=18)
IfTrueAction18=[!SetOption Rainmeter ContextTitle18 "[\x25c9] [#ConfigName18]"]
IfFalseAction18=[!SetOption Rainmeter ContextTitle18 "[\x25cb] [#ConfigName18]"]
IfCondition19=(#Current#=19)
IfTrueAction19=[!SetOption Rainmeter ContextTitle19 "[\x25c9] [#ConfigName19]"]
IfFalseAction19=[!SetOption Rainmeter ContextTitle19 "[\x25cb] [#ConfigName19]"]
IfCondition20=(#Current#=20)
IfTrueAction20=[!SetOption Rainmeter ContextTitle20 "[\x25c9] [#ConfigName20]"]
IfFalseAction20=[!SetOption Rainmeter ContextTitle20 "[\x25cb] [#ConfigName20]"]
IfCondition21=(#Current#=21)
IfTrueAction21=[!SetOption Rainmeter ContextTitle21 "[\x25c9] [#ConfigName21]"]
IfFalseAction21=[!SetOption Rainmeter ContextTitle21 "[\x25cb] [#ConfigName21]"]
IfCondition22=(#Current#=22)
IfTrueAction22=[!SetOption Rainmeter ContextTitle22 "[\x25c9] [#ConfigName22]"]
IfFalseAction22=[!SetOption Rainmeter ContextTitle22 "[\x25cb] [#ConfigName22]"]
IfCondition23=(#Current#=23)
IfTrueAction23=[!SetOption Rainmeter ContextTitle23 "[\x25c9] [#ConfigName23]"]
IfFalseAction23=[!SetOption Rainmeter ContextTitle23 "[\x25cb] [#ConfigName23]"]
IfCondition24=(#Current#=24)
IfTrueAction24=[!SetOption Rainmeter ContextTitle24 "[\x25c9] [#ConfigName24]"]
IfFalseAction24=[!SetOption Rainmeter ContextTitle24 "[\x25cb] [#ConfigName24]"]
IfCondition25=(#Current#=25)
IfTrueAction25=[!SetOption Rainmeter ContextTitle25 "[\x25c9] [#ConfigName25]"]
IfFalseAction25=[!SetOption Rainmeter ContextTitle25 "[\x25cb] [#ConfigName25]"]

[Metadata]
Name=Audio Visualizer Monitor
Author=Eclectic Tech
Information=Monitors your media player process and only activates a specified visualizer config when the player is active. Run this invisible skin all the time and it will load/unload your visualizers without you having to touch anything. Can control up to 25 visualizer configs.
License=CC BY-NC-SA 3
Version=1.2019.10.14

The fade works now, thank you! :)

I use AIMP and Spotify (windows 10 store app, not the desktop version), I wonder if it's possible to make the visualizer work with both programs?

I just tried using the skin you sent and replaced winamp.exe with aimp.exe, visualizer still appears everytime there's sound coming from any program, tested it with spotify and chrome. Is there anything else I need to change for it to work?
User avatar
balala
Rainmeter Sage
Posts: 11017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to hide visualizer when there's no audio playing

Post by balala »

eclectic-tech wrote:
March 19th, 2020, 2:38 am
You need to create a measure that checks the Process for your media player and deactivates/activates the visualizer config. I will use WinAmp as an example, your media player process may be different, but it will be the executable file that starts your player.

Code: Select all

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=WinAmp.exe
; Value will be '1' when the process is running, '-1' when it is not running
IfCondition=([MeasureProcess]=-1)
IfTrueAction=[!DeactivateConfig "Lasix\Visualizer"]
UpdateDivider=66
Unfortunately this measure this way doesn't work. In fact the measure itself does work, but the IfCondition doesn't, because the name of the [MeasureProcess] measure is used in the Ifcondition option as a section variable and this has to set on the dynamic variables, by adding a DynamicVariables=1 option to the measure. I see this option is added into the second code:
eclectic-tech wrote:
March 19th, 2020, 2:38 am

Code: Select all

IfCondition=([#CURRENTSECTION#]<=0.00001)
IfTrueAction=[!HideFade]
IfFalseAction=[!ShowFade]
IfConditionMode=1
DynamicVariables=1
and this is ok, however these are options of a different measure, right?
But in fact there is no need to add it. This IfCondition does perfectly work even without using the name of the measure as a section variable. Such in a case there is no need to set the dynamic variables. for instance the following measure perfectly work, as same as its IfCondition (note that there is no DynamicVariables=1 option):

Code: Select all

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=WinAmp.exe
; Value will be '1' when the process is running, '-1' when it is not running
IfCondition=(MeasureProcess=-1)
IfTrueAction=[!DeactivateConfig "Lasix\Visualizer"]
UpdateDivider=66
As said, in this case there is no need for section variables, because the Process plugin measure returns a numeric value, which can be used freely into both, the IfCondition or the Formula option of a Calc measure (if would be needed).
User avatar
balala
Rainmeter Sage
Posts: 11017
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to hide visualizer when there's no audio playing

Post by balala »

rina wrote:
March 19th, 2020, 5:07 pm
I just tried using the skin you sent and replaced winamp.exe with aimp.exe, visualizer still appears everytime there's sound coming from any program, tested it with spotify and chrome. Is there anything else I need to change for it to work?
Instead of activating / deactivating the skin depending on the running / not running media player, maybe another approach is to load it when there is a sound played on the system and unload it when there is not. This can be done similarly to the case when the skin was loaded / unloaded depending on the appropriate process status. There is needed an AudioLevel plugin measure, which controls is the system is playing any sound. If it does, the Lasix\Visaualizer\Visaualizer.ini skin is loaded, otherwise the skin is unloaded.
Example:

Code: Select all

[Rainmeter]
Update=1000

[Variables]

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTAttack=0
FFTDecay=0
FFTSize=8192
FFTOverlap=4096
FreqMin=15
FreqMax=10000
Sensitivity=35
Bands=1
IfCondition=([#CURRENTSECTION#]=0)
IfTrueAction=[!DeactivateConfig "Lasix\Visualizer"]
IfFalseAction=[!ActivateConfig "Lasix\Visualizer" "Visualizer.ini"]
DynamicVariables=1

[MeterDummy]
Meter=STRING
Hidden=1
Note that this code, although is using an AudioLevel plugin measure, has the Update set to the default Update=1000, which in this case is a completely good value, because there is no need to get the audio level frequently. But this way this skin doesn't loads the CPU so much as it would with a much lower Update.
Take care that if using this skin, as I said previously, the visualizer skin is loaded whenever the system is playing any audio. Not sure if this is a good approach, if it is, depends on your needs.
If you tried this out, please let me know what you think about it.
rina
Posts: 6
Joined: March 18th, 2020, 3:03 pm

Re: How to hide visualizer when there's no audio playing

Post by rina »

balala wrote:
March 19th, 2020, 5:38 pm
Instead of activating / deactivating the skin depending on the running / not running media player, maybe another approach is to load it when there is a sound played on the system and unload it when there is not. This can be done similarly to the case when the skin was loaded / unloaded depending on the appropriate process status. There is needed an AudioLevel plugin measure, which controls is the system is playing any sound. If it does, the Lasix\Visaualizer\Visaualizer.ini skin is loaded, otherwise the skin is unloaded.
Example:

Code: Select all

[Rainmeter]
Update=1000

[Variables]

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
Port=Output
FFTAttack=0
FFTDecay=0
FFTSize=8192
FFTOverlap=4096
FreqMin=15
FreqMax=10000
Sensitivity=35
Bands=1
IfCondition=([#CURRENTSECTION#]=0)
IfTrueAction=[!DeactivateConfig "Lasix\Visualizer"]
IfFalseAction=[!ActivateConfig "Lasix\Visualizer" "Visualizer.ini"]
DynamicVariables=1

[MeterDummy]
Meter=STRING
Hidden=1
Note that this code, although is using an AudioLevel plugin measure, has the Update set to the default Update=1000, which in this case is a completely good value, because there is no need to get the audio level frequently. But this way this skin doesn't loads the CPU so much as it would with a much lower Update.
Take care that if using this skin, as I said previously, the visualizer skin is loaded whenever the system is playing any audio. Not sure if this is a good approach, if it is, depends on your needs.
If you tried this out, please let me know what you think about it.
Thank you for the code! I don't mind that much if the skin loads everytime the system is playing any audio, since most of the time it is playing audio is when I'm listening to music anyways. I realise having it activated only when the music player is playing audio would be a better option, but I don't mind it this way either.

I just tried it and when I open rainmeter, the visualizer is indeed unloaded and loads when I first play some audio. However after I pause it the visualizer seems to stay active, as it's still visible on the loaded skins list when I right click on the rainmeter icon on the system tray?

Edit: I've noticed it sometimes unloads as it is supposed to, sometimes it stays active. Weird :???: not a big issue though, I tested it a lil bit more and it seems like it unloads more often than not ^^"