Forums > MaxMSP

Delaying an action N milliseconds

December 25, 2007 | 11:05 pm

How can I go about delaying an action by some time? As a small example I have a note being played, and 100ms later I’d like the same note one octave down (-12) triggered. How can I fit the delay in between the -12 and makenote?

Random aside: how can I ‘dump’ my patches to text as are posted here on occasion?


December 26, 2007 | 1:13 am

hi there,

i’m new to this list, but i think here’s a question i can answer ;)

use [delay] (or [del]) (arg in ms, you can also set it through the right inlet) to delay an event. use a [trigger] (or [t]) to send your event to several objects. (you can also send your delay value in ms to [delay], it will output a bang after that time.)

to see your patches in text: file>open as text, or open your patch in your favourite text editor (drag it onto the app’s icon works on osx). (i don’t know whether this works with binaries as well, i always save as txt file).

hope this helps,
cheers, robbert


December 26, 2007 | 1:14 am

Use "pipe" or "delay"
Delay only works on bangs, and only one at a time. Pipe can delay any
message, and multiple messages at once.
Add an argument after the object name as the delay time in milliseconds

On 25/12/2007, Wells Oliver wrote:
>
>
> How can I go about delaying an action by some time? As a small example I
> have a note being played, and 100ms later I’d like the same note one octave
> down (-12) triggered. How can I fit the delay in between the -12 and
> makenote?
>
> Random aside: how can I ‘dump’ my patches to text as are posted here on
> occasion?
> –
> Wells Oliver
> wells@submute.net
> http://www.submute.net
>


December 26, 2007 | 1:15 am

And for your other point, it’s as simple as copy-pasting the objects into
your email. They’ll paste as text.
Alternatively you can save your patches as a max text file.
Hope this helps!

Joe

On 25/12/2007, Wells Oliver wrote:
>
>
> How can I go about delaying an action by some time? As a small example I
> have a note being played, and 100ms later I’d like the same note one octave
> down (-12) triggered. How can I fit the delay in between the -12 and
> makenote?
>
> Random aside: how can I ‘dump’ my patches to text as are posted here on
> occasion?
> –
> Wells Oliver
> wells@submute.net
> http://www.submute.net
>


December 26, 2007 | 12:11 pm


December 26, 2007 | 2:06 pm

Or…

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 55 163 76 196617 pipe 0 0 0 500;
#P window setfont "Sans Serif" 12.;
#P newex 33 30 246 196620 notein;
#P newex 55 94 35 196620 – 24;
#P newex 33 281 246 196620 noteout;
#P connect 2 0 0 0;
#P connect 2 0 1 0;
#P connect 2 2 3 2;
#P connect 2 2 0 2;
#P connect 2 1 3 1;
#P connect 2 1 0 1;
#P connect 3 2 0 2;
#P connect 3 1 0 1;
#P connect 3 0 0 0;
#P connect 1 0 3 0;
#P window clipboard copycount 4;

On 12/26/07 7:11 AM, "Alain Chastenet" wrote:

> max v2;
> #N vpatcher 79 165 935 560;
> #P window setfont "Sans Serif" 12.;
> #P newex 762 151 62 196620 pipe 500;
> #P newex 33 30 665 196620 notein;
> #P newex 400 198 35 196620 – 24;
> #P newex 484 155 62 196620 pipe 500;
> #P newex 400 155 62 196620 pipe 500;
> #P newex 33 281 665 196620 noteout;
> #P fasten 3 0 0 0 405 250 38 250;
> #P connect 4 0 0 0;
> #P connect 4 1 0 1;
> #P fasten 2 0 0 1 489 229 365 229;
> #P fasten 4 0 1 0 38 103 405 103;
> #P connect 1 0 3 0;
> #P fasten 4 1 2 0 365 91 489 91;
> #P connect 4 2 0 2;
> #P fasten 5 0 0 2 767 227 692 227;
> #P fasten 4 2 5 0 692 101 767 101;
> #P pop;

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


Viewing 6 posts - 1 through 6 (of 6 total)