Stuck with a SynthEdit project?

Tag: SINC Filter

SINC (IIR) Filters

Windowed-sinc filters are used to separate one band of frequencies from another. They are very stable, produce few surprises, and can be pushed to incredible performance levels.
These exceptional frequency cutoff characteristics are obtained at the expense of poor performance in: a) the time domain (meaning they will always introduce latency), b) excessive ripple and c) overshoot in the step response.
In the image below you can see how the signal pulse (Oscillator 280Hz) is delayed as the number of “Taps” at a filter frequency of 5 kHz increases, and the amount of “ringing” or ripple on the pulse waveform also increases.

Increasing TAPs increases the latency:

TAPs and latency.

The SINC Lowpass filter is a linear-phase FIR Filter. The number of “taps” specifies the number of coefficients, more TAPs means increased filter cut-off steepness as seen below however, increasing the number of TAPs introduces more latency. In SynthEdit however there is latency compensation. The module is watching for any change to the default value of the ‘Taps’ pin. The module then uses this value to calculate how much latency compensation it requires and passes that value to the host via the ‘SetLatency’ method. Latency is measured in sample frames.
The module reports this latency to SynthEdit to enable PDC (Plugin Delay Compensation). PDC hides the effect of latency through the clever use of delay lines. You can literally think of all FIR/SINC filters as a multitap delay with no feedback, all the taps are spaced 1 sample apart, then gain is applied per tap and then all taps are added together. So for a 171 tap delay, you have 170 delays, 171 gains (like level adjust modules) and 170 adds. It’s already well optimised with SSE2, as it’s doing 4 calculations at a time.

Resonance/Q/Feedback.

SINC filters do not include a feedback path, so have no feedback, resonance, or “Q” control plug. The are intended to be used as a filter with a very steep low/high pass cutoff characteristic, rather than for colouration of sound.

Increasing the number of TAPs and the effect on frequency roll-off.

Note about 0 Hz filter cut-off:

Although this filter will allow you to set a cut-off frequency of 0 Hz, you cannot use a filter frequency of 0Hz, this is is an ‘illegal‘ value. You will get quite loud clicks and pops, along with “glitching”.
Most SynthEdit filters are “clipped” internally so that end-users don’t input wrong values (this comes at a slight CPU cost of course), usually limited to just above 0Hz and just below the Nyquist frequency.
Why 0Hz is illegal is easiest to explain with a simple 6dB/Octave lowpass. If we set the lowpass to 100Hz, then 200Hz (2nd octave) will be filtered by -6dB, 300Hz (3rd Octave) by -12dB, 400Hz(4th Octave) by -18dB and so on, hence the “6dB/Octave” name. Now try and do the same thing with 0Hz….what is an octave above 0? 0 multiplied by 0 is still 0. It’s the same as dividing by zero.
To prevent loud pops, clicks and glitching you must limit the lowest cut-off frequency to 14 Hz.
Just be sure to limit your patch memory values to prevent illegal values.
Other than this the SINC filters are suitable for fast modulation of the cut-off frequency. Note that there is no resonance/feedback on these filters.

Changing TAP value.

One point to note with SINC filters is that when you change the TAP value the audio engine has to reset for the recalculation process.

TAP Value and filter cut-off slope.

Although we can vary the cutoff slope on SINC filters by altering the TAP number, this bears no relation to the more familiar dB/Octave slope, so unfortunately you cannot say that a certain TAP number is equivalent to a particular dB/Octave cutoff slope. This is due to the DSP structure, and the way these filters work, they are a using a different method of filtering which bears little or no mathematical resemblance to the more traditional analogue filter emulations.

SynthEdit Filters

First I’ll cover what a filter actually does, and the four modes of filtering: Low Pass, High Pass, Band Pass, and finally Notch filtering. Next will be the common types of VCF found in Synthesizers, such as Moog, Korg et al.
A subtractive synthesizer without a filter is going to be very much lacking in the soundscapes you can generate – it will be like a curry without most of the spices missing. Filters lend sounds their flavour by boosting and cutting the oscillators’ frequencies.

Generally speaking any filter that has a cut-off pitch set by a float plug is not suitable changes in frequency during operation, they tend to respond badly, produce strange noises and crash unpredictably.
Filters which have a dark blue voltage plug for pitch/frequency are safe for faster modulation speeds.

So, let’s first review the different breeds of filter.
In order of appearance: Low Pass, High Pass, Band Pass, and Notch (AKA Band Stop) filter frequency response curves are shown below.:

Characteristics of High, Low, Band-pass and Notch filters.

Most Synthesiser voltage controlled filters have a resonance control. This alters the amount of internal feedback in the filter, which causes a boost to frequencies at the filters cut-off frequency, causing “ringing” and even self oscillation in the filter.

Low pass filter with a low resonance setting:

Low pass filter with low resonance setting

Low pass filter with a high resonance setting:

Low pass filter with high resonance setting

The State Variable Filter (SVF) works in low-pass, high-pass, bandpass, and band-reject (also called notch and band-stop) modes. And all of these modes can operate at the same time, if you wish.
Low-pass and high-pass modes cut-off slopes are 12 dB per octave, and the band-pass modes is 6 dB per octave.
State variable filters are all-pole filters, meaning they boost high frequencies even when the resonance value is low. This affects band-pass and high-pass outputs more than the low-pass output, also mixing these outputs adds a touch more gain.

The next type is the Moog ladder filter, which is a Low Pass filter. This is a digital emulation of Moog’s celebrated four-pole transistor ladder filter, the Moog Filter is a has a 24 dB/octave frequency attenuation slope. Its digital programming also simulates the analogue components’ natural non-linearities. As well as responding differently to different input levels, it also (like the original) self-oscillates when resonance is turned up high. It behaves very differently to an SV filter at high resonance levels.
The Moog Filter features enhanced resonance levels for high frequencies, adding a natural high-end gloss, and moderate resonance levels for lower frequencies.
Note: At extreme resonance settings, unlike the original analogue circuit the saturation in the digital filter may cause high frequency aliasing.

SINC filters are linear phase “Brickwall” filters, Brickwall meaning that unlike normal filters where the frequencies above or below the cut-off frequency are attenuated more the further you pass the cut-off frequency these filters abruptly stop passing audio at the cut-off frequency. Linear phase meaning that across their frequency range there is as little change in phase shift as possible. These filters are an idealised design only possible in the world of DSP programming.
Due to their nature SINC filters do not have a resonance control or any feedback
High Pass SINC filter.

High pass SINC filter

Low Pass SINC filter.

Low pass SINC filter

This is a digital emulation of the OTA Low Pass filter used in the Korg MS20. This filter had a characteristic “screaming” quality when high input levels were combined with high resonance control settings. In the SynthEdit emulation this saturation can be controlled, or turned off altogether.
The effect of the saturator is shown below, as you can see the effect is to reduce slightly the main resonance peak, and introduce some new resonance peaks into the spectrum

For practical design purposes, the Sallen-Key filter is switchable from 12dB/octave lowpass to high-pass to band-pass – a versatile filter. Also, if you push a lot of volume through the Sallen-Key filter it starts to overdrive subtly and then more distinctly, which is another useful sonic option. On the Arturia Brute synths, Arturia arranges the “Steiner-Parker” style (Sallen-Key) and “Moog” style (transistor ladder) filters so they can be used either in series – one operating on the basic oscillator sound after the other – or in parallel, with the outputs from both equally audible. A Master Cut-off knob is also provided to change the basic setting of both simultaneously. Combining the various types of filter in these ways can give you a lot of options in your sonic palette.

TD Modules Sallen Key Filter

Sallen Key filter

TD Modules Steiner-Parker filter
Note that each filter mode has its own input, so you can have each mode set at it’s own level giving you all sorts of possibilities.

A type of voltage controlled filter, originally developed by EMS in order to work around the Moog patent for the VCF.
The diode ladder works on a similar principle to the Moog transistor ladder; the diode, under the influence of an applied control voltage, permits or limits current flow to a filter capacitor, such that as the control voltage is varied, the filter’s cut-off frequency changes. A main difference between the transistor ladder and diode ladder is that in the transistor ladder circuit, each pole of the filter is electrically isolated or “buffered” from the others. In the diode ladder, this is not the case; all the poles interact electrically with each other. This makes the diode ladder much more difficult to analyze mathematically, and its distortion behaviour as resonance is increased is more non-linear and harder to predict. Performers often say that the diode ladder filter has a “dirtier” sound, which is probably the effect of the less predictable distortion behaviour.
Besides the EMS synth models, the diode ladder was used by Roland in many older analogue models of Synthesizer. The famous TB-303 filter is a diode ladder filter.

These are much like their ordinary counterparts in the SynthEdit filter selection, but are closer in sound and behaviour to their original counterpart Analogue filters. There are some comparisons below, see the difference in the frequency roll-off at the top end of the spectrum.
SV Filter:- Top Spectrum is the ordinary SV Filter, the bottom one is the VA SV Filter.
The “Normal” SV filter can start to distort at high resonance levels at the top end of the spectrum, and can start to sound distinctly “crunchy”

Comparison of Standard and VA state variable filters

Comparison between the Standard (Top) Moog Filters, and the VA (bottom)

Comparison of standard and VA Moog filters

After doing some side by side testing (on a personal level) I prefer the sound and behaviour of the VA filters, as it’s closer to how the original analogue filters behaved.
There is more to these filters than just that… if you want to go into the “geeky” stuff… read on, there’s more.

OK, so this sounds like a real contradiction in terms an ALL pass filter? What does it actually do?
An all-pass filter is a signal processing filter that passes all frequencies equally in gain, but changes the phase relationship among various frequencies. Most types of filter reduce the amplitude (i.e. the magnitude) of the signal applied to it for some values of frequency, whereas the all-pass filter allows all frequencies through without changes in level, but changes the phase of the signal dependent on the frequency. A common application in electronic music is in the design of an effects unit known as a “phaser”, where a number of all-pass filters are connected in sequence and the output mixed with the input signal to produce a notch which can be swept back and forth in frequency by modulating frequency of the filter. Read more on All pass filters here

Bi-quad filters are commonly used in digital filter design. Bi-quad is short for
Bi-quadratic, a second order filter comprising two poles and two zeros.
A bi-quad filter’s transfer function is much like a state variable’s. What sets the former apart is that it contains so-called zeros.
They do however eliminate the high-frequency ringing that State Variable filters are so well known for.
A Bi-quad filters high-frequency performance is excellent, highly stable all the way up to Nyquist. Most are faster than state variables, and much faster than Moog filters, however for reasons outlined below they are not really useful as a VCF.
Note: On the downside, a Bi-quad filter’s low frequency performance is not exactly a model of stability. At high resonance levels, low frequencies tend to destabilize with excessive gain. This can boost levels to extremes and cause clipping, especially during fast filter modulations. This makes Bi-quad filters unsuitable for fast modulation rates, as they can quickly become unstable, and prone to crashing or making strange clicking noises.

Butterworth filters are usually operated at fixed frequencies with variable gain levels for such designs as graphic or parametric equalizers, tone controls etc.
Butterworth filters have no resonance control plugs, just peak or cut-off frequency, gain, number of poles, and for bandpass/notch filters an width setting (bandwidth).

These are often Butterworth filters that are used in equalizers or tone controls. The idea of a shelf filter is that it boosts or cuts frequencies above or below a set frequency. High shelf boosts or cuts audio above the set frequency, and Low shelf boosts or cuts audio below the set frequency (see chart below) the idea is just to cut or boost part of the spectrum without introducing any “colouration” of the audio (no resonances etc.) Much like the tone controls on a stereo.

A band shelf filter does much the same thing but will boost or cut a range of frequencies within a set pass-band, so you could set your mid-frequency to 1kHz, set the width of the filter to 400Hz then boost or cut the frequencies within the range of 800Hz to 1200Hz, again with no unwanted resonances or colouration of the audio.