How to digitize analog audio

How to digitize analog audio

The sound is analog by nature, so if you want to store it digitally you need to convert it to a binary format previously. In this article we analyze how this process is carried out until getting an audio ready to dump in a hard disk or digital memory.

The first step is to sample the original signal by taking fragments from different points, considering that the more samples we have, the better quality and fidelity the result will have.

This is measured by the sampling frequency (fs), or sampling rate, a parameter that tells us how many samples per second we have collected from the original analog signal. This parameter is defined in hertz (Hz).

The most used sampling rates move between 8,000 and 44,100 Hz, from the human voice for digital telephony to the compact disc.

Sampling rate values

The sampling frequency limits the maximum frequency of the spectrum in the original signal. If the frequency is more than double the original bandwidth, the initial signal can be recovered by filtering and deleting the high frequency bands. However, if the sampling rate is less than twice that original bandwidth there is an overlap between both audio bands (aliasing) and the original signal can not be recovered.

For this reason, the number of samples must be sufficiently high to recover the original signal without loss of quality, as established in the Nyquist-Shannon theorem. That way, you can sample the signals in baseband at the appropriate frequency that allows to eliminate high frequency bands and therefore recover the original signal using filters.

After this phase, the collected samples must be quantified and coded. The quantification consists of approximating the value of the signal sampled by one of the values ​​fixed in the analog-to-digital converter, while the coding means assigning to each quantized sample an output binary code to convert it into a bit stream.

The resolution bits of the converter are the number of bits with which each sample is encoded, and they depend on the quantization levels of the conversion.

When the original audio signal comes from several channels (like the stereo signal) you have to add one more process, multiplexing. Thanks to it, the samples of each channel are indexed to create a single bit string with all the information.

Conversion issues

The processing of audio to pass it from analog to digital can lead to a series of technical problems:

  1. Aliasing, when the sampling frequency is not high enough to faithfully reproduce the input signal. It is solved filtering the signal of each channel before sampling to eliminate interference or limit the original bandwidth, through an antialising filter.
  2. Saturation, or clipping, when the level of the analog signal is higher than the maximum voltage admitted by the converter and causes annoying noise. To solve this problem, the level of the input signal can be modified by sound compressors.
  3. Undersampling, when the sampling frequency is very low and the “steps” of the digitalization are noticed. Samples must be added by interpolation to the digital signal to solve it.
  4. Noise, caused by a quantization error introduced during the conversion and that lowers the sound quality. The resolution of the A-to-D converter should be well chosen to mask the inherent noise of any signal properly.

Once we have the digitized signal it can be registered in a support for its correct storage. You can use systems with optical technology, such as compact discs (CD) or DVD discs, systems with magnetic technology such as DAT (Digital Audio Tape) or systems with semiconductor technology, such as MP3 players or flash memories.

If you want to know more about audio and public address and voice alarm systems, contact us and we will be happy to help you.