Wednesday, November 28, 2012

The difference between analog and digital audio, basic explanation of sample rate, audio compression and DAC's (digital to analog converters)


People who are new to the realm of expensive audiophile grade headphones are often presented with many terms that they do not understand. The most common example is DAC or digital to analog converter.  In this article I will attempt to clarify and explain exactly what a DAC is and what it does, and additionally explain the difference between analog and digital audio, and the factors that attribute to sound degradation in digital audio files such as sampling rate and audio compression.

Before the "electronic age" that we live in today, all audio was presented via an analog signal.  Today most of us listen to music via a digital signal whether it's from our smartphones, portable MP3 players, or computers.  In order to understand what a DAC does, you must first understand the difference between digital and analog audio.  An analog audio signal is recorded from a microphone and directly laid onto a tape or record player.  The sound waves taken from the microphone are analog, and because these sound waves are laid directly onto the tape or record, the signal remains analog.

Analog (top) vs. Digital Analog (bottom)
 With digital audio the audio signal is recored by microphones just like with analog.  However instead of the recording being directly laid onto a tape or record, the audio is sampled at a certain rate (usually a 44,000 sample rate on most audio CD's and MP3 files) and then converted into numbers, or binary to then be stored on some form of electronic storage medium, whether its a CD, DVD, spinning hard disk,  solid state drive or flash memory.  The sample rate of digital audio files corresponds to the number of samples stored per second of audio.  For example, a sample rate of 44,000 means that 44,000 sample numbers are stored per second of music.  Obviously, the higher the sample rate the higher the audio quality of a digital file.  The idea of sample rates can also be presented through a bandwidth perspective.  Lower sample rates reduce the bandwidth of the audio file resulting in reduced file size and the amount of work the processor of the device has to carry out.  This is good for portable devices where battery life can be an issue, as obviously more CPU usage requires more power.  However lowered bandwidth translates to reduced audio quality.

FiiO E7 Amp/ DAC
I sometimes find it interesting how many people think digital age has brought us better technology.  For the most part, yes we have far more advanced and powerful computers and electronics than we had just ten years ago.  However, one thing that has not improved is audio quality.  Contrary to many peoples popular beliefs, digital audio DOES NOT sound better than analog audio. As human beings, we are designed to hear things via an analog signal.  Digital audio is kind of an interesting way in which we trick our bodies into thinking we are listening to an analog signal.  The iTunes music file on your iPhone or iPod? Its really just a compilation of ones and zeros.  Its quite an interesting concept when you think about it.  Of course in order to listen to this audio file it needs to be converted into an analog signal (which I will get into when I talk about DAC's later on).  Another factor that causes audio quality degradation is compression. Audio  compression is when file sizes are reduced so that they can better fit on our portable devices.  Files that are not compressed (usually called FLAC or Lossless files) take up massive amounts of digital storage space, which simply makes uncompressed files far too large to fit on our portable devices and laptops.  Many audio purists like myself do have FLAC and Lossless files stored on our computers, although I will admit I listen to compressed audio files more often than lossless ones.  So how are uncompressed audio files made smaller in order to fit on our portable devices? Mathematical algorithms are implemented that remove and eliminate less audible sounds, or sounds that humans are incapable of hearing.  These mathematical algorithms dictate which sounds are removed.  Audio compression is essentially the removal of less critical data to reduce file sizes.  There are variants to how much an audio file has been compressed.  This is designated by a bit-rate.  A bit-rate is the number of transferred bits per second of computer data.  For example, an audio file with a bit-rate of 356Kbps (kilobytes per second) is transferring a larger number of bits, thus the fidelity and sound quality of a 356Kbps compressed file is much higher than a 128Kbps bit-rate track.  Because more bits are being transferred in a 356Kbps track, the file size is larger than a 128Kbps track.  As file compression increases, the mathematical algorithm is forced to remove more and more sounds to trim down the size of the file.  This means that sounds humans can hear begin getting removed, subsequently resulting in decreased audio quality.  With analog audio, sampling rate and compression are not a factor at all and the listener is hearing audio the way he or she should, completely uncompressed with no sound degradation whatsoever.  Thus, a record on a good record player will sound better than any digital audio file.

Standard DAC internals and motherboard
So now that you know the difference between analog and digital audio and the effects of sampling rate and audio compression on digital audio files, what exact does a DAC or digital to analog converter do? Well it does exactly what it says it does, it converts a digital signal into an analog one! In a world that has gone completely digital and the fact that records and record players aren't exactly portable nor cheap, the only solution to the down-falls of digital audio is the DAC. Basically what a DAC does is convert the digital numbers from the digital audio signal into am electrical analog signal.  This signal is then sent to an amplifier that amplifies the signal and subsequently sends it to your headphones or speakers.   How a DAC achieves this is relatively confusing and too difficult and lengthy to explain here.  However, as with anything there are better DAC's than others.  How good or bad a DAC's ability to perform the conversion is based on the quality of the processor or "DAC chip" that actually performs the conversion.  Obviously the more expensive DAC's have the better conversion processors, thus higher audio quality is achieved from these more expensive DAC's.
FiiO E17 Amp/ DAC

There are two different types of headphone DAC's, desktop DAC's and portable DAC's.  Sometimes DACS are paired with a headphone amplifier by the manufacturer, meaning the DAC and amplification are all done inside one unified enclosure.  An example of a portable DAC/ amp combo is the FiiO E7 and FiiO E17.  However, many DAC's are standalone, which means that a separate enclosure is dedicated to the conversion processor and internals that comprise a DAC.  The converted signal then travels through an output and then into the input of an amplifier in a separate enclosure.
Example of standalone DAC,
the Schiit Audio Bifrost
(and yes the name is Schiit audio
but to be honest they are an awesome
company and they make good humor about
their name on their website)


This rather lengthy explanation has only scratched the surface of the principles of audio sample rates, audio compression, the difference between digital and analog audio, and the conversion of a digital audio signal into an analog signal.  Be sure to comment on anything I may have forgotten, or if you need clarification on any of the principles stated above, just leave a question in the comments section.

*Please note the FiiO is a Chinese brand so their website
is translated from Chinese to English.  It's far from perfect
so bare that in mind.  I have confirmed the quality of FiiO's
products, and they are great! Don't be let down by the
website!

CLICK HERE for FiiO E7 product page
CLICK HERE for FiiO E17 product page
CLICK HERE for Schiit Audio's website            
                               

2 comments:

  1. Your first 3 paragraphs are great but then you write "the only solution to the down-falls of digital audio is the DAC". While a separate DAC/Amplifier will make your MP3s sound better you are need to keep in mind that you are listening to degraded quality when you "listen to compressed audio files more often than lossless ones". I put to you that this is the source of your perceived "down-falls of digital audio". No separate DAC/Amplifier can restore the 80% of music data you discarded when you converted your music to MP3.

    FLAC and Apple Lossless may "take up massive amounts of digital storage space" but with 32 or 64 Gig players now common it is no longer an issue.

    You write "Contrary to many peoples popular beliefs, digital audio DOES NOT sound better than analogue audio" but the error is that people expect it to. 16bit/44.1 was designed to exactly represent the analogue signal that had been recorded onto tape in recording studios. I admit that 24Bit/96KHz and DSD sounds a little better but most folks don't hear a difference on a mid range HiFi (one reason DVD Audio and SACD hasn't taken off)

    One last comment. In regards to your graphs, they are extremely misleading. It looks like you are actually showing a 16 Bit sample rate (top) compared to a 2 bit sample rate (bottom). At 16 Bit/44.1KHz a wave will be displayed just like what you see at the top, smoothly. If digital actually looked anything like the graph you display at the bottom the sound would be unlistenable and the CD format would have been a complete failure rather than an overwhelming success.

    ReplyDelete
  2. Yep, he obviously didn't get to the chapter on dither.

    ReplyDelete