How to sync phase of two cycle~ ?

Joseph Nagy's icon

In the following patch I have two cycles added together with ratio and phase controls for each. But once I change the ratio of one of them and then set it back to 1, the phase of that cycle is then different from the other. How would I go about making sure both of the cycles start at the same phase on every note press?

Max Patch
Copy patch and select New From Clipboard in Max.

Roman Thilenius's icon

cycle doesnt do this. phasor does.

- use phasor to control the phase of cycle (instead of sending cycle a frequency)
- whenever the 2 frequency values match for the first time, reset the phase of phasor.

(alternatively you could use a gate~ to link the first phasor to the second cycle whenever their frequencies are the same.)