Hey, no problem. FM synthesis is one of my greater interests! With modulating the phase offset I mean that instead of doing
carrier = sin((f + modulator) * pi)
(a typical way of modulating the frequency) you can do
carrier = sin(f * pi + modulator)
The modulator could be scaled by something from 0 to 2 pi but experiment with what sounds best.
The reason for doing this to begin with is probably that simply adding an offset in a sin table readout is probably a more effective design than adding the offset to the phase accumulator, especially if you want a consistent timbre without scaling the modulator amplitude along with the carrier frequency, and don't want to deal with negative frequencies.
Another nice thing you get for free with phase modulation is that you can do stable feedback modulation. In essence, you use the last calculated sample value for an operator (envelope * oscillator) as a modulation source in itself. In code, something like
Comments
Hey, no problem. FM synthesis is one of my greater interests! With modulating the phase offset I mean that instead of doing
(a typical way of modulating the frequency) you can do The modulator could be scaled by something from 0 to 2 pi but experiment with what sounds best.The reason for doing this to begin with is probably that simply adding an offset in a sin table readout is probably a more effective design than adding the offset to the phase accumulator, especially if you want a consistent timbre without scaling the modulator amplitude along with the carrier frequency, and don't want to deal with negative frequencies.
Another nice thing you get for free with phase modulation is that you can do stable feedback modulation. In essence, you use the last calculated sample value for an operator (envelope * oscillator) as a modulation source in itself. In code, something like
It's very effective for brass sounds or harsher sounds like trying to model distorted guitars