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

Jun 4, 2009 at 10:22am

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

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?).

– Pasted Max Patch, click to expand. –
#44242
Jun 4, 2009 at 3:53pm

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~)

– Pasted Max Patch, click to expand. –
#159036
Jun 15, 2009 at 1:19pm

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…

Stefan

#159037
Sep 27, 2013 at 8:42am

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.

– Pasted Max Patch, click to expand. –

The advantage of this patch is you don’t need the delay. So it’s sample accurate.

#266450
Sep 29, 2013 at 5:47pm

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.

Here:

http://cycling74.com/forums/topic/pm-phasorseq/

#266599

You must be logged in to reply to this topic.