It is currently March 28th, 2024, 9:25 pm

[SOLVED] Is it possible to determine programatically if AudioLevel is not playing music?

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

[SOLVED] Is it possible to determine programatically if AudioLevel is not playing music?

Post by CodeCode »

Hello, So yep.
Is there a way I can use some value to determine if AudioLevel is not receiving a signal from a music player? So basically if there is no output, then I could get that and pass it to ActivateMeasure/DeactivateMeasure?

I am trying to use a calc measure to cycle through numbered pngs as a sort of screen saver. But when the music is playing the calc measure is deactivated.

Thanks for any help.

I remember doing this a long time ago, but it has slipped my mind how its done. :confused:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-VV
Working Final rmskin:
7.1 VU Meter _1.2.rmskin
You do not have the required permissions to view the files attached to this post.
Last edited by CodeCode on October 5th, 2021, 12:34 pm, edited 2 times in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by CodeCode »

I didn't clarify what I am trying to do, so here si more if anyone can help with this added info.

I have a Measure in one skin:

Code: Select all

[MeasureTrack]
Measure=NowPlaying
PlayerName=#Player#
PlayerType=Title
DisableLeadingZero=1
Substitute="":"stopped"
I tried this:

Code: Select all

[MeasureTrack]
Measure=NowPlaying
PlayerName=#Player#
PlayerType=Title
DisableLeadingZero=1
Substitute="":"stopped"
IfMatch=stopped
IfMatchAction=[!ShowMeter Funnel "#SKINSPATH#\FolderName"][!Update]
IfNotMatchAction=[!HideMeter Funnel "#SKINSPATH#\FolderName"][!Update]
DynamicVariables=1
But it isnt working.
I thought IfMatch was the way to go. Perhaps I am doing it wrong?
Last edited by CodeCode on October 5th, 2021, 9:49 am, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by death.crafter »

CodeCode wrote: October 5th, 2021, 9:07 am Hello, So yep.
Is there a way I can use some value to determine if AudioLevel is not receiving a signal from a music player? So basically if there is no output, then I could get that and pass it to ActivateMeasure/DeactivateMeasure?

I am trying to use a calc measure to cycle through numbered pngs as a sort of screen saver. But when the music is playing the calc measure is deactivated.

Thanks for any help.

I remember doing this a long time ago, but it has slipped my mind how its done. :confused:
You can't detect if audio is not coming from any specific app.

If it's just audio,

[AudioLevel]
...
IfCondition=AudioLevel<0.001
...
from the Realm of Death
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by death.crafter »

CodeCode wrote: October 5th, 2021, 9:46 am

Code: Select all

IfMatchAction=[!ShowMeter Funnel "@SKINNSPATH#\FolderName"][!Update]
IfNotMatchAction=[!HideMeter Funnel "@SKINNSPATH#\FolderName"][!Update]
But it isnt working.
I thought IfMatch was the way to go. Perhaps I am doing it wrong?
???
"@SKINNSPATH#\FolderName"
???
from the Realm of Death
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by CodeCode »

death.crafter wrote: October 5th, 2021, 9:49 am ???
"@SKINNSPATH#\FolderName"
???
HAHA. Yep, I just corrected the typos, but you already answered.

How do I show the config path? What I did might be wrong?

Should I have the .ini in there as well?
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by CodeCode »

death.crafter wrote: October 5th, 2021, 9:47 am You can't detect if audio is not coming from any specific app.

If it's just audio,

[AudioLevel]
...
IfCondition=AudioLevel<0.001
...
I have this Measure:

Code: Select all

[MeasureAudioOutput]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=1
RMSDecay=1
RMSGain=2.0
PeakAttack=5
PeakDecay=5
PeakGain=1.0
So, I tried this:

Code: Select all

[MeasureAudioOutput]
Measure=Plugin
Plugin=AudioLevel
Port=Output
RMSAttack=1
RMSDecay=1
RMSGain=2.0
PeakAttack=5
PeakDecay=5
PeakGain=1.0
IfCondition=AudioLevel<0.001
IfTrueAction=[!ShowMeter Funnel][!Update]
IfFalseAction=[!HideMeter Funnel][!Update]
DynamicVariables=1
But it doesnt seem to be working.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by death.crafter »

CodeCode wrote: October 5th, 2021, 9:51 am HAHA. Yep, I just corrected the typos, but you already answered.

How do I show the config path? What I did might be wrong?

Should I have the .ini in there as well?
You use it as #SKINSPATH#"ROOTCONFIG\UP\TO\THE\FOLDER\WITH\INI"\Some.ini

Example: MySkin\Variant1\Subvariant2
from the Realm of Death
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by death.crafter »

Code: Select all

[MeasureAudioOutput]
Measure=Plugin
Plugin=AudioLevel
Port=Output
IfCondition=AudioLevel<0.001
IfTrueAction=[!ShowMeter Funnel][!Update]
IfFalseAction=[!HideMeter Funnel][!Update]
DynamicVariables=1
from the Realm of Death
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by CodeCode »

I also tried this, but still not triggering the !ShowMeter.

Code: Select all

[MeasureAudio]
Measure=Plugin
Plugin=AudioLevel
IfCondition=AudioLevel < 0.001
IfTrueAction=[!ShowMeter Funnel][!Redraw]
IfFalseAction=[!HideMeter Funnel][!Redraw]
DynamicVariables=1
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Is it possible to determine programatically if AudioLevel is not playing music?

Post by CodeCode »

death.crafter wrote: October 5th, 2021, 10:01 am

Code: Select all

[MeasureAudioOutput]
Measure=Plugin
Plugin=AudioLevel
Port=Output
IfCondition=AudioLevel<0.001
IfTrueAction=[!ShowMeter Funnel][!Update]
IfFalseAction=[!HideMeter Funnel][!Update]
DynamicVariables=1
Man, it isn't working. I copied directly from your example.

Wow. I am missing something.

The image meter is default to Hidden=1. Should I get rid of that? I'll try, just thinking in real time here.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.