Forums > MaxMSP

keeping sync perfectly?

Mar 21 2013 | 9:42 pm

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.

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

Mar 21 2013 | 9:46 pm

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. )

Mar 21 2013 | 10:52 pm

it is now out of phase*

Mar 22 2013 | 4:22 pm

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.

Mar 22 2013 | 6:53 pm

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.

Mar 22 2013 | 6:54 pm

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.

Mar 22 2013 | 10:46 pm

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.

Mar 22 2013 | 10:59 pm

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.

Mar 22 2013 | 11:45 pm

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.

Mar 23 2013 | 11:54 am

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:

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

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

Forums > MaxMSP