It is currently December 12th, 2019, 8:20 pm

Change wallpaper when music starts

Get help with installing and using Rainmeter.
zBobo
Posts: 12
Joined: November 16th, 2019, 5:07 pm

Change wallpaper when music starts

zBobo » November 16th, 2019, 5:10 pm

hi guys, can i change my wallpaper when i play music? thanks
User avatar
Jeff
Posts: 92
Joined: September 3rd, 2018, 11:18 am

Re: Change wallpaper when music starts

Jeff » November 16th, 2019, 5:50 pm

Sure, if you're referring to changing the windows wallpaper when you open a player or start playing music from that player, you can use IfCondition on a NowPlaying measure with Status or State measure and on the true action you add the !SetWallpaper bang (and the obvious opposite on the other one).
You can do more than that, you can make it so when a Player has started/Song is playing to make a skin appear, or run something else, just play around.
zBobo
Posts: 12
Joined: November 16th, 2019, 5:07 pm

Re: Change wallpaper when music starts

zBobo » November 16th, 2019, 6:00 pm

more precisely, i wold like to make a gif appear on my screen when i play music from a music player, can i have an example to do this?. i have 0 skills with rainmeter but i can try.
User avatar
Jeff
Posts: 92
Joined: September 3rd, 2018, 11:18 am

Re: Change wallpaper when music starts

Jeff » November 16th, 2019, 7:04 pm

Code: Select all

[NPMeasure]
Measure=NowPlaying
PlayerName= ||| CHECK https://docs.rainmeter.net/manual/measures/nowplaying/#playerlist |||
PlayerType=State
IfCondition=NPMeasure = 1
IfTrueAction=[!UnPauseMeasure ImageNumberCalc][!SetOption ImageNumberCalc Hidden 0]
IfFalseAction=[!PauseMeasure ImageNumberCalc][!SetOption ImageNumberCalc Hidden 1]

[ImageNumberCalc]
Measure=Calc
Formula=Counter % ||| NUMBER |||

[ImageMeter]
Meter=Image
MeasureName=ImageNumberCalc
AntiAlias=1
Follow this guide for how to make gifs in Rainmeter, with the way I made this, the filename of the extracted frames should be something like 1.png, 2.png, 3.png... but however you can change it how you want. The obvious parts I noted are with |||, just choose the player you have and replace it there, if you however want to use something like YouTube, Soundcloud or Spotify, check WebNowPlaying plugin.
User avatar
balala
Rainmeter Sage
Posts: 9258
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Change wallpaper when music starts

balala » November 16th, 2019, 7:05 pm

zBobo wrote:
November 16th, 2019, 6:00 pm
more precisely, i wold like to make a gif appear on my screen when i play music from a music player, can i have an example to do this?.
Do you want to show always the same animation, or there are more animations and you'd like to show one depending on the played music? Because if one single animation is needed to be played, it's a little bit easier, because although Rainmeter can't handle animated GIFs, the frames of the animation can be extracted and used to show the animeation into Rainmeter. But if the animation varies, you have to always extract the frames and use them when you want to show the animetion. There is a procedure to extract those frames, using the gif2frames utility.
So, first please let us know what is your intention: one single animation should be shown, or different ones?
zBobo
Posts: 12
Joined: November 16th, 2019, 5:07 pm

Re: Change wallpaper when music starts

zBobo » November 16th, 2019, 7:12 pm

one single animation
zBobo
Posts: 12
Joined: November 16th, 2019, 5:07 pm

Re: Change wallpaper when music starts

zBobo » November 16th, 2019, 7:16 pm

@jeff thank you, what do i have to replace in ||NUMBER|| ?
User avatar
Jeff
Posts: 92
Joined: September 3rd, 2018, 11:18 am

Re: Change wallpaper when music starts

Jeff » November 16th, 2019, 7:40 pm

zBobo wrote:
November 16th, 2019, 7:16 pm
@jeff thank you, what do i have to replace in ||NUMBER|| ?
Number of extracted frames from what is told on the manual or what you extracted from the tool balala provided
It should have been obvious from the gif guide I sent lol
User avatar
balala
Rainmeter Sage
Posts: 9258
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Change wallpaper when music starts

balala » November 16th, 2019, 7:47 pm

Jeff wrote:
November 16th, 2019, 7:40 pm
Number of extracted frames from what is told on the manual or what you extracted from the tool balala provided
Yes, but unfortunately that's not so simple, because beside adding the appropriate number, zBobo should have to tell the [ImageMeter] meter where it finds the images.

zBobo, first how many frames do you have? What are their names?
User avatar
Jeff
Posts: 92
Joined: September 3rd, 2018, 11:18 am

Re: Change wallpaper when music starts

Jeff » November 16th, 2019, 7:51 pm

balala wrote:
November 16th, 2019, 7:47 pm
zBobo should have to tell the [ImageMeter] meter where it finds the images
ImagePath, the Image Meter has %1.png as it's default value, that's why I made it this way and not using DynamicVariables (all my homies hate DynamicVariables)
However, you can continue from here onward using your method or the one suggested on the Rainmeter guide, it's no problem since either of them will work