Sync two phasors with different frequency

periklis's icon

Hi everyone!

here is my problem: i am trying to sync the phase of two phasors, both having different frequency, so that they start always on the same moment when i change their frequencies... I tried to do that with banging a 0 message but this gives clicks. Any suggestions?

Thanks!

John Cassidy's icon

Do both have to be an actual phasor~ object? If not, the rate~ object set to sync mode- cycle sounds perfect for your situation.

periklis's icon

Hi John, thanks for your post!

I tried to use rate~ but i am having trouble defining the frequency rate of the rate object. Its Period is somehow inverted?! Giving it a rate of 2 for example, you get half of Period of the phasor object (instead of getting twice the phasor period) Or am i seeing something wrong here?

DJF's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I am not 100% sure, but I think the [rate~] divides an input by its argument. So [phasor~ 1] to [rate 0.5] would be dividing the incoming phasor frequency by 0.5. In your case I do not think you need to supply the [rate~] with an argument - but instead solely supply it with a message asking it to [synccycles] - that way any specified frequency at the [phasor~] stage remains unscaled. I am sure someone will correct me if I am wrong though.

John Cassidy's icon
Max Patch
Copy patch and select New From Clipboard in Max.

The trouble with using two separate phasor~ objects is that you still have no guarantee that they will remain in phase. Check out this patch. I think it might be what you're looking for.

The nice thing about doing it with one phasor and having two rate objects is that the frequencies of the two rate objects are independent, but still remain in phase. You'd have to decide for yourself whether or not having sync mode set to cycle or lock is better for your purposes. (cycle mode syncs the phase at the end of the input ramp's cycle. Lock mode syncs the phase immediately, whenever there's a change.)

periklis's icon

Hi John! Thank so much! Yes, this does the trick and AT LAST i understood how to use rate~ right!!!

Thanks for the lesson ;)

CarpentersKeys's icon

Just stumbled upon this in the midst of a similar problem. Thanks for your solution John.