Anti-aliasing filters in audio

Discussion in 'Software' started by towerdefense, Aug 24, 2023.

  1. xorome

    xorome Audiosexual

    Joined:
    Sep 28, 2021
    Messages:
    978
    Likes Received:
    735
    If you turn on oversampling, there's going to be a lowpass at some point.

    Step 1: upsample
    - Option 1: run a lowpass over the original sample at near-Nyquist of the original samplerate, then run a lowpass over a sample of value 0. store both samples. we now have twice as many samples.
    - OR Option 2: Use a custom method to interpolate between the original sample and a number of future samples. we now have twice as many samples as before.

    Step 2: run our DSP processes over all samples, including the ones we just created in step 1.

    Step 3: downsample
    - Our DSP processes in step 2 created audio information above our old Nyquist, which we definitely need to filter out. so we run a lowpass at our old Nyquist. we also need to cut the number of samples in half - we can't feed our DAW 2x the samples it gave us. we can average the samples, interpolate between them or just take the last sample and throw away the first, - up to us how we decimate our sample pool. we need to lowpass in any case or we just did all that work without any benefit.
     
    • Agree Agree x 1
    • Winner Winner x 1
    • List
  2. towerdefense

    towerdefense Guest

    The best thing is that this is a "less technical" breakdown of ADAA & is meant to show the average dev how to easily implement it. The papers linked in this paper are even less comprehensible :rofl:

    Apologies, my use of the word "filter" comes from a background in image processing.

    Likely just simply not knowing it exists, not knowing how to implement it, or not caring. Although, Chowdhury's breakdown & example seems extremely thorough and easier to understand than most new tech that gets released. A straight up open source example using JUCE no doubt will make implementing it thousands of times easier, at least for me.

    Unfortunately true. That's why I do like Newfangled Audio for at least attempting innovative stuff. Chowdhury too is a great person to have around in DSP, he seems to be open to collaborating with companies to make new stuff on top of his open source work.
     
  3. xorome

    xorome Audiosexual

    Joined:
    Sep 28, 2021
    Messages:
    978
    Likes Received:
    735
    • Like Like x 1
    • Agree Agree x 1
    • List
  4. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,045
    Likes Received:
    6,292
    Location:
    Europe
    Especially the first link makes it crystal clear. [​IMG] [​IMG]
     
  5. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,045
    Likes Received:
    6,292
    Location:
    Europe
    Just tried. Runs on WiN7. With Tanh, ADAA1 and 2x OS it uses just almost as much as JS:Waveshaping with 2x Reaper OS.
     
  6. pratyahara

    pratyahara Guest

    In three sentences:
    ADAA works by first applying the antiderivative of the nonlinear function to the signal. The antiderivative is a function that reverses the action of the nonlinear function. In other words, if the nonlinear function takes a signal as input and gives a signal as output, then the antiderivative takes a signal as input and gives the original signal as output.
     
    • Like Like x 1
    • Interesting Interesting x 1
    • List
  7. saccamano

    saccamano Rock Star

    Joined:
    Mar 26, 2023
    Messages:
    1,098
    Likes Received:
    439
    Location:
    uranus
    Running your sessions @ 96khz or better yet 192khz will negate (or significantly decrease) the need for anti-aliasing/oversampling options on plugins. Since every plugin dev has their own way of dealing with the oversampling/anti-aliasing issue there is no standard method of doing it. Hence, mixing plugins that are have AA/OS options enabled will yield mixed and unpredictable results when being used together in the same project. Running sessions at 96Khz or better reduces the effects to the audible hearing range significantly enough so that the need to over-sample becomes less or ineffective resulting in a cleaner more manageable mix.
     
    • Disagree Disagree x 3
    • Agree Agree x 1
    • List
  8. towerdefense

    towerdefense Guest



    The issue is, once those harmonics go into the inaudible frequency range, those same harmonics can then generate more harmonics with an additional nonlinear plugin, alias, and then reflect back down to the audible frequency range. That's why oversampling applies a lowpass filter.
    Without applying a lowpass filter after every stage of nonlinear processing while working at a higher sample rate, you'll genuinely be increasing the amount of aliasing in your audio vs a 44.1khz project with oversampling.

    For the vast majority of cases, the only benefit of a higher sample rate is lower latency. Even if you were willing to go through the hassle of applying a lowpass filter after every stage of nonlinear processing, I don't see the point unless you're in it for the lower latency. Quality wise, they should be about the same.

    I'm not sure what you mean by "unpredictable results", are you referring to phase shift? Since linear phase oversampling doesn't have that.
     
    • Agree Agree x 1
    • Disagree Disagree x 1
    • List
  9. saccamano

    saccamano Rock Star

    Joined:
    Mar 26, 2023
    Messages:
    1,098
    Likes Received:
    439
    Location:
    uranus
    Yes. That is the issue.

    A more viable tentative solution to the issue is to run your studio (and all your waveforms) at higher sample rates. You need the computing power to do this but then again computing power these days is much easier to come by. @ 31:30


    There is also the caveat that not all dev's deal with oversampling and aliasing in viable ways. Wherein some dev's give the OPTION of turning OFF oversampling/anti-aliasing functions and some don't. Using plugins where there is no OFF option for these "features", even running all your sessions and waveforms at higher sample rates wont help. Solution: don't use plugins that have no OFF switch for the aliasing/oversampling functions.
     
    Last edited: Aug 25, 2023
    • Interesting Interesting x 1
    • List
  10. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,045
    Likes Received:
    6,292
    Location:
    Europe
    ...that Dan made the mistake to compare HQ (8x OS) to 96kHz SR while he should've compared it to 352,8/384kHz. Even if he mentioned this, it's a completely flawed comparison. If you use the appropriate SR, the results are the same. The assumption that higher OS is better than higher SR is wrong, I've tested it, they null.
     
  11. towerdefense

    towerdefense Guest

    That wasn't my point at all though. The video while flawed in that is still informative in many other areas regarding sample rates/oversampling. 48khz 2x oversampling will have just as effective alias reduction as a 96khz project with a steep lowpass filter placed after a nonlinear process. My whole argument is; what's the point outside of a live setting?

    I don't understand how this is a response to my argument. I have the computing power for 96khz; I just don't see the point in it for mixing/mastering. All it does it increase CPU usage for no tangible benefit. Aliasing will be the same when properly mitigated, but more of a hassle with 96khz since you need to add lowpass filters yourself. I don't see how having the option to disable oversampling on specific plugins is related to this...I don't have any issues mixing oversampled tracks/samples together :dunno:
     
  12. No Avenger

    No Avenger Audiosexual

    Joined:
    Jul 19, 2017
    Messages:
    9,045
    Likes Received:
    6,292
    Location:
    Europe
    Agreed.

    You mean higher SR? Some plugins don't have an OS option, so running at higher SR is the only way to reduce aliasing - unless you're running Reaper which can apply OS to (almost) everything.
     
  13. saccamano

    saccamano Rock Star

    Joined:
    Mar 26, 2023
    Messages:
    1,098
    Likes Received:
    439
    Location:
    uranus
    It is inherently dumb to have to low pass every instance of an oversampled/anti-aliased plugin or even a group of plugins when it's obvious that higher sample rates (96k +) will accomplish the goal. The expense is computing power, which these days I see no discernible issue with save for those that went with a low budget build with low ram and skimpy CPU to save $$.
     
  14. Havana

    Havana Platinum Record

    Joined:
    May 6, 2022
    Messages:
    351
    Likes Received:
    191
    True but in order to hear distortion at just 18khz ( assuming your recording at 96khz ) you'd have to exceed maximum frequency range of 48khz by 30khz. And if you were recording at say 192khz, you'd have to exceed max frequency of 96khz by 78khz just to hear distortion at 18khz.

    Most people can't even hear 18khz let alone the average speaker range.
     
  15. Sinus Well

    Sinus Well Audiosexual

    Joined:
    Jul 24, 2019
    Messages:
    2,083
    Likes Received:
    1,605
    Location:
    Sanatorium
    I found it quite helpful. Don't be put off by the complex formulas. It's a very readable document.
     
Loading...
Similar Threads - Anti aliasing filters Forum Date
Recreating Antimatter Sound how to make "that" sound Aug 4, 2024
Whispers of Desire: The Ultimate Romantic Seduction Soundtrack Education Jul 29, 2024
Antimalware Service Executable in windows 11 pro PC Apr 14, 2024
should antipsychotics be banned for their use on people with asperger? Lounge Feb 9, 2024
Antivirus problem with motu m4 Soundgear Dec 6, 2023
Loading...