Skip to main content

# Audio Sample Rate Conversion Explained

• Author:
• Updated date:

## The Challenge of Converting Sample Rates

Digital systems make use of a number of different sample rates, which can cause problems if you intend to use a different sample rate. As an ex-broadcast engineer, this used to cause a number of challenges. We often had digital audio at 44.1kHz, that needed to be converted to 48kHz or vice versa. Other sample rates needed to be converted, too. If you consider varispeed operation, then all possible sample rates may be encountered. For instance, you might want to play an audio podcast at 1.5 times speed so that you can listen to it faster.

One way of converting the sample rates is to convert the signal back into analogue and then digitally resample it at the desired sample rate, but this is wasteful and unnecessary.

Have you ever wondered how it's done properly? I did, and that is why I have prepared this article for you.

This article starts by looking at the basic principles, using a simple example of conversion from 32kHz to 48kHz. It then highlights how the technique may be extended to more difficult cases.

### Frequency Spectrum of Sampled Signals

A sampled signal contains the base band signal and a series of sidebands around multiples of the sampling frequency. All the necessary information required to accurately reproduce the original signal is contained in the base band signal.

In the example above, the same audio signal is sampled at 32kHz, 48kHz, and 96kHz, Each of the sidebands is 15kHz wide.

## "Gearbox" Fixed Sample Rate Conversion

Consider the process of converting from 32kHz to 48kHz.

If the signal is resampled at a higher frequency (96kHz), which is the least common multiple of the original and final sampling frequencies, then no information will be lost as some of the new sample points (every third) will coincide with the original ones.

### Digital Filter

The signal is now sampled at high frequency but has components corresponding to the original sampling process. By passing this through a (digital) low pass filter of the same bandwidth as the original audio (15kHz), the sidebands caused by the original sampling process will be removed. The baseband signal will be unchanged by this process.

Sampling theory states that this low pass filter will generate the missing samples accurately as if the signal had been sampled at a high rate originally. This is because the signal is bandwidth limited and all the necessary information is contained in the original samples.

### Decimation

The high sample rate signal (96kHz) can now be resampled (at 48kHz) to generate the required output. This process involves discarding every other sample and is called "decimation".

Thus, we have converted from 32kHz to 48kHz (but with a bandwidth of only 15kHz). It is not possible to generate new information to increase the bandwidth.

These converters are sometimes called "gearbox" converters as they work at a fixed ratio—the incoming and outgoing sample rates must be locked together.

## Conversion of Other Sampling Frequencies

This process can be used to convert from 48kHz to 32kHz by carrying out the reverse of the above process, but an additional filter is required to reduce the original 20kHz signals to the 15kHz required with 32kHz sample rate.

In a similar way, 48kHz and 44.1kHz could be interchanged. The signal needs to be resampled at 7.056MHz, as this is the least common multiple of these frequencies.

These converters can produce accurate results, which are limited by the resolution of the signal processing carried out. With that proviso, the process should be transparent.

## Variable Sample Rate Conversion

If variable sample rate conversion is to be attempted, a slightly different approach is required. Rather than use the "gearbox" approach, the variable sample rate approach is used, eliminating the need for the equipment to be locked for precise frequencies.

The original signal is resampled at a high frequency, which may not be an exact multiple of the incoming sampling frequency. This signal is then passed through a variable digital filter. The characteristics of the filter change to accommodate the variable ration between the incoming and outgoing sample rates. The output of the filter is "decimated" to bring it down to the required rate.

Because the high sample frequency is not an exact multiple of the original sample rate, this is not an exact process. However, by reducing rounding errors within the signal processing, the degradation can be minimised.

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.

© 2022 Mr Singh