Efficient antialiasing for distortion of any input

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

the waveforms in the same order :
waveform.png
edit : added one more exemple from ADSR tutorials.
You do not have the required permissions to view the files attached to this post.
Last edited by Mokafix on Thu Sep 03, 2015 8:27 am, edited 1 time in total.

Post

Miles1981 wrote:It's the approach I'm using in https://github.com/mbrucher/AudioTK/blo ... ngFilter.h from http://yehar.com/blog/wp-content/upload ... 8/deip.pdf
Basically, I'm interpolating the signal, so it's more or less padding with a better value (as if I used 0 and then filtered the resulting signal in some way. Not the optimal one, but close enough. And it should also be better in terms of CPU/memory bandwidth/register usage, as the same data is used for neighbor samples. But then, it's a matter of taste, I think ;)
Btw., speaking of http://yehar.com/blog/wp-content/upload ... 8/deip.pdf. I'm not really experienced in oversampling so maybe my question is a bit naive. But does not non-linear interpolation also emit parasite harmonics in "not-mirrored" frequency ranges (unlike plain LP after zero-stuffing)? E.g. at figure in 5.7 of the mentioned paper I can see we would win ~28dB in 1.5-2.5 range, but in the same time does not it emit extra distortion into 0.5-1.5 range (I assume it does at least from IMD)? (while "normal" zero-stuffing leaves 0.5-1.5 range clean).

Post

I added one extra example to both spectrum and wf comparisons from a tutorial by adsrsounds.com.

Not that it performs any better but just to try and make sure I am comparing to enough supposedly state of the art techniques.

Post

sault wrote:The issue that I would have with using the "Polynomial Interpolators for High-Quality Resampling of Oversampled Audio" is that the author specifically is talking about resampling oversampled audio. To quote,

"Also, it shall only be commented that using polynomial interpolators
with unoversampled input is a choice that can only be made when the quality is not
that important but speed is essential, the most useful interpolators in that case being
linear and 4-point Hermite, and Watte tri-linear, which is somewhere between those
two in both quality and computational complexity."


As far as computational savings over other methods, it's hard to say. 23 multiplies for a total of 47 operations per sample isn't an insignificant amount, although I totally acknowledge that the specs on it are impressive. I suppose in final analysis it depends upon the application.

Food for thought. At least we have options, no?
It's always a compromise, I agree. I don't think we should just think in terms of MAD, but also about memory reusage, so I quite like this approach ;)

Post

Max M. wrote:Btw., speaking of http://yehar.com/blog/wp-content/upload ... 8/deip.pdf. I'm not really experienced in oversampling so maybe my question is a bit naive. But does not non-linear interpolation also emit parasite harmonics in "not-mirrored" frequency ranges (unlike plain LP after zero-stuffing)? E.g. at figure in 5.7 of the mentioned paper I can see we would win ~28dB in 1.5-2.5 range, but in the same time does not it emit extra distortion into 0.5-1.5 range (I assume it does at least from IMD)? (while "normal" zero-stuffing leaves 0.5-1.5 range clean).
Linear interpolation emits parasite harmonics, the only one that doesn't is a perfect sinc interpolation. Then it's up to the coder to decide where he wants to stop. Even with 0 stuffing + LP, you will get something in the .5-1.5 range, the remaining amount dependening on your LP filter.

Post

Miles1981 wrote:Linear interpolation emits parasite harmonics
Zero-padding does only in "mirrored" range (thus starting only at 1.5). What I mean is that while with non-linear interpolation we would decrease levels of harmonics in 1.5-2.5 range, we also introduce new harmonics into 0.5-1.5 range (something that does not happen when we simply zero-pad). So in the end, does not that make us to use more steep filter (because with zero-padding "bad" harmonics start at 1.5, but with non-linear interpolation they start right at 0.5).

So this makes me doubt if non-linear interpolation can ever make the whole thing more efficient for oversampling at all (if compared to zero-padding with comparable aliasing levels after filtering). Unfortunately the paper does not seem to enlighten on that matter at all...

P.S. I'm not taking linear interpolation into account at all because (correct me if I'm wrong) it's nothing but the same zero-padding + naive-LP after all.

Post

I have trouble with the plots provided by the paper, but even then, it's easy to make a test with a simple signal, 0 padd it and check the spectrum: you get an aliasing right after the "old" Nyquist frequency.
The whole goal of the paper is to find something that would not create something just after the old Nyquist frequency to help the LP filtering after the non linear effect. As such, it succeeds, because 0-padding with x2 oversampling just mirrors the spectrum (just made the test for a square signal). It is thus the worst possible oversampling, as it doesn't remove any frequency content without LP, contrary to this interpolation.

Post

Miles1981 wrote:I have trouble with the plots provided by the paper, but even then, it's easy to make a test with a simple signal, 0 padd it and check the spectrum: you get an aliasing right after the "old" Nyquist frequency.
Indeed. Now I realized what was my misundersatnding. Thanks!

Post

Ok so apparently I am not going to get any feedback here ;)
or is the info I provided not precise enough ?
the methods used in the two reaktor ensembles i linked to seem to e fairly well implemented to me, so I tend to think they make a fair comparison point...

Post

It may be that what you are doing works for this case, but only a x2 oversampling is definitely not enough. Don't understand what you mean by twice either.

Post

The two algorithms I use for comparison in the pictures are x4 and x8.

Ultimately I simply want to have something really good to check my solution against.

If someone can confirm me that the two different algorithms I compared mine with are good interpretations of today's best technology on the topic, I would be interested to simply know that.
My solution takes 3 times less cpu and gives better result so far compared to those two.

If anyone has a reaktor exemple to antialias a hard clipper that he considers state of the art, I would be interested in trying it.


Found a mistake in my test; here is an updated comparison :
antialiasing.png
You do not have the required permissions to view the files attached to this post.
Last edited by Mokafix on Fri Sep 04, 2015 8:40 am, edited 1 time in total.

Post

So your solution is with the Chebyshev LP? (I found the cut off quite low, and if 3dB is the ripple, that's also quite a lot).

Post

I edited my previous post.
No Chebyshev is used in example #2 from the top in my latest picture.
My solution - represented by "custom" and "custom x2" - is radically different (and new I believe).

Post

The thing is, we don't know what you are doing, and signal theory says you should oversample by a proper amount so that you don't get aliasing. So if you are not (and for instance only using x2 oversampling) and in your case the result doesn't behave badly, it's either you did something groundbreaking or your algorithm works properly with this signal, but not with generic signals.
But without knowing what you are doing, there is no way of giving you proper feedback.

Post

Miles1981 wrote:The thing is, we don't know what you are doing, and signal theory says you should oversample by a proper amount so that you don't get aliasing.
I cannot say what I am doing but I think it does not matter because it is not anything already documented afaik. So it is not about judging the theory for now but the results.
Miles1981 wrote:either you did something groundbreaking or your algorithm works properly with this signal, but not with generic signals.
Works with any input signal from what I could try. Sometimes a couple of peaks are better ironed out by another method (you can see this on the pics) but I get much less peaks in total and way lower cpu.

Post Reply

Return to “DSP and Plugin Development”