Specific oversampling/antialiasing advice
-
- KVRer
- Topic Starter
- 19 posts since 18 Jul, 2008
The oversampling approaches I’ve used (often in conjunction with other antialiasing techniques, like antiderivative antialiasing—see viewtopic.php?t=332930&start=90) exhibit the Gibbs phenomenon, with time domain ripples. Are there suggested approaches to oversampling in nonlinear waveshapers that:
-are fast,
-are usable at 2x or 4x (with ADAA) and
-minimize the Gibbs phenomenon?
-are fast,
-are usable at 2x or 4x (with ADAA) and
-minimize the Gibbs phenomenon?
-
- KVRist
- 56 posts since 16 Mar, 2014
To avoid ringing or Gibbs phenomenon use less steep filters. May have to accept some treble attenuation or aliasing at highest frequencies.
- KVRAF
- 8030 posts since 12 Feb, 2006 from Helsinki, Finland
This might depend a bit on platform, but on modern desktop CPUs the method of choice would typically be a polyphase FIR (they are SIMD friendly and don't have any recursive dependencies).
The thing about Gibbs though is that it's the steep transition in frequency domain that produces the Gibbs ringing in the time-domain, so pretty much the only way to reduce Gibbs is to use a wider transition (ie. make the filter "worse" in frequency domain), which means giving up high frequencies, allowing some aliasing at high frequencies.. or both. Wide transitions are perhaps workable at 88.2kHz/96kHz, but for 44.1kHz/48kHz Gibbs ringing is probably the lesser evil most of the time.
Unlike aliasing, Gibbs is also relatively simple to reduce after the fact: just take any random EQ and cut the high frequencies with a gentle lowpass. So as long as the Gibbs-ringing from upsampling doesn't cause too many issues with your oversampled process, I wouldn't worry too much about Gibbs at the downsampling phase... users can deal with it themselves if it bothers them.
- KVRAF
- 8030 posts since 12 Feb, 2006 from Helsinki, Finland
Well.. it's not really a "solution" as it just moves the "problem" elsewhere (loss of high frequencies)..
Rather my point is that since the Gibbs ripple is a natural consequence of the shape of the spectrum, some amount of it will come and go as you process a signal, even with simple linear EQ.
Don't stress about it unless it creates some actual problems for you. Losing a bit of headroom is not a problem, that's something you deal with a limiter at the very end of mixing a track.
-
- KVRer
- Topic Starter
- 19 posts since 18 Jul, 2008
Thanks. My main concerns are (1) when using a clipper (in place of a limiter), and (2) when using saturation within a feedback loop, like a delay line with feedback. In my initial experiments, using some combination of ADAA + oversampling + one-pole LPF seems to work fairly well for my purposes (although if there are other interpolation or oversampling strategies to try I'm all ears
).
![Smile :-)](./images/smilies/icon_smile.gif)
- KVRAF
- 8030 posts since 12 Feb, 2006 from Helsinki, Finland
The first case is not worth worrying about unless you're writing the actual clipper.. and then you might want to think about inter-sample peaks too, which are basically the same thing except "hiding" between the samples. Basically if you aren't going to worry about inter-sample peaks, then you probably don't want to worry about the Gibbs ripple either, because putting either through a clipper will alias the same way.
In the second case, a bit of ringing doesn't necessarily matter much unless you drive it very hard (but then you'd be oversampling again)... but also a bit of lowpass filter in delay feedback loops usually sounds good anyway, so ..
![Shrug :shrug:](./images/smilies/icon_shrug.gif)
-
- KVRian
- 842 posts since 21 Feb, 2006 from FI
- KVRAF
- 8030 posts since 12 Feb, 2006 from Helsinki, Finland
The idea choice in terms of reducing time domain ripple specifically is to use a boxcar or perhaps a cascade of several (approaching gaussian as you apply more and more)... but that's also basically the worst thing you can do with your frequency response.
-
- KVRer
- Topic Starter
- 19 posts since 18 Jul, 2008
Good point. The approach I didn't mention is the old-school Reaktor method of linear interpolation between two samples, applying the non-linear process to the subsamples, and then averaging the interpolated outputs. Which, as you note, minimizes ripple at the expense of mid and high frequency response.
- KVRAF
- 8030 posts since 12 Feb, 2006 from Helsinki, Finland
Doing this together with ADAA is kinda pointless, 'cos ADAA is just a better version of this.Dogue wrote: ↑Wed May 29, 2024 2:15 pm Good point. The approach I didn't mention is the old-school Reaktor method of linear interpolation between two samples, applying the non-linear process to the subsamples, and then averaging the interpolated outputs. Which, as you note, minimizes ripple at the expense of mid and high frequency response.