You are here

When Should You Use Oversampling?

Plug-in Optimisation Strategies By Sam Fischmann
Published December 2023

We explain why aliasing in plug‑ins isn’t always a problem — and why oversampling isn’t always the solution.

Aliasing and oversampling are popular topics in forums, product marketing, and video tutorials. The one is an unpleasant artefact of sampling audio; the other, a process that increases the sample rate of audio and can help eliminate the former. Hot takes abound, often telling you to max out oversampling whenever your computer can handle it. As it turns out, not all oversampling is the same, you don’t always need it, and sometimes it causes problems in the mix. This article aims to help you understand when oversampling is a good idea and the different issues it may introduce.

What Is Aliasing?

Figure 1: When sampling (or downsampling), frequencies in the input signal that are above the sampling rate’s Nyquist frequency alias back towards zero, as illustrated by the red line.Figure 1: When sampling (or downsampling), frequencies in the input signal that are above the sampling rate’s Nyquist frequency alias back towards zero, as illustrated by the red line.Aliasing is a type of distortion that is characteristic of digital audio. Aliasing occurs when you try to add or record frequencies that are too high for your working sample rate to represent. Those frequencies ‘bounce off’ or ‘fold back’ over the Nyquist frequency — the highest frequency your sample rate can represent — and head back towards zero, then bounce back up, and so on. It’s similar to watching propellers on a plane: as they get too fast for your eyes, they appear to slow down, then turn backwards. That’s aliasing!

In audio plug‑ins, aliasing occurs when the maths the plug‑in performs is non‑linear, meaning it changes the shape of the waveform and creates sonic energy higher up in the spectrum than the original sound. We call this sonic energy ‘harmonic distortion’. Harmonic distortion below Nyquist is often desirable, and may even be the purpose of the plug‑in (such as with a saturator). But, when harmonic distortion passes Nyquist, the sample rate cannot accurately represent it, and aliasing is stamped onto the audio signal permanently. When audible, aliasing sounds noisy, because it is not harmonically related to the original material.

In a single plug‑in, aliasing is not always a problem worth tackling, because it’s often too quiet to hear. Most sonic energy in audio is in the low end and midrange anyway, and usually, the higher the order of harmonics that are created, the quieter they are. So, the low end and midrange have to be distorted a lot for the harmonics to reach Nyquist, getting very quiet along the way, and while the high‑end energy is closer to Nyquist to start with, it also starts out at a very low level in the first place. To be audible, aliasing must be very bad, or your audio must contain an unusual amount of high‑end energy.

However, as you stack multiple plug‑ins in series, aliasing distortion from one plug‑in is fed into the next plug‑in, and the next. It can build up throughout the production, mixing and mastering process, like a digital version of line noise.

Oversampling is a method plug‑in developers use to alleviate aliasing.

How Does Oversampling Help?

Figure 2: Non‑linear DSP introduces harmonic distortion that can quickly climb above the Nyquist frequency. This chart shows the first two even harmonics (blue dashed lines) and the aliasing they create (red dashed lines).Figure 2: Non‑linear DSP introduces harmonic distortion that can quickly climb above the Nyquist frequency. This chart shows the first two even harmonics (blue dashed lines) and the aliasing they create (red dashed lines).Oversampling is a method plug‑in developers use to alleviate aliasing. Let’s say you are working at 48kHz. At that rate, audio will begin to alias at 24kHz, the Nyquist frequency. The plug‑in applies a series of filters and techniques to accurately represent your signal at a much higher rate, say 192kHz. Nyquist is now at 96kHz, providing more frequency ‘headroom’, and making it much more likely that any sonic energy there is too quiet to hear, even in aggregate. After performing the non‑linear maths, the plug‑in uses a low‑pass filter to remove all the frequencies that are above your original sample rate’s Nyquist frequency (24kHz), and converts your signal back to 48kHz. Voila! Much less aliasing distortion.

It’s important to note that, in addition to adding harmonic distortion to a signal, non‑linear maths also adds intermodulation distortion. This type of distortion occurs at the sum and difference of each frequency present in the signal, at different amounts depending on the non‑linear maths. Given that most audio signals are complex and contain many frequencies, that’s a lot to consider. Unfortunately, oversampling does not reduce this type of distortion. If bothersome noise persists in a plug‑in, even when oversampling is enabled, it might be that the intermodulation distortion the plug‑in introduces is undesirable. Because that’s baked into the maths, you’ll just have to use another plug‑in. This presence of intermodulation distortion may very well be why you prefer the sound of some plug‑ins to others.

Is Aliasing A Problem In My Project?

A fear of aliasing may make it tempting to turn on oversampling all the time. As we’ll see, though, there are drawbacks, so it’s a good idea to turn on oversampling only when you hear a problem. The simplest way to determine if you need to oversample is to play your audio through a plug‑in chain, and A/B the sound with oversampling enabled and disabled on the plug‑ins in your chain:

1. Create two different channel strips, with the same plug‑ins on each.

2. Enable oversampling (on all the plug‑ins that offer it) on one channel, and disable it for the plug‑ins on the other.

3. Put the same material through both channels.

4. Solo the channels one at a time to compare. It is not helpful to invert polarity on one of the channels to perform a null test, because phase changes from the oversampling process may render that test invalid. Stick to comparing what you hear via A/B comparison.

Keep in mind that, for some plug‑ins — especially those emulating digital distortion — aliasing is part of the sound. If the plug‑in sounds better without oversampling, don’t fret, just accept that as a fact and move on!

If you’d like to be more methodical about your approach, the following method will help you isolate and test plug‑ins for aliasing:

1. Create an audio track in your DAW.

2. Put a 10+ second linear sine sweep on the track at ‑1dBFS.

3. Add the plug‑ins you want to test as inserts on the track.

4. Loop the track and listen: as the sine sweep climbs above your audible range, if you hear a second sweep start to bounce down and back up over and over, that’s aliasing.

5. Bypass all but one plug‑in, one at a time, to individually determine the worst offenders. Enable oversampling on just those plug‑ins.

6. Repeat steps 4 and 5 until the signal is acceptably clean.

There are two important things to note about this test. First, it does not attempt to make intermodulation distortion audible. Listening for intermodulation distortion requires at least two different sine tones. Second, this test signal is very artificial. It’s unlikely real material will have very high‑frequency content even close to ‑1dBFS. This is why I suggest listening to the audio you’re working with, before getting too detailed with sine sweeps.

Also, if you look at the audio through a chart such as a spectrogram, don’t fret too much about it. While you may be able to see aliasing in the chart, consider the decibel level there. A lot of the time, it’s not loud enough to justify oversampling unless you can also hear it. While it’s true that we stack tracks fairly often, the sound of aliasing on each track will not necessarily line up in one place, meaning it’s likely to come through in aggregate as a ‘digital‑sounding’ noise rather than ringing. If you do not hear this noise in your full mix, oversampling likely won’t help.

Figure 3: After oversampling, the Nyquist frequency is higher, so there is less aliasing to begin with. Compare the chart on the left to Figure 2! The centre chart shows what sound is left after applying the downsampling filter, which removes the frequencies below your original sample rate’s Nyquist frequency. Finally, the right chart shows the frequency content of the final signal.Figure 3: After oversampling, the Nyquist frequency is higher, so there is less aliasing to begin with. Compare the chart on the left to Figure 2! The centre chart shows what sound is left after applying the downsampling filter, which removes the frequencies below your original sample rate’s Nyquist frequency. Finally, the right chart shows the frequency content of the final signal.

Chain Oversampling

Oversampling on a per‑plug‑in basis may cause problems in your signal chain (we’ll go over them next), so it may be easier to work at a higher sampling rate to begin with, such as 96 or 192 kHz. When you do this, the Nyquist frequency is higher from the get‑go, so there are fewer instances where you need to oversample. Similarly, some plug‑in hosts offer a feature called chain oversampling that allows you to oversample all the plug‑ins in a channel strip. This is very similar to working at a higher rate: the chain oversamples once at the beginning, downsamples once at the end, and uses the same, predictable technique to oversample each channel. If you work at a high sample rate or use chain oversampling, disable oversampling on each individual plug‑in. If you still hear problems, you can always run the sine sweep test and enable it just where you need it.

Other than increasing the CPU usage, the drawback to working in high sample rates is that each time your signal goes through a non‑linear plug‑in it adds harmonic distortion at higher frequencies (though quieter than the original material). This harmonic distortion is passed onto the next non‑linear plug‑in, which adds frequencies even higher up. On the one hand, each jump in frequency continues to get quieter, so by the time the harmonic distortion hits your high Nyquist and becomes aliasing, it’s very quiet. On the other hand, if you use a heavy amount of plug‑ins, it might still get loud enough to hear. If it does, put a low‑pass filter at 20kHz after each offending plug‑in. The filter will attenuate super‑high frequencies from the non‑linear maths, leaving a cleaner signal for the next plug‑in in the chain, and prevent the harmonic distortion from climbing upwards from plug‑in to plug‑in. This method is transparent, relatively cheap for the CPU, and less invasive to the audio than working at a low sample rate and up‑ and downsampling for each plug‑in. In the future, it would be a good idea for chain oversamplers or DAWs to provide this filter as a quick toggle option next to each insert for high‑sample‑rate projects!

While it may sound like a silver bullet, oversampling is not perfect. Different oversampling techniques can cause different problems in your signal chain, depending on the type of filters the developer uses to implement the technique.

Oversampling Issues

While it may sound like a silver bullet, oversampling is not perfect. Different oversampling techniques can cause different problems in your signal chain, depending on the type of filters the developer uses to implement the technique. Let’s go over several different problems that oversampling might cause, and what to do.

1. Oversampling always increases the load on your computer. If this becomes a problem, try enabling oversampling just when you bounce your audio, or printing oversampled effects to tracks. It’s less convenient, but if you are sure your plug‑ins need oversampling and your computer can’t handle the load, it’s the only way to go.

2. Oversampling may add significant latency. To counteract this, some plug‑ins offer advanced oversampling options: look for words such as low latency, minimum phase or IIR. If a setting with a name like this exists, it will significantly reduce latency, but may introduce problems with phase or headroom (we’ll discuss these soon).

3. The plug‑in may not correctly report latency when oversampling is enabled. If your track’s timing sounds off after enabling oversampling, try starting and stopping playback. Some hosts, such as Logic Pro, require you to kick the tires a bit to update latency compensation across all your tracks. If the timing is still wrong, report this as a bug to the plug‑in developer! They can fix the issue, but it may take a while. While you could theoretically fix this issue by manually adding negative delay compensation to a track, you’d have to measure exactly what that is, and the technique to set it varies per host. Moving audio around will only become a nightmare in the long run! As a result, it’s best to avoid oversampling with the plug‑in except in situations where the delay does not matter. Use a higher sample rate or chain oversampling instead.

4. Oversampling can cause phase issues in send/return setups. Low‑latency oversampling techniques use minimum‑phase filters, so phasing issues can arise when processed audio on an aux send is recombined with dry signal on the original channel. If you hear phasing issues, look for a dry/wet control on the plug‑in and use it as an insert instead. Alternatively, if it doesn’t have its own dry/wet control, but you need this functionality, disable oversampling and work at a higher sample rate.

5. Oversampling can increase peak signal levels. Some oversampling filters introduce significantly higher peaks into your signal, especially if your signal has already gone through extreme non‑linear processing, such as a clipper. These higher peaks are caused by the low‑pass filters used in the oversampling process and are especially harmful during mastering because they cause dynamics processing to overreact and reduce your dynamic range. If you suspect this issue, you can check your signal before and after oversampling with a true peak meter and look at the difference. If you notice a problem, work at a higher sampling rate instead of using oversampling.

6. Oversampling may attenuate or phase‑smear the high end, especially when you stack oversampled plug‑ins. This is not a problem as often as it used to be, but some oversampling filters are gentle enough that they attenuate audible frequencies. If you stack more than one of these, you will hear a roll‑off in the high end, and your signal will have less ‘air’. If you suspect this problem, try not to stack that plug‑in with others that have the same problem, or use a higher sampling rate and disable oversampling.

In Conclusion

Adding oversampling to individual audio plug‑ins is a good, but sometimes imperfect, solution to aliasing during mixing and mastering. By waiting to reach for oversampling until you hear a problem, and by using sine sweeps to search out where it’s coming from, you can make smart decisions about when and where oversampling is necessary. By using a higher sample rate to begin with, you can make oversampling less necessary overall. And when you run into a problem that seems like a mystery, you can consider whether oversampling may be involved, and take a look at some simple troubleshooting steps.

Armed with these techniques, you’ll be able to clamp down on the aliasing that really matters without reducing your headroom, adding latency, or unnecessarily bogging down your computer.