Forums > MaxMSP

Reset cycle~ Phase with bang?

Oct 25 2009 | 7:44 pm

I am synthesizing a bell tone that has some slight modulation on the fundamental. I have amp modulated the tone with a cycle~ object. The only problem is that when I trigger the bell tone using a bang the modulated cycle could be anywhere in it’s waveform. Therefore the hits are not consistent. How do I reset the phase of the cycle on each bang?

Thanks in advance, Mike.

Oct 25 2009 | 7:52 pm

is this what you want to do?

— Pasted Max Patch, click to expand. —
Oct 25 2009 | 7:56 pm

Thanks for the reply. Sending a 0. into the phase input doesn’t seem to work for me. I have tried a float into sig~ and into phase as well and it still doesn’t reset.


Oct 25 2009 | 8:01 pm

You can use a phasor~ to drive the phase inlet of cycle~ and then reset phasor with a [button] > [ trigger 0]. Then you just send the desired frequency to phasor~ instead of cycle~.

like so:

— Pasted Max Patch, click to expand. —

Oct 25 2009 | 8:03 pm

I see…

Maybe you could post a small patch with what you want to do
and indicate the problem specifically.


Oct 25 2009 | 8:21 pm

Excellent. The phasor reset works. Thanks for the help guys.


Jul 23 2015 | 5:22 am

Thanx Tim Llyod, helped here to get phase distorted bass drums clean.

Jul 23 2015 | 6:14 am

Question: How to avoid clicks on a cycle~ when the phasor~ gets triggered again? Example patch:

-- Pasted Max Patch, click to expand. --

Jul 23 2015 | 7:19 am

in this solution I reset the phase of the oscillator in 1ms, then open the envelope over 5ms. It’s simply a matter of event ordering, and seems to work fine; any residual transients occur only at around 100-200Hz, but are not envelope or phase-reset clicks:

-- Pasted Max Patch, click to expand. --


Jul 25 2015 | 2:00 am

Thank you very much, Brendan. Smart and simple.

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

Forums > MaxMSP