It is currently May 2nd, 2024, 10:10 am

[Help]Smooth Progress bar for Media Player

Get help with creating, editing & fixing problems with skins
Lightz39
Posts: 98
Joined: August 1st, 2012, 12:48 am

[Help]Smooth Progress bar for Media Player

Post by Lightz39 »

Hello again. So I've made a very quick and easy change from the itunes plugin over to nowplaying. Far easier than I expected, I am happy with the results thus far. One thing I can't seem to figure out is how to get my progress bar to move constantly and smoothly instead of jumping every 2-3 seconds. It is a 250 by 2 px solid color bar. I've seen on here some one using lua but that is still over my head. Is there another way to accomplish this or am I going to need to figure this area out sooner than I hoped?

Any suggestions welcomed and appreciated as always.
Alex Becherer

Re: [Help]Smooth Progress bar for Media Player

Post by Alex Becherer »

have a look at these settings in your skin:

[Update] http://rainmeter.net/cms/Skins-Rainmeter_beta

and

[UpdateDivider] http://rainmeter.net/cms/Measures-GeneralSettings_beta
Lightz39
Posts: 98
Joined: August 1st, 2012, 12:48 am

Re: [Help]Smooth Progress bar for Media Player

Post by Lightz39 »

Hum, it seems to me that rainmeter just isn't meant to display a smooth progress bar on its own. Every other media player skin I've looked at does the same thing where its not just a smooth drawing over the distance.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Help]Smooth Progress bar for Media Player

Post by jsmorley »

Rainmeter will check the value of the measure returning the information you want (in this case the percentage complete the song is I assume) every [Rainmeter] Update= milliseconds times [Measure] UpdateDivider= milliseconds. So the "jump" that you will get in a Bar meter (or any other meter displaying this value) is purely driven by those settings.

You may be able to get a "smoother" progression by playing with the AverageSize setting on the measure returning the value. I'm not sure if that is going to help in this case, but worth trying out.

Seems like the "ticks" that the bar has as it progresses through the song are reduced in length quite a bit for me when I use something like this, although I don't think it is every going to be perfectly "smooth" as that just isn't how Rainmeter works:

Code: Select all

[Rainmeter]
Update=100
DynamicWindowSize=1

[MeasureNowPlaying]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WinAmp
PlayerType=PROGRESS
AverageSize=10
MinValue=0
MaxValue=100

[MeterBarBack]
Meter=Image
W=200
H=20
SolidColor=150,150,150,255

[MeterBar]
Meter=Bar
MeasureName=MeasureNowPlaying
X=0r
Y=0r
W=200
H=20
BarColor=0,255,0,255
BarOrientation=Horizontal
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [Help]Smooth Progress bar for Media Player

Post by MerlinTheRed »

I'd like to learn where averaging takes place here. I've been oblivious to this feature until now and the documentations doesn't seem too illuminating.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Help]Smooth Progress bar for Media Player

Post by Kaelri »

MerlinTheRed wrote:I'd like to learn where averaging takes place here. I've been oblivious to this feature until now and the documentations doesn't seem too illuminating.
There's not much to know. With AverageSize=n on a measure, the measure keeps the last n values it records, and returns the average of those values.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [Help]Smooth Progress bar for Media Player

Post by MerlinTheRed »

Ah. I guess I misinterpreted the documentation. But won't this generate incorrect values for a measure like the progression in a music player skin?
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Help]Smooth Progress bar for Media Player

Post by jsmorley »

MerlinTheRed wrote:Ah. I guess I misinterpreted the documentation. But won't this generate incorrect values for a measure like the progression in a music player skin?
I don't see why it would. The way I envision it in this case is that the actual return values of 1..2..3..4..5..6..7..8..9..10 are "smoothed out", by having them returned with five decimal places of precision as an average. There will be a certain "lag" behind the raw value returned by NowPlaying of course.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [Help]Smooth Progress bar for Media Player

Post by jsmorley »

Mind you, this is just a way to get a slightly "more smooth" effect. You are just not going to get a true smooth progression from a plugin that returns the percent done in integers. There are an infinite number of decimal places between 0 and 1, and by the nature of things you have to "stop and measure" at some point, and that "point" is what is evaluated by Rainmeter. Setting Update to "1" wouldn't make a bit of difference, as NowPlaying is still going to return 1..2..3..4..5..
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [Help]Smooth Progress bar for Media Player

Post by Kaelri »

There is a transition script that you could use for this. It wouldn't completely eliminate the "ticks," but it would make them much more gentle.

You'd have to change your Bar meter to a regular Image meter, and bind the width to a dynamic variable (as in W=#Variable#).

Here's a skin demonstrating the effect:
SmoothBarTest_0.1.rmskin
You do not have the required permissions to view the files attached to this post.