Taperssection.com

Gear / Technical Help => Post-Processing, Computer / Streaming / Internet Devices & Related Activity => Topic started by: Dede2002 on May 28, 2008, 06:36:57 PM

Title: Resample and then dither. Why?
Post by: Dede2002 on May 28, 2008, 06:36:57 PM
Why do you have to resample and finally dither? Is there any bad consequences in sound quality if you do the other way around, I mean, dither from 24 to 16 and then resample to 44.1 ( of course I'm asking this because that's exactly what I've been doing for years... ::)?

Thanks in advance  ;)
Title: Re: Resample and then dither. Why?
Post by: JasonSobel on May 28, 2008, 08:37:43 PM
when you do any processing to the file (including resampling), you want to do it at the highest bit depth as possible, to avoid "rounding errors" in the mathematical calculations.  you'll get more accurate results using 24 bits of info when you resample (many programs actually have internal calculations at bit depths of 32 or even 64 bits).

Once all the processing is done, you now have a file that's sampled at 44.1 kHz, but still at 24 bit (or, 32 bit or whatever internal bit depth was used), and you need to get it to 16 bit.  the only reason why dither is applied to the file is to hide any digital noise that may occur if the bit depth was just "truncated" to 16 bits (i.e. only the 16 most significant bits kept, and everything else thrown away).
Title: Re: Resample and then dither. Why?
Post by: Dede2002 on May 28, 2008, 09:04:40 PM
when you do any processing to the file (including resampling), you want to do it at the highest bit depth as possible, to avoid "rounding errors" in the mathematical calculations.  you'll get more accurate results using 24 bits of info when you resample (many programs actually have internal calculations at bit depths of 32 or even 64 bits).

Once all the processing is done, you now have a file that's sampled at 44.1 kHz, but still at 24 bit (or, 32 bit or whatever internal bit depth was used), and you need to get it to 16 bit.  the only reason why dither is applied to the file is to hide any digital noise that may occur if the bit depth was just "truncated" to 16 bits (i.e. only the 16 most significant bits kept, and everything else thrown away).

Thanks. Appreciate your fast reply ;).
But doing the way I was doing ( dither first, resample last) actually hurts the sound quality of a given file?
Title: Re: Resample and then dither. Why?
Post by: JasonSobel on May 28, 2008, 09:11:39 PM
well, you say that you've been doing it for years.  If it was really hurting the sound quality significantly, you probably would have noticed it by now, yes?  as a result of dithering before resampling, you might have small little digital artifacts in the recording.  these little digital distortions might be more apparent to some people than others.  it might just not sound as smooth as it otherwise could.  Basically, dithering should always be the last step (decreasing bit depth to 16) because it will allow you to maintain as high a quality of file through the post processing for as long as possible.
Title: Re: Resample and then dither. Why?
Post by: Dede2002 on May 28, 2008, 09:32:23 PM
well, you say that you've been doing it for years.  If it was really hurting the sound quality significantly, you probably would have noticed it by now, yes?  as a result of dithering before resampling, you might have small little digital artifacts in the recording.  these little digital distortions might be more apparent to some people than others.  it might just not sound as smooth as it otherwise could.  Basically, dithering should always be the last step (decreasing bit depth to 16) because it will allow you to maintain as high a quality of file through the post processing for as long as possible.

Yes, you're probably right. But I can't help myself.I'm a paranoid when it comes to sound quality.
Thanks a lot one more time  ;).
Title: Re: Resample and then dither. Why?
Post by: DSatz on June 30, 2008, 11:02:59 PM
Rather than speculate, you might try both approaches with the same input file and then compare the results by subtracting one from the other to create a difference signal.

If you do that, please let us know the peak amplitude and the long-term average power of that difference signal. I will do this myself when I get some time. I agree that theoretically it's preferable to do all signal processing at the highest available resolution and then dither down to the final word length as your last operation, but I don't think there'll be much actual difference unless your software is badly broken.
Title: Re: Resample and then dither. Why?
Post by: Dede2002 on June 30, 2008, 11:54:56 PM
Rather than speculate, you might try both approaches with the same input file and then compare the results by subtracting one from the other to create a difference signal.

If you do that, please let us know the peak amplitude and the long-term average power of that difference signal. I will do this myself when I get some time. I agree that theoretically it's preferable to do all signal processing at the highest available resolution and then dither down to the final word length as your last operation, but I don't think there'll be much actual difference unless your software is badly broken.

SDatz,

Thanks a bunch for your response  ;). Your posts are always a pleasure toread. Unfortunatelly, this time I don't think I get it. Excuse my lack of knowledge, but what exactly do you mean by "subtracting one from the other to create a different signal"?
Thanks one more time for the second part of your reply ;). I was almost resampling and dithering all my recordings. Actually I've done this to 2 or 3 recordings, but, as you just said, I just couldn't really hear any difference between a Resample > Dither and  a Dither > Resample file.
Thanks one more time  ;)
Title: Re: Resample and then dither. Why?
Post by: morst on July 01, 2008, 04:16:19 AM

DSatz,

Thanks a bunch for your response  ;). Your posts are always a pleasure toread. Unfortunatelly, this time I don't think I get it. Excuse my lack of knowledge, but what exactly do you mean by "subtracting one from the other to create a different signal

I second the comment about DSatz's posts!  8)

If you "invert" one of the versions and then "add" it to the other, you will get a "difference" track, which you can then find peak and average levels on to see how much different they really are! (the tracks must be the exact same length, or at least perfectly aligned in order for this to work.)
Title: Re: Resample and then dither. Why?
Post by: Dede2002 on July 04, 2008, 04:23:39 PM

DSatz,

Thanks a bunch for your response  ;). Your posts are always a pleasure toread. Unfortunatelly, this time I don't think I get it. Excuse my lack of knowledge, but what exactly do you mean by "subtracting one from the other to create a different signal

I second the comment about DSatz's posts!  8)

If you "invert" one of the versions and then "add" it to the other, you will get a "difference" track, which you can then find peak and average levels on to see how much different they really are! (the tracks must be the exact same length, or at least perfectly aligned in order for this to work.)

Thanks, Morst. +T for your response  ;)
Title: Re: Resample and then dither. Why?
Post by: morst on July 06, 2008, 11:28:20 PM
Thanks, Morst. +T for your response  ;)
No sweat! DSatz did all the "heavy lifting" and I'm just glad when I can help clarify something that makes sense to me, so others can get some use out of it too.