DPW oscillators - division by zero

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I want to develop an alias-suppressed oscillator based on DPW algorithm. It should support through-zero fm, so zero frequency is allowed :). (chose DPW because of some reasons)

Any idea how to solve the division by zero problem?

Tried:
- Crossfading with original function when dx is close to zero - doesn't work, there is always a small difference that causes aliasing
- Adding a small value to dx, constant, noise or negative/positive when its zero - this causes a drift or noise

Thanks in advance
giq

Post


Post

You can either handle the case where frequency=0 in another way using a conditional: if(frequency==0){alternate handling}
Or, you can translate the entire value space to positive values and then translate back to the original range after calculation. I have no idea if this would affect output though. It's entirely possible. I would try the conditional first.

Post

I've used differentiated poly wave generators a decade ago (vagabond king vsti). They are great for SSE code as they do not need look up tables.

DPW is not a good method for audio rate frequency modulation: even when you are far from 0, the differentiator's coefficients will change too fast and induce glitches. To prevent that you'll have to include tricky delays for the coefficients to compensate for the half delays induced by the differentiators.
See you here and there... Youtube, Google Play, SoundCloud...

Post Reply

Return to “DSP and Plugin Development”