Hallo, sara kolster hat gesagt: // sara kolster wrote:
I want to make a clock [stopwatch] which counts down from [for example] 30 minutes till zero, but I have a very hard time making it. For so far I made a counter with a metro of 1000 which counts the seconds and connected a select 60 to count the minutes. [counter 1] I can combine the message via pack, which prints out [for example] time: 30 min 15 sec in the terminal. [counter 2]
But it gets weird when it comes close to 60:
time: 9 min 59 sec time: 10 min 1 sec time: 10 min 1 sec time: 10 min 60 sec time: 10 min 2 sec time: 10 min 3 sec
Cannot figure out why it is doing this.
I now could look at your patch, too. The reason for this strange behaviour is, that the outlet of the [+ 1] in the counter can never be 0 and also the order of execution is undefined in some states of execution. Some more triggers should help.
But you are also using an unusual way to count. This is hard to explain in ascii-patching, so maybe you want to take a look at attached explanation in Pd-format.
Basically when you do the [f 0] X [+ 1] counters it's better to use the outlet of the float object for the counter value. If you don't want to start counting at 0, you can always add or substract some values after the counter.
Frank Barknecht _ ______footils.org__
_ __latest track: "scans" _ http://footils.org/cms/show/41