DPW oscillators - division by zero
-
- KVRian
- Topic Starter
- 513 posts since 3 Sep, 2009 from Poland
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
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
-
- KVRAF
- 7400 posts since 17 Feb, 2005
See this thread for some ideas.
http://www.kvraudio.com/forum/viewtopic.php?p=5974428
http://www.kvraudio.com/forum/viewtopic.php?p=5974428
-
- KVRist
- 48 posts since 5 Jul, 2011
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.
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.
-
Smashed Transistors Smashed Transistors https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=339459
- KVRist
- 142 posts since 10 Oct, 2014
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.
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.