SynthMaker

Digital Filtering Quality - Low vs. High Frequencies

Archive · 2012 15 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

SBMastering ·

Hi everyone! I have a question about EQ filters -- I will be thrilled to hear your thoughts.

I recently told a legendary DSP designer that I was starting out with DSP using Synthmaker, so that I could learn more about audio. I mentioned a crossover I was working on and how I couldn't get it to sound right. He said with bass/lower frequencies that double precision is necessary to have a decent sounding crossover for mastering purposes.

Before this, I always thought that the biggest weakness of digital filtering was the high frequencies. I have heard in the past from a few people that with DSP, there are less samples to represent high frequencies than there are to represent low frequencies. That doesn't quite seem like it tells the whole story, but I know the highs/air of my analog Sontec EQ sound much more natural and musical than any digital EQ. Burgess Macneal who designed the Sontecs once described to me how the Sontec EQ's high frequency and "air-band" magic could never be emulated digitally because of the way the amplifiers work. He said I would never see any Sontec digital emulation. This increased my belief that the weakness of digital equalizers is the high frequencies.

I don't know what to think now. If double precision is necessary for a bass crossover, it would seem that digital bass filtering is quite intensive. I suppose the inaccuracy we're talking about is aliasing, and I suppose the aliasing is caused by rounding of values? I have yet to entirely build an equalizer from the ground up but I'm guessing the rounding is more accurate with doubles because there are more possible decimal places.

So what are your thoughts? Is digital filtering less accurate with low frequencies or less accurate with high frequencies? Is it entirely dependent on filter type? What are the factors involved? Can anyone give me an enlightened scoop on this?

Warmonger ·

I have heard in the past from a few people that with DSP, there are less samples to represent high frequencies than there are to represent low frequencies

Nonsense. Frequency is not represented by sample, but fourier transform of digital signal.

You probably mean mp3 encoding, which actually sacrifices a bit of upper frequency range for smaller file size.

Analog filters may sound better because they are more natural, digital filters are digital and may sound artificial just because of their high fidelity and mathematical precision. Quite simply, digital filters do not exist in nature.

trogluddite ·

I would say that it is certainly possible - it's not just the sample interval that will affect the filter response, but also the accuracy of the maths within the filter. This is especially so for IIR filters, because they contain endlessly iterating feedback loops, meaning that rounding errors can accumulate over the 'generations'. Even the initial filter co-efficients could introduce errors - they are supposed to be a 'complete set' of values in harmony with each other to get the desired response. But each coeff will almost certainly have a rounding error - and those errors are not guaranteed to be 'in proportion' such that you simply get, say, a slight shift in the cutoff freq. More likely they will work against each other to create a set of co-efficents that place the filter poles in places that lead to a certain amount of undesired resonance etc. My maths isn't great, but... To get the coeff's for some bi-quads for example, I have seen maths which involve combining terms of the form 1+cos(x), or 1+sin(x) etc. At the frequency extremes the sin or cos values can get very small, making them easily dwarfed by the added one, leading to a big loss of accuracy (accuracy is always best retained when adding values of similar scale). This does indeed make it likely that the coeff's will be more wayward near both frequency extremes. Hence the recommendation to use double precision - to better preserve the accuracy. But sadly this isn't possible in SM code, though the stream primitives do offer some double-precision functions that can be used, albeit with higher CPU load.

martinvicanek ·

Your DSP designer buddy is right in pointing out that low frequency filtering is more prone to single precision issues. Consider this: a second order filter acts at each step based on three consecutive samples (the current one and the last two). Now low frequencies will result in smaller variations between consecutive samples than high frequencies. Therefore, low frequency content will be harder to detect in this short frame, especially if the samples have limited precision. Hence a filter with a low crossover frequency will be more reliable when acting on double precision samples, whereas high crossover frequencies are less susceptible to roundoff error.

For practical concerns, the widely used Direct Form 1 implementation of biquad filters will work down to 1/1000 Nyquist at single precision. That should be OK for audio, however you can improve that figure without going double precision by choosing other filter topologies (e.g. SVF).

trogluddite ·

Great explanation, Martin - it had never occurred to me to consider that aspect of the inter-sample 'delta' before, your post really made the penny drop for me.

SBMastering ·

Do you know of an SVF and/or other topology filter modules that have already been implemented in Synthmaker?

DigitalWhiteByte ·

SBMastering wrote: Do you know of an SVF and/or other topology filter modules that have already been implemented in Synthmaker?

SVF and Moog filter, allready preset in tool box. And in registered user area, great collection filter from contibution by power-user.

infuzion ·

I'm assuming we're talking about 16bit files, or 24, or 32...? I would assume that more bits per file, greater precision you have for volume changes, thus can eek out extra filtering accuracy. I would also assume that SamplingRate helps also, since you have more samples/second to do filtering maths with.

DWB forgot a thread martinvicanek helped out with a non-phasing filter 😉

SBMastering ·

There have been some wonderful answers to my questions here. I am about to go through and try to find all the filters mentioned and experiment to find which sounds best when implemented as a crossover. I'm pretty excited to find out what happens.

One thing -- there have been plenty of great comments about the factors that affect low-frequency digital filters, but does anyone know why it is that digital filters are especially different from their analog counterparts in regards to high frequencies with various topologies? There were a couple of answers but I think that there may be more views on this. I have never heard a digital filter that could come close to what my Sontec or Crane Song Ibis mastering EQs can do.

Dell ·

SBMastering wrote: There have been some wonderful answers to my questions here. I am about to go through and try to find all the filters mentioned and experiment to find which sounds best when implemented as a crossover. I'm pretty excited to find out what happens.

This is the best way to do it. A step better is to literally measure the frequency of an electronic crossover so see how the curvature responds in the lower frequency region. I believe I mentioned to you in a previous thread. In order to replicate analogue you must design with an hardware mentality. Synthmaker has no issues following a hardware topology in design. Once you emulate analogue responses of a hardware device as if you are working in digital, you will not get the results you are aiming for.

I might add don't use VST Analyser or any measuring device aimed for or designed to work with VSTs on low frequencies. The limitation of such devices will not give you the answers you are looking for which, in turn will give you false results. Use software designed to measure hardware equipment.

Bear in mind, your Legendary VST Designer may be not be creative enough to overcome the objectives why, he/she feels double precision is the only way to go. The biggest tip I can give you is to don't use hops.

Cheers.

SBMastering ·

What are hops?

Also, is there any specific software you would recommend for the testing?

Dell ·

"Hop" is explained in Synthmaker's Wiki. You can use any measuring software you like. The majority of them are the same. This is a fairly common one http://www.trueaudio.com/rta_abt1.htm

trogluddite ·

SBMastering wrote: What are hops?

They are a processing option in SM's code and assembly, allowing you to economise on CPU usage by "hopping" over sample iterations such that a piece of code only executes once every 2^N samples. The same idea can usually be achieved in most programming languages, it's just that SM has an explicit function for it that sync's with the sample counter. For quality audio, it is definitely to be avoided within the main iterative body of a filter, as it effectively lowers the sample rate, thus reducing the upper limit of the audio bandwidth and adding lots of crunchy aliasing!

It is however quite useful sometimes for calculating the coefficients to be passed to such a loop - the iterative parts typically contain only adds and multiplies, whereas the coefficient maths is much more demanding due to the division and trig' functions required. Depending on the speed/accuracy of parameter modulation required, the "heavy duty" maths can often be calculated at a slower rate while retaining an acceptable level of audible artifacts. Such "zipper" noise is most intrusive during fast modulation with a high 'Q', as the resonant peak 'clicks' through the discrete jumps in parameter values, somewhat like a fast glissando on a fretted instrument. Hence the differing opinions on using 'hopping' in synth designs, where fast, high resonance filter sweeps are de riguer, but must be traded against the CPU power required for polyphony and complex voicings. In mastering, where quality trumps quantity, the choice is possibly more simple - CPU load is much less of an issue, as the shortest possible signal chain is a virtue, so there is little need to compromise.

For a fixed filter, of course, the coefficients are effectively constants and only require calculating once - which can be done outside of the code, using SM's "Green" primitives.

Dell ·

trogluddite wrote: For quality audio, it is definitely to be avoided within the main iterative body of a filter, as it effectively lowers the sample rate, thus reducing the upper limit of the audio bandwidth and adding lots of crunchy aliasing!

It affects the low frequencies too. It may not be so obvious due to focusing more on high frequencies than low frequencies in terms of precision. However, the low frequencies are affected by hops as well.

This video will illustrate the reaction speed of two dB graphs. The dB graph on the left, hops to one whereas the dB graph on the right hops to sixteen.

The test tone is 15 cycles per second (15 Hz). The sound is muted so you need not worry about damaging your woofers.

View My Video

As you can see, the meters on the left is responding more consistent than the meters on the right. This is a good indication how accurate the meter is responding based on the 15 cycles per second test tone observing the LED meters ranging from –0.75 dB to –0.03 dB (Technically –0.020845 dB).

trogluddite ·

Ah - good spot. The 'pulses' caused by turning the waveform into "steps" need smoothing - we've made a DAC with the reconstruction filter ripped out!

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.