Very strange behavior of Clock actor
fypy last edited by
Hi everybody !_Please excuse my english, I'm french_while working on a patch with a Clock actor, I noticed a very strange behavior of the numerical values delivered by the outputs.I have tested the "Seconds" output, made a patch for you to test, but I haven' tested the other outputs, and I think that you guess that testing the year input is quite loooong...To be clear enough, use Actor/Control Split, I made comments on the control view.Fypy
mark last edited by
Daer Fypy,Well, you are very good at finding bugs! This is my silly mistake, but this one is quite is quite easy to deal with. The 'limit' min for the 'hours', 'minutes' and 'seconds' outputs of the clock were incorrectly set to '1' instead of '0' as the default. This led to your problem, which is one of scaling.For benefit of future readers of this post, let me remind everyone that it is very important to read these sections of the manual:
and/or to watch the online tutorials on Value Scaling; the video tutorial links are in the Help menu.In any case, by limiting the seconds output to a range of 1 to 59, when the seconds output is 0 the output _forced_ to be 1\. As you correctly indicated, the first problem is that the 'seconds' output will say '1' for two seconds because of this. Second, it means that the value is incorrectly scaled the from the output of 'seconds' to the input of the Gate actor, which is what you are seeing in your example patch.To understand this, add a new Trigger Value actor and look at the 'dot' next to the 'value' input. Note that it is blue/grey, meaning that it is a "fixed" input -- connecting a link to such an input or output does not change the input or output in any way. But now add a new Gate actor, and look at the dot: it is green. This means it is a 'mutable' property, that will change to the kind of data coming from the first link you connect to this actor. (See the manual section called "Mutable Inputs and Outputs".)So the flow of creating the patch went something like this:
- Scaling Values Between Outputs and Inputs
- Understanding Value Scaling
If you change the 'limit min' of the 'hours', 'minutes' and 'seconds' outputs of the Clock actor to 0, everything will work as expected.Best Wishes,Mark
- Add Gate Actor
- Connect output of 'seconds' to Gate actor input -- because it is a mutable input, it 'scale min' and 'scale max' changed from the default (MIN and MAX) to 0 to 59, matching the 'seconds output range.
- But now, the value is incorrectly scaled because of my error, where the 'limit min' and 'limit max' were 1 to 59 instead of 0 to 59.