24bit vs 16bit, the myth exploded!
Dec 13, 2010 at 2:29 AM Post #631 of 7,175
Thanks for explaining this VISUALLY! 
I got your point easily! 
 
Again keep the explanations coming as this is all food for the brain. 
 
     
 --- Let's go back to the tube amplifier.  I have a tube amp that is getting HQ .flac 96Khz audio from my ipod doc "unmodified" and unfiltered through the IPOD doc. The audio in fed via component into the inputs. There is a considerable change in audio quality. It sounds fuller to the ear. This is distortion of the waveform or injected noise or both?
 
 Help me here.  
 
 I think I am understanding this. Just clarify please.  
 
Dec 13, 2010 at 9:43 AM Post #633 of 7,175
     Quote:
Are you sure about that? If I generate a -10 dB pink noise file and add a -15 dB 440 Hz sin wave to that file, won't I be able to hear the 440 Hz signal?

You can hear through a noise floor, but as the signal goes below it will be masked to some extent. At som point (depending on the signal, type of noise, etc.) it will be completely masked by the noise and you won't be able to hear it.
Ideally you want to keep all of the signal above the noise floor.
 
Quote:
@D. Lundberg
The entire first part of your post I agree with... You act like you are correcting me, but that's all that I am saying... Those equations you posted describe the relationship I am talking about, if D goes up then Q goes up. If Q goes up, the difference between steps becomes smaller.

True, I was just clarifying. So then we agree that the bit depth only affects the dynamic range and not the "sound quality" (unless the noise floor is audible or masks the signal)?
 
Quote:
Even if a "proper" signal is dithered, it still won't sound as good as the original.

Except for the amount of background noise, the signal will be (close to) identical. And if you use some form of noise shaping you can minimize the effect of the noise, but you'll probably need to extend the bandwidth a bit as well to make room for the noise.
If you lower the noise floor in the audible range (20Hz-20kHz) enough there will be no audible difference between a 24bit recording and the same recording reduced to 8bits (or less)!
 
Dec 13, 2010 at 11:48 AM Post #634 of 7,175
Alright, how about this: 'Depending on the situation, bit depth may or may not affect audible signal quality'? I think that's appropriately ambiguous... 
tongue.gif

 

Quote:
. the file on the CD/computer is already dithered, there is no dithering at the time of playback. The only situation where you dither at the time of playback id if you need to convert a 24bit file to 16 bit because your DAC doesn't support 24 bit.




 
[size=medium]
 
That makes no sense to me... why mess up the waveform if you just get the exact same quantization error plus noise? If it's going to be 16 bit anyway, why mess up the wave before you compress it?
[/size]

 
Dec 14, 2010 at 9:28 AM Post #637 of 7,175
     Quote:
Originally Posted by wyager /img/forum/go_quote.gif
That makes no sense to me... why mess up the waveform if you just get the exact same quantization error plus noise? 

Dither doesn't "mess up" the waveform, in fact it is is used to prevent quantization (rounding to "steps") from messing up the waveform. The basic form of dither is random noise and it is used to make sure there is enough noise in the waveform to randomize the errors from quantization.
 
Random quantization errors -> white noise
Quantization errors that are correlated to the signal -> distortion
 
Adding dither does actually raise the noise floor by a small amount (for example 0.5bits of dither will raise it by 3dB), but that is a small price to pay to preserve the waveform.
 
The basic form of dither is used during many stages of processing, but the final quantization from 24bit to 16bit is often done with some form of "colored" (not random) dither and/or noise shaping (which allows you to preserve much of the 24bit noise floor).
 
Here's a sample of what noise shaping can do:
 
Silent part (noise floor) of the original master: 24bit/192kHz
piano24192.jpg
 
Reduced to 16bit/192kHz with iZotope MBIT+ Noise shaping
piano16192.jpg
 
     Quote:
If it's going to be 16 bit anyway, why mess up the wave before you compress it?

I'm not sure what you mean. Changing the bit depth is not compression.



 
Dec 14, 2010 at 9:35 AM Post #638 of 7,175
@Canuckabroad81: Of course, imagine a pure 100 Hz sine wave vs. a 100+200 Hz harmonic sine wave - the pitch will be higher.
 
@wyager: I've even posted dithered example files.. see post #539. And I'm still recommending you to read a book about the topic if you want to understand what, why and how things work.
 
Dec 14, 2010 at 9:36 AM Post #639 of 7,175
Going back to the example with the pictures, a 4 bit (16 colors) quantization undithered has the pixels values simply truncated or rounded of from the actual values, it creates digital artifacts, see how it simply divides the sky into 2 distinct parts, on the other hand the dithered image has some kind of randomization going on in the sky and globally gives an artifact free and more realistic sky.
 
Quote:
That makes no sense to me... why mess up the waveform if you just get the exact same quantization error plus noise? If it's going to be 16 bit anyway, why mess up the wave before you compress it?

 
Dec 16, 2010 at 1:40 PM Post #640 of 7,175
I just got an idea how it is better possible to picture why bit depth got nothing to do with wave resolution.
Imagine a sine at 10 kHz. Imagine it sampled with 44,1 kHz.
Picture 1/10000 second (which shows just one pass of the sine through max and min).
There are only around four values taken for this pass. The sine must look really ugly now, with only four steps.
Regardless how big the bit depth, even with 100 bit there are still only four values taken.
But e.g. with 24 bit compared to 16 bit you will be able to take greater max and smaller min values, which would be the greater dynamic range as far as I understood.

Correct me somebody if I'm wrong, please.
 
Dec 16, 2010 at 5:07 PM Post #641 of 7,175
Quote:
I just got an idea how it is better possible to picture why bit depth got nothing to do with wave resolution.
Imagine a sine at 10 kHz. Imagine it sampled with 44,1 kHz.
Picture 1/10000 second (which shows just one pass of the sine through max and min).
There are only around four values taken for this pass. The sine must look really ugly now, with only four steps.
Regardless how big the bit depth, even with 100 bit there are still only four values taken.
But e.g. with 24 bit compared to 16 bit you will be able to take greater max and smaller min values, which would be the greater dynamic range as far as I understood.

Correct me somebody if I'm wrong, please.


The sine doesn't look ugly at all, it looks fine (READ!). What looks ugly is if you link the 4 sample values with a straight line, but that has nothing to do with how the waveform is reconstructed.
 
There's not really greater max values.
128 in 8-bit format = 32768 in 16-bit format = 8388608 in 24-bit format = 1.0 normalized (floating point) = 0 dBFS
(all integers signed)
 
The problem is quantization noise. Imagine a sample value (normalized) of 0.333, even in a 24-bit format you cannot exactly represent that number, because it would have to be 2793406.5 which is a problem with integers. So you introduce a small amount of noise to the signal because you either have to pick 2793406 or 2793407.
 
Both values are very close to what we want, but if you repeat quantization with 8-bit numbers you'll see that the error is greater. More noise. Less dynamic range.
 
Convert the files I uploaded from 16 to 8 bit, with dithering. All you'll see is that the noise floor (around -120 dB) will move up by quite some dB. Everything below that new noise floor will probably be drowned = less dynamic range.
 
Dec 16, 2010 at 11:54 PM Post #642 of 7,175
@xnor, if I understand that wiki right, the sin wave is shifted so that either the peak values or the (close to) zero values (I'm not sure which) occur at the moment of sampling. Do I understand it correctly?
Also, please answer me this please-let's say that you have the hypothetical 8-bit +/-1.28v system I described earlier, with .01v resolution. You want a voltage of .635v, but do not have the resolution. Does the noise introduced by dithering, in effect, make the DAC rapidly switch between .63v and .64v to achieve the illusion of .635v for a certain amount of time? This is how I have come to interpret it, but I am not at all sure if this is correct.
 
@xabu
while that may be right (But maybe xnor disagreed? And I have no idea.), the problem is that there are plenty of waves well below 10khz. As I said, a non-dithered 100hz 8bit wave sounded really grainy.
 
Dec 17, 2010 at 8:58 AM Post #643 of 7,175
Quote:
@xnor, if I understand that wiki right, the sin wave is shifted so that either the peak values or the (close to) zero values (I'm not sure which) occur at the moment of sampling. Do I understand it correctly?
Also, please answer me this please-let's say that you have the hypothetical 8-bit +/-1.28v system I described earlier, with .01v resolution. You want a voltage of .635v, but do not have the resolution. Does the noise introduced by dithering, in effect, make the DAC rapidly switch between .63v and .64v to achieve the illusion of .635v for a certain amount of time? This is how I have come to interpret it, but I am not at all sure if this is correct.

 

I really don't know why it's so hard to understand, but to help you I made this little graph:
 

 
That's a 10 kHz sine wave, sampling rate is 44100 Hz.
 
We start by looking at each sample, center the sinc function around that sample and scale it down to the sample value. In the end we sum those functions up, et voilà we have our continuous sine wave back.
 
This step is the same for 8, 16, 24 or whatever bit sample size, the waveform always is going to be continuous like this.
 
A DAC will try to follow this continuous waveform as close as possible, how the DAC achieves this, however, is implementation specific. (there's a lot more to read 
wink.gif
)
 
Dec 17, 2010 at 12:37 PM Post #644 of 7,175
OK, so the sum of all the sinc functions from the samples taken is the current amplitude of the sine wave? I guess that makes sense.
 
However, as xabu pointed out, won't the wave not look smooth, like in your graph, but rather blocky since there are only around four total samples per hertz?
 
Dec 17, 2010 at 1:18 PM Post #645 of 7,175
Quote:
However, as xabu pointed out, won't the wave not look smooth, like in your graph, but rather blocky since there are only around four total samples per hertz?


No, I have pointed that out in my answer clearly, haven't I?
 

 
This has nothing to do with the reconstructed waveform (see above, I used the same sample values for this graph, it looks nothing like the waveform). You cannot graphically connect samples and hope you get an accurate waveform, that's nonsense.
 
But either of the display modes shown in my graph are very simple to implement and fast, that's why some audio editors choose to display waveforms that way.
 
 
(Only some ancient or very simple DACs would output something exactly like the hold line above.)
 

Users who are viewing this thread

Back
Top