Log in

View Full Version : Two questions about audio depth


doom-nine
9th February 2012, 07:58
I use Adobe Audition. While saving files, I'm wondering,

1. Resampling depth from 16bit to 24bit or 32bit, or from 24bit to 32bit, it's lossless, right?

2. If I save a 32bit floating wav file to 24bit, is it still lossless? I guess, from 32bit to 24bit, only some addtional bits are cut off. The audio is still not affected, right?

J_Darnley
9th February 2012, 10:40
1 - If the resampler does not alter the original bits then yes, the original can be obtained through truncation or shifting. Again the resampler going back to 16- or 24-bit would need to "know" this to make sure it does the right thing. In general this probably doesn't happen.

2 - It is lossless only if the 24-bit integer can represent all the values that the 32-bit float actually contains. In the very general sense, this is not possible. For the case of audio, I don't know.

But why do you care if these things are lossless? All the distortion will be at the very limit of human perception or way beyond it, at least for any software of moderate quality.

Ghitulescu
9th February 2012, 11:16
1. Resampling depth from 16bit to 24bit or 32bit, or from 24bit to 32bit, it's lossless, right?

2. If I save a 32bit floating wav file to 24bit, is it still lossless? I guess, from 32bit to 24bit, only some addtional bits are cut off. The audio is still not affected, right?

The answer is NO to both questions.

1. Padding 8 bits with NULLs will decrease the dynamic of the sound. And of course vice-versa. Modern DAWs dither using noise shaping algorithms.

2. Try to do arcsin(arccos(arctan(sin(cos(tan(43)))))) - 43 and see what happens. There is no possibility to convert exact real values into integer values without a certain approximation (except for the real rare cases when you have integer numbers = real number those approximation error is lower than the mantissa). Philosophically is not lossless, since you change the content. Can one hear it? Not really.

doom-nine
10th February 2012, 02:50
1 - If the resampler does not alter the original bits then yes, the original can be obtained through truncation or shifting. Again the resampler going back to 16- or 24-bit would need to "know" this to make sure it does the right thing. In general this probably doesn't happen.

2 - It is lossless only if the 24-bit integer can represent all the values that the 32-bit float actually contains. In the very general sense, this is not possible. For the case of audio, I don't know.

But why do you care if these things are lossless? All the distortion will be at the very limit of human perception or way beyond it, at least for any software of moderate quality.

I assume human can almost have no way to identify the distortion, at least I can't tell the differences with my poor ear. However, the questions are just bothering me for quite a long time. :thanks:

doom-nine
10th February 2012, 02:54
The answer is NO to both questions.

1. Padding 8 bits with NULLs will decrease the dynamic of the sound. And of course vice-versa. Modern DAWs dither using noise shaping algorithms.

2. Try to do arcsin(arccos(arctan(sin(cos(tan(43)))))) - 43 and see what happens. There is no possibility to convert exact real values into integer values without a certain approximation (except for the real rare cases when you have integer numbers = real number those approximation error is lower than the mantissa). Philosophically is not lossless, since you change the content. Can one hear it? Not really.

Got your point. Thanks. :goodpost:

doom-nine
10th February 2012, 14:24
1 - If the resampler does not alter the original bits then yes, the original can be obtained through truncation or shifting. Again the resampler going back to 16- or 24-bit would need to "know" this to make sure it does the right thing. In general this probably doesn't happen.

2 - It is lossless only if the 24-bit integer can represent all the values that the 32-bit float actually contains. In the very general sense, this is not possible. For the case of audio, I don't know.

But why do you care if these things are lossless? All the distortion will be at the very limit of human perception or way beyond it, at least for any software of moderate quality.

Yes, I believe human can have no way to identify the minor distortion, at least I can't with my poor ear. However, the questions has been bothering me for quite a long time. :thanks:

doom-nine
10th February 2012, 14:26
The answer is NO to both questions.

1. Padding 8 bits with NULLs will decrease the dynamic of the sound. And of course vice-versa. Modern DAWs dither using noise shaping algorithms.

2. Try to do arcsin(arccos(arctan(sin(cos(tan(43)))))) - 43 and see what happens. There is no possibility to convert exact real values into integer values without a certain approximation (except for the real rare cases when you have integer numbers = real number those approximation error is lower than the mantissa). Philosophically is not lossless, since you change the content. Can one hear it? Not really.

Thank you, Ghitulescu. Got your point now, it helps. :goodpost:

Ghitulescu
10th February 2012, 16:37
Thank you, Ghitulescu. Got your point now, it helps. :goodpost:

Maybe I should detail a bit:

if you add 8 bits to a 24b signal to make it in 32b then remove the same 8 bits the very same way as you added them, the transformation is lossless.

if you convert 32b in 32float then viceversa, there are chances that you can obtain a lossless transformation.


However, you miss the point of having 24b, 32b or 32f. The human hearing is somewhere ~14b (around ~-70dB), so the CD is 4x better in this respect. 24b and 32b for customers are marketing bonuses. No card in the world (even in the pro field) can come close to 24b, what they like to quote are the DAC specs, not the real dynamic, limited by the electronic noise to somewhere around -110 dB (or ~19b).

24b was invented to avoid the clipping during the processing of music. 32f was invented to "clean" complicated operations, for a even better sound.

Bottom line: while 24b may provide the music with cleaner "curves", one really need audiophile grade equipment to sense any improvement. Far better is to increase the sampling rate.

doom-nine
13th February 2012, 07:14
24b was invented to avoid the clipping during the processing of music. 32f was invented to "clean" complicated operations, for a even better sound.

Thanks Ghitulescu. Did you mean the 32f contains the operations record information, just like for example, the history record in Photoshop?

nevcairiel
13th February 2012, 08:10
Thanks Ghitulescu. Did you mean the 32f contains the operations record information, just like for example, the history record in Photoshop?

32f is a raw format like any other, just with better precision in some areas. It does not contain any extra metadata.

Technically, 32f has the same precision as 24b (23-bit mantissa, 8 bit exponent, 1 bit sign), however with one advantage - 32f has the full precision over the full range of possible values. In 24b, "1" is just that, information of 1-bit. Converted to 32f, you can have 23 bits of full precision to represent the slightest variations of "1".

doom-nine
14th February 2012, 03:35
32f is a raw format like any other, just with better precision in some areas. It does not contain any extra metadata.

Technically, 32f has the same precision as 24b (23-bit mantissa, 8 bit exponent, 1 bit sign), however with one advantage - 32f has the full precision over the full range of possible values. In 24b, "1" is just that, information of 1-bit. Converted to 32f, you can have 23 bits of full precision to represent the slightest variations of "1".

Thank you, nevcairiel.