It is currently April 24th, 2024, 6:33 pm

Wallpaper changing with music

Get help with creating, editing & fixing problems with skins
yeh_
Posts: 5
Joined: February 24th, 2019, 12:05 am

Wallpaper changing with music

Post by yeh_ »

Last time I posted here I needed help with setting the Monstercat visualizer to change my desktop background so it fits the song genre. Now I would like it to change to each song individually.

My question is, is there a way to do it? I don't want it to set my screen to cover arts because they're square and small. In my mp3 tag editor, there's a variety of types of cover arts I could set mine to (like front cover, back cover, other, etc.) but I don't know how many of them Rainmeter can recognize.

Ideally, it would either be that or selecting the wallpaper from another folder where all are named "[Artist] - [Song]" and it would somehow pick the right wallpaper basing on this information. Without having to manually put every file name in the code.


I'm not expecting ready solutions (unless it's easy) but if you could guide me a little as in what would work in Rainmeter that would be very appreciated. Thank you!!!
User avatar
balala
Rainmeter Sage
Posts: 16167
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Wallpaper changing with music

Post by balala »

yeh_ wrote: March 4th, 2019, 5:59 pm Ideally, it would either be that or selecting the wallpaper from another folder where all are named "[Artist] - [Song]" and it would somehow pick the right wallpaper basing on this information. Without having to manually put every file name in the code.
First you need two NowPlaying measure, returning one the artist and the other the title:

Code: Select all

[Song]
Measure=NowPlaying
PlayerName=...
PlayerType=TITLE

[Artist]
Measure=NowPlaying
PlayerName=[Song]
PlayerType=ARTIST
Now you can add an OnChangeAction option to the [Song] measure, to change the wallpaper every time the title is changing. Add the following option to the mentioned [Song] measure: OnChangeAction=[!SetWallpaper "#@#[Artist] - [Song].jpg"]. In order this to work, make sure that:
  • You've added the appropriate player name to the PlayerName option of the [Song] measure.
  • You've added a DynamicVariables=1 option to the measure where you're adding the above OnChangeAction option ([Song]).
  • The appropriate wallpapers are stored into the @Resources folder (or obviously if they are stored elsewhere, change the above path accordingly).
  • The wallpapers have the .jpg format (or again change the above option accordingly).
  • If needed, you can add a second parameter to the !above SetWallpaper bang, which can be either Center, Tile, Stretch, Fit or Fill.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Wallpaper changing with music

Post by jsmorley »

Right...

Code: Select all

[mArtist]
Measure=NowPlaying
PlayerName=Winamp
PlayerType=ARTIST
Substitute="":"N\A"

[mAlbum]
Measure=NowPlaying
PlayerName=[mArtist]
PlayerType=ALBUM
Substitute="":"N\A"

[mSong]
Measure=NowPlaying
PlayerName=[mArtist]
PlayerType=TITLE
Substitute="":"N\A"
OnChangeAction=[!SetWallpaper "#@#Images\[mArtist]-[mAlbum]-[mSong].jpg" Center]


And the files are stored like this:
C:\Users\Jeffrey\Documents\Rainmeter\Skins\@Working\@Resources\Images\Beatles-Help!-Help!.jpg

My biggest concern with this is that album / song art that is downloaded by your MP3 player is generally going to be no larger than 500X500 or so, and the size will wildly vary, so setting your desktop wallpaper to a small image, and either centering it or stretching it to fit, is going to look weird in my view.

Unless you have a nice, full-screen sized image for every song you will ever play, I'm not sure this is practical. I have 6,403 songs in my Music folder in Windows, I assure you I'm not going out to find 6,403 1920 X 1080 images and renaming them.

My other issue with this is that you are going to have to define some wallpaper to be selected when there is no song playing in the player. Something like "N\A-N\A-N\A.jpg".
User avatar
balala
Rainmeter Sage
Posts: 16167
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Wallpaper changing with music

Post by balala »

jsmorley wrote: March 4th, 2019, 6:33 pm Unless you have a nice, full-screen sized image for every song you will ever play, I'm not sure this is practical. I have 6,403 songs in my Music folder in Windows, I assure you I'm not going out to find 6,403 1920 X 1080 images and renaming them.
Agree. Probably not too practical, however this is how I have understood yeh_'s request. However is true that if there are many mp3s (thousands, as you said), it can become uncomfortable to store all needed wallpapers...
yeh_
Posts: 5
Joined: February 24th, 2019, 12:05 am

Re: Wallpaper changing with music

Post by yeh_ »

jsmorley wrote: March 4th, 2019, 6:33 pm Unless you have a nice, full-screen sized image for every song you will ever play, I'm not sure this is practical. I have 6,403 songs in my Music folder in Windows, I assure you I'm not going out to find 6,403 1920 X 1080 images and renaming them.

My other issue with this is that you are going to have to define some wallpaper to be selected when there is no song playing in the player. Something like "N\A-N\A-N\A.jpg".
I have much fewer songs than you do, haha. It's something I'm willing to do just for the sake of trying it.

Will my default wallpaper not show up when no song is playing?



I'm going to try your suggestions out, thanks a lot to you and Balala for helping!
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Wallpaper changing with music

Post by jsmorley »

yeh_ wrote: March 4th, 2019, 6:59 pm Will my default wallpaper not show up when no song is playing?

Once you set a wallpaper with !SetWallpaper, that IS the "default" wallpaper.
yeh_
Posts: 5
Joined: February 24th, 2019, 12:05 am

Re: Wallpaper changing with music

Post by yeh_ »

It works! Thanks a lot to both of you for your help, there should be more people like you in the world :)
User avatar
balala
Rainmeter Sage
Posts: 16167
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Wallpaper changing with music

Post by balala »

:thumbup: