Consistent phase when using FM

Joseph Nagy's icon

I'm trying to set up FM that will have consistent results every time I shift the FM knob up or down. The way it works now is that when the FM knob is turned, the phase of one of the oscillators is changed and it starts to FM from varying phases causing different results.

How would I go about changing this patch so that I can maintain consistent phase every time I mess with the FM knob?

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

On a side note, I noticed that when applying FM, the change in the change in the waveform is very jittery. Is there a way to smooth out changes to the signal?

mzed's icon

Phase isn't really going to make a difference to the sound. And, since your modulation ratio is variable there really isn't a way to keep a constant phase relationship over any arbitrary modulator settings.

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

To smooth out the changes, have a look at line~ to change control values into signals.

Joseph Nagy's icon

Thank you so much for the reply MZED, it turns out the jittery changes in the signal is what was causing inconsistencies!

But now my question is if the envelope from a single line~ can be applied to multiple sources to save cpu. Would this be possible?

Roman Thilenius's icon
Joseph Nagy's icon

I'm new to Max, could someone provide an example of how to do that?

mzed's icon

I'm not really sure what you're asking for. You can patch the output of a line~ to multiple places if you need to.

Joseph Nagy's icon

I would want multiple parameters to move with the smoothing produced from a single line~ instead of making a line~ for every parameter in a theoretically larger project in order to save cpu.

Roman Thilenius's icon

now that is per signal - of course, if i may say so.

Roman Thilenius's icon

what one could do in a synth with 1000 paramters is to turn the line~ objects only on when a message arrives and turn them off again when interpolation has finished.

if you do this using poly~, the last signal value will still be present at its outlet.

but encapsulating line~ in poly~ alone needs more CPU than line~ alone, even when turned off. :)

mzed's icon

I don't think that optimizing the performance of line~ is really going to do much for overall CPU savings. In general, I tend to worry about optimizing patches as the last stage of programming... if at all.

Roman Thilenius's icon

well it would turn off all the signals from the line object, too. but it doesnt work anyway. :) your RAM will go havoc if you have tenthousand polys.