Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Into which bit should noise be added in order to dither 32bit file to  (Read 8116 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

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


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.

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.

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 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)

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.

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.

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?

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.

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?

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.