Forums > MaxMSP

Additive delay (or so)

September 22, 2010 | 12:59 pm

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 ?

Cheers


September 22, 2010 | 3:01 pm

Hello BenCello,

– Pasted Max Patch, click to expand. –

September 22, 2010 | 4:25 pm

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 !

Cheers


September 22, 2010 | 9:39 pm

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


September 23, 2010 | 6:58 am

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…

Cheers


September 23, 2010 | 7:01 am

Hello BenCello,

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


September 28, 2010 | 12:49 pm

Hi!

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 !


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