Monday, December 12, 2016

Analog to Digital: Sample Rates

One of the first decisions that must be made when starting a new project is the sample rate it will be recorded at. Sample rate is involved in the conversion from an analog sound wave to digital data.

When an analog signal is converted to digital, the computer must take a "snapshot" of the wave amplitude at a set time interval. The sample rate of a track refers to how many times the signal is measure each second. In theory, a higher sample rates provides a better approximation of the sound wave. Whether or not using a high sample rate is actually beneficial is a highly debated topic in digital audio.

The Nyquist-Shannon Theorem

In 1928, physicist Harry Nyquist discovered a way to accurately represent analog sound as digital data. Nyquist stated that to capture an analog signal as digital samples, the sample rate must be greater than twice the highest frequency (known as the Nyquist frequency) of the sound being converted. If the frequency of the sound being recorded is above the Nyquist frequency, aliasing will occur.


Aliasing is when a digital audio converter does not take enough samples to accurately represent a sound wave being converted. This is because the sample rate is not fast enough to keep up with the frequency of the sound. Instead, we get a lower frequency within our range that was not present in the analog signal. The new frequency will be lower than the Nyquist frequency by the amount that the analog frequency was over by. That is, with a sample rate of 6,000 Hz (Nyquist frequency of 3,000 Hz) a wave of 4,000 Hz will result in a digital wave represented as 2,000 Hz.

How do we avoid aliasing?

A common way to avoid aliasing is to use an anti-aliasing filter. The anti-aliasing filter cuts off the frequency above the Nyquist frequency. Since the anti-aliasing filter cannot perfectly cut off the signal immediately above the Nyquist frequency, we must have a sample rate greater than twice the highest frequency. Thankfully, we don't have to worry about this because audio interfaces do it automatically. It is important, however, because some plugins can produce signals over our project's sampling rate and cause aliasing. In these cases, we can use oversampling with the plugin to prevent this.

So what sampling rate should I use?

Most digital audio uses a sampling rate of 44.1 kHz. This allows for a maximum frequency of 20,000 Hz, which is the upper limit of human hearing. Many home recording interfaces are capable of recording at up to 96 kHz, however this does not create any noticeable difference in sound quality. Going beyond a sample rate of 96 kHz up to 192 kHz can introduce intermodulation distortion, which would actually make the sound quality worse. In the end, a standard sample rate of 44.1 kHz (the sample rate used on CDs) is sufficient for most applications, but it is not recommended to exceed 96 kHz as a sample rate.

No comments:

Post a Comment