Cabbage Logo
Back to Cabbage Site

My LFO depth is acting as an overall gain control for my synth?

I’ve been building this basic synth as a project and one part that I can’t seem to figure out the solution to is the LFO depth acting like a gain control. I’m sure I’m missing a basic concept here.

I’ve included the synth and the LFO code is on lines 348 thru 352
Synth Demo.csd (17.8 KB)

Thanks for any help in advance.

You’re multiplying the output of your synth by your LFO. This is standard ring modulation, which is a type of amplitude modulation. What were you hoping to achieve?

Hi Rory, thanks for getting back. Yes the modulation of the amplitude part I’m clear on but was just confused on how the depth parameter works, and if I even need it at all.

I’ll look into the concepts more tomorrow though. Thanks again.

The oscili opcode you are using does not have a depth parameter, per say. The parameter you are controlling with the kdepth variable is the oscillator’s amplitude. By multiplying the output of the oscili by your signal you are shaping the amplitude of your output signal. What’s referred to as the message signal in the diagram below is the kmod signal in your code. What’s called the carrier below is aOuthpf in your code.

If your ‘depth’ goes above or below +/-1 you will probably get some kind of distortion.

Most synth uses an LFO to control filter parameters rather than output amplitude. That’s being said, there is nothing wrong with this approach. It can yield some very interesting results, especially as you increase the rate.

Iain McCurdy’s RingMod instrument that comes with Cabbage employs a similar technique, although it’s a little more complex. The results are very nice.

Thanks for this Rory, was reading yesterday. Crystal clear info.