It is currently March 28th, 2024, 7:44 pm

Setting one single VisBubble Audio Source?

Get help with creating, editing & fixing problems with skins
ZoleGam
Posts: 15
Joined: February 16th, 2018, 4:49 pm

Re: Setting one single VisBubble Audio Source?

Post by ZoleGam »

Hi, i just wanted to know, because earlier you said: "Idea yes, but I'm not sure how to make it to properly work. Problem is that Groove Music a so called modern app, launched in Win10. It's easy to check if a "normal" app is running, but I'm not sure how can be checked the same thing for these new apps. I think I read once something about this, but I can't find it. Maybe someone has an idea?
Because if we could check if the app is running, would be simple to achieve what you'd like: we could block or enable the skin, depending if Groove is or isn't running." What Do I do to check if a so called "normal App" is running and can you give examples of a normal app? TY!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Setting one single VisBubble Audio Source?

Post by jsmorley »

I believe that Groove Music starts a process called Music.UI.exe.

However I would caution that you might want to go to Settings > Privacy > Background Apps and turn off Groove Music, or the presence of that executable may not reliably indicate if you are actively using Groove Music.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureGroove]
Measure=Plugin
Plugin=Process
ProcessName=Music.UI.exe
IfCondition=MeasureGroove = 1
IfTrueAction=[!SetOption MeterGroove FontColor "111,255,104,255"][!UpdateMeter MeterGroove][!Redraw]
IfFalseAction=[!SetOption MeterGroove FontColor "255,255,255,255"][!UpdateMeter MeterGroove][!Redraw]

[MeterGroove]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Groove Music
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Setting one single VisBubble Audio Source?

Post by balala »

jsmorley wrote:I believe that Groove Music starts a process called Music.UI.exe.
Good to know. Thanks for the info.
jsmorley wrote:However I would caution that you might want to go to Settings > Privacy > Background Apps and turn off Groove Music, or the presence of that executable may not reliably indicate if you are actively using Groove Music.
In his initial request ZoleGam talked about Music Groove and I thought this is what he want to use. In the meantime he clarified that the player doesn't matter too much. So, definitely would be better to use a player which is supported by the NowPlaying measures. In this case the properly written measure can know if the player is playing or not and the visualizer could be activated / deactivated (enabled / disabled) accordingly.
ZoleGam
Posts: 15
Joined: February 16th, 2018, 4:49 pm

Re: Setting one single VisBubble Audio Source?

Post by ZoleGam »

Hi I'm sorry for being this stupid, but my English isn't that good and i'm super lost right now, so i recorded this video, to clarify what I need help in, hope you guys understand and are able to help me! Again, really sorry for the stupidity! Thank you all so much for all the help so far, and the patience too! <3 Link: https://youtu.be/GDLUz3iFceI
-Zole
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Setting one single VisBubble Audio Source?

Post by balala »

ZoleGam wrote:Hi I'm sorry for being this stupid, but my English isn't that good and i'm super lost right now, so i recorded this video, to clarify what I need help in, hope you guys understand and are able to help me! Again, really sorry for the stupidity! Thank you all so much for all the help so far, and the patience too! <3 Link: https://youtu.be/GDLUz3iFceI
-Zole
Don't consider yourself stupid, you're definitely not! Maybe inexperienced in Rainmeter, but that's not stupidity!
To lock the VisBubble to react only when a specific file is playing, is harder to be done (but definitely not impossible, nor this). Easier would be to make it to react only when certain NowPlaying supported player app is playing music (or whatever). As we said before, the problem is that in such case, when the chosen app is playing, VisBubble will react to any sound source, not just to the sound coming from the player app. That's not a problem if you don't play more sound sources (eg you don't start both, the player app and a Youtube video) in paralel, but if you do, you'll see in VisBubble the result of both sounds.
Please let me know if you're interested in a such solution. I could write a small code which would enable VisBubble only when the chosen app is playing or when the chosen app is playing a specific piece.
ZoleGam
Posts: 15
Joined: February 16th, 2018, 4:49 pm

Re: Setting one single VisBubble Audio Source?

Post by ZoleGam »

I'm certainly interested in that! I'll post my visbubble code down below and you can edit it how you want! Feel free to choose the app as well, I can download a new one if Groove Music doesn't work, no problem in that regard! Thanks again! <3

Code: Select all

[Metadata]
Name=VisBubble
Author=undefinist
Version=3.1
License=CC BY-NC-SA 3.0
Information=The default | Double-click for settings.

[Rainmeter]
Update=25
ContextTitle=SETTINGS (double-click)
ContextAction=[!ActivateConfig "#ROOTCONFIG#\SettingsWindow"]
ContextTitle2=SETTINGS FILE
ContextAction2=["#ROOTCONFIGPATH#Settings.inc"]

[Variables]
@Include=Settings.inc
FORMULA_SUM=([mBand%%]+(#Smoothing#=0?0:(%%={#NumOfItems#-1}?0:[mBand{(%%+1)%#NumOfItems#}])+(%%=0?0:[mBand{%%=0?#NumOfItems#-1:%%-1}])))
FORMULA_SUM_FULL=([mBand%%]+(#Smoothing#=0?0:[mBand{(%%+1)%#NumOfItems#}]+[mBand{%%=0?#NumOfItems#-1:%%-1}]))
FORMULA_AVG_NUM=((%%={#NumOfItems#-1}||%%=0)?2:3)
FORMULA_AVG_NUM_FULL=3
FORMULA_AVG=#FORMULA_SUM_FULL#/#FORMULA_AVG_NUM_FULL#
FORMULA_THETA=(#AngleTotal#-#AngleTotal#/#NumOfItems#*(#ClockWise#=0?%%:#NumOfItems#-%%-1)+#AngleStart#)
@Include2=#INC#Common.inc

[mFullCircle]
Measure=Calc
IfCondition=#AngleTotal# >= PI * 2
IfTrueAction=[!WriteKeyValue Variables FORMULA_AVG "#*FORMULA_SUM_FULL*#/#*FORMULA_AVG_NUM_FULL*#"]
IfFalseAction=[!WriteKeyValue Variables FORMULA_AVG "#*FORMULA_SUM*#/#*FORMULA_AVG_NUM*#"]
UpdateDivider=-1

;=
; base measures
;============================

[mAudioOut]
Bands=(#NumOfItems#+4)

;=
; meterstyles
;============================

[styleLine]
LineColor=#ItemColor#
LineWidth=(#ItemWidth#/2)
RotationAngle=(#Inward#*PI)
ControlAngle=0
AntiAlias=1
DynamicVariables=1

;=
; meters + scripts + includes
;============================

[sFactoryBandMeasures]
Measure=Script
ScriptFile=#SCRIPT#Factory.lua
IncFile=#INC#BandMeasures.inc
Number=#NumOfItems#
SectionName=mBand%%
Option0=Measure
Value0=Plugin
Option1=Plugin
Value1=AudioLevel
Option2=Parent
Value2=mAudioOut
Option3=Type
Value3=Band
Option4=BandIdx
Value4={%%+1}
UpdateDivider=-1
@Include=#INC#BandMeasures.inc

[sFactoryBars]
Measure=Script
ScriptFile=#SCRIPT#Factory.lua
IncFile=#INC#Lines.inc
Number=#NumOfItems#
SectionName=%%
Option0=Meter
Value0=Roundline
Option1=MeterStyle
Value1=styleLine
Option2=StartAngle
Value2={#FORMULA_THETA#}
Option3=X
Value3={#Radius#*Cos(#FORMULA_THETA#%(PI*2))+#Radius#+#ExtrudeMax#}
Option4=Y
Value4={#RadiusY#*Sin(#FORMULA_THETA#%(PI*2))+#RadiusY#+#ExtrudeMax#}
Option5=LineLength
Value5=((#FORMULA_AVG#=0)?{#ExtrudeMin#=0?-1:#ExtrudeMin#}:((#FORMULA_AVG#-[mBand%%])*{#Smoothing#}+[mBand%%])*{#ExtrudeMax#-#ExtrudeMin#}+#ExtrudeMin#)
Option6=DynamicVariables
Value6=1
UpdateDivider=-1
@Include=#INC#Lines.inc

; Helper script to always refresh skin twice instead of once
; This is so that it loads the updated .inc files
[sRefresher]
Measure=Script
ScriptFile=#SCRIPT#Refresher.lua
UpdateDivider=-1
Refreshed=0

[sColor]
Measure=Script
ScriptFile=#SCRIPT#Color.lua
UpdateDivider=-1
NumOfItems=#NumOfItems#
Color=#ItemColor#
;C4FB7200:0|C4FB72cc:30|85ECF099:60|85ECF099:80|85ECF000
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Setting one single VisBubble Audio Source?

Post by balala »

Add the following measure somewhere in your code:

Code: Select all

[MeasurePlay]
Measure=NowPlaying
PlayerName=#PlayerName#
PlayerType=State
IfCondition=(#CURRENTSECTION#=1)
IfTrueAction=[!EnableMeasure "mAudioOut"][!Show "#CURRENTCONFIG#"]
IfFalseAction=[!DisableMeasure "mAudioOut"][!Hide "#CURRENTCONFIG#"]
Also add the PlayerName variable to the [Variables] section. Choose any fully supported player, listed in the following list: https://docs.rainmeter.net/manual/measures/nowplaying/#playerlist. You also can try the partially supported players, but I'm not sure how will they work.
Eg with PlayerName=WMP, you'll use the Windows Media Player, which probably you have installed. Unfortunately the NowPlaying measures don't support the new Music Groove, that's why I said before you'll have to choose another player.
The [MeasurePlay] measure will enable the visualizer skin (and will show it up) when the chosen player plays and will disable (hide) it otherwise (when it is paused, stopped or closed). But as we said before, when the player plays, the visualizer skin won't react just to the sound coming from the player, but to every sound. There is no better solution now, I think.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Setting one single VisBubble Audio Source?

Post by balala »

dvo wrote:and for webnowplayer something like this:
The IfCondition would be IfCondition=MeasureDisplayStatus = 0, or IfCondition=MeasurePlay = 0? Because I'm not even sure what the [MeasureDisplayStatus] measure is.
Probably I'd use instead an IfCondition=(#CURRENTSECTION#=1) form of this IfCondition.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Setting one single VisBubble Audio Source?

Post by balala »

dvo wrote:i used my player that has that option already just added your parts... :D
Then plase edit your previous post, to fix the mistaken condition.
ZoleGam
Posts: 15
Joined: February 16th, 2018, 4:49 pm

Re: Setting one single VisBubble Audio Source?

Post by ZoleGam »

Hi! Thank s again for the code, I feel like we're almost there! The current code i'm using will be listed below, It works in the sense that VisBubble is Hidden while iTunes is not open, but when iTunes IS open, If anything triggers visbubble, Rainmeter instantly crashes, I think my problem is that, I didn't understand what to put In the [VARIABLES] Tab! But the measure play you linked is in there and seems to be working, only need this little help with the Playername variable! (Again, if iTunes is the problem, there's no problem in changing it!) PS:Thanks again for the help!

Code: Select all

[Metadata]
Name=VisBubble
Author=undefinist
Version=3.1
License=CC BY-NC-SA 3.0
Information=The default | Double-click for settings.

[Rainmeter]
Update=25
ContextTitle=SETTINGS (double-click)
ContextAction=[!ActivateConfig "#ROOTCONFIG#\SettingsWindow"]
ContextTitle2=SETTINGS FILE
ContextAction2=["#ROOTCONFIGPATH#Settings.inc"]

[Variables]
@Include=Settings.inc
FORMULA_SUM=([mBand%%]+(#Smoothing#=0?0:(%%={#NumOfItems#-1}?0:[mBand{(%%+1)%#NumOfItems#}])+(%%=0?0:[mBand{%%=0?#NumOfItems#-1:%%-1}])))
FORMULA_SUM_FULL=([mBand%%]+(#Smoothing#=0?0:[mBand{(%%+1)%#NumOfItems#}]+[mBand{%%=0?#NumOfItems#-1:%%-1}]))
FORMULA_AVG_NUM=((%%={#NumOfItems#-1}||%%=0)?2:3)
FORMULA_AVG_NUM_FULL=3
FORMULA_AVG=#FORMULA_SUM_FULL#/#FORMULA_AVG_NUM_FULL#
FORMULA_THETA=(#AngleTotal#-#AngleTotal#/#NumOfItems#*(#ClockWise#=0?%%:#NumOfItems#-%%-1)+#AngleStart#)
@Include2=#INC#Common.inc

[mFullCircle]
Measure=Calc
IfCondition=#AngleTotal# >= PI * 2
IfTrueAction=[!WriteKeyValue Variables FORMULA_AVG "#*FORMULA_SUM_FULL*#/#*FORMULA_AVG_NUM_FULL*#"]
IfFalseAction=[!WriteKeyValue Variables FORMULA_AVG "#*FORMULA_SUM*#/#*FORMULA_AVG_NUM*#"]
UpdateDivider=-1

;=
; base measures
;============================

[mAudioOut]
Bands=(#NumOfItems#+4)

;=
; meterstyles
;============================

[styleLine]
LineColor=#ItemColor#
LineWidth=(#ItemWidth#/2)
RotationAngle=(#Inward#*PI)
ControlAngle=0
AntiAlias=1
DynamicVariables=1

;=
; meters + scripts + includes
;============================

[sFactoryBandMeasures]
Measure=Script
ScriptFile=#SCRIPT#Factory.lua
IncFile=#INC#BandMeasures.inc
Number=#NumOfItems#
SectionName=mBand%%
Option0=Measure
Value0=Plugin
Option1=Plugin
Value1=AudioLevel
Option2=Parent
Value2=mAudioOut
Option3=Type
Value3=Band
Option4=BandIdx
Value4={%%+1}
UpdateDivider=-1
@Include=#INC#BandMeasures.inc

[sFactoryBars]
Measure=Script
ScriptFile=#SCRIPT#Factory.lua
IncFile=#INC#Lines.inc
Number=#NumOfItems#
SectionName=%%
Option0=Meter
Value0=Roundline
Option1=MeterStyle
Value1=styleLine
Option2=StartAngle
Value2={#FORMULA_THETA#}
Option3=X
Value3={#Radius#*Cos(#FORMULA_THETA#%(PI*2))+#Radius#+#ExtrudeMax#}
Option4=Y
Value4={#RadiusY#*Sin(#FORMULA_THETA#%(PI*2))+#RadiusY#+#ExtrudeMax#}
Option5=LineLength
Value5=((#FORMULA_AVG#=0)?{#ExtrudeMin#=0?-1:#ExtrudeMin#}:((#FORMULA_AVG#-[mBand%%])*{#Smoothing#}+[mBand%%])*{#ExtrudeMax#-#ExtrudeMin#}+#ExtrudeMin#)
Option6=DynamicVariables
Value6=1
UpdateDivider=-1
@Include=#INC#Lines.inc

; Helper script to always refresh skin twice instead of once
; This is so that it loads the updated .inc files
[sRefresher]
Measure=Script
ScriptFile=#SCRIPT#Refresher.lua
UpdateDivider=-1
Refreshed=0

[MeasurePlay]
Measure=NowPlaying
PlayerName=#PlayerName#
PlayerType=State
IfCondition=(#CURRENTSECTION#=1)
IfTrueAction=[!EnableMeasure "mAudioOut"][!Show "#CURRENTCONFIG#"]
IfFalseAction=[!DisableMeasure "mAudioOut"][!Hide "#CURRENTCONFIG#"]

[sColor]
Measure=Script
ScriptFile=#SCRIPT#Color.lua
UpdateDivider=-1
NumOfItems=#NumOfItems#
Color=#ItemColor#
;C4FB7200:0|C4FB72cc:30|85ECF099:60|85ECF099:80|85ECF000