Additive delay (or so)

    Sep 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 intn, it outputs a bangn milliseconds after. But, more different from delay, I would like to have a kind of "FIFO" so that if you send 2 (or more) intn 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 | 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 !
    • Sep 22 2010 | 9:39 pm
      The [pipe] object delays ints. You'll have to change them to bangs on the output..
    • Sep 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...
    • Sep 28 2010 | 12:49 pm
      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 !