It is currently May 1st, 2024, 7:33 pm

Mond skin - Adding Spotify album cover to player

Get help with creating, editing & fixing problems with skins
kiyeon
Posts: 4
Joined: April 18th, 2024, 10:47 pm

Mond skin - Adding Spotify album cover to player

Post by kiyeon »

Hi all,

I managed to make the mond player compatible with the Spotify Desktop Player with Spicetify and version 1.2.0 of WebNowPlaying. Everything is running with no problems but I also would like to further customize and add the album cover next to the song title. I'm really new to rainmeter and I was wondering if this was possible to do, thanks!
User avatar
balala
Rainmeter Sage
Posts: 16193
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mond skin - Adding Spotify album cover to player

Post by balala »

kiyeon wrote: April 18th, 2024, 10:53 pm I managed to make the mond player compatible with the Spotify Desktop Player with Spicetify and version 1.2.0 of WebNowPlaying. Everything is running with no problems but I also would like to further customize and add the album cover next to the song title. I'm really new to rainmeter and I was wondering if this was possible to do, thanks!
Most probably it is, but to can help you you should help us for first, for instance by a code of your skin. I understand you're using the Mond package, but I assume the original code has been altered in some way, so we have no idea how is it looking like. So post it, please.
kiyeon
Posts: 4
Joined: April 18th, 2024, 10:47 pm

Re: Mond skin - Adding Spotify album cover to player

Post by kiyeon »

balala wrote: April 19th, 2024, 6:41 pm Most probably it is, but to can help you you should help us for first, for instance by a code of your skin. I understand you're using the Mond package, but I assume the original code has been altered in some way, so we have no idea how is it looking like. So post it, please.
Yeah for sure, heres the code I have in "PlayerSpotify' in the player folder

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]

[Variables]
@include=#@#Variables.inc
Scale=2.1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""

[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""

[MeasureAlbum]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ALBUM
Substitue="":""

[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=PROGRESS

[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=DURATION

[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=POSITION

[MeasureStateButton]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"

[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(15*#Scale#)
Text="%1"
AntiAlias=1

[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Center
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(95*#Scale#)
Y=(8*#Scale#)r
Text="%1"
AntiAlias=1

[MeterPosition]
Meter=String
MeasureName=MeasurePosition
StringAlign=Center
FontFace=Quicksand
FontColor=#TextColor#
FontSize=(4*#Scale#)
X=(10*#Scale#)
Y=(2.5*#Scale#)
AntiAlias=1

[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=Quicksand
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(185*#Scale#)
Y=(2.5*#Scale#)
AntiAlias=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterBar]
Meter=Shape
X=(23*#Scale#)
Y=(5*#Scale#)
Shape=Rectangle 0,0,(150*#Scale#),(1*#Scale#),0 | Fill Color #TextColor#,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.5*#Scale#),(1*#Scale#),0 | Fill Color #TextColor# | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(1.2*#Scale#) |Fill Color #TextColor# | StrokeWidth 0
Shape4=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(3.4*#Scale#) |Fill Color #TextColor#,50 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterPrevious]
Meter=Image
ImageName=#@#Previous.png
X=(69*#Scale#)
Y=(35*#Scale#)
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Previous"]

[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
SolidColor=0,0,0,1
ImageTint=#Color2#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]

[MeterNext]
Meter=Image
ImageName=#@#Next.png
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Next"]
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Mond skin - Adding Spotify album cover to player

Post by Yincognito »

kiyeon wrote: April 18th, 2024, 10:53 pm Hi all,

I managed to make the mond player compatible with the Spotify Desktop Player with Spicetify and version 1.2.0 of WebNowPlaying. Everything is running with no problems but I also would like to further customize and add the album cover next to the song title. I'm really new to rainmeter and I was wondering if this was possible to do, thanks!
It should be possible. Use PlayerType=Cover in a new WebNowPlaying measure, depending on your needs, to get the path to the cover image:
https://wnp.keifufu.dev/rainmeter/usage
then use an Image meter with its MeasureName set to the newly created WebNowPlaying measure, to display the image located at that path:
https://docs.rainmeter.net/manual/meters/image/

The approach for cover art web addresses (instead of local paths) might be slightly different in terms of the PlayerType value and could involve using a Download=1 in a suited WebParser measure:
https://docs.rainmeter.net/manual/measures/webparser/#Download

Not entirely sure, but the sample skin from the WebNowPlaying release might already have a minimal example of displaying the cover art:
https://forum.rainmeter.net/viewtopic.php?t=26619
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16193
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mond skin - Adding Spotify album cover to player

Post by balala »

kiyeon wrote: April 19th, 2024, 6:45 pm Yeah for sure, heres the code I have in "PlayerSpotify' in the player folder
To be little bit more specific than Yincognito, add the following measure to your code:

Code: Select all

[MeasureCover]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=COVER
This measure is returning the path to the cover art.
Add an Image meter, to can get visible the cover. For instance this one:

Code: Select all

[MeterCover]
Meter=Image
MeasureName=MeasureCover
SolidColor=0,0,0,1
X=0
Y=0
W=200
H=200
PreserveAspectRatio=1
Obviously you have to adapt the above code, according to your needs. For example:
  • Place it to the proper / desired position, by altering the X and Y values.
  • Resize the image as you want, by the W (width) and H (height) options. Note here that the added PreserveAspectRatio=1 option ensures you that the image is not distorted.
Could you get this working?
kiyeon
Posts: 4
Joined: April 18th, 2024, 10:47 pm

Re: Mond skin - Adding Spotify album cover to player

Post by kiyeon »

balala wrote: April 19th, 2024, 7:26 pm To be little bit more specific than Yincognito, add the following measure to your code:

Code: Select all

[MeasureCover]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=COVER
This measure is returning the path to the cover art.
Add an Image meter, to can get visible the cover. For instance this one:

Code: Select all

[MeterCover]
Meter=Image
MeasureName=MeasureCover
SolidColor=0,0,0,1
X=0
Y=0
W=200
H=200
PreserveAspectRatio=1
Obviously you have to adapt the above code, according to your needs. For example:
  • Place it to the proper / desired position, by altering the X and Y values.
  • Resize the image as you want, by the W (width) and H (height) options. Note here that the added PreserveAspectRatio=1 option ensures you that the image is not distorted.
Could you get this working?
Sorry for taking a bit to get back to you; got busy with life haha. This worked perfectly thank you so much for your help and @Yincognito as well. :)
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Mond skin - Adding Spotify album cover to player

Post by Yincognito »

kiyeon wrote: April 23rd, 2024, 2:20 am Sorry for taking a bit to get back to you; got busy with life haha. This worked perfectly thank you so much for your help and @Yincognito as well. :)
You're welcome - we're glad to help. :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
kiyeon
Posts: 4
Joined: April 18th, 2024, 10:47 pm

Re: Mond skin - Adding Spotify album cover to player

Post by kiyeon »

Yincognito wrote: April 23rd, 2024, 11:58 am You're welcome - we're glad to help. :great:
If I could get help with one more thing I would really appreciate it. I want to add a smooth scrolling effect to song titles/artists if they are too long/exceed a maximum width size, like in the clearskin skin. I tried to use the latest ver. (6.0 )of clearskin (https://github.com/redsaph/cleartext/releases/tag/6.0), but with my very limited rainmeter coding knowledge I just gave myself a headache and lost many hours of my life instead :handtohead: realized that sometimes you just gotta get help from the experts instead

Here is my updated spotify player code for reference:

Code: Select all

[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1

[Variables]
@include=#@#Variables.inc
Scale=2.1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureCover]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=COVER

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""

[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""

[MeasureAlbum]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ALBUM
Substitue="":""

[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=PROGRESS

[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=DURATION

[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=POSITION

[MeasureStateButton]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"

[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Left
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(6*#Scale#)
X=(55*#Scale#)
Y=(15*#Scale#)
W=0
H=0
Text="%1"
AntiAlias=1
Container=MeterTextContainer

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Left
StringCase=Upper
FontFace=Aquatico
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(55*#Scale#)
Y=(10*#Scale#)r
Text="%1"
AntiAlias=1

[MeterPosition]
Meter=String
MeasureName=MeasurePosition
StringAlign=Left
FontFace=Quicksand
FontColor=#TextColor#
FontSize=(4*#Scale#)
X=(10*#Scale#)
Y=(62.5*#Scale#)
AntiAlias=1

[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=Quicksand
FontColor=#Color1#
FontSize=(4*#Scale#)
X=(185*#Scale#)
Y=(62.5*#Scale#)
AntiAlias=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterBar]
Meter=Shape
X=(23*#Scale#)
Y=(65*#Scale#)
Shape=Rectangle 0,0,(150*#Scale#),(1*#Scale#),0 | Fill Color #TextColor#,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.5*#Scale#),(1*#Scale#),0 | Fill Color #TextColor# | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(1.2*#Scale#) |Fill Color #TextColor# | StrokeWidth 0
Shape4=Ellipse ([MeasureProgress]*1.5*#Scale#),(0.5*#Scale#),(3.4*#Scale#) |Fill Color #TextColor#,50 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterPrevious]
Meter=Image
ImageName=#@#Previous.png
X=(69*#Scale#)
Y=(75*#Scale#)
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Previous"]

[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
SolidColor=0,0,0,1
ImageTint=#Color2#
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]

[MeterNext]
Meter=Image
ImageName=#@#Next.png
X=(20*#Scale#)r
Y=(0*#Scale#)r
W=(13*#Scale#)
AntiAlias=1
ImageTint=#Color2#
SolidColor=0,0,0,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Next"]

[MeterCover]
Meter=Image
MeasureName=MeasureCover
SolidColor=0,0,0,1
X=0
Y=25
W=100
H=100
PreserveAspectRatio=1
I've been reading old threads on this problem and came across threads that you and balala have been helping in. you guys have been helping so many members since years back it's kinda insane! so thank you once again for all your help to community members over the years :rosegift:
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Mond skin - Adding Spotify album cover to player

Post by Yincognito »

kiyeon wrote: April 23rd, 2024, 2:42 pm If I could get help with one more thing I would really appreciate it. I want to add a smooth scrolling effect to song titles/artists if they are too long/exceed a maximum width size, like in the clearskin skin. I tried to use the latest ver. (6.0 )of clearskin (https://github.com/redsaph/cleartext/releases/tag/6.0), but with my very limited rainmeter coding knowledge I just gave myself a headache and lost many hours of my life instead :handtohead: realized that sometimes you just gotta get help from the experts instead

I've been reading old threads on this problem and came across threads that you and balala have been helping in. you guys have been helping so many members since years back it's kinda insane! so thank you once again for all your help to community members over the years :rosegift:
Well, even us have to spend time on these things, so at times, if the matter was already discussed and reasonable results have already been achieved, we try to not reinvent the wheel every time a similar objective is mentioned, by providing some useful links, like this one:
https://forum.rainmeter.net/viewtopic.php?t=31790

There, the structure is already build on a basic level, you could even leave only the 1st marquee related code to make it more compact and to understand it better. Once you do, you only need to apply it to your code, by copy pasting the measures doing the work, using similar variables as the X position in the desired meters, and obviously adjusting various section or variable names correspodingly. If after trying - at least on a rudimentar level, to see something happening - you still can't manage it, further help could be provided. Remember, "porting" something from one skin to another is not about copy pasting everything, but about "cherry picking" and copy pasting / adjusting only what you need.

Personally, I'm also a bit busy these days so I can't guarantee immediate assistance, but you might be able to get the idea. For the record, it's only about altering the "X" position of the meters displaying the desired texts, via an ActionTimer plugin animation, and also "masking" / "hiding" the undesired parts of the marquee via a container meter:
https://docs.rainmeter.net/manual/plugins/actiontimer/
https://docs.rainmeter.net/manual/meters/general-options/container/
It might seem complicated at first, but if you simplify the problem, it really isn't. Once you get one thing understood and working, the rest can follow. ;-)
Here are 2 other variations of the above example that I adjusted to help folks with similar objectives over time:

Code: Select all

[Variables]
Player=Winamp
AnimationSpeed=32
Wait=1500
ArtistX=0
TitleX=0

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
OnRefreshAction=[!CommandMeasure Marquee "Stop 1"][!CommandMeasure Marquee "Stop 2"][!CommandMeasure Marquee "Execute 1"][!CommandMeasure Marquee "Execute 2"]
MiddleMouseUpAction=[!Refresh]

---Measures---

[ArtistTextOffset]
Group=Marquee
Measure=Calc
Formula=(Max(0,([ArtistText:W]-[Container:W])))
DynamicVariables=1

[TitleTextOffset]
Group=Marquee
Measure=Calc
Formula=(Max(0,([TitleText:W]-[Container:W])))
DynamicVariables=1

[Marquee]
Group=Marquee
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat MoveArtist,#AnimationSpeed#,[ArtistTextOffset:] | Wait #Wait# | ResetArtist | Wait #Wait# | DoOverArtist | Wait #Wait#
ResetArtist=[!SetVariable ArtistX 0][!UpdateMeasure Marquee][!UpdateMeter ArtistText][!Redraw]
MoveArtist=[!SetVariable ArtistX (#ArtistX#-1)][!UpdateMeasure Marquee][!UpdateMeter ArtistText][!Redraw]
DoOverArtist=[!CommandMeasure Marquee "Stop 1"][!CommandMeasure Marquee "Execute 1"]
ActionList2=Repeat MoveTitle,#AnimationSpeed#,[TitleTextOffset:] | Wait #Wait# | ResetTitle | Wait #Wait# | DoOverTitle | Wait #Wait#
ResetTitle=[!SetVariable TitleX 0][!UpdateMeasure Marquee][!UpdateMeter TitleText][!Redraw]
MoveTitle=[!SetVariable TitleX (#TitleX#-1)][!UpdateMeasure Marquee][!UpdateMeter TitleText][!Redraw]
DoOverTitle=[!CommandMeasure Marquee "Stop 2"][!CommandMeasure Marquee "Execute 2"]
DynamicVariables=1

[Artist]
Measure=NowPlaying
PlayerName=#Player#
PlayerType=Artist
OnChangeAction=[!SetVariable ArtistX 0][!SetVariable TitleX 0][!UpdateMeterGroup Marquee][!Redraw][!UpdateMeasureGroup Marquee][!CommandMeasure Marquee "Stop 1"][!CommandMeasure Marquee "Stop 2"][!CommandMeasure Marquee "Execute 1"][!CommandMeasure Marquee "Execute 2"]
DynamicVariables=1

[Title]
Measure=NowPlaying
PlayerName=[Artist]
PlayerType=Title
OnChangeAction=[!SetVariable ArtistX 0][!SetVariable TitleX 0][!UpdateMeterGroup Marquee][!Redraw][!UpdateMeasureGroup Marquee][!CommandMeasure Marquee "Stop 1"][!CommandMeasure Marquee "Stop 2"][!CommandMeasure Marquee "Execute 1"][!CommandMeasure Marquee "Execute 2"]
DynamicVariables=1

---Styles---

[Text]
FontFace=Calibri
FontColor=230,230,230
FontSize=15
FontWeight=600
X=0r
Y=0R
AntiAlias=1
DynamicVariables=1

---Meters---

[Background]
Meter=Shape
Shape=Rectangle 1,1,246,84,6 | StrokeWidth 2 | Stroke Color 50,50,50 | Fill Color 15,15,15

[ArtistLabel]
Meter=String
MeterStyle=Text
X=16
Y=16
Text=Artist

[TitleLabel]
Meter=String
MeterStyle=Text
Text=Title

[Container]
Meter=Image
X=82
Y=16
W=150
H=76
SolidColor=255,255,255,255

[ArtistText]
Group=Marquee
Container=Container
Meter=String
MeterStyle=Text
X=#ArtistX#
Y=0r
MeasureName=Artist
Text=%1

[TitleText]
Group=Marquee
Container=Container
Meter=String
MeterStyle=Text
X=#TitleX#
MeasureName=Title
Text=%1

Code: Select all

[Variables]
PlayerName=Winamp
FontName=Segoe UI
FontColor=255,255,255,255
AnimationSpeed=25
TrackStep=1
ArtistStep=1
AlbumStep=1

[Rainmeter]
Update=#AnimationSpeed#

---Measures---

[MeasureTrack]
Group=Infos
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PlayerName#
PlayerType=Title
Substitute="":""
; If using the parent - child measure model for NowPlaying below (i.e. PlayerName=[ParentMeasure]), actions should be taken on entire groups in this parent measure
; If using the individual measure model for NowPlaying below (i.e. PlayerName=#PlayerVariable#), actions must be taken on individual sections in the measures below
OnChangeAction=[!SetVariable TrackStep 1][!SetVariable ArtistStep 1][!SetVariable AlbumStep 1][!DisableMeasureGroup Positions][!UpdateMeasureGroup Positions][!UpdateMeterGroup Marquees][!Redraw][!EnableMeasureGroup Positions]

[MeasureArtist]
Group=Infos
Measure=Plugin
Plugin=NowPlaying
PlayerName=[MeasureTrack]
PlayerType=Artist
Substitute="":""

[MeasureAlbum]
Group=Infos
Measure=Plugin
Plugin=NowPlaying
PlayerName=[MeasureTrack]
PlayerType=Album
Substitute="":""

; To temporarily stop text movement at the time of minimal and maximal positioning or inverting the step in the IfTrueAction:
; - Reset Pos Variant: [!PauseMeasure ...][!Delay ...][!UnpauseMeasure ...][!DisableMeasure ...][!UpdateMeasure ...][!PauseMeasure ...][!Delay ...][!UnpauseMeasure ...][!EnableMeasure ...]
; - Ping Pong Variant: [!PauseMeasure ...][!Delay ...][!UnpauseMeasure ...][!SetVariable ... (-...)]
; - Perpetual Variant: is supposed to move forever, but pausing and unpausing the relevant measures can still be used in the mouse actions from a meter

[TrackX]
Group=Positions
Measure=Calc
; Formula - Reset Pos Variant: Formula=([M_Track:W]-[Container:W]>0?TrackX+#TrackStep#:TrackX)
; Formula - Ping Pong Variant: Formula=([M_Track:W]-[Container:W]>0?TrackX+#TrackStep#:TrackX)
; Formula - Perpetual Variant: Formula=([M_Track:W]-[Container:W]>0?TrackX+#TrackStep#:[Container:W])
; IfCondition - Reset Pos Variant: IfCondition=(TrackX<0)||(TrackX>[M_Track:W]-[Container:W])
; IfCondition - Ping Pong Variant: IfCondition=(TrackX<0)||(TrackX>[M_Track:W]-[Container:W])
; IfCondition - Perpetual Variant: IfCondition=(TrackX<0)||(TrackX>[M_Track:W]+[Container:W])
; IfTrueAction - Reset Pos Variant: IfTrueAction=[!DisableMeasure TrackX][!UpdateMeasure TrackX][!EnableMeasure TrackX]
; IfTrueAction - Ping Pong Variant: IfTrueAction=[!SetVariable TrackStep (-#TrackStep#)]
; IfTrueAction - Perpetual Variant: IfTrueAction=[!DisableMeasure TrackX][!UpdateMeasure TrackX][!EnableMeasure TrackX]
IfConditionMode=1
DynamicVariables=1

[ArtistX]
Group=Positions
Measure=Calc
; Formula - Reset Pos Variant: Formula=([M_Artist:W]-[Container:W]>0?ArtistX+#ArtistStep#:ArtistX)
; Formula - Ping Pong Variant: Formula=([M_Artist:W]-[Container:W]>0?ArtistX+#ArtistStep#:ArtistX)
; Formula - Perpetual Variant: Formula=([M_Artist:W]-[Container:W]>0?ArtistX+#ArtistStep#:[Container:W])
; IfCondition - Reset Pos Variant: IfCondition=(ArtistX<0)||(ArtistX>[M_Artist:W]-[Container:W])
; IfCondition - Ping Pong Variant: IfCondition=(ArtistX<0)||(ArtistX>[M_Artist:W]-[Container:W])
; IfCondition - Perpetual Variant: IfCondition=(ArtistX<0)||(ArtistX>[M_Artist:W]+[Container:W])
; IfTrueAction - Reset Pos Variant: IfTrueAction=[!DisableMeasure ArtistX][!UpdateMeasure ArtistX][!EnableMeasure ArtistX]
; IfTrueAction - Ping Pong Variant: IfTrueAction=[!SetVariable ArtistStep (-#ArtistStep#)]
; IfTrueAction - Perpetual Variant: IfTrueAction=[!DisableMeasure ArtistX][!UpdateMeasure ArtistX][!EnableMeasure ArtistX]
IfConditionMode=1
DynamicVariables=1

[AlbumX]
Group=Positions
Measure=Calc
; Formula - Reset Pos Variant: Formula=([M_Album:W]-[Container:W]>0?AlbumX+#AlbumStep#:AlbumX)
; Formula - Ping Pong Variant: Formula=([M_Album:W]-[Container:W]>0?AlbumX+#AlbumStep#:AlbumX)
; Formula - Perpetual Variant: Formula=([M_Album:W]-[Container:W]>0?AlbumX+#AlbumStep#:[Container:W])
; IfCondition - Reset Pos Variant: IfCondition=(AlbumX<0)||(AlbumX>[M_Album:W]-[Container:W])
; IfCondition - Ping Pong Variant: IfCondition=(AlbumX<0)||(AlbumX>[M_Album:W]-[Container:W])
; IfCondition - Perpetual Variant: IfCondition=(AlbumX<0)||(AlbumX>[M_Album:W]+[Container:W])
; IfTrueAction - Reset Pos Variant: IfTrueAction=[!DisableMeasure AlbumX][!UpdateMeasure AlbumX][!EnableMeasure AlbumX]
; IfTrueAction - Ping Pong Variant: IfTrueAction=[!SetVariable AlbumStep (-#AlbumStep#)]
; IfTrueAction - Perpetual Variant: IfTrueAction=[!DisableMeasure AlbumX][!UpdateMeasure AlbumX][!EnableMeasure AlbumX]
IfConditionMode=1
DynamicVariables=1

---Meters---

[M_Shape]
Meter=Shape
Shape=Rectangle 2,2,394,75,2 | Fill Color 0,0,0,128 | StrokeWidth 1 | Stroke Color 255,255,255,255

[Container]
Meter=Image
X=172
W=50
H=75
SolidColor=255,255,255,255
DynamicVariables=1

[M_TRACK]
Group=Marquees
Meter=String
MeasureName=MeasureTrack
; Reset Pos Variant: X=(-[TrackX])
; Ping Pong Variant: X=(-[TrackX])
; Perpetual Variant: X=([Container:W]-[TrackX])
Y=1
FontFace=#FONTNAME#
FontColor=#FONTCOLOR#
FontSize=13
Text=%1
Container=Container
AntiAlias=1
DynamicVariables=1

[M_ARTIST]
Group=Marquees
Meter=String
MeasureName=MeasureArtist
; Reset Pos Variant: X=(-[ArtistX])
; Ping Pong Variant: X=(-[ArtistX])
; Perpetual Variant: X=([Container:W]-[ArtistX])
Y=20r
FontFace=#FONTNAME#
FontColor=#FONTCOLOR#
FontSize=12
Text=%1
TooltipText=%1
Container=Container
AntiAlias=1
DynamicVariables=1

[M_ALBUM]
Group=Marquees
Meter=String
MeasureName=MeasureAlbum
; Reset Pos Variant: X=(-[AlbumX])
; Ping Pong Variant: X=(-[AlbumX])
; Perpetual Variant: X=([Container:W]-[AlbumX])
Y=20r
FontFace=#FONTNAME#
FontColor=#FONTCOLOR#
FontSize=12
Text=%1
Container=Container
AntiAlias=1
DynamicVariables=1
The 1st variation above works right away, for the 2nd you'd have to uncomment the code for the desired behavior. Both use Winamp as the player and NowPlaying as the plugin / measure, since that's what I use myself, but adapting to WebNowPlaying and Spotify should be trivial. By the way, the Player skin from my MYiniMeter suite also uses endless scrolling for the artist, duration and track info, but that might be too complicated for you and from what you mentioned it seems you're interested in some kind of "ping-pong" behavior.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16193
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mond skin - Adding Spotify album cover to player

Post by balala »

kiyeon wrote: April 23rd, 2024, 2:20 am This worked perfectly thank you so much for your help
You're welcome as well from my part.
kiyeon wrote: April 23rd, 2024, 2:42 pm If I could get help with one more thing I would really appreciate it.
Is Yincognito's above solution good for your needs? I'm sure it is...
kiyeon wrote: April 23rd, 2024, 2:42 pm I've been reading old threads on this problem and came across threads that you and balala have been helping in. you guys have been helping so many members since years back it's kinda insane! so thank you once again for all your help to community members over the years :rosegift:
Don't worry we're doing it with many pleasure (me personally at least for sure, but I think I can talk in Yincognito's name as well). Glad to help when can.