U-Law dithering

Help for Audacity 2.x.x on Windows.

ImageThis forum is for Audacity 2.x.x on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.

Re: U-Law dithering

Permanent link to this post Posted by steve » Sat Apr 14, 2018 2:05 pm

Correct. It's a compromise.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46541
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: U-Law dithering

Permanent link to this post Posted by Piotr Grochowski » Sat Apr 14, 2018 4:10 pm

It's still an unexpected result though. Most people wouldn't expect a Shaped dither that works powerfully in 16-bit PCM to barely do anything in U-law. Haven't tested 8-bit PCM, A-law, Rectangular dither or Triangular dither.
Piotr Grochowski
Probationer
 
Posts: 138
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: U-Law dithering

Permanent link to this post Posted by steve » Sun Apr 15, 2018 12:30 pm

Piotr Grochowski wrote:Most people

Most people don't care about dither in μ-Law exports.
In my opinion, the level of dither noise would be totally unacceptable if implemented in the way you suggest, so I will not promote this proposed feature.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46541
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: U-Law dithering

Permanent link to this post Posted by Piotr Grochowski » Sun Apr 15, 2018 1:10 pm

steve wrote:
Piotr Grochowski wrote:Most people

Most people don't care about dither in μ-Law exports.
In my opinion, the level of dither noise would be totally unacceptable if implemented in the way you suggest, so I will not promote this proposed feature.

Most people don't care about μ–law or dithering at all.

However, there's always "default and extension" — where you keep the default, but add an optional way to change the behavior.

And, in your "big dithering" sample, the noise seems to be whitely distributed. Isn't shaped dithering supposed to "shape" the dithering noise to less audible frequencies? Will it still be "totally unacceptable" to you?
Piotr Grochowski
Probationer
 
Posts: 138
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: U-Law dithering

Permanent link to this post Posted by steve » Sun Apr 15, 2018 2:02 pm

Piotr Grochowski wrote:Isn't shaped dithering supposed to "shape" the dithering noise to less audible frequencies?

Yes, less audible when the peak level of the noise is below about -70 dB.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46541
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: U-Law dithering

Permanent link to this post Posted by Piotr Grochowski » Sun Apr 15, 2018 2:14 pm

steve wrote:
Piotr Grochowski wrote:Isn't shaped dithering supposed to "shape" the dithering noise to less audible frequencies?

Yes, less audible when the peak level of the noise is below about -70 dB.

So the "big dithering" noise will be the same perceived volume with noiseshaping and without?
Piotr Grochowski
Probationer
 
Posts: 138
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: U-Law dithering

Permanent link to this post Posted by steve » Sun Apr 15, 2018 2:47 pm

You agree that the linear amplitude difference between adjacent sample values for high level samples in u-Law format is around 0.03125 ?

Shaped dither randomises sample values by up to +/- 4 bits (for 16-bit linear PCM, that gives a peak level of around -72 dB).
So, for shaped dither where the linear distance between sample values is 0.03125, the required peak level for shaped dither is 8 x 0.03125 = 0.25.
Here is a sample of shaped noise with a peak amplitude of 0.25 (linear)
dither.wav
(430.71 KiB) Downloaded 1 time


Note also that in order to achieve shaped dither without clipping, the u-law file would need to be limited to allow 4 bits of dither, which means that the peak level before dither must not exceed +/- 0.855347 linear.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46541
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: U-Law dithering

Permanent link to this post Posted by Piotr Grochowski » Sun Apr 15, 2018 3:11 pm

Yes, it is 0.03125. In https://en.wikipedia.org/wiki/%CE%9C-la ... m#Discrete, the largest interval is 256. It's in a 14-bit scale, so it's divided by 8192 and will produce 0.03125. u-law indeed has 6–bit LPCM's precision at sample volumes from 50% to 100%.

And indeed, the noises of Rectangular and Shaped seemed similar in volume when I linearly amplified a sine wave by a divisive factor of 1024, then by a multiplicative factor of 1024 (simulating 6-bit LPCM), while Shaped seemed quieter when both factors were 256, simulating 8-bit LPCM. Of course, adaptive Shaped dithering may still be better quality than adaptive Rectangular dithering for U-law, because U-law is not always 6-bit LPCM quality.

However, it would still be nice to have a Preferences... setting that allows to enable adaptive dithering for U-law, A-law, 32-bit float and 64-bit float.
Piotr Grochowski
Probationer
 
Posts: 138
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: U-Law dithering

Permanent link to this post Posted by Piotr Grochowski » Sun Apr 15, 2018 3:12 pm

I don't know what causes the weird effect that two noises may suddenly seem similar volume when increased in volume by the same factor.
Piotr Grochowski
Probationer
 
Posts: 138
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: U-Law dithering

Permanent link to this post Posted by steve » Sun Apr 15, 2018 3:29 pm

Piotr Grochowski wrote:However, it would still be nice to have a Preferences...

If you can show me an implementation of your proposed u-Law dither that works, then I'll suggest it to the developers.

Piotr Grochowski wrote:I don't know what causes the weird effect that two noises may suddenly seem similar volume when increased in volume by the same factor.

The "equal loudness curve" becomes flatter as the volume level increases (https://en.wikipedia.org/wiki/Equal-loudness_contour)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46541
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

PreviousNext

Return to Windows



Who is online

Users browsing this forum: Bing [Bot], fbarraza28 and 11 guests