How Do Audio Converters Work?

Have you ever wondered, “how do audio converters work?” Most of us are familiar with online audio file converters, and while we appreciate them for the convenience of changing “.wav” to a “.mpg,” are we aware of how much our devices rely on audio converters to produce sound? And how many of us realize that audio converters are not limited to changing Ogg Vorbis, WMA, WAV, and MP3 audio files?

Audio converters are software and hardware that change media formats by decoding and recoding data sets in particular algorithms. Audio file converters use “rules” to change the algorithm to a desired one, while analog-to-digital converters transcribe electronic signals to binary data points.

Whether playing audio from a disk in your computer or changing your WAVs into MP3s, audio converters are versatile programs essential to the process. This article examines what process analog and digital audio converters follow while changing files, how audio file converters work, and what issues you may experience converting files.

The Ins And Outs Of Audio Converters (How They Work)

Audio files are data files stored in a particular format. This format is based on algorithms (codec) that audio players decipher and use to play the contained audio. Unfortunately, not all data sequences are made equally.

While most modern audio players can read the “popular” audio files, some are “illegible.” In these instances, an audio (file) converter takes the information from the illegible file, reads it, and “transcribes it to a usable format (like translating a document into a different language).

These converters are software-based (programs) and don’t directly rely on hardware during the conversion (aside from the fact that it runs on a machine like a PC, cellular phone, tablet, etc.)

There are also hardware-based audio converters, like analog audio to digital audio converters (ADCs). These converters take “real” sound signals (continuous audio waves)  and convert them into digital representations (binary points).

Some converters work the opposite way, i.e., they take a digital audio signal and convert it into an analog signal (DACs).

Examples of ADCs and DACs include:

  • Capture cards
  • Sound cards
  • Microphones

Devices (like personal computers, laptops, and cellphones) often have a combination of ADCs and DACs.

How Do Audio File Converters Work?

We use an audio file converter when changing digital audio files from one format to another (e.g., WAV to MP3). This process is also referred to as audio transcoding. These converts use two audio codecs for decompressing and compressing data.

An audio file converter is a program that follows a predetermined set of rules (software coding). By following these rules, the program recognizes a particular type of data file and its “packaging,” and decompresses/removes it from its packaging.

A converter needs to be smart enough to recognize the “packaging.” Once it recognizes the container (packaging), it can open it (decode) and extract the audio data inside.

After “unpacking” the data, the program follows the next set of rules to change the audio files and their “packaging” into the desired format by recompressing and encoding the audio data into the new codec (data format).

Once compressed, the convert repackages the data into the correct packaging to fit the new codecs.

What Happens During File Compression?

Compression is similar to encoding. We compress and encode data (audio, image, and text) to speed up transfer times and to free up storage space.

When encoding, a program uses “values” related to a code table to represent certain data segments. Encoding software reduces the file size.

Files online benefit from compression/encoding as they are quicker to download, require less storage space, and require less bandwidth.

File compression occurs through various processes. One method is that the converter software examines the code for repeated patterns (thanks to mathematical algorithms).

Once it discovers the repeats, the program “cuts” and replaces these code sections with different values (as a placeholder), which are smaller and take up less space.

There are two forms/categories of compression:

  • Lossy – programs “cut” certain parts of the data to make it as small as possible. The program evaluates the file and decides what is not essential for the file, and then removes that to save space.

The converter reduces the number of samples when audio files are compressed in a “lossy” format. MP3 is a popular example of a lossy format.

  • Lossless – programs convert a data file without cutting off “unnecessary” pieces of the data. This lack of data loss results in better-quality sounds when the file is decompressed (restored). Zip files are a great example of lossless files.

The program looks for repeats in the data through various algorithms. These files are not as small as lossy formats.

What Happens During File Decompression?

Decompression is similar to decoding. We use decompression to restore compressed data to a usable form after transport/storage.

The quality of the decompressed data (how much it resembles the original) depends significantly on whether the file is a lossy or a lossless format.

Much like with compression, decompression is also related to the algorithms of the converter program. Data is often “decoded” during decompression, unpacking the information from its “packaging” and allowing other software to access it.

The File Type Determines The Complexity Of The Conversion

Not all files are equally complex. While certain files require advanced programs to remove the packaging, translate the data, and repackage the audio file, other data types are simple.

For example, WAV (Waveform Audio File Format) audio files are relatively small (44 bytes). They contain uncompressed integers (numbers representing the amplitude and position of the sound). These files are simple to transcribe into other formats, requiring little software coding.

Issues With Audio File Converters

Although audio file converters are essential programs, they are not without shortcomings.

The Loss Of Sound Quality During Transfers

The most significant shortcoming with audio file conversion is that many file types are “lossy.”

While cutting data files smaller, there is often a loss in quality (thanks to removing samples). The program must fill in more blanks when converting to an uncompressed format.

Unfortunately, the computer/device won’t get the information 100%; however, we generally don’t hear much difference. During the “reassemble” phase, the program “smooths out” the incorrect pattern, filling the missing pieces with logical deductions of where the curve should be.

Lossless Audio Files Are Large

Many people use a lossless format to avoid the drop in audio quality; however, these formats are generally much larger than lossy file types, making transfer time and storage less optimal.

Online Audio File Converters Have Several Shortcomings

Many of us use an online audio file converter when converting from WAV to MP3 (or other conversions). These programs are convenient; but present several issues, including:

  • Quality-free software is often not well-coded, and it produces sub-quality conversions.
  • Many online converters have a limited capacity/maximum file size that they can convert, and your files might be too big to convert.
  • Viruses – unfortunately, the internet is full of malware, spyware, and other viruses. Online converters are some of the places these malicious codes occur.
  • Privacy issues – most websites have tracking cookies and store data, which means that when you access a site, your information is logged, and the site may make backups of the files you’re converting.

How Do Analog Audio Converters Work?

Although analog audio converters also change audio signals from one form into another, they differ significantly from audio file converters.

An analog-to-digital converter (ADC) is a mixture between hardware and software. If it helps to simplify the concept, imagine a graphical presentation of a sound wave.

I.e., there is an x and y-axis graph with a curve that moves to a peak (amplitude) and then drops down to an equal but opposite peak (below the x-axis).

An ADC “measures” a sound wave’s amplitude (on the y-axis) at set intervals (on the x-axis). The amplitude is how loud the audio wave is. Each amplitude measurement at a given time is recorded on the graph, allowing the software to map out the analog signal in a digital format.

The amplitude on the y-axis has 0s and 1s (binary bytes) as numerical values. So at every point along the x-axis, the converter reads a binary byte value for the amplitude. When an ADC takes these amplitude readings, it takes a “sample.”

These samples occur at fixed intervals (1s, ½ a second, etc.). The converter “reads” the sound wave as a continuous electrical wave. The converter has a minimum and maximum voltage parameter and maps the incoming wave according to the voltage.

While taking samples of the analog wave, some y-values may not fall onto a whole number (in between two numbers). In these instances, the program rounds up or down to the nearest whole number (called quantization).

The ADC puts these samples in a chronological list for the device to read. The analog signal is now digital (binary). This data is usually encoded or compressed within the converter.

Pulse-Code Modulation And Audio Data

While in a digital state, audio data (digital audio) is often stored as pulse-code modulation (PCM). This data is a digital representation of sound, with the numbers in a particular sequence (digital data stream) indicating the shape of the audio curve.

It is the most convenient method of converting analog audio signals into digital data.

I.e., the “numbers” represent the position on the Y-axis (amplitude or volume) of a graph, while their sequence position relates to the x-axis (time).

In this unaltered form, the PCM is uncompressed. A program (codec) “packages” this data into a specific codec so that other programs recognize and read the data. Software may add other data during this packaging (like video, images, or particular instructions/metadata), and the file is often compressed.

An example of an ADC is a microphone. This device takes the “real” sound and converts it into a digital format. The digital information moves to a processing unit where the information is recorded/used in other programs.

Several devices, including CDs, store digital code/data in an uncompressed format.

From Digital Back To Analog Audio Signals

Although analog-to-digital converters are important for recording information, they cannot change digital data into an analog wave. You’ll require a digital-to-analog converter (DAC) to accomplish this conversion.

A DAC takes the digital data (sequence of binary information) and converts it back into a sound wave by decoding the binary and producing an electronic wave (voltage or current, depending on the type of converter).

This wave travels to an amplifier/sound-emitting device and produces a sound.

Issues When Converting From Analog To Digital (And Back)

Sounds that move through AD and DA converters don’t always sound exactly like the original sound should.

This audio discrepancy relates to the quantization during the ADCs sampling. When the DAC converts the digital data into an analog audio wave, it “interpolates” it.

This process “fills in the blanks” between sample points, creating a fuller curve on the graph, and producing a sound closer to the original.

The analog-to-digital converter resolution is fundamental in determining sound quality.

A higher resolution converter has a better bit depth, which means that the converter makes better quality samples (there are more points on the y-axis, so there are fewer rounded up/down numbers and more points overall), leaving less “guesswork,” for the DAC during interpolation.

I.e., the more “full” sampling allows the converter to split the amplitude into various “levels” along the y-axis (more points). The number of levels (y-axis points) relates to the bit depth.

Higher bit depth produces a better quality sound after conversion.

The most common bit depths are:

  • 8-bit with the potential for 256 binary values (or 42dB of dynamic range)
  • 16-bit with the potential for 65,536 binary values (or 96dB of dynamic range)
  • 24-bit with the potential for 16.7 million binary values (or 144dB of dynamic range)

The takeaway is that a higher-resolution analog-to-digital converter takes better samples because more values on the y-axis result in less rounding up or down when the converter takes a sample.

Once the binary information moves to the digital-to-analog converter, it decodes and repositions the audio signal to resemble the original signal more precisely than a lower-resolution converter because it does less interpolation (guesswork).

What Do Bits And Bytes Have To Do With It?

A computer’s binary language is a combination of 1s and 0s, signaling when a computer switches a function on or off.

We give computers instructions when we place several of these binary digits (bits) together. When we put 8 ones and zeros (bits) in a sequence, they make one “byte.” 2 bytes consist of 16 ones and zeros in order, 24 bits in a sequence make 3 bites, etc.

A digital “word” is one or more bytes together. The longer the “word,” the more complex the message and the more accurately the computer can replicate the analog signal (in the case of converters).

Greater bit depth means more “words” describing the audio wave.

How Sample Rate Fits Into The Picture

Aside from bit depth, the sample rate is another cornerstone of producing good-quality audio recordings/files.

The sample rate is how often/quickly the converter takes samples of the audio wave (the frequency of samples taken). More frequent sampling provides a more accurate analog signal representation when converting to and from digital information.

The sample rate is measured in “Hertz.” 1Hz equates to 1 sample taken per second. These samples occur quickly, with an average frequency of 44 100 Hz per second.

A high sample rate and bit depth are essential for optimal audio conversions.

Why Do We Need Audio Converters?

Without audio converters, we would be unable to record and playback sound.

Devices like computers and cellular phones cannot process analog audio signals because the machine “understands”/operates in individual steps. An analog sound wave is a continuous wave, so to play sounds on these devices, we need to convert the signal into a digital (binary) format, making individual data points easier to process.

Analog-to-digital audio converters work with digital-to-analog audio converters to allow devices to play sounds.

A good analog-to-digital converter is essential for recording music or other sound media. No matter the quality signal you’re “putting in,” if the converter is substandard, you will have sub-par quality sound.

Are Audio File Converters As Important As Analog Converters?

Although they don’t serve the same function as analog-to-digital (ADC) or digital-to-analog converters (DAC), audio file converters are equally important.

ADC converters create a pulse-code modulation signal (binary), often encoded or compressed. This encoding is unfortunately not always in an “understandable” language for the software of the DAC to play. So without changing the file format, the device can’t play the audio file.

Compatibility issues often occur when files need to be compressed (particularly for transportation). During compression, the “packing” changes for size concerns; however, the packaging needs to change back to a recognizable format to be read by the device’s software.

Conclusion

Audio converters play a fundamental role in sound recording and playback on devices. There are different types of audio converters, including audio file converters that change digital file formats, analog to digital converters that change sound waves into binary language, and digital to analog converters that change binary data into a soundwave.

Converters often include hardware and software components of a device.

References

Similar Posts