Hi,
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. The countdown is another issue. I thought multiplying by -1 and adding 30 [for the minutes] and 60 [for the seconds] would do, but not really.
I attached the patch. It's probably very simple, but I cannot get a hold of it.
Sara
#N canvas 194 290 839 464 10; #X obj 105 297 + 1; #X msg 178 12 bang; #X obj 107 111 float; #X msg 222 12 stop; #X obj 16 160 select 60; #X msg 204 95 0; #X obj 109 11 t b b; #X obj 443 268 t; #X obj 382 314 pack f s f s; #X msg 316 275 30 min 0 sec; #X obj 443 268 t; #X obj 108 69 metro 100; #X floatatom 16 330 5 0 0 0 - - -; #X floatatom 105 330 5 0 0 0 - - -; #X obj 16 298 + 1; #X obj 17 191 float; #X obj 441 234 + 1; #X msg 512 14 bang; #X obj 441 113 float; #X msg 556 14 stop; #X obj 350 162 select 60; #X msg 538 97 0; #X obj 443 13 t b b; #X obj 351 235 + 1; #X obj 351 193 float; #X obj 441 72 metro 1000; #X obj 389 350 print time; #X text 279 11 COUNTER 1; #X text 575 97 Only resets seconds to zero when I press stop. When I connect it to the second float to reset the minutes to zero , the counter does not work properly anymore.; #X text 610 11 COUNTER 2 prints in terminal for example: time: 30 min 0 sec; #X connect 0 0 2 1; #X connect 0 0 4 0; #X connect 0 0 13 0; #X connect 1 0 11 0; #X connect 2 0 0 0; #X connect 3 0 5 0; #X connect 3 0 11 0; #X connect 4 0 6 0; #X connect 4 0 15 0; #X connect 5 0 2 1; #X connect 6 0 11 0; #X connect 6 1 5 0; #X connect 8 0 26 0; #X connect 9 0 8 0; #X connect 10 0 8 0; #X connect 11 0 2 0; #X connect 14 0 12 0; #X connect 14 0 15 1; #X connect 15 0 14 0; #X connect 16 0 18 1; #X connect 16 0 20 0; #X connect 16 0 10 0; #X connect 16 0 8 2; #X connect 17 0 25 0; #X connect 18 0 16 0; #X connect 19 0 21 0; #X connect 19 0 25 0; #X connect 20 0 22 0; #X connect 20 0 24 0; #X connect 21 0 18 1; #X connect 22 0 25 0; #X connect 22 1 21 0; #X connect 23 0 24 1; #X connect 23 0 8 0; #X connect 24 0 23 0; #X connect 25 0 18 0;