[PD] Make timer / clock

sara kolster sara at x-i.net
Fri May 6 11:58:28 CEST 2005


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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: counter_time.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20050506/501f455d/attachment.txt>


More information about the Pd-list mailing list