How to make a countdown.

Feb 22, 2007 at 3:19am

How to make a countdown.

Hey Everyone, Im rather new to max msp so please forgive the newbie question.

I am trying to make something similar to a stopwatch, but something that will count down from 10 seconds, and when it finishes counting down, will play a short video clip.

Ive searched for quite a while and couldnt find anything on how to make a count down.

I know how to make a simple stopwatch, but i need something that will count down from 10.

Any help / info is much appreciated.

Thanks!

Dan

#30401
Feb 22, 2007 at 3:30am

look at counter

On 2/21/07, spectre333 wrote:
>
> Hey Everyone, Im rather new to max msp so please forgive the newbie question.
>
> I am trying to make something similar to a stopwatch, but something that will count down from 10 seconds, and when it finishes counting down, will play a short video clip.
>
> Ive searched for quite a while and couldnt find anything on how to make a count down.
>
> I know how to make a simple stopwatch, but i need something that will count down from 10.
>
> Any help / info is much appreciated.
>
> Thanks!
>
> Dan
>
>

#97095
Feb 22, 2007 at 3:43am

or a simple line might do the trick.

bests,
-ben

keith manlove wrote:
> look at counter
>
> On 2/21/07, spectre333 wrote:
>>
>> Hey Everyone, Im rather new to max msp so please forgive the newbie
>> question.
>>
>> I am trying to make something similar to a stopwatch, but something
>> that will count down from 10 seconds, and when it finishes counting
>> down, will play a short video clip.
>>
>> Ive searched for quite a while and couldnt find anything on how to
>> make a count down.
>>
>> I know how to make a simple stopwatch, but i need something that will
>> count down from 10.
>>
>> Any help / info is much appreciated.
>>
>> Thanks!
>>
>> Dan
>>
>>


Cycling ’74

http://www.cycling74.com

Main Office:
379A Clementina Street
San Francisco, CA 94103 USA
p: 415-974-1818
f: 415-974-1812

Authorization Support:
p: 415-974-1818 ext. 2#
e: challenge@cycling74.com

Technical Support:
p: 415-974-1818 ext. 5#
e: support@cycling74.com

#97096
Feb 22, 2007 at 3:44am

hi, ive played around with counter object and tried searching but havnt found anything for counting down, only counting up.

#97097
Feb 22, 2007 at 3:46am

hmmm im not quite sure i follow.

im now familiar with terminology and such, could you clarify what you meant by “simple line”?

thanks

#97098
Feb 22, 2007 at 3:54am

scale should do the trick, on the other end of the counter – just use a 0 to -10 range to do the reversal of values

#97099
Feb 22, 2007 at 3:55am

thanks! I’ll give that a shot :)

#97100
Feb 22, 2007 at 4:18am

Check the tutorials out. They cover a lot of this kind of stuff. Take
your time and go slow. Max is an odd beast and can be a bit odd to
get used to.

On Feb 21, 2007, at 10:19 PM, spectre333 wrote:

>
> Hey Everyone, Im rather new to max msp so please forgive the newbie
> question.
>
> I am trying to make something similar to a stopwatch, but something
> that will count down from 10 seconds, and when it finishes counting
> down, will play a short video clip.
>
> Ive searched for quite a while and couldnt find anything on how to
> make a count down.
>
> I know how to make a simple stopwatch, but i need something that
> will count down from 10.
>
> Any help / info is much appreciated.
>
> Thanks!
>
> Dan
>

v a d e //

http://www.vade.info
abstrakt.vade.info

#97101
Feb 22, 2007 at 4:19am

read all the counter documentation… look for “dec.”

Eliot Palmer wrote:
> scale should do the trick, on the other end of the counter – just use a 0 to -10 range to do the reversal of values
>
>
>

#97102
Feb 22, 2007 at 6:43am

This can be done with just the counter object. You will have a much better time with Max/MSP if you go through the tutorials! Also, simply reading the help files for an object that looks like it might do the trick will lead you in the right direction. If the object doesn’t do what you want, the help file might point you to one that does.
Anyways, here is a solution:

Copy the following text (with the “#P”s) and then go to

Max File–> New From Clipboard

#P window setfont “Sans Serif” 9.;
#P number 20 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#N counter 1 0 10;
#X flags 0 0;
#P newobj 20 77 77 196617 counter 1 0 10;
#P toggle 20 29 15 0;
#P newex 20 53 58 196617 metro 500;
#P comment 105 77 307 196617 three arguments: direction (1 for down) min count and max count;
#P comment 41 29 87 196617 < -- click to start;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 5 0;
#P window clipboard copycount 6;

#97103
Feb 22, 2007 at 6:48am

thanks a million guys that really helped. i feel silly finding out it was so simple.

aaah i just found the tutorials. they are great!

all this time i was trying to find info off the net when all the while it was right here in the install.

thanks for all the help guys!

Dan

#97104
Feb 22, 2007 at 9:02am

Hi all,

This is interesting. How about populating the Help menu in Max?

- Reference
- Tutorials
- Object help files
- Forum

.. just a thought.

Mattijs

#97105
Feb 22, 2007 at 5:52pm

Agreed! I got tired of navigating to the tutorials, so I made a little patch with “links” to the reference manuals and added it to my Extras. The path names would need to be modified for it to work on windows, but the idea is pretty simple. It would make sense for something like this to be included with Max already.

#P button 8 90 15 0;
#P button 8 70 15 0;
#P button 8 50 15 0;
#P button 8 30 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 26 92 111 196617 Pluggo Dev Guide;
#P comment 26 52 118 196617 MSP Tutorials and Topic;
#P comment 26 72 111 196617 MSP Reference Manual;
#P comment 26 32 111 196617 Max Reference Manual;
#P button 8 10 15 0;
#P window linecount 3;
#P hidden message 8 510 239 196617 ; max launchbrowser “file:///Applications/Pluggo/Development Materials/PluggoDevGuide.pdf”;
#P hidden message 8 441 243 196617 ; max launchbrowser “file:///Applications/MaxMSP 4.6/Documentation/MSP46TutorialsAndTopics.pdf”;
#P hidden message 8 374 243 196617 ; max launchbrowser “file:///Applications/MaxMSP 4.6/Documentation/MSP46ReferenceManual.pdf”;
#P hidden message 8 297 243 196617 ; max launchbrowser “file:///Applications/MaxMSP 4.6/Documentation/Max46TutorialsAndTopics.pdf”;
#P window linecount 5;
#P hidden message 8 215 156 196617 ; max launchbrowser “file:///
Applications/MaxMSP 4.6/Documentation/Max46ReferenceManual.pdf”;
#P window linecount 1;
#P comment 26 12 118 196617 Max Tutorials and Topic;
#P user panel 7 7 17 103;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 89 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 48 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 7 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 18 0 9 0;
#P hidden connect 16 0 8 0;
#P hidden connect 17 0 7 0;
#P hidden connect 10 0 6 0;
#P hidden connect 15 0 5 0;
#P window clipboard copycount 19;

#97106
Feb 22, 2007 at 5:59pm

Great idea but you didn’t send the complete patch

On 2/22/07 12:52 PM, “Nick Inhofe” wrote:

>
> Agreed! I got tired of navigating to the tutorials, so I made a little patch
> with “links” to the reference manuals and added it to my Extras. The path
> names would need to be modified for it to work on windows, but the idea is
> pretty simple. It would make sense for something like this to be included with
> Max already.
>
> #P button 8 90 15 0;
> #P button 8 70 15 0;
> #P button 8 50 15 0;
> #P button 8 30 15 0;
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P comment 26 92 111 196617 Pluggo Dev Guide;
> #P comment 26 52 118 196617 MSP Tutorials and Topic;
> #P comment 26 72 111 196617 MSP Reference Manual;
> #P comment 26 32 111 196617 Max Reference Manual;
> #P button 8 10 15 0;
> #P window linecount 3;
> #P hidden message 8 510 239 196617 ; max launchbrowser
> “file:///Applications/Pluggo/Development Materials/PluggoDevGuide.pdf”;
> #P hidden message 8 441 243 196617 ; max launchbrowser
> “file:///Applications/MaxMSP 4.6/Documentation/MSP46TutorialsAndTopics.pdf”;
> #P hidden message 8 374 243 196617 ; max launchbrowser
> “file:///Applications/MaxMSP 4.6/Documentation/MSP46ReferenceManual.pdf”;
> #P hidden message 8 297 243 196617 ; max launchbrowser
> “file:///Applications/MaxMSP 4.6/Documentation/Max46TutorialsAndTopics.pdf”;
> #P window linecount 5;
> #P hidden message 8 215 156 196617 ; max launchbrowser “file:///
> Applications/MaxMSP 4.6/Documentation/Max46ReferenceManual.pdf”;
> #P window linecount 1;
> #P comment 26 12 118 196617 Max Tutorials and Topic;
> #P user panel 7 7 17 103;
> #X brgb 205 215 224;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 23 89 130 21;
> #X brgb 205 215 224;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 23 48 130 21;
> #X brgb 205 215 224;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P user panel 23 7 130 21;
> #X brgb 205 215 224;
> #X frgb 0 0 0;
> #X border 0;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P hidden connect 18 0 9 0;
> #P hidden connect 16 0 8 0;
> #P hidden connect 17 0 7 0;
> #P hidden connect 10 0 6 0;
> #P hidden connect 15 0 5 0;
> #P window clipboard copycount 19;
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#97107
Feb 22, 2007 at 6:56pm

Works OK here.
David

On Feb 22, 2007, at 9:59 AM, Gary Lee Nelson wrote:

> Great idea but you didn’t send the complete patch
>

#97108
Feb 22, 2007 at 7:59pm

Still doesn’t work here. Shouldn’t there be something more at the
beginning. Note the first three lines and the very last.

max v2;
#N vpatcher 10 59 610 459;
#P button 149 97 15 0;
#P button 8 90 15 0;
#P button 8 70 15 0;
#P button 8 50 15 0;
#P button 8 30 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 26 92 111 196617 Pluggo Dev Guide;
#P comment 26 52 118 196617 MSP Tutorials and Topic;
#P comment 26 72 111 196617 MSP Reference Manual;
#P comment 26 32 111 196617 Max Reference Manual;
#P button 8 10 15 0;
#P window linecount 3;
#P hidden message 8 510 239 196617 ; max launchbrowser
“file:///Applications/Pluggo/Development Materials/PluggoDevGuide.pdf”;
#P hidden message 8 441 243 196617 ; max launchbrowser
“file:///Applications/MaxMSP 4.6/Documentation/MSP46TutorialsAndTopics.pdf”;
#P hidden message 8 374 243 196617 ; max launchbrowser
“file:///Applications/MaxMSP 4.6/Documentation/MSP46ReferenceManual.pdf”;
#P hidden message 8 297 243 196617 ; max launchbrowser
“file:///Applications/MaxMSP 4.6/Documentation/Max46TutorialsAndTopics.pdf”;
#P window linecount 5;
#P hidden message 8 215 156 196617 ; max launchbrowser “file:///
Applications/MaxMSP 4.6/Documentation/Max46ReferenceManual.pdf”;
#P window linecount 1;
#P comment 26 12 118 196617 Max Tutorials and Topic;
#P user panel 7 7 17 103;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 89 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 48 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 7 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 18 0 9 0;
#P hidden connect 16 0 8 0;
#P hidden connect 17 0 7 0;
#P hidden connect 10 0 6 0;
#P hidden connect 15 0 5 0;
#P window clipboard copycount 19;
#P pop;

On 2/22/07 1:56 PM, “David Beaudry” wrote:

> Works OK here.
> David
>
> On Feb 22, 2007, at 9:59 AM, Gary Lee Nelson wrote:
>
>> Great idea but you didn’t send the complete patch
>>
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#97109
Feb 22, 2007 at 8:33pm

Quote: Gary Lee Nelson wrote on Thu, 22 February 2007 11:59
—————————————————-
> Still doesn’t work here. Shouldn’t there be something more at the
> beginning. Note the first three lines and the very last.
>
> max v2;
> #N vpatcher 10 59 610 459;
>…
> #P pop;
>
>

As far as I know, the version without these lines works when selecting “New from clipboard” from the file menu. These lines are needed, though, when making a patch in text format.

mz

#97110
Feb 22, 2007 at 8:45pm

Adding these lines makes it open with open from clipboard. Without them it
doesn’t. Max 4.6 on Intel.

On 2/22/07 3:34 PM, “mzed” wrote:

>
> Quote: Gary Lee Nelson wrote on Thu, 22 February 2007 11:59
> —————————————————-
>> Still doesn’t work here. Shouldn’t there be something more at the
>> beginning. Note the first three lines and the very last.
>>
>> max v2;
>> #N vpatcher 10 59 610 459;
>> …
>> #P pop;
>>
>>
>
> As far as I know, the version without these lines works when selecting “New
> from clipboard” from the file menu. These lines are needed, though, when
> making a patch in text format.
>
> mz
>
>
> –
> || michael f. zbyszynski — molecular gastronimist
> || http://www.cnmat.berkeley.edu/
> || http://www.mikezed.com/
>
>
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

#97111
Feb 22, 2007 at 10:31pm

but again…it worked as originally posted for me doing open from
clipboard. 4.6.2 on intel as well. most interesting ;)

On Feb 22, 2007, at 12:45 PM, Gary Lee Nelson wrote:

> Adding these lines makes it open with open from clipboard. Without
> them it
> doesn’t. Max 4.6 on Intel.
>
>
> On 2/22/07 3:34 PM, “mzed” wrote:
>
>>
>> Quote: Gary Lee Nelson wrote on Thu, 22 February 2007 11:59
>> —————————————————-
>>> Still doesn’t work here. Shouldn’t there be something more at the
>>> beginning. Note the first three lines and the very last.
>>>
>>> max v2;
>>> #N vpatcher 10 59 610 459;
>>> …
>>> #P pop;
>>>
>>>
>>
>> As far as I know, the version without these lines works when
>> selecting “New
>> from clipboard” from the file menu. These lines are needed,
>> though, when
>> making a patch in text format.
>>
>> mz
>>
>>
>> –
>> || michael f. zbyszynski — molecular gastronimist
>> || http://www.cnmat.berkeley.edu/
>> || http://www.mikezed.com/
>>
>>
>>
>
>
> Cheers
> Gary Lee Nelson
> Oberlin College
> http://www.timara.oberlin.edu/GaryLeeNelson
>
>

#97112
Feb 23, 2007 at 7:28am

Nick Inhofe wrote:
> Agreed! I got tired of navigating to the tutorials, so I made a
> little patch with “links” to the reference manuals and added it to my
> Extras. The path names would need to be modified for it to work on
> windows, but the idea is pretty simple. It would make sense for
> something like this to be included with Max already.

I made a complete overview system including pointing to manuals, you can
directly call helpfiles and manuals at your will, worth to try out. Its
sitting always on the right of my screen and is indispensible for me…

(If someone knows how to jump directly to a corresponding page of an
external in the pdf manual I am all ears…)

You’ll find it at

http://www.cycling74.com/twiki/bin/view/Share/StefanTiedje

I’d love to hear some comments. You have to set it up correctly though,
and I don’t know if my manual/description does give enough information
to do so…

I included a lot of 3rd party collections, which might be not up to date
now, if anybody has some enhancements in form of additional or corrected
overview files, you can send them to the list or to me privately, I’ll
include them in future releases…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#97113
Feb 24, 2007 at 1:03am

Hey Guys, I just had one more question which has kinda been bugging me.

How do I get the countdown to STOP when it reaches 0?

Im trying to make something that will countdown to 0, then play a movie file.

Thanks!

Dan

#97114
Feb 24, 2007 at 1:05am

actually never mind guys,

I just added Select 0 below counter and reconnected it to my toggle.

silly.

Thanks!

#97115
Feb 24, 2007 at 4:55am

I tried to copy/paste the patch again… the text is the same… However if I open the patch as text, the header shows up. Weird!
Here is the full patch (which I called Reference.pat) -

max v2;
#N vpatcher 11 58 202 196;
#P button 8 90 15 0;
#P button 8 70 15 0;
#P button 8 50 15 0;
#P button 8 30 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 26 92 111 196617 Pluggo Dev Guide;
#P comment 26 52 118 196617 MSP Tutorials and Topic;
#P comment 26 72 111 196617 MSP Reference Manual;
#P comment 26 32 111 196617 Max Reference Manual;
#P button 8 10 15 0;
#P window linecount 3;
#P hidden message 8 510 239 196617 ; max launchbrowser “file:///Applications/Pluggo/Development Materials/PluggoDevGuide.pdf”;
#P hidden message 8 441 243 196617 ; max launchbrowser “file:///Applications/MaxMSP 4.6/Documentation/MSP46TutorialsAndTopics.pdf”;
#P hidden message 8 374 243 196617 ; max launchbrowser “file:///Applications/MaxMSP 4.6/Documentation/MSP46ReferenceManual.pdf”;
#P hidden message 8 297 243 196617 ; max launchbrowser “file:///Applications/MaxMSP 4.6/Documentation/Max46TutorialsAndTopics.pdf”;
#P window linecount 5;
#P hidden message 8 215 156 196617 ; max launchbrowser “file:///
Applications/MaxMSP 4.6/Documentation/Max46ReferenceManual.pdf”;
#P window linecount 1;
#P comment 26 12 118 196617 Max Tutorials and Topic;
#P user panel 7 7 17 103;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 89 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 48 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 23 7 130 21;
#X brgb 205 215 224;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden connect 15 0 5 0;
#P hidden connect 10 0 6 0;
#P hidden connect 17 0 7 0;
#P hidden connect 16 0 8 0;
#P hidden connect 18 0 9 0;
#P pop;

#97116

You must be logged in to reply to this topic.