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.