2 ms·
I habitually edit audio using 32-bit float, not 16-bit integer. > Why would you want to use a floating point in between? Because 32-bit float has enough manti
by nayuki 9y ago
I habitually edit audio using 32-bit float, not 16-bit integer.
> Why would you want to use a floating point in between?
Because 32-bit float has enough mantissa bits to represent all 24-bit integer fixed-point values exactly, so it is at least as good.
Because 32-bit float is friendly to vectorization/SIMD, whereas 24-bit integer is not.
Because with 32-bit integers, you still have to worry about overflow if you start stacking like 65536 voices on top of each other, whereas 32-bit float will behave more gracefully.
Because 32-bit floating-point audio editing is only double the storage/memory requirements compared to 16-bit integer, but it buys you the ultimate peace of mind against silly numerical precision problems.
- shams93 9y agoYeah I edit at 32 bit float myself, then I export down to 16 bit 44100 flac for distribution.
- kazinator 9y agofloat has scale-independent error because it is logarithmic/exponential. If you quiet the amplitude by some decibels, that is just decrementing the exponent field in the float; the mantissa stays 24 bits wide. If you quiet the amplitude of integer samples, they lose resolution (bits per sample). If you divide a float by two, and then multiply by two, you recover the original value without loss, because just the exponent decremented and then incremented again. (Of course, I mean: in the absence of underflow. But underflow is far away. If the sample value of 1 is represented as 1.0, you have tons of room in either direction.)