It is currently December 7th, 2021, 12:58 pm

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

Help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 797
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 »

CodeCode wrote: October 5th, 2021, 10:09 am 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.
HAH! That worked!

Ok, got it now.


Thanks death.crafter. :bounce:
Last edited by CodeCode on October 5th, 2021, 10:12 am, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 797
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 »

CodeCode wrote: October 5th, 2021, 10:10 am HAH! That worked!

Ok, got it now.


Thanks death.crafter. :bounce:
Grr. Dang it. It went unhidden but wont hide when IfFalse should be triggered.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 797
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 »

OK.

Now I REALLY got it.

This works great:

Code: Select all

[MeasureAudioState]
Measure=Plugin
Plugin=AudioLevel
Port=Output
IfCondition=(MeasureAudioState<0.001)
IfTrueAction=[!SetVariable "FunnelTog" "0"][!!Update]
IfFalseAction=[!SetVariable "FunnelTog" "1"][!!Update]
DynamicVariables=1
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 797
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 »

Working Example in Top Post on page one.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 13530
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

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?
Returning a little to this question, note that in case of most bangs, when you want to apply the bang to another skin that the current one, you have to add the name of the config as last parameter of bang, not the name and / or path of the .ini file. In case of !ShowMeter / !HideMeter, if the meter you want to show / hide is located into another skin, you have to precise the name of the config (not the skin) in which the meter resides.
For instance if you want to show / hide a meter of the Skins\illustro\Clock\Clock.ini skin (which obviously has to be loaded), you have to know that the name of config is illustro\Clock, so this is what you have to enter as the second parameter of the bang, after the name of the meter. For instance: [!ShowMeter meterTitle "illustro\Clock"] - this is a correct form of the bang and will work. But the [!ShowMeter meterTitle "illustro\Clock\Clock.ini"] form won't, because beside the name of the config which contains the meter to be shown, the name of the skin is added as well. This seems to be a relatively common mistake.
User avatar
CodeCode
Posts: 797
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 »

balala wrote: October 5th, 2021, 2:10 pm Returning a little to this question, note that in case of most bangs, when you want to apply the bang to another skin that the current one, you have to add the name of the config as last parameter of bang, not the name and / or path of the .ini file. In case of !ShowMeter / !HideMeter, if the meter you want to show / hide is located into another skin, you have to precise the name of the config (not the skin) in which the meter resides.
For instance if you want to show / hide a meter of the Skins\illustro\Clock\Clock.ini skin (which obviously has to be loaded), you have to know that the name of config is illustro\Clock, so this is what you have to enter as the second parameter of the bang, after the name of the meter. For instance: [!ShowMeter meterTitle "illustro\Clock"] - this is a correct form of the bang and will work. But the [!ShowMeter meterTitle "illustro\Clock\Clock.ini"] form won't, because beside the name of the config which contains the meter to be shown, the name of the skin is added as well. This seems to be a relatively common mistake.
Cool. This has been explained in the past, to different people, but me as well. I was fairly certain that the containing folder was all that was needed.
I just wasn't positive since I was not getting results having failed to use a measurename for the ifcondition. Once that was sorted everything is now working as hoped.

Thanks for confirming balala. I appreciate the time you take to help people with mental blocks to programming. I am getting better at remembering structure of Sections and their options under the type. I also am more relaxed when using styles and other nice helpful things rainmeter has these days.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 13530
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

CodeCode wrote: October 6th, 2021, 2:47 am I was fairly certain that the containing folder was all that was needed.
it is named "config".
CodeCode wrote: October 6th, 2021, 2:47 am I just wasn't positive since I was not getting results having failed to use a measurename for the ifcondition. Once that was sorted everything is now working as hoped.

Thanks for confirming balala. I appreciate the time you take to help people with mental blocks to programming. I am getting better at remembering structure of Sections and their options under the type. I also am more relaxed when using styles and other nice helpful things rainmeter has these days.
In fact there are extremely less bangs, which are allowing a file as parameter:
  • !WriteKeyValue - requires the file where to write the value if this is another than the current one.
  • !ActivateConfig / !ToggleConfig (but not !DeactivateConfig) - to tell which skin of the config has to be activated (especially if there are more).
  • !EditSkin - to tell Rainmeter what to edit.
  • !SetWallpaper - to precise which wallpaper to be set.
  • Play and PlayLoop - requires the sound file.
  • Finally maybe !Manage.
All other bangs are requiring / allowing only the name of the config, not the name of any file (hope I didn't forget any).
User avatar
death.crafter
Rainmeter Sage
Posts: 1206
Joined: April 24th, 2021, 8:13 pm

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

Post by death.crafter »

balala wrote: October 6th, 2021, 1:51 pm [*]!EditSkin - to tell Rainmeter what to edit.
This bang doesn't take file parameter by itself. It needs a config before file(only name and not full path).
E.g. [!EditSkin "MyConfig" "Variant2.ini"]

I guess you know that but just to be clear.
from the Realm of Death
User avatar
balala
Rainmeter Sage
Posts: 13530
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

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

Post by balala »

death.crafter wrote: October 6th, 2021, 1:56 pm This bang doesn't take file parameter by itself. It needs a config before file(only name and not full path).
E.g. [!EditSkin "MyConfig" "Variant2.ini"]

I guess you know that but just to be clear.
Obviously know. I listed all bangs requiring a file as parameter, beside a config name or alone.
User avatar
CodeCode
Posts: 797
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 »

balala wrote: October 6th, 2021, 5:26 pm Obviously know. I listed all bangs requiring a file as parameter, beside a config name or alone.
I think the clarification was for the entire class, but d.c specified 'you' (literal quote) as knowing these things.
I for one, welcome d.c as our overlord/emperor/duke/knight/high-ranking craftsman, or just a good guy. 8-)
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.