How to reset delay ?


    Jun 22 2017 | 1:13 pm
    Hi at all I have a very stupid question: how can I "clear" the Delay's buffer?
    I've try to find out something from the documentation but with no sucess.
    The goal is to clear the delay line immediatly, without waiting his time.
    This is for a re-trigger porpouse.
    Thanks in advance!!!
    Enrico

    • Jun 22 2017 | 2:30 pm
      The only way to reset Delay is to reset the whole gen~ ...
      ...of course this is shitty...
      ...or to roll your own Delay in GenExpr using Data & Poke etc and create a for-loop to write 0's to the Data on a History reset only. This is how I do it.
      I have always wanted to be able to reset Delay, and also to be able to reset Historys from Max top-level even in the subpatch / function level in Gen.
      Please someone tell me if I am being an idiot. If not, can we all please feature-request this :)
    • Jun 22 2017 | 2:31 pm
      no matter if we´re talking pipe, delay, delay~ or tapout~: sending "0., 275." for the delay time should clear the buffer.
    • Jun 22 2017 | 2:34 pm
      Hi Roman. This is the GEN forum.
    • Jun 22 2017 | 2:35 pm
      damn :)
    • Jun 22 2017 | 3:21 pm
      @STKR :
      "or to roll your own Delay in GenExpr using Data & Poke etc and create a for-loop to write 0's to the Data on a History reset only" sound really intersting!
      Are you meaning to write a (circular) buffer and use it as delay line?
      Seems to be an expensive solution, for a so simple operation...
      Or maybe simply I can't figure out how to.
      Maybe can be usefull to use two delay line and switching between?
      Thank so much!!
      Enri
    • Jun 22 2017 | 6:16 pm
      never said it was a good idea :)
      something like this:
    • Jun 24 2017 | 1:07 am
      Writing your own circular buffer might not be *that* more expensive -- the delay operator itself uses an anonymous data object internally, and shares some of the same code generation with sample/poke et al. It has a few of its own optimizations but they might not make all that much difference. Delay is there as a convenience but sometimes you need something a little more flexible.
    • Jul 10 2017 | 5:57 pm
      I started to think about this problem, reaching the conclusion one needs some kind of sample counter which is set when the delay should be cleared and decrements to zero. Then when the counter value is more than one, the delay output is zero. I haven't quite figured out how to set the counter.
    • Jul 11 2017 | 5:54 pm
      Thanks at all guys! @STRK : I will study your code, its a bit complex for me, but a good source to learn @Wakefield : Really clear, as usual, thx! @ERNEST: thanks to think about this.
      Enrico