Additive delay (or so)

Sep 22, 2010 at 12:59pm

Additive delay (or so)

Hi Maxers,

I have a rather simple problem but I can’t find a “Max-way” of looking at it so I could implement it simply with a patch. Here is the thing :
I would like something which works pretty much as delay which means : if you input an int n, it outputs a bang n milliseconds after. But, more different from delay, I would like to have a kind of “FIFO” so that if you send 2 (or more) int n and m, it outputs a first bang after n milliseconds then a second one m milliseconds after the first bang.

I tried with a proper FIFO (using a coll) storing the int and outputting them in a delay but I have some trouble to conciliate an “auto” triggering mechanism for the first int to have the usual delay mechanism with a loop for the next ones (+ an “auto-reset” mechanism).

Do you have any suggestions to have an efficient Maxy implementation ?


Sep 22, 2010 at 3:01pm

Hello BenCello,

– Pasted Max Patch, click to expand. –
Sep 22, 2010 at 4:25pm

Wow !

That looks like a very elegant solution ! Thank’s pizza olives !
I didn’t know about the zl queue object. It would have saved me quite a lot of time…
Anyway, I’ll dissect your solution to understand it fully (but it looks very simple actually) and adapt it to my needs.

I knew I could count on you Maxers !


Sep 22, 2010 at 9:39pm

The [pipe] object delays ints. You’ll have to change them to bangs on the output..

Sep 23, 2010 at 6:58am

Hi Chris,

Thank’s for your answer but I already tried with pipe and it won’t work because there is only one amount of time you can set for all the int going through.
But pizza olives‘s solution is probably the good way…


Sep 23, 2010 at 7:01am

Hello BenCello,

you can use [qlist] too (i often forget it) ; if you want a text based interface …

Sep 28, 2010 at 12:49pm


I forgot about [qlist] too ! And actually for what I need to do it will be even more handy to use [qlist] than to have a FIFO delay.
But I improved (IMHO) a bit your patch anyway to have features like “stop” or “reset” and use it with ints and list…
As sharing is fun, here it is : (I saved it as “qdelay”)

– Pasted Max Patch, click to expand. –

Cheers !


You must be logged in to reply to this topic.