Additive delay (or so)
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
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 ?
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 !
The [pipe] object delays ints. You’ll have to change them to bangs on the output..
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…
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")
----------begin_max5_patcher---------- 1158.3oc2Z80iahCD+4jOEV7P0tR4V4w+g.mTen2ceA5ympNQBta4DARAhts aU+tW7XH6ltjfSfXhtGVRrwlLyuYleyLl86ym4sJ+IUoG42I+MY1ruOe1LbJ 8DyZFOyaSzSqSiJwk4ko9u7U+q2ByspTOUgSWjuqRQRxpZuS1tM0SkppvswZ lMIFWc8S32.Z6RMqq5aaUFAwyaQ8ejO0b6OmmUkEsAuo2GJRhRa231np0eII 6w+oPstxrWlH7A5BBHn5OjB8UV82O3oUl7L9z.V8s2KtIYsRKnm6GymqurXX 3REYEgYMlDdTHYUT1iZXQivCBY7A8U9jCLIUphtwE3s3RvwcUFlaBHQbX4Ti Fo4QwFSrkHh+o8TFDpvQPwmN0fBJgphnhGKsNBRbEIUBBzWWd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