Qustion about samplerate conversion
Reply #32 – 2006-11-28 10:18:03
AndyH-ha, Thanks for your long reply with much detailed information. Comments follow:Essentially any change to digitized audio results in quantization errors; no change of wordlength is necessary. Any digital representation uses quanta - small steps - to represent a continuous audio signal. No change is necessary because just representing an analog signal in digital format introduces quantization error (of 1/2 LSB).The shift of 16 bits up or down within a 24 bit word, as discussed recently vis a vis digital volume controls, is one exception, but is a very special case. I don't know if there are any others. Shifting data up or down a word also shifts the quantization error, but no error is added - as long as the LSB of your original data is preserved intact.What no one has pointed out explicitly, however, is that the quantization error amplitude is 36dB lower when working at 24 bit than when working at 16 bit, and much lower still for floating point files. This is what makes dithering on those files most likely pointless. This was clearly pointed out in the first article that I referenced in this thread. Quantization error in floating-point is a little more complicated, since it is not 1/2 LSB (since we now have mantissa and exponent): it varies according to the amplitude of the signal.I'm not certain what the process is when working with existing digital files, but I believe of necessity the dither must be added to the data before the transform is done. I don't think that adding dither after the transform could do anything for uncorrelating the quantization error from the signal. Also, I read in Pohlmann that dither is added to the analogue signal before digitizing, this being the only way it can work to effectively randomize the quantization errors that will result from the A to D process. 24-bit A/D converters for audio use (such as those you can find in high-end PC sound cards) are self-dithering, since the noise floor of most analog equipment is above -144dB. What happens afterwards depends on the respective devices in your mixing/editing chain. I also read in Pohlmann that the quantization error will have little correlation with high level complex signals. Thus it is much like white noise. Raising the noise level is its only significant contribution to audio (dis)quality. With low level signals, however, the error becomes highly correlated to the signal and thus is readily perceived as distortion. Gathering evidence is much easier under simplified conditions. My casual experiments with 16 bit CoolEdit generated tones (much easier to analyze than recorded music) puts the level of the signal at which quantization error becomes audible at -80dB. I'm sure there is some range either side of that depending upon just what the signal is and just what you do to it. There are some very informative comments about the audibility of quantization distortion in the article referenced by Kees a few posts above; quite a good read, actually.CoolEdit will dither any 16 bit transforms. It does not use noise shaping however (unlike when it resamples). The result of this is that the dither can become quite audible after only a few transforms, one of the disadvantages of working with 16 bit files. Some further experiments showed me that dithering the first 16 bit transform, then not dithering the second (on the same file), still produces audible quantization distortion from that second transform (the quantization noise is also quite visible in CoolEdit's Spectral View). Any FFT transform will result in an additional quantization error of >= 1/2 LSB -> there goes your dither. Just a guess here: CoolEdit doesn't use noise shaping when dithering after a transform because the cumulative high-frequency noise would become audible after even fewer transforms, compared to dithering without noise shaping.However, when I dithered the first two transforms, but not the third, I was unable to determine that any audible problems were produced. It seemed that, after two applications, the random noise content of the signal is so high that further dithering is irrelevant. More dithering will add more noise but not produce any benefit in return. Again, this may depend upon the particular signal and particular series of transforms; I don't know what those parameters might be. When the cumulative dither is > the quantization error of your transform, further dithering is not required.... I ask the same thing here. Test tones are easy. Can anyone provide a music sample where it is possible to hear negative results of not dithering when resampling from 32 bit (or 24 bit) to 16 bit? ... Good point! It is already answered at the end of the same article: http://www.hifi-writer.com/he/dvdaudio/dither.htm Quoting: The individual distortion components, themselves reaching to no more than -49dB (ref the -60dBFS tone), would actually be below the limits of human hearing in even a perfectly silent environment. Since you are talking about audibility (a subjective, psychoacoustic phenomenon), you would really need to ABX your music samples. So this thread is now reaching for a similar problem as that in the thread of 24 vs. 16-bit sample audibility. At one point somebody may want to do a public listening test with 16-bit non-dithered, 16-bit dithered without noise-shaping, 16-bit dithered with noise-shaping, and 24-bit audio samples, so we can bury these issues once and forever. Notes: