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 ?
Cheers
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
The [pipe] object delays ints. You'll have to change them to bangs on the output..
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
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")
Cheers !