Showing posts with label quantization. Show all posts
Showing posts with label quantization. Show all posts

Thursday, October 25, 2012

How Many Bits in Infinity?

Why are 24-bit digital recordings the benchmark for capturing live sound?

It has to do with our limited ability to measure physical phenomena. Experiencing and recording sound is essentially measuring pressure over time.

Regardless of whether you are measuring continuously or sampling at intervals, at any instant you are trying to capture the magnitude of a phenomenon, or signal, that exists as a real number — arbitrarily scaled to lie in the closed interval [0,1] — and its direction. Real numbers cannot (all) be represented exactly.

The set of real numbers has infinite size. The set is so big, the real numbers are not even countably infinite, like the integers. While there are an infinite number of integers, there are a finite number between any two of them, so that the set of integers in a closed interval has a known size N. A set of size N can be represented using b bits, where b is the smallest whole number such that N ≤ 2b. Between any two real numbers are an infinite number of real numbers. How many bits in infinity?

Thus, our ability to record physical phenomena is defined by our ability to quantize it. Quantization maps infinite sets of real values to single values, to create a finite set of approximation sample values ("words") large enough both to have high dynamic range (DR), the maximum decibel (dB) level of a signal minus the aveage noise level, and have an acceptable error factor (inversely proportional to the size of the quantized set).

How big is an accurate quantization set and how many bits are needed to represent its members? Each bit added to the sample word accomplishes three important things:
  1. Doubles the size of the quantized value set it can represent;
  2. Cuts quantization error by half;
  3. Adds 6 dB of DR.
There is a well-known term for this — exponential growth. Not only does the sample set expand as you add bits, the rate of that expansion accelerates. Every added bit is more significant than all the bits that came before it, up to a point. When does adding bits stop adding information?

Since the threshold of hearing is near 0 dB SPL, and since the "threshold of pain" is often defined as 120 dB SPL, it is said that the DR of human hearing is approximately 120 dB. Thus, 24 bits is the first natural computer word size (divisible by 8) that offers a DR geater than that of human hearing. Larger word sizes, while greater precision for other kinds of measurements, don't add meaningful information for sound. 24 bits is the right combination of precision and practicality.

Anything less than 24-bit digital audio has been a compromise. 16-bit samples were chosen for CD audio due both to the requirement to store more than 70 minutes of audio on a disc and to the limited space offered by optical disc technology in the 1970's. Lossy compressed audio was a concession to the covenience of being able to store a lot of songs on the low-capacity flash memory devices that were the first generation of portable digital music players. Now there is sufficient storage space and wireless bandwidth inside our homes to make 24-bit studio master recordings the de facto standard for digital music acquisiton and playback.

The reproduction is never going to be the original perfomance; or, as Alfred Korzybski said, "The map is not the territory." But a richly detailed map is better than the back of a napkin drawing. To paraphrase one of my design heroes Edward Tufte, summaries can emerge from high-information sources, but there is nowhere to go if we begin with a low-information source. A 24-bit studio master recording is a richly detailed map. Why settle for a summary?

             Vinyl-to-Digital Restoration #9            

Title: Desperado
Artist: Eagles
Genre: Rock
Year: 1973
When I bought my first CD player c. 1985, I already had an extensive album collection. Never the record labels' dream consumer, I rarely re-purchased on CD material I had on vinyl. For years, my turntable and CD player peacefully co-existed. So my Eagles albums went silent when I retired the turntable in the mid-90s (before the vinyl revival) for lack of space and a general frustration that an artist shuffle is not possible when the material is spread over seven LPs. It's nice to have the band back together after converting all that physcial media to weightless 24-bit digital. Hell Freezes Over, anyone?


© 2012 Thomas G. Dennehy. All rights reserved.

Thursday, January 19, 2012

We'll Always Have Paris. Or a 24-bit Approximation of Paris.

Quantization maps infinite sets of real values to single values.
When it comes to digitally recording music from analog source material (LP, tape) the best approach is, "Sample often, sample well."

In a previous post we introduced non-subjective numerical methods to establish 96 KHz (ninety-six thousand samples per second) as an information-rich practical sampling rate. That takes care of "sampling often."

But what about "sampling well?" Can near 100% accuracy be achieved for the samples being collected? 24-bit word size is the closest practical approximation. Why? Read on.

Digital sound samples are real numbers in the closed interval [-1, +1] and can take on any of an uncountably infinite number of values within that interval. The sound capture process therefore must quantize the infinite set of real sample values into a set of approximating values that has a finite size yet is still information-rich. How big should that set be and how many bits are needed to represent its members?

With b bits available, a value set of size 2^b (2 raised to the power of b) can be encoded. At one bit, the sign bit, there are two values available (2^1 = 2) and we can only express whether a sample is greater than 0 or less than 0. Arbitrarily assign the value +0.5 to any positive sample (bit value 0) and -0.5 to any negative sample (bit value 1). The maximum quantization error ε with one bit is 50% (± 0.5). Clearly we need more bits.

Each bit added to the sample word doubles the size of the quantized value set it can represent and cuts quantization error by half. There is a well-known term for thisexponential growth. Not only does the sample set expand as you add bits, the rate of that expansion accelerates.

At 8 bits, 256 values can be represented and ε is just under 0.5%. Not good. At 16 bits, the set has more than 65,000 values and ε around 0.002%. Better, but still room for improvement. At 24 bits, the set has more than 16 million values and ε around 0.000006%. Every added bit is more significant than all the bits that came before it, up to a point. When does adding bits stop adding information?

A copy can't contain more information than the original. Most digital studio recording is done at 24-bit, so adding bits beyond that in the home audio capture process adds no new information on digital-to-analog source material (e.g. new releases on vinyl). Using 24-bit sampling to record analog-to-analog material (old vinyl) mimics current industry best practices. And 24-bit is a sample size supported by more and more computer sound interface devices, so it's likely you can find one at a price you're willing to pay.

Therefore my next recommendation for creating numerically accurate digital copies of your LPs is to set the sample size to 24-bit when recording. What do you think? Leave a comment.

              Vinyl-to-Digital Restoration #11              

Title: Waiting For Columbus
Artist: Little Feat
Genre: Rock
Year: 1978
Double albums present special challenges in the digital transfer process. Live albums present still other challenges. Double live albums are a double whammy. If a multi-disc set comprises a single work, you must normalize the output sound level across the entire set (not disc by disc) to prevent odd changes in volume if you shuffle the tracks. Deciding exactly where to split between tracks on a live album (during applause) is an art, not a science. You'll be happy to have a 24-bit/96KHz recording on which you can zoom way in to make a precise cut.


© 2012 Thomas G. Dennehy. All rights reserved.