Construction of FIR filters in Reaktor?

cs5947 Member Posts: 18 Sine
edited September 23 in Reaktor

Hello everyone. I want to be able to create a relatively simple FIR filter (specifically lowpass, highpass, bandpass, notch and the like) for a DWG ensemble I'm working on. The reason I want to use FIR filter is because the default primary Reaktor filters (which I assume to be IIR) alters the phase of the delay line which in turn changes the pitch, which I want to get rid of easily.

The idea of using an FIR filter popped straight into my head when I found this reply (#10) by Robin Davies on decoupling the pitch delay from filters.

The only issue here is that I have no idea how to properly construct a filter, because my knowledge of maths is a little behind compared to most DSP people, so I want to learn how this can be done.

Thanks, cs5947


  • Laureano Lopez
    Laureano Lopez Cordoba, ArgentinaMember Posts: 70 Tri

    There's no easy way to solve this, and it's hard to recommend anything without more information on the context: which filters are you using, with which purpose.

    A FIR filter is just a polynomial on the input, so implementing it in Reaktor is trivial. What is not trivial is getting the coefficients for a given response. There are different methods for different kinds of responses. All of them are complicated and very difficult to implement in Reaktor. When people use (non-trivial) FIR filters in Reaktor, they compute the coefficients somewhere else. It's not reasonably possible to implement variable-cutoff FIR filters in Reaktor.

    If I were doing this, I'd use IIR filters and compensate for their phase delay. The phase delay formulas for simple filters are not that complicated. For example, for a 2-pole lowpass you have

    where fc is the filter cutoff and f is your frequency of interest. This gives a result in samples which amounts to the delay caused by the filter at that frequency, so you would subtract that from your delay time. As Robin explained, you'll get the fundamental in tune, with the harmonics slightly skewed. The arctan there is the "a" output of the xy2polar macro, tan[pi f/sr] is the output of the "F to half w" macro.

    Of course, this means learning how to compute the phase delay of your filters. Learning how to model linear phase FIR filters with arbitrary responses is not any easier though.

Back To Top