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: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605) (Read 4443 times) previous topic - next topic - Topic derived from Is there any value is...
0 Members and 1 Guest are viewing this topic.

32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

[...]  32bit Wav files [...]

There's no such thing like 32 bits in the real world as no real 32 bits ADC exist.
You can be sure that - at least - the 8 LSB are random data, pure noise.





Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #1
[...]  32bit Wav files [...]

There's no such thing like 32 bits in the real world as no real 32 bits ADC exist.

First, that is a fallacy (synthetic-generated sound is also sound), and second: 32-bit floating-point representation serves a different purpose.

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #2
[...]  32bit Wav files [...]

There's no such thing like 32 bits in the real world as no real 32 bits ADC exist.

First, that is a fallacy (synthetic-generated sound is also sound), and second: 32-bit floating-point representation serves a different purpose.

32 bits is near 200dB, way above the range of human ears or any device. Can you hear a leaf falling of a tree at 20 meters when you are near a Saturn V lifting off at full thrust ? No !

There no real 32 bits DAC either as its thermal noise or any of its passive component around it would be above the LSBs. Bit 31 would be 200 pico Volt for 1 Volt amplitude.

16 bits is more than enough. Of course one could use 80 or 128 bit real format when doing stuff on the samples.






Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #3
The potential benefit of limiting the bandwidth (low/high/bandpass) in OP's application is to reduce the occurrence of artifacts due to low end components, like tiny speakers on Christmas cards, toddler toys driven by low end MCUs and such.

OP's clients probably don't know Opus is always 48kHz and bit-depth is by definition float. If fact, a bandpassed 16-bit file may contain some dither noise that the encoder may pick up as data and reduce efficiency, so sending 32-bit float to the encoder will make sure the noise is low enough that the encoder will ignore data outside of the filter's range.

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #4
There's no such thing like 32 bits in the real world as no real 32 bits ADC exist.

First, that is a fallacy (synthetic-generated sound is also sound), and second: 32-bit floating-point representation serves a different purpose.

32 bits is near 200dB, way above the range of human ears or any device.

You couldn't be bothered to fact check, no?

32-bit floating point ranges some fifteen hundred dB.
It is effectively a 24-bit signal with an insanely giant volume control.
It serves the purpose of safeguarding against clipping. With integer 24 bits peak-normalized, altering the sound - which you do in an audio workstation - could easily clip. In the floating-point domain, you simply don't peak-normalize. Not until converting away from float.

Floating-point PCM has the advantage that you won't carelessly process at clipping levels - and also, even if you carelessly process at low levels, you won't lose any practically useful resolution. The advantage is not so much being "32" bit as being in the form of sign, exponent and significand. The reason to use full four bytes is that there was already a well-established format.

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #5

32-bit floating point ranges some fifteen hundred dB.
It is effectively a 24-bit signal with an insanely giant volume control.

Ah! Okay. But when I read 32 bits it means int32.

Quote


It serves the purpose of safeguarding against clipping. With integer 24 bits peak-normalized, altering the sound - which you do in an audio workstation - could easily clip. In the floating-point domain, you simply don't peak-normalize. Not until converting away from float.

Floating-point PCM has the advantage that you won't carelessly process at clipping levels - and also, even if you carelessly process at low levels, you won't lose any practically useful resolution. The advantage is not so much being "32" bit as being in the form of sign, exponent and significand. The reason to use full four bytes is that there was already a well-established format.

But it has a very poor precision for processing sound samples. But perhaps enough for our ears.



Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #6
But it has a very poor precision for processing sound samples. But perhaps enough for our ears.
A 32-bit floating point as used by most tools consists of 8 bits coding the exponent, 1 bit for the sign and 24 bits (of which one is implicit and thus not stored) for precision. That precision isn't 'very poor', the maximum achievable SNR even outperforms 24-bit signed int.
Music: sounds arranged such that they construct feelings.

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #7
A 32-bit floating point as used by most tools consists of 8 bits coding the exponent, 1 bit for the sign and 24 bits (of which one is implicit and thus not stored) for precision. That precision isn't 'very poor', the maximum achievable SNR even outperforms 24-bit signed int.

This format must be used to perform relatively simple real time operation on samples. It's not suited for iterative calculation, like a steep slope filter, due to its lack of precision.  Try to extract 10 time the square root of a number on real32 and reverse the operation. I doubt that it return to the same number. 





Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #8
Oh, the Python 101 lecture: (1/3)*3 does not evaluate to 1. But is that relevant?
You have flipped to the opposite conclusion from the above - and what more, the arguments you used above were insufficient for that conclusion, but should make you ditch the completely opposite stance.

* You are right that there is no ADC/DAC chain of 32-bit precision, but that does not imply that 32-bit audio does not exist. (Just digitally fade out a sine and consider it in the digital domain!)
* You are right that reproducing a falling leaf next to a Saturn V is useless for the human ear, but that does not invalidate the use of 32-bit floating-point in audio processing.
* You are right that making mathematical operations on finite-resolution numbers will easily lead to mathematical round-off errors, but that does not in any way imply that they would be audible. Not as much as a falling leaf. Not as much as a falling leaf next to a Saturn V. 
In fact, even making the same operation twice in the floating-point domain can lead to differences even on the same computer and in the same compile.  Now is this a problem in processing audio intended for human ears? Not as long as the round-errors are small enough. (I presume you can deliberately create problems if you want to, but there isn't much of a point in safeguarding audio processing against deliberately sabotaging the sound, is it?)

IEEE float is not tailor-made for audio, and I am not arguing against those who claim that at least the exponent is much more overkill than the mantissa is - but there is a reason to use a well-established hardware-implemented format that is enough. Now return to the Python 101 exercise: what happens if you take your (1/3) * 3 and properly reduce to an end-user format of 16 bit integer?

And then finally, the relevance to the thread: is your typical Opus encoder smart enough not to waste space on the least few (in)significant bits?

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #9
This format must be used to perform relatively simple real time operation on samples. It's not suited for iterative calculation, like a steep slope filter, due to its lack of precision.
I just explained that its precision is better than that of a 24-bit signed int, seems unnecessary to repeat that.

Quote
Try to extract 10 time the square root of a number on real32 and reverse the operation. I doubt that it return to the same number.
That will be even worse with a 24-bit signed int, as at some point that simply becomes zero. I don't see how this is relevant in an audio context anyway.
Music: sounds arranged such that they construct feelings.


Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #11
Oh, the Python 101 lecture: (1/3)*3 does not evaluate to 1. But is that relevant?

>>> (1/3)*3
1.0

Quote

* You are right that there is no ADC/DAC chain of 32-bit precision, but that does not imply that 32-bit audio does not exist. (Just digitally fade out a sine and consider it in the digital domain!)
* You are right that reproducing a falling leaf next to a Saturn V is useless for the human ear, but that does not invalidate the use of 32-bit floating-point in audio processing.
* You are right that making mathematical operations on finite-resolution numbers will easily lead to mathematical round-off errors, but that does not in any way imply that they would be audible. Not as much as a falling leaf. Not as much as a falling leaf next to a Saturn V. 

It's good to be right !


Quote

In fact, even making the same operation twice in the floating-point domain can lead to differences even on the same computer and in the same compile.  Now is this a problem in processing audio intended for human ears? Not as long as the round-errors are small enough. (I presume you can deliberately create problems if you want to, but there isn't much of a point in safeguarding audio processing against deliberately sabotaging the sound, is it?)

IEEE float is not tailor-made for audio, and I am not arguing against those who claim that at least the exponent is much more overkill than the mantissa is - but there is a reason to use a well-established hardware-implemented format that is enough.

I'm no audiophile or audio engineer but if I were I would use 80 bits for doing stuff on signal - just in case. "Qui peut le plus, peut le moins" . But you may be right and 32 bits float is enough for 99.99% of the case during mixing or other stuff.

Quote
Now return to the Python 101 exercise: what happens if you take your (1/3) * 3 and properly reduce to an end-user format of 16 bit integer?

I dont get it ?!

0b0000000000000001


Quote
And then finally, the relevance to the thread: is your typical Opus encoder smart enough not to waste space on the least few (in)significant bits?

I think he is.

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #12
This format must be used to perform relatively simple real time operation on samples. It's not suited for iterative calculation, like a steep slope filter, due to its lack of precision.
I just explained that its precision is better than that of a 24-bit signed int, seems unnecessary to repeat that.

Of course, 32 is better than 24.

Quote
Quote
Try to extract 10 time the square root of a number on real32 and reverse the operation. I doubt that it return to the same number.
That will be even worse with a 24-bit signed int, as at some point that simply becomes zero.

Yes. Where did I say int24 would be better? I just want to say that 16 bits is more than enough to reproduce sound and if you want to do thing on sound it would better to use more than 32 bits.
Now a $30 computer like a Raspberry has more power than Cray supercomputer from CD era.




Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #13
Quote
Quote
Try to extract 10 time the square root of a number on real32 and reverse the operation. I doubt that it return to the same number.
That will be even worse with a 24-bit signed int, as at some point that simply becomes zero.

Yes. Where did I say int24 would be better? I just want to say that 16 bits is more than enough to reproduce sound and if you want to do thing on sound it would better to use more than 32 bits.
Now a $30 computer like a Raspberry has more power than Cray supercomputer from CD era.
It was implied. Seeing that there is almost no audio software capable of handling samples with more precision than 32-bit float audio, I read your argument against floats as in favor of 24-bit ints.

Anyway, you wouldn't perhaps be able to provide any meaningful example where the use of a format with more precision would result in any audible difference? You mentioned taking a square root ten times over, but I can't seem to think of any use of that in audio processing.
Music: sounds arranged such that they construct feelings.

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #14
Oh, the Python 101 lecture: (1/3)*3 does not evaluate to 1. But is that relevant?

>>> (1/3)*3
1.0
:-[
Ouch. Old swine had Python 101 too long ago, even earlier than this. Anyway, the point is that finite-resolution easily yields roundoff errors, and that is a problem if resolution is too rough and not a problem if resolution is adequate. Audio doesn't need that much data (compare to video).

The leaf falling next to the rocket might have suffered a tad in precision when you added the rocket sound to the mix. If then you subtracted the rocket and then amplified the falling leaf by say eighty dB, yeah, fidelity could be lost. But safeguarding against sabotaging the audio isn't much of a point for software that has the purpose of altering the sound audibly.

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #15
It can be done with Javascript, and much more convenient since everyone has a web browser. Ironically, JS on older browsers only supported 64-bit float and 32-bit float support is a newer feature :D
X
NASA seems to use a measly 64-bit float to represent PI, I guess all NASA engineers are not audiophile ;)
https://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimals-of-pi-do-we-really-need/

Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #16
Quote
Yes. Where did I say int24 would be better? I just want to say that 16 bits is more than enough to reproduce sound and if you want to do thing on sound it would better to use more than 32 bits.
Now a $30 computer like a Raspberry has more power than Cray supercomputer from CD era.
It was implied. Seeing that there is almost no audio software capable of handling samples with more precision than 32-bit float audio, I read your argument against floats as in favor of 24-bit ints.

Anyway, you wouldn't perhaps be able to provide any meaningful example where the use of a format with more precision would result in any audible difference?

For me, using float 64 bits for processing samples and then listen to the definitive sound with int16 bits makes more sense than using float 32 bits for processing and int24 bits. But it's a subjective statement as I don't know what kind of processing are made on the audio with the float32. Maybe it's simple stuff and is more than enough. I'm sure that in the 80s it was made entirely in int16 with 12 bits samples and it was okay, hence float32 are than okay and it's a kind of standard in audio so I was wrong. But.. if I was a audio nerd I'll use a library with ultra precision for my software ;D


I listen music an a old PC with cheap speaker so I can't tell 16 bits from, let say 12 bits. But I'm sure than 24 bits makes no real sense. Perhaps 18 bits at the maximum. I don't know. Not sure. 16 bits is huge.

It will be interesting to make a blind test with high end HiFi material and a group of "golden ears". Comparing a very good and clean original track at 24 bits to a copy of itself with random bits on its 1 LSB, then 2 LSB, etc.. Until someone notice some noise. What do you think of that ? It'll be fun.





Re: 32 bit WAV file? There's no such thing. (split from OPUS topic 122605)

Reply #17
makes more sense than using float 32 bits for processing and int24 bits.
There is a convenient history behind it. 352.8 kHz / 24 bit was introduced for audio workstations and given a fancy name around 2004: https://en.wikipedia.org/wiki/Digital_eXtreme_Definition
A bit depth of 24 was seen as enough to work on files that were later to be converted to an end-user format (CD with or without HDCD, or SACD). And as 24-bit files were around, they started to show up for download. But there you got it: 24 bits was there, and tit was enough to cope with roundoff errors.

However ... with peak normalization everywhere, any integer format is susceptible to clipping. At the time, e.g. Cool Edit was already using floating-point formats (CoolEdit's formats, that's another story of arrgghhs). IEEE 754 - and with that the 32-bit float representation - had been around for ages already. Sure some went to 32-bit integer rather than 32-bit float, but the latter had some sense to it:
* Immunity against clipping (unless you really wanted to sabotage it) - automatical fool-proofing saves the engineer the time taken to do manual fool-proofing
* Contains losslessly 24-bit integer, saving everyone from any discussion about whether 24-bit integer was really necessary: even if the 24th bit really were necessary, going 32-bit float sill has no risk of lower fidelity
* Floating-point math was already widely implemented in libraries and even hardware.

So sure, if 24 bits were introduced to be the end-user format because well we need that bit depth at the end - then you would have to ask yourself whether manipulations in 32-bit float would accumulate enough round-off errors to be a problem in the end.
But the 24th bit isn't essential to the end-user. For one thing, DACs don't reach more than 21-ish (?). As for audibility, ... https://hydrogenaud.io/index.php/topic,106156.0.html and https://archimago.blogspot.com/2014/06/24-bit-vs-16-bit-audio-test-part-ii.html
And this: https://www.aes.org/e-lib/browse.cfm?elib=14195 .

16 bits properly dithered is enough. 16 bit badly dithered ... I'd be shocked if it isn't still enough.

So the reason for 32-bit float is not that it delivers the necessary perfect 24-bit integer signal, because that isn't necessary. The good reasons for 32-bit float are that it is float (thus fool-proofing against clipping), that it is was a well-established format even before its applicability to audio, and that it is good enough. Not barely good enough, but much more than good enough.