U-Law dithering
Forum rules
This forum is for Audacity 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.
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
Correct. It's a compromise.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: U-Law dithering
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.
Re: U-Law dithering
Most people don't care about dither in μ-Law exports.Piotr Grochowski wrote:Most people
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)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: U-Law dithering
Most people don't care about μ–law or dithering at all.steve wrote:Most people don't care about dither in μ-Law exports.Piotr Grochowski wrote:Most people
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.
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?
Re: U-Law dithering
Yes, less audible when the peak level of the noise is below about -70 dB.Piotr Grochowski wrote:Isn't shaped dithering supposed to "shape" the dithering noise to less audible frequencies?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: U-Law dithering
So the "big dithering" noise will be the same perceived volume with noiseshaping and without?steve wrote:Yes, less audible when the peak level of the noise is below about -70 dB.Piotr Grochowski wrote:Isn't shaped dithering supposed to "shape" the dithering noise to less audible frequencies?
Re: U-Law dithering
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) 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.
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) 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)
-
Piotr Grochowski
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: U-Law dithering
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.
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
- Posts: 364
- Joined: Fri Jun 23, 2017 12:45 pm
- Operating System: Windows 10
Re: U-Law dithering
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.
Re: U-Law dithering
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:However, it would still be nice to have a Preferences...
The "equal loudness curve" becomes flatter as the volume level increases (https://en.wikipedia.org/wiki/Equal-loudness_contour)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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)