keeping sync perfectly?

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

so something has bothered me for a while now and ive finally taken initiative to try and figure it out.
basically, if i have something like an additive synth, and i have 2 oscillators doing their thing, in whatever phase i want. then i change 1 of them (sort of like if i were tweaking 1 oscillator's ratio attribute) and then i set it back to the original frequency, they will obviously be out of phase. i want this to not happen, i want them to be properly in phase always, and *WITHOUT* clicks.
thank you.

mcQ's icon

in my example, i set the 2 oscillators initially to the same frequency, then set the phase off by 0.5 in one so that the result of adding them will be a flat line, so no sound at all. then when i change one a few times and set it back, its not out of phase and the result is an actual waveform. ( it is also clipped. )

mcQ's icon

it is now out of phase*

Wetterberg's icon

How would you want this to occur? The example you've shown is with two freely running phasors?

You could use rate~ to control the offset, but that yields other problems when you sync back up. You could crossfade between rate~objects, which I suspect will give different awkward results, but some sort of sliding between rates would be ideal, I suppose.

mcQ's icon

i dont know how i want it to occur. thats why im asking the forums.
essentially what i want is when it goes back to 2hz being sent to that phasor, for it to be in the same phase as it left at. (0.5 phase) so that when i add the 2 waves together, they end up making a result of a flat line again.
and yes, the only way i realize this can happen is some kind of ramping or sliding or whatever inbetween the frequency changes, but im not quite sure how to manage it.

mcQ's icon

and i want this to happen without clicking of course. the easiest way is to just reset the phases every single time i change the frequency input, but that obviously makes clicks, as it abruptly resets the wave in the middle of oscillation.

dtr's icon

One thing you could try is to shortly fade out the oscillator who's phase is being reset, then fade back in. This would be milliseconds business.

mcQ's icon

yeah thats not a bad idea, but then note slides would be useless because they would reset it so fast that the fading would ruin sound quality to the point of possible almost silence.
i like where that idea is going though. ill do some thinking on it. thanks.

mcQ's icon

by the way, the rate~ object seems to make some form of relief from another issue ive encountered, it allows me to sync everything on 1 phasor and vary the freqencies. but still when changing frequencies and coming back, it will not work.

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

this is all just a simple issue of staying in the signal domain and knowing what your objects are capable of. afaict.
my msp is rusty, but this is what i remember doing: