Reset zigzag phase at audio rate, based on its output?

    Jun 04 2009 | 10:22 am
    Hello. Not sure if what I'm trying to do is possible.
    I'm using zigzag as a phasor because i need the ability to reset its phase with an audio rate signal.
    I'd like to have a situation where the output of zigzag is compared against a threshold, and if over that threshold, zigzag's phase should be reset to 0. I'd like all this to happen in the signal domain.
    Naively connecting this up results in what looks like a feedback loop which freezes the patch. Does anyone know of a way to fix this? (or an alternative, audio rate arrangement with different objects that would achieve the same thing?).

    • Jun 04 2009 | 3:53 pm
      I understood that a delay should be introduced to prevent the instantaneaous feedback loop but i was confused that adding a delay~ didn't help (can anyone explain why not?). I figured out that using a tapin and tapout does the trick.
      I'd like the delay introduced to be as small as possible, ideally smaller than allowed by the main I/O vector size. Did i understand correctly that i could put the tapin/out objects inside a ~poly subpatch (set to a lower vector size) to achieve this? so far my attempts to do that failed (doing so leads to a patch with no audio signal activity). Can anyone give any clues about how to do this?
      Here's the patch using tapin/out (no poly~)
    • Jun 15 2009 | 1:19 pm
      A send~/receive~ pair would do the trick as well. With tapin~/tapout~ I'd set the delay to 0. Max is smart enough to take not more than a signal vector of delay.
      The poly~ idea would only work, if the whole patch, that has the feedback loop in it, is within the poly~. there you can set the sv to 1 sample, which still isn't no delay...
    • Sep 27 2013 | 3:42 pm
      I'm not sure if you need zigzag~ for your purpose. Although I don't know your purpose. But I think this patch does the same as your example.
      The advantage of this patch is you don't need the delay. So it's sample accurate.
    • Sep 30 2013 | 12:47 am
      There's a patch I posted a while back called PM.PhasorSeq~. (Written in gen~)
      It can reset at signal rate, and outputs a sequence of phasors which can have different speeds, for example 1 1 2.