It is currently March 28th, 2024, 6:59 pm

Syncing skins

Get help with creating, editing & fixing problems with skins
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Syncing skins

Post by qwerky »

balala wrote: March 13th, 2019, 5:14 pm Ok, long story short, I have your pendulum skin working and I have a clock. Since this discussion became in the meantime a little bit long (and I'm a little bit lazy - sorry), I'd like you to let me (us) know again what would you like to achieve.
Sorry, I know you've explained before. Thanks.
It's just that when the pendulum was added to the clock and running at full speed, that it caused the clock to stutter, and did not stay in perfect sync. But it seems we've come to the conclusion in this thread that that isn't going to be possible with a pendulum running that fast--or perhaps it might, using that ActionTimer technique (I'm not sure)? :confused: But if it were, that's more work than my simple just-for-fun skin deserves! :D
Just to self promote my previous work, I want to tell I also wrote a while ago a pendulum skin. Looking for it and trying it out now, I think if you want to try it, you have to make a small modification. Replace the Balls=0 variable with Balls=2 in the [Variables] section.
Here is the link, if you want to try it out.
That is a great skin! :thumbup: I love the visuals. So I installed it, and changed the variable to two, as suggested. This caused all five balls to appear, but the three center balls disappeared again when I started it running? (Also, there wasn't any sound.)

It is a great demonstration of Newton's Cradle, just like someone may have a physical one on his desk. But I'm not sure whether the moving balls were intended to simulate a pendulum, in the sense of being in sync with a clock? Because it seems that that is not the case. :(

But I noticed that your clock also stuttered a bit at fairly regular intervals--it didn't jump two seconds, but it did very quickly step two consecutive seconds, so that there was only a very short interval between one step and the next? Did you notice this?

All of this was with my own clock/pendulum unloaded, so there should have been no interference. But my other skins were running, so perhaps the load was somewhat high?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Syncing skins

Post by balala »

Yincognito wrote: March 13th, 2019, 6:34 pm Maybe balala can help you with that.
Thanks Yincognito for the trust. :great:
qwerky wrote: March 13th, 2019, 6:28 pm I would need to come to an understanding of that ActionTimer plugin, which seems a bit complicated--not sure it's worth it for my simple just-for-fun skin. :D
This plugin (and the appropriate measure) is not so complicated as many people believe. The basic idea is to have a plugin which can create a loop (to update a variable for example) which is updated more frequently than the Update value of the skin would permit. Using it, you can repeat an action every (let's say) 100 milliseconds (or 10 times per second, so 10 times per update cycle - supposing that the Update is set to the default value), even if as said, the Update is 1000, or even if it is set to -1, so the skin is never updated automatically.
As usually the best place to start is the Help page of the plugin. There is a sample code / skin to try it out. I recommend to take a look at it and try to understand how does it work. It's not too complicated, being perfect to understand the basics of the plugin.
If you want to try it and you have specific question(s), please fell free to come back and ask.
But definitely worth to try to work with it. Finally it is for now part of Rainmeter, being an included plugin, so definitely does worth to.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Syncing skins

Post by balala »

qwerky wrote: March 13th, 2019, 6:44 pm That is a great skin! :thumbup: I love the visuals. So I installed it, and changed the variable to two, as suggested. This caused all five balls to appear, but the three center balls disappeared again when I started it running?
Thanks. And yes, you're right, they really are disappearing. I have to take a look sooner or later. The skin definitely worked when I uploaded it, but almost three years passed, Rainmeter was updated more times in meantime and probably something has changed. Will try to fix it today, or tomorrow. When I'll get it working well, I'll come back here.
qwerky wrote: March 13th, 2019, 6:44 pm (Also, there wasn't any sound.)
Note that the skin has a settings tool. Just click the wrench which is shown when you1re hovering the mouse over the skin. There you can set to have the movement of the balls attenuated or not, to play or not the sound and to show or hide the shadows of the balls. Make sure you have checked the Play the sound checkbox.
qwerky wrote: March 13th, 2019, 6:44 pm But I'm not sure whether the moving balls were intended to simulate a pendulum, in the sense of being in sync with a clock? Because it seems that that is not the case. :(
Definitely not. It was never my intention to syncronize them. I've created the pendulum once when I've started to deepen into working with TransformationMatrix (which I still think is a very powerful option) and have figured out how to use it to simulate the movement of those balls.
qwerky wrote: March 13th, 2019, 6:44 pm But I noticed that your clock also stuttered a bit at fairly regular intervals--it didn't jump two seconds, but it did very quickly step two consecutive seconds, so that there was only a very short interval between one step and the next? Did you notice this?

All of this was with my own clock/pendulum unloaded, so there should have been no interference. But my other skins were running, so perhaps the load was somewhat high?
Can be. Try to load just the Pendulum, no other skins. Do you have the lag even so?
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Syncing skins

Post by balala »

qwerky wrote: March 13th, 2019, 6:44 pm It's just that when the pendulum was added to the clock and running at full speed, that it caused the clock to stutter, and did not stay in perfect sync. But it seems we've come to the conclusion in this thread that that isn't going to be possible with a pendulum running that fast--or perhaps it might, using that ActionTimer technique (I'm not sure)? :confused: But if it were, that's more work than my simple just-for-fun skin deserves! :D
By synchronizing them you mean you'd like to get the seconds changing when the ball arrives to the most left and right position?
If so, I think the most important would be to include the clock into the same skin as the pendulum. Otherwise I think it's not possible. My opinion...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Syncing skins

Post by balala »

Yincognito wrote: March 13th, 2019, 6:17 pm Wow, that's a really nice skin - you probably worked a bit on the TransformationMatrix formulas there! :thumbup: I know it's a finished work, but if you'll ever want to add something extra to it in the future, putting the H H : M M characters on the balls when animating it (to make them look like pool game balls, maybe even having diiferent colors) would make it even cooler... 8-)
Thank you for the appreciations. Yes, there was needed to work a little bit with those TransformationMatrices, but finally I succeeded.
Ok, your idea is possible. First I have to fix the problem reported by qwerky above, but as a next step, this is possible as well. Let's see when will I have the needed time to add it as well.
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Syncing skins

Post by qwerky »

balala wrote: March 13th, 2019, 7:33 pmNote that the skin has a settings tool. Just click the wrench which is shown when you1re hovering the mouse over the skin. There you can set to have the movement of the balls attenuated or not, to play or not the sound and to show or hide the shadows of the balls. Make sure you have checked the Play the sound checkbox.
Yes, I tried with the Sound box both checked and unchecked, but had no sound either way.
Can be. Try to load just the Pendulum, no other skins. Do you have the lag even so?
Okay, unloaded all skins, and loaded Pendulum only. Unfortunately, yes I still see the slight stuttering (occasional double-quick-time-step). Do you see it at all? :confused:
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Syncing skins

Post by qwerky »

balala wrote: March 13th, 2019, 7:37 pm By synchronizing them you mean you'd like to get the seconds changing when the ball arrives to the most left and right position?
Yes, that's exactly right.
If so, I think the most important would be to include the clock into the same skin as the pendulum. Otherwise I think it's not possible. My opinion...
Unfortunately, including the pendulum into the clock skin has not helped. Honestly, I think the pendulum is more trouble than it's worth. :-( It does work correctly when slowed down, but that is pretty ugly. :yawn:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Syncing skins

Post by jsmorley »

I think I might have mentioned that it is really not possible to do this in an entirely reliable way. :-)

You simply can't synchronize the ticking of the clock, which can only be measured at a granularity of one second, with an animation that by its nature must be measured at a granularity of less than one second, when the animation uses an "approximate" measure of time, and is impacted by other things that Rainmeter is trying to do at the same moment.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Syncing skins

Post by Yincognito »

jsmorley wrote: March 14th, 2019, 12:35 am I think I might have mentioned that it is really not possible to do this in an entirely reliable way. :-)

You simply can't synchronize the ticking of the clock, which can only be measured at a granularity of one second, with an animation that by its nature must be measured at a granularity of less than one second, when the animation uses an "approximate" measure of time, and is impacted by other things that Rainmeter is trying to do at the same moment.
Let's assume for a moment that there aren't any external obstacles for a skin to update itself at a certain rate. I'm talking about obstacles like, for example, skins "freezing" for a couple of milliseconds when the CPU is very busy with other stuff. In that hypothetical scenario, would it be possible to reliable maintaining the sync by dynamically adjusting the UpdateDivider of the measures/meters involved in the process? If dynamically adjusting the UpdateDivider is even possible, that is...

For example, the OnChange event of a Time measure "discovers" that the time displayed (or expressed through animation) in the skin is behind one second compared to the correct time, so some bangs would therefore dynamically decrease the UpdateDivider on the relevant measures/meters in order to "catch up" with the correct time in a timeframe of, say, 5 seconds. Would it be possible? I'm asking just out of curiosity, because, obviously, those external obstacles assumption is not one that is possible in practice...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Syncing skins

Post by jsmorley »

Sure, UpdateDivider can be dynamically changed.