DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Nov 1: register now to lock in today's rate
Register Now →

Dither audio signal to 24 bits

Started by Unknown ●July 4, 2004
In article <42c34ef.0407060244.243ed351@posting.google.com>, 
spam@dspdimension.com says...
> This effectively "auto-dithers" the signal with a Gaussian PDF noise. > Even though the Gaussian PDF isn't an ideal one for that purpose, > adding even more noise with a triangular PDF doesn't change much in > that case, except that it degrades the SNR further.
Why is a triangular PDF better than a Gaussian PDF? That is a question I've been wondering about for a while now, but I've only found references stating that triangular is better. Never _why_ triangular is better. (and I've also seen references that rectangular PDF is the worst...)
In article <e5vGc.6$jF2.277651@news-text.cableinet.net>, 
richarddobson@blueyonder.co.uk says...
> You would need helium-cooled circuitry to escape the internal > brownian noise of the electronics, and helium-cooled ears too to hear > all the way down to -144dB,
Given that heat causes brownian noise, what is the absolute minimum of noise you can get at around 30 degrees celsius? How do you figure it?
scorey_plonk@waterford.org wrote:

> In article <42c34ef.0407060244.243ed351@posting.google.com>, > spam@dspdimension.com says... > >>This effectively "auto-dithers" the signal with a Gaussian PDF noise. >>Even though the Gaussian PDF isn't an ideal one for that purpose, >>adding even more noise with a triangular PDF doesn't change much in >>that case, except that it degrades the SNR further. > > > Why is a triangular PDF better than a Gaussian PDF?
What is the maximum magnitude of a true Gaussian PDF? Do you want that? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Richard Dobson wrote:
> The standard range for 32bit float audio is +- 1.0, which makes full use > of the 24bit mantissa (which then gives an effective 25bits becasue of > the hidden bit); hence the very close relationship between 24bit int and > 32bit float. SO I would say the quantization is about the same
I heartily disagree. A 24bit two's complement can represent 2^24 numbers. A 32bit floating-point can represent the same range of integers, ie. [-2^23, 2^23-1] plus more than 24 * 2^22 usable fractional numbers in between. This is definitely finer quantisation! The 32bit floating-point quantisation level is only equal to 25bit two's complement in the top 6dB, and doubles for every 6dB step down ...
> (I have > even heard of tricks that convert float to 24bit int by direct > manipulation of the mantissa, rather than using the "proper" > conversion).
In a SHARC DSP, you can convert between the two formats in one single cycle instruction - no dirty trick can do it faster than that. I don't know about workstation processors, though. Regards, Andor
scorey_plonk@waterford.org wrote:
> > > Given that heat causes brownian noise, what is the absolute minimum of > noise you can get at around 30 degrees celsius? How do you figure it?
It's a long time since I did this stuff, but the formula for thermal noise generated by a resistor is I believe some kind of exponential involving the Boltzmann constant. I think it's called Johnson noise, after the guy who first obersved this noise. Googling for Johnson and/or Boltzmann and thermal noise should turn soemthing up. Paul
scorey_plonk@waterford.org wrote:
> In article <e5vGc.6$jF2.277651@news-text.cableinet.net>, > richarddobson@blueyonder.co.uk says... > >> You would need helium-cooled circuitry to escape the internal >>brownian noise of the electronics, and helium-cooled ears too to hear >>all the way down to -144dB, > > > Given that heat causes brownian noise, what is the absolute minimum of > noise you can get at around 30 degrees celsius? How do you figure it?
Thermal voltage noise -- Johnson noise, not shot noise -- is given IIRC by e_n = sqrt(kTR?f), where e_n is the voltage noise, k is Boltzmann's constant, T is absolute temperature (Kelvin), R is resistance, and ?f is bandwidth. For "room temperature", T is generally taken to be 300. For noise current, divide by R, giving sqrt(kT?f/R). Boltzmann's constant is about 1.38 E-23 Joules/degree. That means that a 10K room temperature circuit has about 6.4 nanovolts/sqrt(Hz), or about 0.9 microvolts with a 20 KHz bandwidth. A real circuit is very good if it's within a factor of three. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
The short answer is that triangular "sounds better".  I've read technical
explanations about this but don't understand them enough to explain it.  I think
that triangular allows creating a "perfect" analog-like constant noise floor
with no noise modulation with the minimum added noise.  Rectangular PDF noise
can be used in a pinch since it is cheap to create.  My understanding is that
you need less rectangular noise than you do triangular, but the resulting noise
floor has some input-dependent modulations, i.e. is not constant.

Since dithering trades off distortion for noise, various intermediate tradeoffs
are possible, such as reducing but not eliminating the distortion and adding a
bit less noise.  But most of the research revolves around optimal solutions,
i.e. completely eliminating the distortion.

<scorey_plonk@waterford.org> wrote in message
news:MPG.1b546e061fe02380989687@news.xmission.com...
> In article <42c34ef.0407060244.243ed351@posting.google.com>, > spam@dspdimension.com says... > > This effectively "auto-dithers" the signal with a Gaussian PDF noise. > > Even though the Gaussian PDF isn't an ideal one for that purpose, > > adding even more noise with a triangular PDF doesn't change much in > > that case, except that it degrades the SNR further. > > Why is a triangular PDF better than a Gaussian PDF? That is a question > I've been wondering about for a while now, but I've only found > references stating that triangular is better. Never _why_ triangular is > better. (and I've also seen references that rectangular PDF is the > worst...)
Jon Harris wrote:

> The short answer is that triangular "sounds better". I've read technical > explanations about this but don't understand them enough to explain it. I think > that triangular allows creating a "perfect" analog-like constant noise floor > with no noise modulation with the minimum added noise. Rectangular PDF noise > can be used in a pinch since it is cheap to create. My understanding is that > you need less rectangular noise than you do triangular, but the resulting noise > floor has some input-dependent modulations, i.e. is not constant. > > Since dithering trades off distortion for noise, various intermediate tradeoffs > are possible, such as reducing but not eliminating the distortion and adding a > bit less noise. But most of the research revolves around optimal solutions, > i.e. completely eliminating the distortion. > > <scorey_plonk@waterford.org> wrote in message > news:MPG.1b546e061fe02380989687@news.xmission.com... > >>In article <42c34ef.0407060244.243ed351@posting.google.com>, >>spam@dspdimension.com says... >> >>>This effectively "auto-dithers" the signal with a Gaussian PDF noise. >>>Even though the Gaussian PDF isn't an ideal one for that purpose, >>>adding even more noise with a triangular PDF doesn't change much in >>>that case, except that it degrades the SNR further. >> >>Why is a triangular PDF better than a Gaussian PDF? That is a question >>I've been wondering about for a while now, but I've only found >>references stating that triangular is better. Never _why_ triangular is >>better. (and I've also seen references that rectangular PDF is the >>worst...)
Triangular is only twice as hard as rectangular, plus an addition. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
The first comprehensive digestible article I saw was by Vanderkooy and
Lipshitz.  It is titled Dither in Digital Audio.  You can find it in
the Journal of the Audio Engineering Society.  Vol 35 No.12 pp
966-975.  November 1987.  There are certainly articles that came
before this one, but it is a good place to start.

Mark Allie


On Tue, 6 Jul 2004 09:07:06 -0600, <scorey_plonk@waterford.org> wrote:

>In article <42c34ef.0407060244.243ed351@posting.google.com>, >spam@dspdimension.com says... >> This effectively "auto-dithers" the signal with a Gaussian PDF noise. >> Even though the Gaussian PDF isn't an ideal one for that purpose, >> adding even more noise with a triangular PDF doesn't change much in >> that case, except that it degrades the SNR further. > >Why is a triangular PDF better than a Gaussian PDF? That is a question >I've been wondering about for a while now, but I've only found >references stating that triangular is better. Never _why_ triangular is >better. (and I've also seen references that rectangular PDF is the >worst...)
Jerry Avins wrote:

> scorey_plonk@waterford.org wrote: > >> In article <e5vGc.6$jF2.277651@news-text.cableinet.net>, >> richarddobson@blueyonder.co.uk says... >> >>> You would need helium-cooled circuitry to escape the internal >>> brownian noise of the electronics, and helium-cooled ears too to hear >>> all the way down to -144dB, >> >> >> >> Given that heat causes brownian noise, what is the absolute minimum of >> noise you can get at around 30 degrees celsius? How do you figure it? > > > Thermal voltage noise -- Johnson noise, not shot noise -- is given IIRC > by e_n = sqrt(kTR?f), where e_n is the voltage noise, k is Boltzmann's > constant, T is absolute temperature (Kelvin), R is resistance, and ?f is > bandwidth. For "room temperature", T is generally taken to be 300. For > noise current, divide by R, giving sqrt(kT?f/R). > > Boltzmann's constant is about 1.38 E-23 Joules/degree. That means that a > 10K room temperature circuit has about 6.4 nanovolts/sqrt(Hz), or about > 0.9 microvolts with a 20 KHz bandwidth. A real circuit is very good if > it's within a factor of three. > > Jerry
Where's my RCA Radiotron Handbook when I need it ;? PS. If you can find a circa 1960-1965 edition it has the answer you are looking for ( it's red and about 3 inch's thick ;)