I'm building a media player skin and would like for it to scroll the lyrics to the current track playing, Is there Lua code for getting lyrics to scroll in a media player skin, and since I'm asking, is there any Lua code to get the number of tracks in said music folder?
And if I may point out, I believe this question would be best answered by JSMorley.
Thank you.
It is currently April 26th, 2024, 8:21 pm
Is there lua code for getting lyrics to scroll in a media player skin?
-
- Posts: 65
- Joined: November 14th, 2020, 2:36 pm
- Location: Washington DC
Is there lua code for getting lyrics to scroll in a media player skin?
You do not have the required permissions to view the files attached to this post.
Someone said, "Your thinking too much, so I thought more."
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Is there lua code for getting lyrics to scroll in a media player skin?
I don't think Lua is particularly needed for this:
If your question is really about having the lyrics scroll in synchronization with the music, I have no idea how I would attack that. To be honest, I wouldn't try. You are going to have to scroll the lyrics based on the percentage complete the playback is, and I just don't see that being practical. A lot of songs have long sections of instruments only, and I can't see how you would ever end up with anything that wasn't just a mess that only sorta worked.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
Scroll=10
[MeasureText]
Measure=WebParser
URL=file://#@#Text\Charge of the Light Brigade.txt
RegExp=(?siU)^(.*)$
StringIndex=1
[MeterContainerVisible]
Meter=Shape
X=1
Y=1
Shape=Rectangle 0,0,247,502 | Fill Color 47,47,47,255 | StrokeWidth 2 | Stroke Color 255,255,255,255
[MeterContainer]
Meter=Shape
X=1
Y=1
Shape=Rectangle 0,0,247,502 | StrokeWidth 2
[MeterText]
Meter=String
MeasureName=MeasureText
X=11
Y=(#Scroll#)
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=0,0,0,1
AntiAlias=1
DynamicVariables=1
InlineSetting=Weight | 700
InlinePattern=The Charge of the Light Brigade
InlineSetting2=Oblique
InlinePattern2=by Alfred, Lord Tennyson
MouseScrollDownAction=[!SetVariable Scroll "(Clamp(#Scroll#-10,-580,11))"][!UpdateMeter *][!Redraw]
MouseScrollUpAction=[!SetVariable Scroll "(Clamp(#Scroll#+10,-580,11))"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!Log "Clicked String!"]
Container=MeterContainer
If your question is really about having the lyrics scroll in synchronization with the music, I have no idea how I would attack that. To be honest, I wouldn't try. You are going to have to scroll the lyrics based on the percentage complete the playback is, and I just don't see that being practical. A lot of songs have long sections of instruments only, and I can't see how you would ever end up with anything that wasn't just a mess that only sorta worked.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 65
- Joined: November 14th, 2020, 2:36 pm
- Location: Washington DC
Re: Is there lua code for getting lyrics to scroll in a media player skin?
That's great news, thank you, Mr. Morley, perhaps when I have more time I'll look into having realtime scrolling.
Loving Rainmeter for well over 15 years now. Your expert advice is noted.
I thought I was smart enough to configure the skin you gave me for my project, but I'm stuck with "URL=file://#@#Text\Charge of the Light Brigade.txt"
I knew I wouldn't have that txt file so I made changes to get my test.txt to show in the container (see attachment image) and I can't. Sorry, I'm getting old in years! What do I do? TY.
Loving Rainmeter for well over 15 years now. Your expert advice is noted.
I thought I was smart enough to configure the skin you gave me for my project, but I'm stuck with "URL=file://#@#Text\Charge of the Light Brigade.txt"
I knew I wouldn't have that txt file so I made changes to get my test.txt to show in the container (see attachment image) and I can't. Sorry, I'm getting old in years! What do I do? TY.
You do not have the required permissions to view the files attached to this post.
Someone said, "Your thinking too much, so I thought more."
-
- Posts: 860
- Joined: August 22nd, 2016, 11:32 pm
- Location: Surrey, B.C., Canada
Re: Is there lua code for getting lyrics to scroll in a media player skin?
I created one basied on jsmorley's info, it was just a first attempt. Sometime it does not get lyrics.
You do not have the required permissions to view the files attached to this post.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
Deviant Art Page
-
- Posts: 65
- Joined: November 14th, 2020, 2:36 pm
- Location: Washington DC
Re: Is there lua code for getting lyrics to scroll in a media player skin?
Thanks, I'll look into it.
I have figured it out for the most part! @CyberTheWorm, I ended up using your skin code and will be giving you the credit, thank you.
I have figured it out for the most part! @CyberTheWorm, I ended up using your skin code and will be giving you the credit, thank you.
Someone said, "Your thinking too much, so I thought more."