Page 2 of 3
Re: U-Law dithering
Posted: Sat Apr 14, 2018 2:05 pm
by steve
Correct. It's a compromise.
Re: U-Law dithering
Posted: Sat Apr 14, 2018 4:10 pm
by Piotr Grochowski
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
Posted: Sun Apr 15, 2018 12:30 pm
by steve
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.
Re: U-Law dithering
Posted: Sun Apr 15, 2018 1:10 pm
by Piotr Grochowski
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?
Re: U-Law dithering
Posted: Sun Apr 15, 2018 2:02 pm
by steve
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.
Re: U-Law dithering
Posted: Sun Apr 15, 2018 2:14 pm
by Piotr Grochowski
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?
Re: U-Law dithering
Posted: Sun Apr 15, 2018 2:47 pm
by steve
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.
Re: U-Law dithering
Posted: Sun Apr 15, 2018 3:11 pm
by Piotr Grochowski
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.
Re: U-Law dithering
Posted: Sun Apr 15, 2018 3:12 pm
by Piotr Grochowski
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
Posted: Sun Apr 15, 2018 3:29 pm
by steve
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)