Help - Search - Members - Calendar
Full Version: Dithering or not
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific/R&D Discussion
RockyJ
I've been recording and edititing 16bit but will be getting a recorder I can record in 24 bit.

My question now is do I need to get a dithering plan going since I will eventually save to 16bit files after editing.

The reason I ask is I am using goldwave and I'm not sure if it edits files in floating point. If it does maybe I don't even need dither.

If I do then does anyone have a good formula and procedure to add a good shaped dither that will work well in goldwave? (freebie preferrably)

Thanks
Light-Fire
You will lose quality when dithering. Then you will lose quality again when converting to 16 bit.

So do not dither.

Dither is useful only before converting to analog, before reproduction (DAC stage.)
pdq
QUOTE(Light-Fire @ Apr 19 2008, 08:47) *

You will lose quality when dithering. Then you will lose quality again when converting to 16 bit.

So do not dither.

Dither is useful only before converting to analog, before reproduction (DAC stage.)

Huh? Dither is used when reducing bit depth, such as when going from 24 bits to 16 bits. Dither helps to retain some of the information from the bits that are being lost, at the expense of added noise. Dither is never added when converting from analog to digital because it would add noise without any benefit.

Edit: Make that digital to analog.
Slipstreem
Light-Fire said it was useful when converting from D to A, not A to D. smile.gif

Cheers, Slipstreem. cool.gif
pdq
QUOTE(Slipstreem @ Apr 19 2008, 09:14) *

Light-Fire said it was useful when converting from D to A, not A to D. smile.gif

Cheers, Slipstreem. cool.gif

Oops - yeah I meant D to A. The rest stands.
RockyJ
Ok, Sorry for noobness but when I am editing my 24 bit file and then save it to 16 bit wav I am ok without the dithering process.

I wondered why, in my experimenting, I made a 1khz file of -6db in 24bit PCM wav format. saved it to 16bit PCM and opened it and didn't see any problems with the spectragraph or the wave forms in the 16 bit file. I guess that would conincide with what you are saying.

So if I was to play the 24bit, the sound card does any dithering necessary to go D/A? unsure.gif

If this is true I guess I'll have to investigate further why other editing programs purport to dither when converting from 24bit to 16bit (or am I wrong about that also?)

Thanks for replies, I hope you are right because that sure makes my life easier biggrin.gif
Light-Fire
QUOTE(pdq @ Apr 19 2008, 07:59) *

...Dither helps to retain some of the information from the bits that are being lost, at the expense of added noise...


Where are you going to save the information you "retained" if all (16 bits) are already taken by information coming from the original file (24 bits?)
Jebus
When you save your final output to 16-bit, THAT's when you dither. Your intermediate steps should not be dithered.
AndrewCottrell
QUOTE(Light-Fire @ Apr 19 2008, 16:42) *
Where are you going to save the information you "retained" if all (16 bits) are already taken by information coming from the original file (24 bits?)

This Wikipedia article should make it clear: http://en.wikipedia.org/wiki/Dither#Digital_audio

In summary: quantization introduces error; more information (signal) can be retained by the choice of the error for each sample.

Effectively, erroneous signals due to quantization error are replaced with noise. So, in a sense, more information is retained as the dithered signal is a more accurate representation of the original.
pdq
QUOTE(Light-Fire @ Apr 19 2008, 12:42) *

QUOTE(pdq @ Apr 19 2008, 07:59) *

...Dither helps to retain some of the information from the bits that are being lost, at the expense of added noise...


Where are you going to save the information you "retained" if all (16 bits) are already taken by information coming from the original file (24 bits?)

Signals that are well below the Nyquist frequency are, in effect, oversampled in the time domain and this gives an opportunity for storing additional information. Without dither this opportunity is lost due to quantization. However, by proper dithering the lsb is modulated in such a way as to restore the information that would have been lost, at the expense of some high frequency noise.

Look at the sequence of bits:
00000000000001111111111111

This is what you would get from a slowly increasing signal after quantization. Now look at the sequence:
00001000100101011011101111

By adding a little bit of noise we now see that the underlying signal is slowly rising, not abruptly changing value from 0 to 1. This is in effect what dither does.


This may be off-topic, but can any of the experts help me with this question?

We always talk of dithering with random noise, which permanently adds noise to the signal, hopefullynot audible.

However, suppose that one added a fixed high frequency tone of the correct amplitude to effect the dithering. Then on playback just pass the signal through a notch filter to remove the tone, either digitally at a higher bit depth, or else in the analog domain. I know there could be problems with intermodulation with other frequencies in the signal, but is there any potential to this approach at all?
MaoZhengfu
When you convert a 24-bit file to a 16-bit file, you are reducing its dynamic range from 144dB to 96dB. Because of this, low level signals are more difficult for digital gear to record. The sampling machine will have difficulty deciding whether the necessary bits should be turned "on" or "off." This creates quantization distortion. By adding a small amount of controlled noise to the original signal, the bits can be made to positively switch "on" or "off," improving low sound resolution. You should always dither when converting from a higher bit depth to a lower one. The very small amount of noise created by the dithering process is inoffensive, as it is not correlated to the sound of the original signal and can be made more unobtrusive still by using noise shaping. This is definitely preferable to the quantization distortion which is correlated to the original signal and is anything but unobtrusive.
RockyJ
If I need dithering when I save my 24bit file to 16bit, which I'm not sure from this discussion,
Does anyone have a suggestion. for my goldwave editor. I don't want to buy another editor just for this if I can help it. Maybe there's a wav file out there that can be mixed in to my file or maybe a formula I can use.

Should I just use low level white noise?
Curtor
QUOTE(RockyJ @ Apr 19 2008, 16:25) *

If I need dithering when I save my 24bit file to 16bit, which I'm not sure from this discussion,
Does anyone have a suggestion. for my goldwave editor. I don't want to buy another editor just for this if I can help it. Maybe there's a wav file out there that can be mixed in to my file or maybe a formula I can use.

Should I just use low level white noise?

It seems to me that there's a lot of discussion in this thread about dither by people who don't know what it is.

When you quantize your 24bit files to 16bits, you are going to get quantizing error. That's a simple fact of digital reductions and rounding up or down. Quantizing error sounds bad. Period. Whether or not you can hear it is a separate discussion, but any professional anywhere will tell you that you have to add some dither because it resolves the quantizing errors by distributing some noise at the signal boundary.

You can't just stick some "low level white noise" into things... that's just adding noise and has nothing to do with dither. If goldwave has a dither function when it reduces bit depth, then use it. If not, then it's all moot... you have nothing to use so you'll use nothing. Ideally, you're probably wanting a half-decibel of triangular, noise-shaped dither to be inserted in the process. It's not something you do after you reduce bit-depth, it's part of that process.
Jebus
What dither does is akin to softening an image to hide jaggies (anti-aliasing, if you'd like). You DO want to do that before playback on 16-bit files. At a low level, dither randomizes some of the least-significant bits. There are some sophisticated algorithms for doing this that are beyond my capacity to understand.

Don't dither when you're working with the files though, much as you won't apply softening affects in photoshop until after you're done cropping and moving things around.
RockyJ
I found out Audacity can dither when downsized, so I'll just edit my 24bit file and then when done, go to audacity and save it with dithering to my 16bit.

I suppose it is a decent dithering routine.

Another question, I can write to 44/16 file format from my winamp. Would windows dither the file when it downsizes? I have writen to std windows API so it probably calls on the windows PCM codec to convert to 16bit.

Light-Fire
QUOTE(AndrewCottrell @ Apr 19 2008, 12:57) *

...In summary: quantization introduces error; more information (signal) can be retained by the choice of the error for each sample.

Effectively, erroneous signals due to quantization error are replaced with noise. So, in a sense, more information is retained as the dithered signal is a more accurate representation of the original.


QUOTE(pdq @ Apr 19 2008, 15:56) *

...Look at the sequence of bits:
00000000000001111111111111

This is what you would get from a slowly increasing signal after quantization. Now look at the sequence:
00001000100101011011101111

By adding a little bit of noise we now see that the underlying signal is slowly rising, not abruptly changing value from 0 to 1. This is in effect what dither does...


I think I get the point now. But I have a question.

If I still want to further process this signal (now dithered and reduced to 16 bit.) Wouldn't that (the fact that it's dithered) contribute to propagate error?

or

Can dither be considered a destructive process?


Woodinville
QUOTE(Light-Fire @ Apr 19 2008, 05:47) *

You will lose quality when dithering. Then you will lose quality again when converting to 16 bit.

So do not dither.

Dither is useful only before converting to analog, before reproduction (DAC stage.)


The above advice is utterly wrong, both theoretically and practically. Do not follow it.

Dithering should happen whenever any quantization artifact could, concievably, under any circumstances, be audible.

QUOTE(Light-Fire @ Apr 19 2008, 19:50) *

If I still want to further process this signal (now dithered and reduced to 16 bit.) Wouldn't that (the fact that it's dithered) contribute to propagate error?

or

Can dither be considered a destructive process?


Every time you dither you lose some SNR. Go to 24 bits, work in 24 bits, and dither when you come back to 16 bits.
Light-Fire
QUOTE(Woodinville @ Apr 19 2008, 22:05) *

QUOTE(Light-Fire @ Apr 19 2008, 05:47) *

...Dither is useful only before converting to analog, before reproduction (DAC stage.)


The above advice is utterly wrong...


When talking about DAC I should have used the world "oversampling" instead of "dithering."
greynol
QUOTE(Light-Fire @ Apr 19 2008, 20:35) *
When talking about DAC I should have used the world "oversampling" instead of "dithering."

Which would have made no sense whatsoever since that was the first response to a post that did not ask about oversampling or even sample rates for that matter. rolleyes.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.