or Connect
Head-Fi.org › Forums › Equipment Forums › Sound Science › Bit depth and sampling frequency explained
New Posts  All Forums:Forum Nav:

Bit depth and sampling frequency explained

I don't post much on head-fi since I don't really have the time, but I read it as frequently as I can. And I found that there is a lot of misunderstanding about the effects of bit depth and sampling frequency. Even in the "24 vs 16 bit myth exploded" thread. In fact most of the info is wrong.
I am a master student in EE, and have specialized in communications. Including lots of courses in Fourier analysis. Now I work in speech processing/recognition, so I am more qualified than most people here.
I will try to explain in layman terms.

Humans can hear to about 20khz. Some, and only in their youth, can go to about 22kHz, but that's about it. Any higher frequencies that appear in the signal are insignificant. We can suppose that the signal is low passed at 22kHz prior to digitization, for our purposes.
From the Nyquist–Shannon theorem, you have that if the sampling frequency is higher that 44kHz(2x), you can PERFECTLY recover the original signal. That's why the standard sampling frequency is 44.1kHz.
It should be noted, however, that the perfect recovery is only possible is you can get the exact amplitude of the samples(infinite precision or infinite bit depth). And this is clearly not possible. In practice you have finite bit depth, so you cannot perfectly recover the original signal.
So bit-depth does not only affect the dynamic range, but also the error between the recorded signal and original. Higher bit-depth=better, obviously.
Higher sampling rates don't do anything in theory. I practice, they can help with non-ideal performance of filters and DACs. For audiophiles with high performance components, 88.2/96kHz should be more than enough. Higher values are meaningless, with the introduction of high performance digital filters and delta-sigma DACs.
An ugly fact that you should know about is oversampling. It can be shown that if the noise (including non-ideal performance of components) is equally distributed, 4x sampling frequency adds 1 bit depth resolution. So 192Khz, 16bit is the same as 48kHz, 17bit. I facts most DACs do this to save cost.
If you buy a cheap 24bit DAC, most likely it's a 20bit working at 256x the advertised frequency, or even worse. Since in practice the noise is no where near equally distributed, this is a complete lie.
The conclusion, do a lot of research to make sure that the DAC is not oversampling. This means that they will have to use a 24bit circuit to advertise it as such and it will perform much better that an oversampling 24bit DACs which is not really 24bit. In theory, the price doubles with each bit depth added, since the circuit size doubles.
If the DAC is non-oversampling, don't go for high sampling rates. 44.1/48 will need (near) perfect filters and other components to get good performance, but 88.2/96 is enough. What is important now is bit-depth. Go as high as you can afford.

I do not dispute any of your technical details, but, human hearing is just not that good, it is just not that good to the point where the difference in quantization error and thus noise between 16 bit systems and 24 bit systems is moot, you might just hear the different noise floors in a section of digital silence with the volume cranked up unpleasantly loud(1) but so what.

For playback the extra 8 bits is pretty much impossible to take advantage of, even if you could find a recording with a genuine 144db dynamic range and even if your speakers could handle the range and you had several KWatts of low noise amplification and you were prepared to peak at 144db above the listening room noise floor (typically 25 to 35db) you would deafen yourself after 20 minutes anyway.

1. Meyer and Moran (2007)
Quote:
 Originally Posted by Xel'Naga So bit-depth does not only affect the dynamic range, but also the error between the recorded signal and original. Higher bit-depth=better, obviously.
The quantization errors will just represent the white noise floor (if the signal is properly dithered).

"[W]hen the right dither is used, the resolution of the digital system becomes infinite. What results from a sensible digitisation or digital operation then is not signal plus a highly-correlated truncation distortion, but the signal and a benign low level hiss. In practical terms, the resolution is limited by our ability to resolve sounds in noise. Just to reinforce this, we have no problem measuring (and hearing) signals of –110dB in a well-designed 16-bit channel."
-- J. Robert Stuart, Coding High Quality Digital Audio, Meridian Audio Ltd.

Quote:
 It can be shown that if the noise (including non-ideal performance of components) is equally distributed, 4x sampling frequency adds 1 bit depth resolution.
Technically it's that every time you double the sample rate you lower the noise floor by roughly 3dB. So it's true that going from 48 to 192kHz will lower the noise floor by 6dB, which roughly represents 1 bit.
And if you use noise shaping you can lower it further in the critical frequency range.

Quote:
 I facts most DACs do this to save cost.
Pretty much all DACs have used oversampling since the early 80's. And it's not only cheaper, it's smarter and provides superior performance as well.

Quote:
 If you buy a cheap 24bit DAC, most likely it's a 20bit working at 256x the advertised frequency, or even worse. Since in practice the noise is no where near equally distributed, this is a complete lie.
That a DAC is marked as 24 bit only means that it accept 24 bit signals, nothing more. It does not tell you anything about performance whatsoever, so it's not a lie.
And the vast majority of modern DACs are multi-bit sigma/delta so they work with just a few bits at high speeds (up to 70MHz in some cases!) internally.

Quote:
 The conclusion, do a lot of research to make sure that the DAC is not oversampling.
Then you'll have to go for 20+ year old DAC circuits (and even those are usually oversampling), but those are obviously never 24 bit.

Quote:
 This means that they will have to use a 24bit circuit to advertise it as such and it will perform much better that an oversampling 24bit DACs which is not really 24bit.
But there are no "true" 24-bit DACs on the market. And all modern DACs use oversampling.
I'm a Computer Science Master graduate and had to learn this stuff for computer systems (modems etc...)

What surprises me most is that people are so stuck on the dynamic range that they forget that dynamic range is not the only way to use extra bits.

let me put it this way. 16 bit is only 65535 steps of amplitudo. That's not really that very much. 24 bit gives you 16777215 steps of amplitudo. Now thats a lot more and you can use those steps in the exact same dynamic range as is the case with 16 bits. So now you have the dynamic range of 16 bit sound with the amount of steps you have with 24 bit. What do you get? increased resolution.

now about the dithering... Yes you would probably be able to increase resolution seemingly... But it's the same story with aliasing of images and using realy high resolution imaging (or dithering of images and using true color images)
Quote:
 Originally Posted by Justice Strike let me put it this way. 16 bit is only 65535 steps of amplitudo. That's not really that very much. 24 bit gives you 16777215 steps of amplitudo. Now thats a lot more and you can use those steps in the exact same dynamic range as is the case with 16 bits. So now you have the dynamic range of 16 bit sound with the amount of steps you have with 24 bit. What do you get? increased resolution.
No, if the signal was 24 bit all the way you'll just get a lower noise floor. Those bits can be of use if you're going to process the signal (to keep the noise floor low), but you can just add zeros to a 16 bit signal to get the same advantage (like all DSP-software/hardware does).

Quote:
 now about the dithering... Yes you would probably be able to increase resolution seemingly...
Not "seemingly"! Read this 10 times over :
"[W]hen the right dither is used, the resolution of the digital system becomes infinite".
Quote:
 Originally Posted by D. Lundberg "[W]hen the right dither is used, the resolution of the digital system becomes infinite. What results from a sensible digitisation or digital operation then is not signal plus a highly-correlated truncation distortion, but the signal and a benign low level hiss.
This is false - the resolution is never infinite. Dithering does increase resolution, but there's no free lunch. That sub-LSB information is encoded as PWM, i.e., in the time domain as well as the amplitude. This means infinite resolution is impossible unless you have infinite bandwidth.

Quote:
 Pretty much all DACs have used oversampling since the early 80's. And it's not only cheaper, it's smarter and provides superior performance as well.
No. You are firstly confusing the conversion principle of a DAC with the external usage of it. Delta-sigma DACs use oversampling because they must. An R-2R DAC, for example, need not oversample at all - it's operating principle doesn't require it.

Quote:
 That a DAC is marked as 24 bit only means that it accept 24 bit signals, nothing more. It does not tell you anything about performance whatsoever, so it's not a lie.
This is the case today due to poor quality Delta-sigma DACs. The bit-depth of a DAC should represent the reasonable digital to analog conversion bit depth of the DAC. Ofcourse there are considerations such as noise which make true 24-bit capability unlikely, but the principle should be obvious. Marking a DAC as 24 bit should not simply mean that it takes in 24-bit data and throws out the last 8 bits.

Quote:
 But there are no "true" 24-bit DACs on the market. And all modern DACs use oversampling.
The PCM1704 is one example of what you say doesn't exist - a modern and currently manufacured DAC chip released in 1999 that is a true 24-bit 2-2R DAC.
Quote:
 Originally Posted by D. Lundberg No, if the signal was 24 bit all the way you'll just get a lower noise floor. Those bits can be of use if you're going to process the signal (to keep the noise floor low), but you can just add zeros to a 16 bit signal to get the same advantage (like all DSP-software/hardware does). Not "seemingly"! Read this 10 times over : "[W]hen the right dither is used, the resolution of the digital system becomes infinite".
now that sounds like a challenge. Prove it with mathematics. And when your at it, prove that this is not the case with 8 bit sound.
Quote:
 Originally Posted by b0dhi This is false - the resolution is never infinite. Dithering does increase resolution, but there's no free lunch.
Dither de-correlates the quantization errors from the signal, and as long as they aren't correlated you'll effectively have "infinite resolution" (signal plus a white noise floor).

But "resolution" is probably not the right word to use in this context. There are only four characteristics of audio waveforms (amplitude, frequency, phase and dynamic range), and "resolution" isn't one of them. Other than as statistical resolution, which helps determine the dynamic range of a waveform.

So I'll try to be clearer in the future.

Quote:
 Delta-sigma DACs use oversampling because they must. An R-2R DAC, for example, need not oversample at all - it's operating principle doesn't require it.
True, but most R-2R ladder DACs use oversampling (and even where it's optional it's usually recommended by the manufacturers). And the vast majority of DACs made in the past ten years are (multi-bit) sigma/delta.

Quote:
 The bit-depth of a DAC should represent the reasonable digital to analog conversion bit depth of the DAC.
And what do you mean by that? Should a 5 bit sigma/delta converter with 120dB SNR (~20 bits) that accepts 24 bit signals be branded as 5 bit, 20 bit or 24 bit?

Quote:
 PCM1704 is one example of what you say doesn't exist - a modern and currently manufacured DAC chip released in 1999 that is a true 24-bit 2-2R DAC.
I'm familiar with that chip. It's one of few R-2R DACs made in the past 20 years. It obviously doesn't give you 24 bits of SNR, but it performs pretty well for its age.
And it also uses oversampling.
just show the mathematical equation that shows that 16 bit can give "infinite resolution" and that 8 bit cannot give "infinite resolution"
Quote:
 Originally Posted by Justice Strike now that sounds like a challenge. Prove it with mathematics. And when your at it, prove that this is not the case with 8 bit sound.
Prove what? How quantization works? There is plenty of literature on the subject. I could recommend some books if you're interested.

And what isn't the case with 8 bit sound? Using 8 bits works the same way as any other bit depth.
Quote:
 Originally Posted by D. Lundberg Prove what? How quantization works? There is plenty of literature on the subject. I could recommend some books if you're interested. And what isn't the case with 8 bit sound? Using 8 bits works the same way as any other bit depth.
you are confuzing pcm decoding with spline fitting. Yes you are correct you can approximate it with infinite precision... but that's not how a dac works. And to be honest, sound is much like a brownian motion.
Quote:
 Originally Posted by D. Lundberg True, but most R-2R ladder DACs use oversampling (and even where it's optional it's usually recommended by the manufacturers). And the vast majority of DACs made in the past ten years are (multi-bit) sigma/delta. ... I'm familiar with that chip. It's one of few R-2R DACs made in the past 20 years. It obviously doesn't give you 24 bits of SNR, but it performs pretty well for its age. And it also uses oversampling.
The 1704 doesn't oversample in the same sense that a Sigma-Delta does. You feed it a word and it performs the conversion of that word to a current when WCLK cycles (actually 2 BCLKs afterward). It can do this only within a certain operating frequency. The operating frequency has nothing to do with the conversion principle of the chip itself. The chip doesn't actually change the sampling rate in any way. There's the distinction between oversampling in a R-2R DAC and oversampling as used in a Sigma-Delta; with SD, it's fundamental to the conversion principle. With the 1704, you can feed it "oversampled" data or you can not. The DAC functions as a DAC exactly the same either way.

My point with all this being that although dithering does increase resolution significantly, it isn't without consequence and cost (some of which we may not even be aware of yet), and it doesn't make bit depth inconsequential.
Quote:
 Originally Posted by Justice Strike you are confuzing pcm decoding with spline fitting. Yes you are correct you can approximate it with infinite precision... but that's not how a dac works. And to be honest, sound is much like a brownian motion.
I don't think I wrote anything about spline fitting.

Let's go over the basics of digital sound:

There are only only four characteristics of a waveform: frequency, amplitude, phase (relative to other waveforms) and dynamic range.

The first three can be known by (as per the Nyquist theorem) sampling the amplitude of a waveform more than twice as fast as the highest frequency it contains.
And the dynamic range is a measure of the amount of errors caused by rounding the amplitude values of the sample points to quantization steps.
Those errors (when converted to back to analog sound) are the noise that make up the noise floor.

I know it's a bit hard to get your head around that, for example, 4 quantization steps (2 bits) are sufficient to describe all the complexities of a waveform, but they very effectively can (albeit with large amounts of resulting background noise).
That's why modern AD/DA-converters can work with very few bits (and move the resulting noise upward in frequency).

So more bits actually does mean better "precision", but only as in less quantization errors (and thus lower noise floor).
Quote:
 Originally Posted by b0dhi My point with all this being that although dithering does increase resolution significantly, it isn't without consequence and cost (some of which we may not even be aware of yet)
You make it sound like it's some form of voodoo.

There are many types of dither, but the most basic form is basically just random noise of the same type that is present in all analog signals.
That's why you don't need to add dither when you convert an analog signal to digital.
The analog signal will already contain more than enough random noise.

And as long as there is random noise of sufficient amplitude in the signal, the quantization errors will be random as well and not correlated to the signal.
So the difference between the quantized signal and the original will be in the amount of background noise.

That's the beauty of dither:
Quantizing a clean signal -> distorted signal
Quantizing random noise -> random noise
Quantizing signal + random noise -> signal + random noise

Quote:
 and it doesn't make bit depth inconsequential.
Of course not. But it's important to know what bit depth represents and where and why it is important.
from another thread, here's a pointer to some useful and not-overly-technical reading (from Pohlmann, Principles of Digital Audio)