Dr. AIX's POSTS

Dither: Is It Still Needed?

In the world of PCM digital audio, we have sampling rates and word lengths. The sampling rate establishes the highest recordable frequency thanks to the Nyquist Theorem and greater work lengths provide increased dynamic range. Then there’s this problem called quantization noise, which happens when the amplitude of the incoming analog signal doesn’t land on one of the discrete digital amplitudes that are part of the “battleship” grid of samples and amplitude (see Figure 1 below). The digitization process must look for the closest digital amplitude to the actual analog value. This inexactness produces low-level noise called quantization noise.

quantization_noise

Figure 1 – Quantization Noise [click to enlarge]

What does this do to the sound of a PCM digital recording? It produces a very low level and randomly shifting noise. When something is random as opposed to continuous and predictable, our ear are drawn to it and we “hear” the problem. The early designer of PCM digital audio knew about the problems of quantization noise. One of the obvious solutions is to increase the length of the words. Moving from 8-bits to 16-bits increased the potential dynamic range of PCM encoding by providing many more horizontal lines on our diagram. The chart below will show you the dramatic increases that happen when you add bits to the words.

word_length_bits

Figure 2 – A chart showing the number of bits in a digital word and the available values that can be used. [Click to enlarge]

The reality is that no matter how many discrete values to have along the horizontal axis of the “battleship graph”, the analog amplitudes will never match up, so there will also be some quantization noise. Thankfully, it is quite low.

The other remedy is to modify the randomness of the noise and turn it into a steady state type of noise. This makes the sound much less obtrusive. This method is accomplished by adding dither to the stream of digital words as they are output.

Dither happens on the “least significant bits” [LSB] of a data word…the ones on the extreme right. If you take a couple of the ones and zeros that make up the LSBs and randomly switch them over time, the output is a steady state low-level noise. Obviously the lose of even a couple of bits degrades the potential signal to noise ratio of the system but the addition of dither improves the quality of the listening.

There are different types of dither [from Wikipedia]:

RPDF stands for “Rectangular Probability Density Function,” equivalent to a roll of a die. Any number has the same random probability of surfacing.

TPDF stands for “Triangular Probability Density Function,” equivalent to a roll of two dice (the sum of two independent samples of RPDF).

Gaussian PDF is equivalent to a roll of a large number of dice. The relationship of probabilities of results follows a bell-shaped, or Gaussian curve, typical of dither generated by analog sources such as microphone preamplifiers. If the bit depth of a recording is sufficiently great, that preamp noise will be sufficient to dither the recording.

Colored Dither is sometimes mentioned as dither that has been filtered to be different from white noise. Some dither algorithms use noise that has more energy in the higher frequencies so as to lower the energy in the critical audio band.

Noise shaping is a filtering process that shapes the spectral energy of quantization error, typically to either de-emphasize frequencies to which the ear is most sensitive or separate the signal and noise bands completely. If dither is used, its final spectrum depends on whether it is added inside or outside the feedback loop of the noise shaper: if inside, the dither is treated as part of the error signal and shaped along with actual quantization error; if outside, the dither is treated as part of the original signal and linearizes quantization without being shaped itself. In this case, the final noise floor is the sum of the flat dither spectrum and the shaped quantization noise. While real-world noise shaping usually includes in-loop dithering, it is also possible to use it without adding dither at all, in which case the usual harmonic-distortion effects still appear at low signal levels.

So is Dither a good thing or a bad thing? Its value was more important in the days of CD resolution digital audio but it is still a valuable tool in these days of longer word lengths. The use of noise shaping is extremely important in the world of DSD because without it, DSD could only realize 6 dB of dynamic range from 1-100 kHz. As it is, by pushing the noise out past the “audio band” of 20-20 kHz, DSD manages to do a pretty good job of providing standard resolution…somewhat better than a CD.

Dr. AIX

Mark Waldrep, aka Dr. AIX, has been producing and engineering music for over 40 years. He learned electronics as a teenager from his HAM radio father while learning to play the guitar. Mark received the first doctorate in music composition from UCLA in 1986 for a "binaural" electronic music composition. Other advanced degrees include an MS in computer science, an MFA/MA in music, BM in music and a BA in art. As an engineer and producer, Mark has worked on projects for the Rolling Stones, 311, Tool, KISS, Blink 182, Blues Traveler, Britney Spears, the San Francisco Symphony, The Dover Quartet, Willie Nelson, Paul Williams, The Allman Brothers, Bad Company and many more. Dr. Waldrep has been an innovator when it comes to multimedia and music. He created the first enhanced CDs in the 90s, the first DVD-Videos released in the U.S., the first web-connected DVD, the first DVD-Audio title, the first music Blu-ray disc and the first 3D Music Album. Additionally, he launched the first High Definition Music Download site in 2007 called iTrax.com. A frequency speaker at audio events, author of numerous articles, Dr. Waldrep is currently writing a book on the production and reproduction of high-end music called, "High-End Audio: A Practical Guide to Production and Playback". The book should be completed in the fall of 2013.

6 thoughts on “Dither: Is It Still Needed?

  • Alex S

    Thank you for explaining quantization error, dither, and noise-shaping. Very good to know that in addition to signal-to-noise improvement more bits reduces quantization error, too. I’m going to see whether I can find undithered files in the Internet so I can hear what quantization distortion sounds like. I would like to hear the effects of different dither and noise-shaping, too.

    Reply
  • james

    Been reading a lot of your posts here and have a question regarding re-mastering from analog masters using increased wordlengths (24 vs 16 bit).

    In a previous exchange, you indicated that there wasn’t any improvement remastering from an analog master since most analog masters don’t exceed the Redbook standards. This context for the exchange waa more about the bitrate than the word length.

    If I understand this post corretly, there would be a reduction in the quanitization error, correct as the analog waveform would be more accurately represented by the increased word length.

    It may be that it doesn’t matter since dithering would still be necessary. I would like to know your position on that as well.

    Thanks

    Reply
    • Admin

      James, thanks for the note and for coming by to read a few of my posts. There are couple of points that need addressing in your comment. The first has to do with the transfers of analog tapes to PCM digital copies. It’s true that virtually all commercial analog masters will fit very comfortably within the specifications of CDs. This is especially true of the dynamic range…which is where word lengths come into play. Without noise reduction, analog tape may come close to 12 bits but rarely more and most of the time less. So digital copies of analog tapes at 16-bits is way overkill.

      The second issue is whether increasing the word length add more amplitude levels resulting in less quantization noise or more potential dynamic range. The answer is that a single bit provides about 6 dB of dynamic range…and not more resolution within an existing range of dynamics. We need dithering to minimize the effects of quantization noise in either case.

      Reply
  • james

    OK, so no advantage due to work length, and also no advantage with a higher bitrate (considering analog masters).
    But I thought I read in one of your posts that you don’t see any advantage in bit rates greater than 96kHz, which implied to me that there was an advantage in 96kHz vs 44.1.

    In the end, I’m trying to decide whether purchasing hi-res versions of albums I love is worth it or not. I have downloaded your demos and love the quality, but sites like HD Tracks offer some of my favorite albums at various combinations of increased bit rates and word lengths.

    I understand that just “upsampling” existing fiels won’t make for a better end product, but if they go back to the original master (analog or digitial) and re-master, will the resulting product be better (as least can it theoretically be better, understanding that other things may impact the final product)?

    I’m not looking for an opinion on HD Tracks specifically. BUt hter are a number of sources for HD Audio you list on your site. You obviously are capturing the original performance at a higher resolution, and I agree that is the best situation. But there’s a lot of music out there. Too much to start over at the beginning, and in many cases, the artists aren’t even around anymore to make that possible. Can we not improve by starting with the masters?

    Thanks for all the education. I’ve been enjying it and appreciate your responses to my questions.

    Reply
    • Admin

      Thanks for the comment James. I did write and I do believe that sampling at 96 kHz delivers better fidelity over 44.1 or 48 kHz files…AND I’m not convinced that going higher than that is beneficial.

      Your question is really about transfers of older analog recordings into High-Resolution Audio containers. It would be great if we all knew what process was used in doing the transfers, did they have access to the master, and which masters (EQ’d or not), was a new mastering done etc. The face is with current sites, you don’t know and there’s been a lot of bad transfers or misrepresentations about the processing.

      Coming in the first quarter of next year, the new iTrax.com will expand our content catalog to include analog standard definition transfers AND I will let you know what the provenance is AND give you a high-resolution sample to check out before you purchase a track.

      The industry needs this sort of transparency.

      Reply
      • james

        Awesome.
        Looking forward to a larger catalog on iTrax.
        Also, thanks for clarifying your position. I think I got it now.

        James

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *