Hello, I’m looking for some help understanding how different oscillators respond to FM. I’m just starting to mess around with plugin development, and while I know a little C++ I’m very new to DSP, so apologies if I’m missing anything obvious.
As I understand it, most oscillators are working by constantly advancing a phase variable, that cycles between some numbers (between -0.5 and 0.5 for example), and that phase value is passed to something that produces the actual audio wave, like a lookup table or a sin function. I’ve been messing around with the plugin development tutorial example and have a 2 operator FM synth, where one operator oscillates another via the modulators value being added to the phase as an offset
phase += freq * time + fmMod
This is working quite well for what I want it to do, but I’m sure there’ll be some more sensible way of doing this.
Where I’m running into trouble is understanding how to implement feedback on one of the operators. I can get an operator to modulate itself, but it doesn’t respond the way I’d like. As I increase the feedback intensity, it reduces the overall pitch of the oscillator and gradually evolves from a standard sine wave to a more pinched, pulsey wave. This is the same behaviour as when the sin output from the VCV VCO-1 is patched into it’s own FM input, as with a few other oscillator modules I’ve tried it with. What I’d like to achieve is the same kind of feedback that can be found in Bogaudio’s FM-OP and Valley Audio’s Dexter. Unfortunately the source code for both of these are a bit too complex for me to be able to figure out what they’re doing differently.
This is the Bogaudio oscillator core
And here’s the Valley Audio oscillator:
With Bogaudio’s sine oscillator, there’s an option to set the modulation type to linear or exponential, with the exponential setting having the behaviour I want, but exponential mode still looks to me to be adding a phase offset.
Would appreciate being pointed in the right direction here!