Difference between Anologue and digital sound?
Mar 9, 2012 at 5:22 PM Post #76 of 78
Quote:
Originally Posted by jcx /img/forum/go_quote.gif
 
code snippet - though I'm not certain which version: http://code.google.com/p/audacity/source/browse/audacity-src/trunk/src/Dither.cpp?spec=svn11480&r=11480

 
I think the problem may be that I tested with a stereo track, and Audacity (at least in the version I have) reuses the same Dither object for both channels. This is not an issue for the simple uniform dither, but in the triangle mode makes the colored noise white (because each channel has only the even or odd samples of the same differentiated noise signal), and it completely breaks the noise shaping mode. With a mono test track, it works correctly.
 
@germanium: here is a short summary of why TPDF has an unweighted SNR of 93.3 dB relative to a 0 dBFS sine wave:
- TPDF dithering adds triangular distribution noise of a peak to peak amplitude of 2 (-1 to +1) to the signal before quantization
- this is sufficient to make the quantization error uncorrelated to the original signal (i.e. only noise, no distortion)
- with triangular distribution, there is 25% chance that the random value is in the range 0.5 to 1, and 75% that it is in the range 0 to 0.5. Therefore, with no input signal, on average 6 out of 8 output samples will be zero, one +1, and one -1
- the RMS of the quantization noise is sqrt(1 / 4) = 0.5
- the RMS of a full scale sine wave is 32767 / sqrt(2)
- the SNR is (32767 / sqrt(2)) / 0.5 = 65534 / sqrt(2) = 46339.54 = 93.32 dB
With A weighting, it is better by a few dB, depending on how the noise is generated (see above).
 
 
Mar 11, 2012 at 2:47 PM Post #77 of 78


Quote:
Something to keep always firmly in mind is that sampling is not a lossy process for the frequency range in question, so long as the sampling rate is at least twice the maximum frequency of the frequency range.  Said another way, a sampling rate of, say, 44.1kHz provides for a lossless (read, perfect, identical) reproduction of a signal at or below a frequency of 22.05kHz.  Above 22.05kHz the process lossy, yes.  Below 22.05kHz, the process of reconstructing the analog signal is lossless, perfect.  In the range of human hearing, between 20-20,000kHz, a sampling rate of 44.1kHz provides for a perfect, lossless representation of the signal.  This talk of "connecting the dots" could lead many to believe that there is some lossy, error-introducing interpolation going on when, in fact, no such thing takes place at all.  This is established scientific fact.


You left out an important part of the Nyquist-Shannon theorem. From Wikipedia:
If a function x(t) contains no frequencies higher than B hertz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart.

 
..and then later on:
 
 
The theorem assumes an idealization of any real-world situation, as it only applies to signals that are sampled for infinite time; any time-limited x(t) cannot be perfectly bandlimited. Perfect reconstruction is mathematically possible for the idealized model but only an approximation for real-world signals and sampling techniques, albeit in practice often a very good one.

The theorem also leads to a formula for reconstruction of the original signal. The constructive proof of the theorem leads to an understanding of the aliasing that can occur when a sampling system does not satisfy the conditions of the theorem.

 
Here we don't have input signals (i.e. music) that are strictly limited to a maximum of 22.05kHz, so the conditions of the N-S theorem are not satisfied. Of course you can preprocess the signal, applying a filter to attempt a brick wall cutoff at 22.05kHz, but that process is certainly lossy. The Nyquist-Shannon theorem most certainly does not guarantee a lossless sampling for music signals. In the context of music recording, any sampling scheme is an approximation. We can argue all day about how good of an approximation, and where the "good enough" cutoff is, but to say that 44.1kHz sampling is lossless, even within the range of 0-22.05kHz - and to argue that such perfection is "guaranteed by N-S" - is absolutely wrong.  
 
 
Mar 11, 2012 at 3:11 PM Post #78 of 78
Quote:
We can argue all day about how good of an approximation, and where the "good enough" cutoff is, but to say that 44.1kHz sampling is lossless, even within the range of 0-22.05kHz - and to argue that such perfection is "guaranteed by N-S" - is absolutely wrong.

Which is why he wrote between 20 Hz and 20 kHz a sampling rate of 44.1kHz provides for a perfect, lossless representation of the signal keeping in mind what is audible to humans and what is not. Up to 22.05 kHz there's enough "room" for a low pass filter (actually the using steeper filters the passband can be over 21 kHz) and even if there's some aliasing above 20 kHz it doesn't matter because it is inaudible.
 
 

Users who are viewing this thread

Back
Top