There's no such thing as digital: A conversation with Charles Hansen, Gordon Rankin, and Steve Silberman
It's common for people to envision and represent a digital signal as a series of 1s and 0s. As such, there's really no room for error, at least according to this binary theory. Is a digital signal simply a series of 1s and 0s?
Charlie Hansen: Unfortunately not. The "1"s and "0"s are just abstractions that are easy to think about. But in the real world, something real needs to represent those two abstract states. In modern digital electronics, we have almost universally chosen a voltage above a specific level (that varies from one "family" of electronic parts to another) to represent a "1" and a voltage below a different specific level (that again can vary) to represent a "0".
In the real world, those two voltages are not the same, so there is a "grey" zone between the "black" of the "0" and the "white" of the "1". Also, it takes time for the signal to change levels, and the time required to do so can depend on dozens (or even thousands) of other external factors.
"All of the problems with digital are analog problems."
All of this can be boiled down to a simple phrase. "All of the problems with digital are analog problems."
This is the primary reason that digital audio has taken so many decades to come close to the sound of analog. When digital audio was introduced, none of the top analog designers of the day knew anything about it. So it was all designed by digital engineers. Digital engineers have gone through years of training where these problems were never mentioned. And as time went on engineering schools put less and less emphasis on analog circuit design.
There is an entire generation of designers that lacked even a basic understanding of analog electronics. And without a thorough knowledge of analog electronics, the problems of digital can never be addressed, let alone the problems of analog electronics, which will always be necessary. Currently good analog engineers are in high demand because there aren't many of them left! So a lot of schools are adding analog electronics back into their curricula.
We live in an analog world, and all signals start as analog signals and must be returned to analog for audio playback. Modern video displays are about as close to pure digital as we've gotten so far, and even there the fact that there are still analog problems in digital electronics is what separates the good from the great.
Gordon Rankin: Many people talk about digital data and bit perfect in a singular sense. But in reality things are very different. The testing involved with doing a real bit test is larger than anyone really would want to take on. Just using the obvious methods of the indication of a HDCD marker or recording a signal and taking the analog equivalent and subtracting them to see a difference only covers a really finite amount of what a true bit perfect test is. How about we take a song output over an S/PDIF transmitter to an S/PDIF receiver, record that and compare the two (original file and the data received)? Why stop at one song, but maybe 10, 20 songs, 8 hours worth.
But aside from the data being true, there is so much more. How much energy is wasted delivering the data seems to have an effect on sound. As with increased energy usage the amount of EMI/RFI radiation also increases. This might be a reason why applications sound different. If we look at the "top" command in the Terminal application on OS X we see a programs usage and percent time and all the processes associated with that program. In practice the applications with the least required processing time also sounds the best. This may have an indication of why file types sound different. If you unpack a lossless file on the fly the processing time increases measurably and that tends to decrease the sound quality.
"People talk about USB and Firewire jitter being an issue and it can cause data errors. But really this is not the audio related jitter error that is most important."
Also how do we get the data there is a whole other topic to be taken on. We are basically packing audio data up into finite packets of bytes and then sending them over some serial link, one bit at a time and then rebuilding this data into a format for which the DAC chip will accept. People talk about USB and Firewire jitter being an issue and it can cause data errors. But really this is not the audio related jitter error that is most important. That has to do with the way the DAC receiver formats output data to the DAC chip and the associated audio master clocks and audio serial format (I2S, left justified, right justified, DSD, etc...). Then there is flow control over the network from the computer to the DAC. I don't know if any of you are looking at this... I have and it's not a pretty sight. So just doing this on average is not a good thing and there is an appreciable difference in sonics depending on the way you handle this.
Anyone who feels it's only "1" and "0" is missing a ton more variables that need to be addressed.
CH: The complete system used for CD's was developed before CD-ROMs were used for computers. It was only later when people started to realize that a CD could hold MUCH more data than any other transportable medium of the time (eg, 650 MB for a CD-ROM versus 1.2 MB for a 3-1/2" high-density floppy disk) that they adapted the CD for use with computers.
There are several very clever back-up and redundancy systems built into the audio CD format so that it is fairly rare for there to be an actual error in the bits (eg, a "1" will be misinterpreted as a "0" or the converse). However, the error rate is still too high to be used for computer files, so another layer of error correction is added to a CD-ROM in addition to all of the error correction systems found in a CD.
NB:Copying an audio CD to a CD-ROM will NOT use this extra layer of error correction, so there is no reason to copy all of your audio CD's to CD-ROM's. However if you rip your CD's to your hard drive using a system such as AccurateRip (employed in several ripping programs, such as dBpoweramp, see wiki.hydrogenaudio.org/index.php?title=AccurateRip for additional information), the checksum from your disc rip is compared to hundreds (or even thousands) of other submissions from other users and you can be confident that the audio data on your hard drive is a bit-perfect copy of the original master used for the CD. At this point, the data correction built into your hard drive will take over and protect your audio albums from any possible corruption -- at least until your hard drive fails. This is inevitable -- ALL hard drives will fail sooner or later, so be sure to BACK UP your music files!)
Getting back to the "grey zone" that exists between a "0" and "1" in ANY digital system, it is rare that the errors are so large that there will be actual corruption of the data. It can happen -- most people have seen a digital display connected with a cable that is either poor quality and/or too long for its intended purpose. Often this will show up as green "streaks" in the picture. It can also happen with audio. If the cable connecting the DAC to the computer is either poor quality and/or too long for the system in use, there may be randomly audible "ticks" or "pops" during playback.
"But since digital audio is a streaming system, the timing of the bits is critical. If the bit changes to the correct state but at the wrong time, this is equivalent to changing to the wrong level at the correct time."
However, it is important that ALL audio systems will suffer ill effects from this "grey zone" even if there are no obvious audible problems. This is because the error is not large enough to change the state of any particular bit. But since digital audio is a streaming system, the timing of the bits is critical. If the bit changes to the correct state but at the wrong time, this is equivalent to changing to the wrong level at the correct time. These timing errors are known as "jitter".
[GR: Audio streaming protocols are typically not error correcting. Standard Asynchronous and Adaptive protocols only cover flow control, not error control. The analog behavior at the receiver side of any streaming interface can have a lot of effect on the quality of the received data which will directly reflect the quality of the audio.]
It is rather unfortunate that jitter was the first timing error to be described in the context of digital audio, as it has become by far the most common way to refer to timing errors. But it turns out that far more important than the absolute amount of timing error is the spectral distribution of the error (ie, how much error is there at high frequencies versus low frequencies), and whether that timing error is correlated with the audio data (music signal) or if it is just random variations.
More sophisticated test equipment is required to test for this, and you will see this referred to as "phase noise". The phase noise is measured at a frequency that is offset from the desired carrier frequency. A graph of the phase noise versus the offset frequency provides us with information regarding the spectral distribution of the jitter, and is the best tool to date for measuring timing errors (ie, "jitter") in audio equipment, as it is the most sensitive tool and has the highest correlation with audible differences.
AS: Since there's no such thing as 1s and 0s in digital transmission, what is being sent over our USB/Firewire/Ethernet cables when we play back music files?
CH: An ANALOG signal!
Steve Silberman: I think this is where things get misconstrued. The signals we think of abstractly as “digital” are in fact high-speed analog square waves, susceptible to all of the same damage and distortions as any other analog signal.
AS: So when we talk about digital music playback, we're talking about a continuous system as opposed to a discrete system. In effect, once we hit play, our data is transformed from a discrete state into a continuous state which is, for all intents and purposes, governed by the laws of the analog world. And one of the most critical aspects of this continuous music playback system is time/timing errors/jitter.
GR: One thing that people have to realize is that these type of interfaces all work differently. I think that cable companies had to overcome when computer audio hit the market was... this stuff is all different than an S/PDIF cable. Which was really the only digital cable most of these companies had any experience with.
These interfaces all come with protocols which make not only the electrical aspect more demanding, but also details that are not apparent in S/PDIF cables.
"The turnaround time is the amount of time the cable settles to allow the other end to start transmitting without the signal being corrupted."
I would add one really key component to the list [time/timing errors/jitter]—what is called "turnaround". All of these protocols are asked for some kind of response. The turnaround time is the amount of time the cable settles to allow the other end to start transmitting without the signal being corrupted. It has to do with capacitance, length and impedance. For example some companies were making 50 foot USB cables stating they kept the capacitance low enough to make this work. I asked if they tested it on any asynchronous USB DACS and the answer was no. Well the problem was the host was never seeing the feedback pipe which made the DAC under or over run. The turnaround on these cables was sooooo long that when the DAC was asked to send the feedback pipe data that it was all corrupted when it reached the host.
AS: What about digital filters? How does a digital filter differ from an analog filter and doesn't this difference point to a digital "state" within the playback chain?
CH: As we have seen, "digital" itself is a very abstract concept. In the real world, there is some real physical quantity that represents "digital". For example, when the voltage exceeds such-and-such a threshold we define that as representing a "1".
But there is one place where our abstract concept (of the human brain) becomes (in a very strange way) tangible. And that is inside the electronic brain of a digital computer. Now the term "digital computer" can encompass a wide variety of things, from a simple gate that compares two signals to a sophisticated modern PC with billions of transistors operating at thousands of megaHertz.
When this electronic brain receives signals that represent 0's and 1's, it will carry out a very specific set of operations on those numbers as if they were really and truly digital. A good example of this is when one sees the image frequencies created by a digital sampling system. In the textbooks, these image frequencies repeat at multiples of the sampling frequency and go on forever -- to infinity and beyond!
This also happens inside the electronic "brain" that performs the computations, but as soon as the signal comes out into the real world, it has to conform to the real physical laws. For the image frequencies to continue forever, the impulses from the DAC chip would have to be infinitely narrow. Of course something infinitely narrow wouldn't exist. So a mathematician named Paul Dirac invented an abstraction called the "Dirac delta", where delta refers to a change. So it is an imaginary pulse that is infinitely narrow, but to have any energy it would also have to be infinitely tall. Of course such a thing cannot exist in the real world, but it exists in the equations created by digital mathematicians and calculated by the digital "brains" inside digital equipment.
As soon as that imaginary pulse comes out into the real world, the digital "brain" gives instructions to real switches that cannot change states with infinite speed. So they are stretched out to have a finite time, and this causes changes in the actual frequency response compared to the theoretical response.
But inside the "digital brain" of the equipment (and the brain of the digital engineer) is the only place that the signals are truly digital.
"But inside the "digital brain" of the equipment (and the brain of the digital engineer) is the only place that the signals are truly digital."
GR: When people ask me about digital filters I always have to remind them that most of the math we use here for digital filters was derived by the work of LaPlace and Fourier in the early 1800's. Remember to them, there was no computer. This math involves two tables, one of samples the other coefficients which make up the filters. A table with the audio data is multiplied by a table with the filter coefficients and accumulated to form a new output sample. LaPlace and Fourier therefore worked with infinite math models. Not 32 bit floating point, 24, 32, 64 fixed point math models. They assumed you had all the time in the world to do these computations, instead of in between two samples.
"...the larger you make the coefficient and the sample work into a larger model say 64, 72 bits or higher and don't over or under-run the math model, then the better it's going to sound."
This is why filters all sound different. A coefficient is less than 1, so it's a fraction. If you look at this as we do, then all the math here is fixed point, meaning there are no fractions. We multiply the coefficient by some factor, usually a multiple of 2, because we have to divide that out in the end to make the output sample correct. In fixed math it's faster and easier to divide by rotating the data right one spot (divide by 2) or 2 spots (divide by 4). But as Charlie has found out and something we were taught at school, the larger you make the coefficient and the sample work into a larger model say 64, 72 bits or higher and don't over or under-run the math model, then the better it's going to sound. Most commercial chips used 24 bit models for their math to make the chips cheaper. Some companies have really come around [and are building DAC chips with higher precision math models] and that is why the chips sound better and more realistic.
AS: To be continued...