- Home /
Why does an audio clip only want samples between 0 and 1.0?
I'm trying to create an audio clip from a set of floats, and it seems to me that having this limitation would severely limit the quality of the audio. Is that the case, or am I missing something?
Answer by Hoeloe · Oct 09, 2013 at 09:45 PM
Well, yes there is a fundamental limit on it, but generally it's for performance reasons. Values between 0 and 1 give you a substantially large range to produce good quality audio. In fact, it's less the fact that it's between 0 and 1, and the fact that the samples are 32-bit floating points (rather than 64-bit) that puts the limitation. The meaning of a number is totally arbitrary, and in this case, it's essentially a percentage, where 1 means "the highest value" and 0 means "the lowest value". You would not get better quality audio by sampling between 0 and 255 with integers, because the number of discrete steps available is actually less, even for a 32-bit floating point. The reason 32-bit floats are chosen instead of 64-bit is a trade-off between the increase in audio quality (which is minor) and the increase in memory usage (which can be major).
Do you have any advice on normalizing my audio, which seems to range from -1 to 1?
haha, yeah, that does some like the right approach. Thanks!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Slowly decreasing a float 2 Answers
How do i make a float match to another float on other script 1 Answer
Return 2 FLOAT from 1 VOID 1 Answer