It is currently March 28th, 2024, 3:19 pm

Changing Visualizer Layer (Layer Effect) based on song artist

Get help with creating, editing & fixing problems with skins
Post Reply
Pulp4953
Posts: 2
Joined: September 1st, 2022, 1:03 pm

Changing Visualizer Layer (Layer Effect) based on song artist

Post by Pulp4953 »

So, I'm really new to tinkering with Rainmeter and so far, (with the help of posts here), change the wallpaper based on who is the artist of the song that is currently playing.

Code: Select all

[Rainmeter]
Update=1000

[measure]
Measure=Plugin
PlayerName=CAD
PlayerType=ARTIST
Plugin=NowPlaying
IfMatch=xArtist
IfMatchAction=[!SetWallpaper "#@#xArtist.jpg" Fit][!Update]
IfMatch2=yArtist
IfMatchAction2=[!SetWallpaper "#@#yArtist.jpg" Fit][!Update]
IfMatch3=zArtist
IfMatchAction3=[!SetWallpaper "#@#zArtist.png" Fit][!Update]

[render]
Meter=image
SolidColor=0,0,0,0
X=0
Y=0
But I also do have a visualization layer (a PNG file to layer visualizer skin to the wallpaper) and I can't seem to accomplish so that it also changes together with the wallpaper based on the song's artist. Here's what I accomplished so far.

Code: Select all

[Rainmeter]
Update=1000

[Variables]
ImageSet=#@#Default.png

[ReWall]
Meter=Image
ImageName=ImageSet
W=1920
H=1080
Tile=0
PreserveAspectRatio=0

[measure]
Measure=Plugin
PlayerName=CAD
PlayerType=ARTIST
Plugin=NowPlaying
IfMatch=xArtist
IfMatchAction=[!SetVariable "ImageSet" "#@#cutout.png"][!UpdateMeter]
IfMatch2=yArtist
IfMatchAction2=[!SetVariable "ImageSet" "#@#004.png"][!UpdateMeter]
IfMatch3=zArtist
IfMatchAction3=[!SetVariable "ImageSet" "#@#cutout.png"][!UpdateMeter]

[ReWallChanged]
Meter=Image
ImageName=ImageSet
W=1920
H=1080
Tile=0
PreserveAspectRatio=0
Also here's the inspiration vid : https://www.youtube.com/watch?v=05TQESLydE0

So, yeah... I need some help and any response will be appreciated. I also attached the zip file of the skin that I'm working on. Thank you in advance! :rosegift:
Attachments
VisualizerLayer.zip
(6.54 MiB) Downloaded 5 times
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Changing Visualizer Layer (Layer Effect) based on song artist

Post by ikarus1969 »

In your visualization layer skin you should adapt your measure measure. Change each [!UpdateMeter] to [!UpdateMeter "ReWallChanged"][!Redraw] and the image should reflect the artist.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Changing Visualizer Layer (Layer Effect) based on song artist

Post by balala »

Pulp4953 wrote: September 1st, 2022, 1:25 pm So, yeah... I need some help and any response will be appreciated.
Take into account ikarus1969's idea as well, however what is mistaken in your code is how are you using the ImageSet variable into to the [ReWallChanged] meter. You set the values of this variable with the !SetVariables bangs in the IfMatchActionX options of the [measure] measure, however you're not using this variable anywhere. I say this because the ImageName=ImageSet option used in the [ReWallChanged] meter does nothing, it doesn't use the value of the ImageSet variable. The option should be ImageName=#ImageSet#, this way the meter will use the value set to the variable. But this requires one more option to be added to the meter: the DynamicVariables=1. Add it as well:

Code: Select all

...

[ReWallChanged]
Meter=Image
ImageName=#ImageSet#
W=1920
H=1080
Tile=0
PreserveAspectRatio=0
DynamicVariables=1
Additional note: when you're setting a wallpaper, there is no need to update the skin which sets the wallpaper. I'd tend to remove the [!Update] bangs from the IfMatchActionX options of the [measure] measure of your first code.
Pulp4953
Posts: 2
Joined: September 1st, 2022, 1:03 pm

Re: Changing Visualizer Layer (Layer Effect) based on song artist

Post by Pulp4953 »

Thank you for the insight; it now operates flawlessly! And for the [!Update], after I removed it, the wallpaper changes flawlessly, before I need to refresh all on rainmeter app for it to work. so yeah... thank you for the insights again :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Changing Visualizer Layer (Layer Effect) based on song artist

Post by balala »

Pulp4953 wrote: September 2nd, 2022, 1:05 pm Thank you for the insight; it now operates flawlessly! And for the [!Update], after I removed it, the wallpaper changes flawlessly, before I need to refresh all on rainmeter app for it to work. so yeah... thank you for the insights again :thumbup:
Glad to help.
Post Reply