Free Filters, Resonance and Punctuality

Pokey Sticks has been refining some custom EQ plugins lately. Downloadable free from here. The limitation is they’re only for Reaper as JS effects at the mo. Hopefully, the Pokey Sticks Research Department will get around converting them to general vst plugins at some point…

So why design more filters? Problems and limitations showed up in most of the digital filters I was using. Despite price, reputation etc. Hidden complexities, quirks and shortcomings abound! It’s time to cut through the nonsense!

Bad behaviour is easy to come by in both digital and analogue EQ filters, particularly in the time domain. Typical digital techniques are prone to resonances. This means the filter rings like a sound source itself, adding things to the sound that weren’t there before and also blurring exactly when it starts and stops. Analogue designs can do this too. It’s not all bad of course – resonance in filters is sometimes used deliberately. It can help make sharper, more surgical curves in the frequency domain and resonant filters are also used as a creative tool. However, it is mostly just unwanted mess! For digital filters there’s extra problems too. Trying to make good EQ curves anywhere near the Nyquist frequency is a world of pain. See the attached image of a well respected filter trying to do a simple first order lowpass on a square wave with the knee frequency set to 19KHz at a sample rate of 44.1KHz. Instead of smoothly rounding the corner of the square, the filter overshoots then oscillates. Interestingly, it does actually result in the right frequency spectrum on average. That means it’ll look right on a frequency graph. Obviously though, it’s not the right shaped wave coming out and it does sound different to how it should. Under other conditions the same filter may behave just fine. For another example, see the image of a conventional filter trying to add high frequency gain to a square wave. It should pull up a smooth peak but you can see the jaggedy artifacts. The problems can be hidden, surprising and quite audible. Thus the agenda for the Pokey Sticks filters that don’t do that bad stuff…

The original, analogue high pass or low pass filter is very simple. Its a resistor and a capacitor or inductor. Its all passive, with no feedback mechanism so it can’t oscillate or overshoot. The way these electronic components behave can be described quite simply so the Pokey Sticks filters are essentially simulations of these circuits. The main trade off is that you can’t get really steep, ‘surgical’ EQ curves like that. Instead we’re talking about something that is smoother, gentler and more ‘analogue’ style in its nature.

A bit of tweaking and bingo, we’ve got nice ‘virtual analogue’ filters that wont produce long oscillations, weird jagged bits and other digital artifacts. Simple, accurate, good sounding and analogue stylee. The mid gain filter also naturally has a slight ‘Butterfly’ plot. Also known as the push-pull effect or pre-emphasis. It’s something the famous Pultec vintage EQ is known and loved for, resulting from its analogue capacitor and inductor filter network. A mono one will set you back several thousand pounds. So, all good then and almost job done. One last thing. If you work at sample rates below 88.2KHz there’s a quirk to deal with, so read on.

Basic theory is the digital sound inside the computer can’t contain any frequency higher than half the sampling frequency or sampling rate. The less obvious thing is that life is already getting tricky at frequencies before that. See picture for a 19KHz sine wave at 44.1KHz sample rate. Pretty sketchy! There’s only just enough information left to re-make the original smooth sine wave. A highest quality final output render from a good DAW can recreate the sine wave amazing well, but you can’t get that in real-time without significant latency. Lower quality reconstruction just introduces all those artifacts we’re trying to avoid. The ‘standard’ digital filters and the Pokey Sticks filters react in different ways to this problem. The ‘standard’ filters when faced with limited information can produce those weird results and jaggy twitches. The Pokey Sticks filters always produce good sounding, flowing waveforms without artifacts, but the steepness of the EQ slope is altered… So to prevent lies and surprises, if you’re working at sample rates below 88.2KHz you may find the filters refuse to set corner frequencies above 10KHz. It’s less of a deal than it sounds. The whole audio spectrum is still being properly acted on. For the low pass Pokey Sticks filter, the simple workaround is the mix slider. If you want to set a corner frequency of 15KHz but can’t. Set it at 10KHz and fade out the strength of the effect to about 50%. Now you’re cutting a bit less of the top end, pretty much just as you meant to. Using the mix slider will give quite near the same result as if you were setting the  corner frequency where you wanted in that top octave 10 – 20KHz band. The slope wont actually be as steep, but the audible difference is very subtle. At the same time, you’re living free from time smearing, ringing, aliasing and latency which definitely do have a noticeable impact on the sound! Better still, use sample rates of 88.2KHz or higher and there’s no issue!..

Band Gain plot
Band gain showing pre-emphasis dip. Setting 1KHz, 7.5db gain
Digital artifacts from a respectable filter. The curve should be smooth.
Digital artifacts from a respectable filter trying to add high frequency gain. The curve should be smooth.
Correct smooth curve from the Pokey Sticks filter
Correct smooth curve from the Pokey Sticks high shelf filter.
Messed up low passed square wave. 19KHz cut, 44.1KHz sample rate. The corner should round off but instead theres a lot of overshoot and ringing.
Messed up low passed square wave. 19KHz cut, 44.1KHz sample rate. The corner should round off but instead there’s a lot of overshoot and ringing. Well known, respectable filter.
The correct waveform from the Pokey Sticks low pass. Even with worst case conditions and the mix slider workaround its the right result without without weird problems!
The correct waveform from the Pokey Sticks low pass. Even with worst case conditions and the mix slider workaround, it’s correct, smooth and free from weird problems!
A sine wave near the Nyquist frequency - 19KHz wave at 44.1KHz sample rate. Not exactly smooth and even!
What a sine wave looks like near the Nyquist frequency – 19KHz wave at 44.1KHz sample rate. Not exactly smooth and even!

Here are the current batch of filters – a few more to come soon. They are in Reaper JS format – to install them, just put them in the proper folder. Probably something like C:\Documents and Settings\Your_computer_or_user_name\Application Data\REAPER\Effect

Comments and discussion welcome! 🙂

High Pass Filter download

Low Pass Filter download

High Shelf Filter with 6db gain download

Band Gain Filter download

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s