Watch

Jun 14, 2007 at 9:41am

Watch

Hi
Can anyone help me creating a timer/counter that resets after 60 seconds, so it would looke like : 1:00 and then again when it reaches 2 minuttes and so on….
Just like a digital watch..
Thanks
Simon

#32458
Jun 14, 2007 at 11:22am

You really need to show that you have at least tried before asking a question like that. Have you read any of the tutorials/help files/example patches?

I have made you a timer. I’m sure there are better ways of doing it but it works. Have a look at how I have done it. I very much doubt that you will get as much help as this again if you don’t demonstrate your own patches.

Copy and paste the following into a blank patch:

Andy

max v2;
#N vpatcher 1392 80 1876 482;
#P window setfont “Sans Serif” 9.;
#P comment 162 91 37 196617 Reset;
#P button 169 107 15 0;
#P toggle 81 107 15 0;
#N vpatcher 4 44 1280 1024;
#N comlet Bang to Reset;
#P inlet 337 167 15 0;
#N comlet Start/Stop;
#P inlet 244 167 15 0;
#P window setfont “Sans Serif” 18.;
#P window linecount 1;
#P comment 364 770 197 196626 Count Tens of Hours;
#P comment 345 675 148 196626 Count Hours;
#P comment 219 578 212 196626 Count Tens of Minutes;
#P comment 205 483 148 196626 Count Minutes;
#P comment 80 386 222 196626 Count Tens of Seconds;
#P window setfont “Sans Serif” 9.;
#P newex 337 201 91 196617 t b b b b b b;
#N counter 0 0 9;
#X flags 0 0;
#P newobj 592 770 71 196617 counter 0 0 9;
#P newex 592 745 46 196617 select 0;
#P newex 518 702 27 196617 t i i;
#N counter 0 0 9;
#X flags 0 0;
#P newobj 518 675 71 196617 counter 0 0 9;
#P newex 518 650 46 196617 select 0;
#P newex 448 607 27 196617 t i i;
#N counter 0 0 5;
#X flags 0 0;
#P newobj 448 578 71 196617 counter 0 0 5;
#P newex 448 553 46 196617 select 0;
#P newex 379 510 27 196617 t i i;
#N counter 0 0 9;
#X flags 0 0;
#P newobj 379 483 71 196617 counter 0 0 9;
#P newex 379 456 46 196617 select 0;
#P newex 308 413 27 196617 t i i;
#P newex 308 360 46 196617 select 0;
#P newex 244 317 27 196617 t i i;
#N counter 0 0 5;
#X flags 0 0;
#P newobj 308 386 71 196617 counter 0 0 5;
#P number 244 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 0 0 9;
#X flags 0 0;
#P newobj 244 264 71 196617 counter 0 0 9;
#P newex 244 200 64 196617 metro 1000;
#N comlet Count Tens of Hours;
#P outlet 592 792 15 0;
#N comlet Count Hours;
#P outlet 518 724 15 0;
#N comlet Count Tens of Minutes;
#P outlet 448 629 15 0;
#N comlet Count Minutes;
#P outlet 379 532 15 0;
#N comlet Count Tens of Seconds;
#P outlet 308 435 15 0;
#N comlet Count Seconds;
#P outlet 244 339 15 0;
#P window setfont “Sans Serif” 18.;
#P window linecount 0;
#P comment 71 264 148 196626 Count Seconds;
#P connect 31 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 11 0;
#P connect 11 0 1 0;
#P fasten 25 5 8 3 422 241 294 241;
#P fasten 11 1 12 0 266 339 313 339;
#P connect 12 0 10 0;
#P connect 10 0 13 0;
#P connect 13 0 2 0;
#P connect 32 0 25 0;
#P fasten 25 4 10 3 406 241 358 241;
#P fasten 13 1 14 0 330 435 384 435;
#P connect 14 0 15 0;
#P connect 15 0 16 0;
#P connect 16 0 3 0;
#P fasten 25 3 15 3 390 241 429 241;
#P fasten 16 1 17 0 401 532 453 532;
#P connect 17 0 18 0;
#P connect 18 0 19 0;
#P connect 19 0 4 0;
#P fasten 25 2 18 3 374 241 498 241;
#P fasten 19 1 20 0 470 629 523 629;
#P connect 20 0 21 0;
#P connect 21 0 22 0;
#P connect 22 0 5 0;
#P fasten 25 1 21 3 358 241 568 241;
#P fasten 22 1 23 0 540 724 597 724;
#P connect 23 0 24 0;
#P connect 24 0 6 0;
#P fasten 25 0 24 3 342 241 642 241;
#P pop;
#P newobj 81 133 98 196617 p Have a Look In Me;
#P window setfont “Sans Serif” 18.;
#P number 81 172 20 18 0 0 8224 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 101 172 20 18 0 0 8224 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 20.;
#P comment 122 172 13 196628 :;
#P window setfont “Sans Serif” 18.;
#P number 135 172 20 18 0 0 8224 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 210 172 19 18 0 0 8224 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 155 172 20 18 0 0 8224 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 190 172 19 18 0 0 8224 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 20.;
#P comment 176 172 13 196628 :;
#P window setfont “Sans Serif” 9.;
#P comment 57 91 67 196617 Start/Stop;
#P connect 10 0 9 0;
#P hidden fasten 9 5 8 0 171 160 86 160;
#P hidden fasten 9 4 7 0 154 160 106 160;
#P hidden fasten 9 3 5 0 137 160 140 160;
#P hidden fasten 9 2 3 0 120 160 160 160;
#P connect 11 0 9 1;
#P hidden fasten 9 1 2 0 103 160 195 160;
#P hidden fasten 9 0 4 0 86 160 215 160;
#P pop;

#106789
Jun 14, 2007 at 11:25am

is this waht you mean?

max v2;
#N vpatcher 10 59 610 459;
#P window setfont Wingdings 24.;
#P user ubumenu 62 111 33 131792920 1 0 0 1;
#X setrgb 132 0 123 239 125 255 0 255 0 132 0 123 0 255 0 112 112 112;
#X add ?;
#X prefix_set 0 0 0;
#P user lcd 99 105 119 44 0 0 0 0 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 231 103 1030 594;
#P toggle 237 87 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 28 124 38 196617 sel 96;
#P newex 28 96 40 196617 key;
#P window linecount 1;
#P newex 237 58 64 196617 route toggle;
#P window linecount 0;
#P newex 305 88 32 196617 sel 1;
#N comlet on;
#P inlet 237 37 15 0;
#P outlet 224 447 15 0;
#P number 377 287 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 377 263 29 196617 / 10;
#P number 418 287 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 418 263 32 196617 % 10;
#P number 377 237 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 377 216 32 196617 % 60;
#P newex 99 29 45 196617 loadbang;
#P message 390 367 356 196617 size 119 44 , font Verdana 36 , frgb 239 125 255 , brgb 132 0 123 , border 0;
#P newex 214 366 71 196617 prepend write;
#P message 286 367 71 196617 moveto 11 36;
#P message 358 367 31 196617 clear;
#P newex 290 336 40 196617 t l b b;
#N counter;
#X flags 0 0;
#P newobj 237 143 146 196617 counter;
#P newex 237 116 55 196617 metro 100;
#P message 305 116 14 196617 0;
#P newex 198 214 29 196617 / 60;
#P number 232 191 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 291 215 32 196617 % 60;
#P number 291 236 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 332 262 32 196617 % 10;
#P number 332 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 291 262 29 196617 / 10;
#P number 291 286 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 231 312 102 196617 sprintf %s%s:%s%s;
#P number 198 238 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 239 264 32 196617 % 10;
#P number 239 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 198 264 29 196617 / 10;
#P number 198 288 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 232 170 29 196617 / 10;
#P connect 34 0 35 0;
#P connect 13 0 14 0;
#P connect 14 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 1 0;
#P connect 18 0 21 0;
#P connect 21 0 30 0;
#P connect 20 0 30 0;
#P connect 19 0 30 0;
#P connect 22 0 30 0;
#P connect 1 0 6 0;
#P connect 17 0 0 0;
#P connect 0 0 13 0;
#P connect 31 0 33 0;
#P connect 35 0 36 0;
#P connect 33 0 36 0;
#P connect 36 0 16 0;
#P connect 16 0 17 0;
#P fasten 5 0 4 0 203 256 244 256;
#P connect 4 0 3 0;
#P connect 3 0 6 1;
#P connect 18 1 20 0;
#P connect 6 0 18 0;
#P fasten 13 0 12 0 237 214 296 214;
#P connect 12 0 11 0;
#P connect 11 0 8 0;
#P connect 8 0 7 0;
#P connect 7 0 6 2;
#P connect 36 0 32 0;
#P connect 32 0 15 0;
#P connect 15 0 17 2;
#P connect 9 0 6 3;
#P fasten 11 0 10 0 296 254 337 254;
#P connect 10 0 9 0;
#P connect 23 0 19 0;
#P connect 32 0 19 0;
#P connect 18 2 19 0;
#P connect 17 0 24 0;
#P connect 24 0 25 0;
#P connect 25 0 28 0;
#P connect 28 0 29 0;
#P connect 23 0 22 0;
#P connect 32 0 22 0;
#P fasten 25 0 26 0 382 255 423 255;
#P connect 26 0 27 0;
#P pop;
#P hidden newobj 97 60 41 196617 p timer;
#P hidden connect 2 2 0 0;
#P hidden connect 0 0 1 0;
#P pop;

#106790
Jun 14, 2007 at 11:28am

That will be the better way I was talking about.

#106791
Jun 14, 2007 at 12:10pm

Okay, here’s my patch. I have only been working with MAx/Msp for 4 months. I really don’t know how to handle your text, paste where?
How does it work, does it translate it into a patch or?
I’m lost and not familiar with Max/Msp, but I have read a lot of tutorials.
Thanks for your help.
Simon

#106792
Jun 14, 2007 at 12:29pm

copy
open max
File>New>Patcher
paste

#106793
Jun 14, 2007 at 12:42pm

On 14 juin 07, at 14:29, don malone wrote:

> copy
> open max
> file>New>Patcher

The all story is in the beginner’s FAQ:

http://cycling74.com/twiki/bin/view/FAQs/
BeginnersFAQ#I_want_to_look_at_a_patch_someon

ej

#106794
Jun 14, 2007 at 3:01pm

Here’s another even simpler one:

max v2;
#N vpatcher 10 59 755 606;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 191 274 62 196617 prepend set;
#P newex 326 206 32 196617 % 10;
#P newex 281 183 31 196617 / 10;
#P window setfont “Sans Serif” 36.;
#P message 191 295 211 196644 00:00:01.7;
#P window setfont “Sans Serif” 9.;
#P newex 191 206 32 196617 % 24;
#P newex 236 206 32 196617 % 60;
#P newex 191 183 33 196617 / 60;
#P newex 281 206 32 196617 % 60;
#P newex 236 183 29 196617 / 60;
#P newex 191 243 147 196617 sprintf %02d:%02d:%02d.%d;
#B color 5;
#P newex 392 81 31 196617 sel 1;
#P message 392 103 14 196617 0;
#N counter;
#X flags 0 0;
#P newobj 326 125 66 196617 counter;
#P toggle 326 61 15 0;
#P newex 326 103 58 196617 metro 100;
#P fasten 6 0 8 0 241 203 229 203 229 179 196 179;
#P connect 8 0 10 0;
#P connect 10 0 5 0;
#P connect 5 0 14 0;
#P connect 14 0 11 0;
#P fasten 12 0 6 0 286 203 274 203 274 179 241 179;
#P connect 6 0 9 0;
#P connect 9 0 5 1;
#P fasten 2 0 12 0 331 178 286 178;
#P connect 12 0 7 0;
#P connect 7 0 5 2;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 13 0;
#P connect 13 0 5 3;
#P fasten 3 0 2 2 397 121 359 121;
#P fasten 1 0 4 0 331 78 397 78;
#P connect 4 0 3 0;
#P pop;

On Jun 14, 2007, at 6:10 AM, Simon Christensen wrote:

> Okay, here’s my patch. I have only been working with MAx/Msp for 4
> months. I really don’t know how to handle your text, paste where?
> How does it work, does it translate it into a patch or?
> I’m lost and not familiar with Max/Msp, but I have read a lot of
> tutorials.
> Thanks for your help.
> Simon
>

—-
Steven M. Miller
Professor, Contemporary Music Program
College of Santa Fe

Home < http://pubweb.csf.edu/~smill>
SFIFEM <
http://sfifem.csf.edu>
Atrium Sound Space <
http://atrium.csf.edu>
OVOS <
http://pubweb.csf.edu/~smill/ovos.html>
CMP <
http://www.csf.edu/csf/academics/cmp/index.html>

#106795
Jun 15, 2007 at 7:06am

Thanks for your help, but it still dosn’t work at all. I can’t get access to the “beginners FAQ” from the wiki homepage. I have tried to copy the text into a max patch, but nothing happens…
Simon

#106796
Jun 15, 2007 at 7:06am

Thanks for your help, but it still dosn’t work at all. I can’t get access to the “beginners FAQ” from the wiki homepage. I have tried to copy the text into a max patch, but nothing happens…
Simon

#106797
Jun 15, 2007 at 7:09am

Your support has been great, it’s working now!
I’ll be back….Simon

#106798

You must be logged in to reply to this topic.