Forums > MaxMSP

Reset phasor when click is detected at signal rate

June 18, 2013 | 11:30 pm

Hey all,

I’ve been digging around a bit and I have a super simple question.

How do I reset a phasor when a signal goes from 0. to 1.?

I need the phasor to be going at a given frequency but reset intermittently by another signal. It must be done at signal rate which I am fairly certain rules out using the "phase" inlet.

I tried to build something with the gen~-phasor.maxpat example but my gen~ fu is not yet strong enough (I know I need to use expr but I can’t quite figure it out).


June 19, 2013 | 3:30 am

The trick is not to reset the actual phasor~, but instead offset its output by subtracting it from itself, sah~ samples for an offset constant at the click~, pong~ wraps the offset output:

– Pasted Max Patch, click to expand. –

(included a gen~ version there, too, simply replaced ‘pong~’ with ‘wrap’)
(just one of many ways to do it…)


June 19, 2013 | 8:18 am

Perfect, thanks! I would not have figured that out.


Viewing 3 posts - 1 through 3 (of 3 total)