This page is available in English only

DPW Oscillator

FM-able Antialiased CPU-friendly Multiwave Oscillator

(12 Votes)
1.5 (Updated 5 years ago)
November 30, 2015
Reaktor 6


The DPW Algorithm is nice and simple. I guess you cant find an antialiasing algorithm that is faster than DPW. But it comes with a cost. The modulation capabilities are really limited. As you can see at higher order DPWs you cant even play them without the chance of clicks, while the first order DPW is good enough to result in a good sounding and CPU-friendly FM-oscillator.

So when you want some simple CPU-friendly FM-able oscillators in core. This is for you.

- Test ensemble with higher order DPW oscillators up to N=3. The higher order DPW is just for proof of concept. You could play them, but as you can see/hear in the test ensemble, you're likely to get clicks. In the test ensemble the output is clipped to [-1,1].
- Overworked testing environment. Added a simple to use Random Note Player and the Filterbank Spectrometer by Jan Brähler. Safety Switch enables Audio, Scope and Spectrometer when the user want to. The backend of the audio test ensemble is guarded by an AHDSR, so the audio stream is enveloped when it is fed to your sound card.

Thanks to Andres Picornell, who pointed out that the Signal Analyzer was causing the crashes on macbooks, I removed it from the test ensemble and plugged a primary scope to it. This is strange behaviour I dont understand yet. Howeber, I hope the new version of the test ensemble doesnt crash the macbook.

- Overworked Demultiplexing of Control parameters in attempt to solve the issue in the test ensemble posted by Phil Durrant. I cannot acknowledge, if this solves the problem. All I can acknowledge, is that the oscillators dont lead to this crash. So please let me know, if anything unexpected happening, when playing the new ensemble.

V1.2 features two major updates:
- I tuned the structure to be even more CPU-friendly by inserting some latched operations
- I added a DPW-antialiased parabol to the oscillator. There are two macros added, featuring a DPW-antialiased parabolic waveform. Which gives a cleaner FM-sound than the prior version, but also takes a few multiplications and additions more into account!

- Please Notice: The macros in the .zip has been renamed. The macros with the non-DPW parabol has now the suffix (cheap sin). When you want to update your instruments with the new oscillators, and dont want to change the sonic behaviour, please use the version with suffix (cheap sin)!!!

These first order DPW oscillators are well suited for FM and AM. It is good practice to run the core macros running the oscillator at 64bit precision. All oscillator macros in this download are set to 64bit precision. Lower precisions can lead to clicks in the frequency scaling.

The Sinewave outputs a parabolic waveform. But it is not differentiated in the (cheap sin)-version. So it is not DPW-antialiased in the (cheap sin)-version. It gives a simple distorted sinewaveform, whiches aliasing is comparable to the other waveforms of the DPW oscillator.

The oscillators are not suited to be resetted by audio sources.

The download contains:
-Test ensemble containing a simple FM pair.
-Test ensemble containing higher order DPW algorithms
-4 DPW multiwave core macros, two with Gate input for Phase reset, two without. Two of them are implemented with a cheap non antialiased parabol.
-1 DPW multiwave core cell with an interpolating waveform selection
-1 higher order DPW core cell with an interpolating waveform selection


Andres Picornell
5 years ago
nice Benjaming , I was trying to implement the high order code from the papper without succes , thanks
Benjamin Poddig
5 years ago
This was meant as a safety guard. But I see, that's not a good solution. Changed the testing environment in V1.5.
Phil Durrant
5 years ago
No it seems to be fixed :) Maybe new users to Reaktor might not be able to use the Test Ens, because there is a multiplier with only one input?
Benjamin Poddig
5 years ago
@ Phil: Does this still happen with the new test ensemble in V1.2b?
Phil Durrant
5 years ago
Hi Benjamin, I was using Reaktor in Standalone Mode and if I reduced the Constant to 0, Reaktor crashed immediately. I tried three times and got the same result.
Benjamin Poddig
5 years ago
Thank you for pointing out the signal analyzer causing problems. I couldnt ever tell that. On my system it works seemless. Also thank you for the paper. I did the math for higher order DPW waveforms earlier. But I found them as not being playable in realtime in Reaktor because of the higher order differentiation. Its stepresponse contains multiple bipolar unit impulses. Which is not so nice when altering the frequency of the signal to be differentiated, when the signal can be seen as a superposition of stepfunctions. But I guess I can look at that again.
Andres Picornell
5 years ago
Instant crash on my macbook too ,I can't open the ensemble with the reaktor engine on but I deleted the analizer and all is ok now , I'd like to see of 3rd and 4th order implemetation from this paper
Benjamin Poddig
5 years ago
This behaviour sounds strange. The only reason could be my rudimentary implementation of the event bus in the test ensemble. I apologize for the inconvenience and thank you for mentioning. I will overwork this section in my test ensembles. Does it crash Reaktor anytime or under certain circumstances?
Phil Durrant
5 years ago
Changing the Constant to zero on the Right Amp AHDSR causes Reaktor to crash immediately on my Macbook.