Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

How much db for an antialiasing filter ?

For general discussion related FlowStone

How much db for an antialiasing filter ?

Postby Tepeix » Sat Nov 05, 2022 2:10 pm

Seams a basic question but i could not really answer it. How do you think ?
How much db is needed for an antialiasing filter ?
The goal is that at whatever level of listening they will never be any audible aliasing.

I was first thinking that 80 or 100 db attenuation is needed.

But if there's aliasing, it might be produced by another audible frequency.
So the aliasing might be masked by this frequency with less than 80 db ?

(It's difficult to experiment cause i don't want my neighbors to be angry ;)
Tepeix
 
Posts: 352
Joined: Sat Oct 16, 2021 3:11 pm

Re: How much db for an antialiasing filter ?

Postby tulamide » Sat Nov 05, 2022 8:55 pm

I don't understand your question. Aliasing is the effect of frequencies over Nyquist fold back into the audible frequency range. It has nothing to do with loudness or loudness range. What you want an AAF to do is to cutoff frequencies over Nyquist, before the audio gets edited by whatever DSP.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2687
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: How much db for an antialiasing filter ?

Postby Tepeix » Sat Nov 05, 2022 11:24 pm

Yep, sorry to not be clear !
The idea is to use a filter before a pitch shifter, a ring modulator, or before some downsample or even harmonic process to avoid the creation of aliasing.

I've done this little experimental average filter with a lot of pass that do almost -100db for 1.5 octave..
But maybe it's too much..
Attachments
Antialias 1.5oct.fsm
(4.86 KiB) Downloaded 265 times
Tepeix
 
Posts: 352
Joined: Sat Oct 16, 2021 3:11 pm

Re: How much db for an antialiasing filter ?

Postby tulamide » Sun Nov 06, 2022 12:53 am

People nowadays use another approach, which seems to be more forgiving. They use oversampling to get a greater frequency range, then do the processing and afterwards apply a filter (which then has less work to do, because most frequencies won't even reach the original nyquist), before downsampling back to the original.

There are a few examples for this here on the forums, and maybe Martin can tell you more specifics.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2687
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: How much db for an antialiasing filter ?

Postby Tepeix » Mon Nov 07, 2022 2:08 pm

I also tried a little the oversampling. But i suppose they might be also a filter, when down-sampling again.
But in some case it's not very necessary while it take cpu.
In fact my example filter is not good.. because the slope is too much long, it attenuate at 4 octaves.
(Could only be useful if we really don't care about treble)
But let say that i use a better one like a brick wall filter.
For a 1 octave pitch shifter, the oversampling method will not preserve so much high more or even be the same.
I also like to process some bass at hopped frequency..
The oversampling is more required when we do some harmonic content, but have to keep the original signal and preserve his high frequency.

Here's a better filter for this. (But i have to say experimental, because i do not always understand what i do in filter. i don't know what append for the group delay, latency..)
But it do an attenuation of 100db for one octave with a better slope.
(While i didn't know if 100 db is too much or not ;)
Attachments
antialias 1oct.fsm
(10.78 KiB) Downloaded 256 times
Tepeix
 
Posts: 352
Joined: Sat Oct 16, 2021 3:11 pm

Re: How much db for an antialiasing filter ?

Postby R&R » Wed Nov 09, 2022 8:15 pm

How is everyone here "but me" :oops: fluent in ASM! :lol: is everyone doing microprocessor stuff nowadays? :D

I can't contribute with any knowledge. But it's an interesting topic. I'm also looking into my own kind of aliasing problems/artifacts...

Haven't spent much time to look for antialiasing solutions but I did however try, and now use the same oversample solution that tulamide mentioned.
Was able to drastically reduce aliasing on the terrible toolbox distortion by magnitudes by using MV's 4x oversample modules. Now the distortion only sound horrible, not terrible :lol:
I haven't updated my terrible synth with it, but in time...

After the downsample I placed a steep LP... or "high cut" in this context I guess... I'm not that knowledgeable :D
The LP is not nearly as much as steep as 100dB. Just enough to dampen some of the HF content I didn't like.
But the main transient caused by the oversample, that's another matter... I don't know what to do about that, but it doesn't bother me as much as the aliasing before adding the oversample.

I'm a bit curious if some kind of oversample can be used with "filters themselves",when using a feedback loop. But I suspect that the transient will be an issue (even for non resonant), unless the filters (single per filter) internally are written for processing odds/evens... I'm guessing.
R&R
 
Posts: 437
Joined: Fri Jul 15, 2022 2:28 pm

Re: How much db for an antialiasing filter ?

Postby Tepeix » Thu Nov 10, 2022 2:34 pm

Well that's some paradox in dsp overdrive.
The antialias is very important.
But in the end you also need to attenuate the high harmonics.
(From my limited experience when a note has higher frequency
it need very less volume in overdrive/harmonics before it's become to much,
or maybe i need another formula for high note ??)
So finally it could be good to get back some of the treble from the original signal while the discorded one is attenuated.
Also the bass will get a lot of inter modulation. It's also good to attenuate them whit high pass.
But finally to really get rid of the inter modulation maybe we need a multiband overdrive ?
Where every band get a corresponding highpass.
I also think about an adaptive filter, that could detect approximately where is the lowest note off the signal
and make a high pass just below.. (But i don't know if it's possible)
Tepeix
 
Posts: 352
Joined: Sat Oct 16, 2021 3:11 pm

Re: How much db for an antialiasing filter ?

Postby R&R » Thu Nov 10, 2022 3:26 pm

I also think about an adaptive filter, that could detect approximately where is the lowest note off the signal
and make a high pass just below.. (But i don't know if it's possible)


I'm not much help unfortunately since I don't know any math, DSP nor audio stuff in that sense.

Intuitively I suspect it's a tricky one though, since, I'm guessing... one has to know the composition of the signal to be processed "at all times". As you wrote... adaptive. But with some known variables.

Maybe a cascade or parallel bank of static filters with plain mixing between them as needed using... one or more input parameters... based on known information about incoming signal. Might work for my particular problem since my synth is fairly simple. I know the frequency of each oscillator at all times, naturally. The big hurdle would be picking apart all harmonics of waveforms...

I don't want to stray from your topic or clutter your thread :D Maybe someone else here, that actually knows a thing or two, like tulamide, or someone else has more suggestions for you...

Edit: But I'm going to keep experimenting with some filtering myself. Maybe I'll even learn something in the process :lol:
R&R
 
Posts: 437
Joined: Fri Jul 15, 2022 2:28 pm

Re: How much db for an antialiasing filter ?

Postby Tepeix » Fri Nov 11, 2022 7:27 pm

Now that i read again and think about it, if we produce the signal, maybe it's possible to know what are the desirable overdrive harmonics produced by x notes and produce them has pure frequency.
But will it sound like an overdrive or like some strange pitch-shifter ?
Tepeix
 
Posts: 352
Joined: Sat Oct 16, 2021 3:11 pm

Re: How much db for an antialiasing filter ?

Postby R&R » Sat Nov 12, 2022 9:42 am

Now that i read again and think about it, if we produce the signal, maybe it's possible to know what are the desirable overdrive harmonics produced by x notes and produce them has pure frequency.
But will it sound like an overdrive or like some strange pitch-shifter ?


:D My suspicion is that it will sound a bit strange unless the original signal isn't processed as well. Like mixing a distorted signal with the original undistorted one. But it might turn out as a nice effect who knows... :)

I somehow highly suspect that plenty of very skilled people on this forum have tried most things that can ever be tested. If not on purpose, by accident :D

How to approach might be dependent on what to achieve. Since there's a difference I think (remember I'm not that knowledgeable)... between overdrive and distortion. Overdrive an analogue term and distortion, in my mind, being just a wide term for distorting (clipping or in particular "de-shaping") a signal.

The toolbox distortion feels more like a set point of soft clipping that smooths (badly acts like a saturation). This smoothing subtracting from the original content I guess (an effect of smoothing, naturally), and adding some other lower/higher harmonics in the process.
And that shaping causing aliasing since most waveshaping causes some sort of aliasing maybe... but a diminishing problem if using high sampling rates.

I won't be trying to completely eliminate aliasing or unwanted harmonics myself. But If one, that isn't part of the "wanted" signal is present at some frequency... and destructive... it might be reduced with bandstop type filter?
R&R
 
Posts: 437
Joined: Fri Jul 15, 2022 2:28 pm

Next

Return to General

Who is online

Users browsing this forum: Majestic-12 [Bot] and 22 guests