Ummm...aliasing? What be this critter?

Author
trimph1
Max Output Level: -12 dBFS
  • Total Posts : 6348
  • Joined: 2010/09/07 19:20:06
  • Location: London ON
  • Status: offline
2011/10/02 09:48:51 (permalink)

Ummm...aliasing? What be this critter?

I'm just throwing this out here to get some enlightenment as to what aliasing is, and why it can become an issue. 

In my perusal through various sites it became clearer to me that it has something to do with the intermingling of various signals when sampled.

So, what happens when something is over-or under-sampled then?     

The space you have will always be exceeded in direct proportion to the amount of stuff you have...Thornton's Postulate.

Bushpianos
#1

8 Replies Related Threads

    bitflipper
    01100010 01101001 01110100 01100110 01101100 01101
    • Total Posts : 26036
    • Joined: 2006/09/17 11:23:23
    • Location: Everett, WA USA
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 11:20:39 (permalink)
    Aliasing is what happens when there isn't sufficient data to properly reconstruct the analog signal, causing the mathematical model to produce the wrong answers. The result is frequencies being generated that were not part of the original audio, and that are particularly unpleasant because they are usually not harmonically related to the original audio either.

    The Shannon/Nyquist sampling theorem only works correctly when the sample rate is at least double the highest frequency in the audio. When we record, it is imperative that we remove all frequencies above that limit, which the interface does using a combination of analog and digital filters.

    Problems can occur when high frequencies are subsequently generated within the DAW itself. Some processes cause harmonic distortion, with compressors being the #1 culprit. In the analog world this isn't a problem, since very high frequencies are naturally dissipated, but in the digital domain any frequencies generated that fall above the Nyquist frequency are not going to be properly reconstructed back into analog. Wrong frequencies will be created.

    One way to mitigate this effect is to use oversampling inside DSP effects. Converting to a higher sample rate raises the Nyquist frequency, which means more of the harmonics fall into the "legal" range and won't be misinterpreted. After the plugin has done its thing, it can filter high frequencies out and downsample back to the project's sample rate.

    Except in extreme cases, in practice we often can't hear aliasing. The aliased frequencies are just too quiet to be heard. But they are sometimes subliminally perceivable, causing us to sense there's something not quite right without being able to put our finger on why. To some extent it accounts for why one compressor might be preferred over another.

    Although it's often hard to actually hear aliasing, it's fairly easy to measure and observe it using visual aids such as SPAN. This is where some folks get carried away over on KVR. They think if you can measure aliasing it's the same as hearing it, and therefore any plugin that shows measurable aliasing must be inferior. They don't take into account whether the measured errors are actually audible (or might become audible under certain circumstances).

    At the moment there is some discussion over on KVR regarding IKM's LA-2A emulation. Somebody measured some aliasing, and a long debate ensued about how much aliasing there was, how much is acceptable, how to properly test for aliasing, blah blah blah. The consensus came down to "it sounds OK to me".

    Eventually, all vendors will take the approach of Voxengo and others, which is to offer multiple oversampling options. A plugin can tell if it's in playback versus render mode, so it's easy to offer one sample rate for mixing and a higher rate for exporting/bouncing. That way, you get the CPU efficiency of a lower rate during playback and the precision of a higher rate when it comes time to commit your audio into permanence.

    Finally, aliasing can still occur in the playback device despite all our efforts to keep it out of the signal chain during production. A cheap player may cause aliasing, as can very low-bitrate MP3s. Nothing we can do about that except to offer higher-quality MP3s (or FLAC) and hope that the people who listen to our music aren't doing so on iPods or ten-dollar players from the office supply store.


    All else is in doubt, so this is the truth I cling to. 

    My Stuff
    #2
    Danny Danzi
    Moderator
    • Total Posts : 5810
    • Joined: 2006/10/05 13:42:39
    • Location: DanziLand, NJ
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 11:26:17 (permalink)
    bitflipper


    Aliasing is what happens when there isn't sufficient data to properly reconstruct the analog signal, causing the mathematical model to produce the wrong answers. The result is frequencies being generated that were not part of the original audio, and that are particularly unpleasant because they are usually not harmonically related to the original audio either.

    The Shannon/Nyquist sampling theorem only works correctly when the sample rate is at least double the highest frequency in the audio. When we record, it is imperative that we remove all frequencies above that limit, which the interface does using a combination of analog and digital filters.

    Problems can occur when high frequencies are subsequently generated within the DAW itself. Some processes cause harmonic distortion, with compressors being the #1 culprit. In the analog world this isn't a problem, since very high frequencies are naturally dissipated, but in the digital domain any frequencies generated that fall above the Nyquist frequency are not going to be properly reconstructed back into analog. Wrong frequencies will be created.

    One way to mitigate this effect is to use oversampling inside DSP effects. Converting to a higher sample rate raises the Nyquist frequency, which means more of the harmonics fall into the "legal" range and won't be misinterpreted. After the plugin has done its thing, it can filter high frequencies out and downsample back to the project's sample rate.

    Except in extreme cases, in practice we often can't hear aliasing. The aliased frequencies are just too quiet to be heard. But they are sometimes subliminally perceivable, causing us to sense there's something not quite right without being able to put our finger on why. To some extent it accounts for why one compressor might be preferred over another.

    Although it's often hard to actually hear aliasing, it's fairly easy to measure and observe it using visual aids such as SPAN. This is where some folks get carried away over on KVR. They think if you can measure aliasing it's the same as hearing it, and therefore any plugin that shows measurable aliasing must be inferior. They don't take into account whether the measured errors are actually audible (or might become audible under certain circumstances).

    At the moment there is some discussion over on KVR regarding IKM's LA-2A emulation. Somebody measured some aliasing, and a long debate ensued about how much aliasing there was, how much is acceptable, how to properly test for aliasing, blah blah blah. The consensus came down to "it sounds OK to me".

    Eventually, all vendors will take the approach of Voxengo and others, which is to offer multiple oversampling options. A plugin can tell if it's in playback versus render mode, so it's easy to offer one sample rate for mixing and a higher rate for exporting/bouncing. That way, you get the CPU efficiency of a lower rate during playback and the precision of a higher rate when it comes time to commit your audio into permanence.

    Finally, aliasing can still occur in the playback device despite all our efforts to keep it out of the signal chain during production. A cheap player may cause aliasing, as can very low-bitrate MP3s. Nothing we can do about that except to offer higher-quality MP3s (or FLAC) and hope that the people who listen to our music aren't doing so on iPods or ten-dollar players from the office supply store.

    What an answer...wow...what a gift you are to this community, bit. Great read...thanks for posting this!
     
    -Danny

    My Site
    Fractal Audio Endorsed Artist & Beta Tester
    #3
    trimph1
    Max Output Level: -12 dBFS
    • Total Posts : 6348
    • Joined: 2010/09/07 19:20:06
    • Location: London ON
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 11:31:17 (permalink)
    Clear and concise...this makes a lot more sense!!

    Thanks!!!

    The space you have will always be exceeded in direct proportion to the amount of stuff you have...Thornton's Postulate.

    Bushpianos
    #4
    Rain
    Max Output Level: 0 dBFS
    • Total Posts : 9736
    • Joined: 2003/11/07 05:10:12
    • Location: Las Vegas
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 12:38:34 (permalink)
    You have a gift for explaining things, Bit. Seriously. I could understand that even before I finished my first coffee.

    Thanks! 

    TCB - Tea, Cats, Books...
    #5
    drewfx1
    Max Output Level: -9.5 dBFS
    • Total Posts : 6585
    • Joined: 2008/08/04 16:19:11
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 13:03:32 (permalink)
    bitflipper

    Eventually, all vendors will take the approach of Voxengo and others, which is to offer multiple oversampling options. A plugin can tell if it's in playback versus render mode, so it's easy to offer one sample rate for mixing and a higher rate for exporting/bouncing. That way, you get the CPU efficiency of a lower rate during playback and the precision of a higher rate when it comes time to commit your audio into permanence. 
    Actually, it would be nice if the oversampling options were at the DAW level.

    So, for instance, you could do the SRC for any individual synth, FX plug, or, only once for the whole FX bin. And if you had 2 individual FX plugs in a row set to a higher rate, it could be smart enough to do the SRC only once.

    Kind of silly to upsample and downsample 4 times each if you have, say, a synth followed by a modeled EQ and compressor, followed by a tape sim.

     In order, then, to discover the limit of deepest tones, it is necessary not only to produce very violent agitations in the air but to give these the form of simple pendular vibrations. - Hermann von Helmholtz, predicting the role of the electric bassist in 1877.
    #6
    The Maillard Reaction
    Max Output Level: 0 dBFS
    • Total Posts : 31918
    • Joined: 2004/07/09 20:02:20
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 13:56:59 (permalink)


    Any one remember the sparsity link from last week?


    #7
    trimph1
    Max Output Level: -12 dBFS
    • Total Posts : 6348
    • Joined: 2010/09/07 19:20:06
    • Location: London ON
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 16:16:06 (permalink)
    I have to go hunting for that one....

    The space you have will always be exceeded in direct proportion to the amount of stuff you have...Thornton's Postulate.

    Bushpianos
    #8
    bitflipper
    01100010 01101001 01110100 01100110 01101100 01101
    • Total Posts : 26036
    • Joined: 2006/09/17 11:23:23
    • Location: Everett, WA USA
    • Status: offline
    Re:Ummm...aliasing? What be this critter? 2011/10/02 18:45:04 (permalink)
    Actually, it would be nice if the oversampling options were at the DAW level.

    I absolutely agree. It would make more sense to be in direct control of that rather than relying on the intelligence of plugins and incurring the CPU expense of multiple conversions. You'll see that feature in Reaper before you see it in SONAR, though.



    All else is in doubt, so this is the truth I cling to. 

    My Stuff
    #9
    Jump to:
    © 2024 APG vNext Commercial Version 5.1