This tutorial is the third part in a series on Wave Digital Filters in Reaktor (part I, part II). Previously, we covered the basic one port elements, including resistors and capacitors, and serial connectors.
In this tutorial, I’ll provide an updated WDF library, including a parallel adaptor, updated components, and an example of an interesting oscillator made out of WDFs.
UPDATED COMPONENTS
There is not much change to these, simply an update from using the ‘Wave Up’ and ‘Wave Down’ names to the more commonly used ‘a’ and ‘b’ for the wave variables of a component. This simply makes it easier to relate the components to the various available literature on WDFs.
![Voltage Source Voltage Source - Wave Digital Filters]()
There is also a new component available, the ‘Res Voltage’ macro. As far as I understand it, this models a voltage source with a resistor built in. The previous macro named Voltage Source models an ideal voltage source, which seems to cause problems in WDF implementations, which probably accounts for the strange behavior of the Tube Diode macro provided in Part II when fed with any non-bandlimited signal.
PARALLEL ADAPTORS
Parallel adaptors are a big improvement to add to our library, because they allow for a whole new type of connection to be made. Only very basic WDF models can be made without them.
The parallel adaptors work just like the serial ones. They are split into two macros, Parallel Up and Parallel Down. The three bottom outputs of Parallel Up feed directly into the bottom three inputs of Parallel down. The ‘b’ and ‘r’ outputs of Parallel Up can be used to control another one-port element (such as a resistor) or a non-linearity.
![pic3 Parallel adaptor configuration]()
If the one port element you need to use doesn’t accept an ‘r’ value (such as the capacitor), you can simply remove the code inside the element that converts from it’s input into port resistance (In the case of the capacitor, this translates from farads).
VIRTUAL ANALOG OSCILLATOR
Using the new elements available, I’d like to share a Reaktor implementation of the oscillator detailed in this article (on page 724, for those who are interested).
![pic4]()
This oscillator is pretty cool! It has good spectral properties (seems to have very little aliasing). It outputs both a sawtooth and a pulse wave at the same time.
By changing the constants in the macro named ‘+/-’, you can change the shape of the sawtooth into a triangle. The same values control the pulse width of the pulse oscillator.
There are some big problems, unfortunately. The frequency of the oscillator is controlled by the capacitance of the sole capacitor. However, the oscillator is only stable within a pretty narrow range of values. I’ve been able to get stable waveforms ranging from around 44 Hz to around 300 Hz.
Relating an exact capacitance to a frequency is probably not simple, either, though I admit I haven’t really tried.
I’m not sure if these problems are in my code or if the oscillator design is simply in need of more work – I am able to match the published results for the values given on page 724.
![pic4]()
Sawtooth, with +/- values equal to 10,000 and 1,000.
CONCLUSION
DOWNLOAD WDF PACKAGE HERE.
The download includes all of the macros described in this tutorial.
I hope in the future to be able to build a larger and more comprehensive WDF library. The field is still producing a lot of new research and innovation, much of it well beyond my comprehension.
The post Wave Digital Filters in Reaktor, Part III appeared first on NI Reaktor Tutorials.