Skip to main content

Topic: Into which bit should noise be added in order to dither 32bit file to  (Read 4740 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • amiti
  • [*][*][*]
Into which bit should noise be added in order to dither 32bit file to
When adding noise to audio data in order to dither it into lower bit depth, should the noise be added to higher bit than the desired outcome bit depth? For example when 24bit data is meant to be dithered into 16 bit , the white noise should be added between the 17th to the 24th bits of the original file?

I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?


Into which bit should noise be added in order to dither 32bit file to
Reply #1
I think that depending on the current binary value, it could change ALL of them. E.G. $7FFF to $8000


  • amiti
  • [*][*][*]
Into which bit should noise be added in order to dither 32bit file to
Reply #2
You are correct Glenn but the chosen bit means how strong the noise is. If the noise added is strong enough it will remain exactly the same after reducing bit depth. For example if we take 24 bit file and add noise in its 15th bit , then after reducing bitdepth to 16  the noise added will remain exactly the same and won't create the dither affect. Am I correct?

Into which bit should noise be added in order to dither 32bit file to
Reply #3
Valueable thread! Keep the information coming! The details are somewhat hard to get but not to hard. Regards.

  • bandpass
  • [*][*][*][*]
Into which bit should noise be added in order to dither 32bit file to
Reply #4
I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?

Dithering to 24-bits is considered unnecessary, this resolution being high enough that (with normal levels) it doesn't really matter what's going on in the LSB.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
Into which bit should noise be added in order to dither 32bit file to
Reply #5
I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?
You should start counting from the least-significant-bit (lsb), i.e. bit 0. Therefore dither would be applied at the the eighth bit.
lossyWAV -q X -a 4 -s h -A --feedback 1| FLAC -5 -e -p -b 512 -P=4096 -S- ~= 320kbps

  • amiti
  • [*][*][*]
Into which bit should noise be added in order to dither 32bit file to
Reply #6
Quote
You should start counting from the least-significant-bit (lsb), i.e. bit 0. Therefore dither would be applied at the the eighth bit.


Nick , so you are saying that dither noise should be added at the 17th bit(if counting  from the msb side)? Theoretically then , when dithering from 32bit to 24 bits (although some would consider it useless) noise should be added from the 25th bit (when counting from most significant bit side)?

Into which bit should noise be added in order to dither 32bit file to
Reply #7
When adding noise to audio data in order to dither it into lower bit depth, should the noise be added to higher bit than the desired outcome bit depth? For example when 24bit data is meant to be dithered into 16 bit , the white noise should be added between the 17th to the 24th bits of the original file?

I saw this plugin for foobar : foo_dsp_noise. With this plugin foobar can add TPDF noise up into the 24th bit but not higher. Does this mean it is usable only for dithering to 16bit and not to 24bit output?


The usual terminology that is used to characterize the amplitude of the dither signal, is given in bits, whose lowest order value is the same as the LSB.

The amount of dither that is required to randomize the quantization error depends on the PDF of the dither signal.  The usual criteria for randomzing the quantization error is the highest order of moment that is randomized.

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Into which bit should noise be added in order to dither 32bit file to
Reply #8
You add as many bits of dither as you are removing bits from the signal. So 16>8, 24>16 and 32>24 all require dither noise added to the 8LSBs, because you are chopping 8-bits off. 32>8 would require 24-bits of dither!

If you add an 8-bit pseudo random number generator, you'll get flat rectangular dither. Add two (or add one then subtract another) and you'll get flat triangular dither (which, because you're adding two 8-bit numbers, will often fill the 9 LSBs).

Of course by adding a number to the 8 LSBs, you may change the value of any or all bits. Just like adding 1 to 899 changes all the decimal numbers, even though it is a single digit.

Cheers,
David.
  • Last Edit: 08 October, 2012, 12:40:22 PM by 2Bdecided

  • amiti
  • [*][*][*]
Into which bit should noise be added in order to dither 32bit file to
Reply #9
Thank you, Arnold and David.

So if I understand correctly  , using the usual terminology , for a target of 16 bit I would need to add noise of 16th bit order? That would mean 17-24 bits (or more if original is in higher resolution) of the original data would be added with noise?

  • 2Bdecided
  • [*][*][*][*][*]
  • Developer
Into which bit should noise be added in order to dither 32bit file to
Reply #10
Yes. Exactly.

But that's only true for rectangular PDF dither. Which you would never use.

So, no.

This is the classic paper on the subject...
http://www.drewdaniels.com/dither.pdf

There are others. See the AES library links from the (mediocre) wikipedia article.

Cheers,
David.

  • krabapple
  • [*][*][*][*][*]
Into which bit should noise be added in order to dither 32bit file to
Reply #11
You add as many bits of dither as you are removing bits from the signal. So 16>8, 24>16 and 32>24 all require dither noise added to the 8LSBs, because you are chopping 8-bits off. 32>8 would require 24-bits of dither!


Is truncation from 32 to 24 bits generally thought to be audible?
  • Last Edit: 27 October, 2012, 03:27:07 PM by krabapple

Into which bit should noise be added in order to dither 32bit file to
Reply #12
You add as many bits of dither as you are removing bits from the signal. So 16>8, 24>16 and 32>24 all require dither noise added to the 8LSBs, because you are chopping 8-bits off. 32>8 would require 24-bits of dither!


Is truncation from 32 to 24 bits generally thought to be audible?


No, and in general with real-world recordings truncation from 24->16 isn't audible either.