-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Float decode out of range [-1, 1] #104
Comments
[-1, 1] is just the nominal output range representing 0 dBFs. But the MP3 format is not restricted to representing data in the nominal range. Even if the original input signal was in that range, due to MP3's lossy compression the reconstructed output can sometimes exceed this range. There is no need to worry about this, as float audio APIs normally have no issue with values outside of the [-1,1] range. Just clamp the range if it's really needed (e.g. when converting to 16-bit data). |
I personally believe this would be useful to mention in the docs, not everybody is familiar with the encoding details of mp3.
No need to worry indeed, but handling values out of the Whatever the case, I think just a comment in the docs would be very helpful. This way users can decide how to handle this case. Clamp, use a compressor, etc. Extend the README section:
Happy to open a PR. |
Using
results in float samples that are outside the typical range of
[-1, 1]
.Is this to be expected and to be trimmed/clipped by the user?
Or is this a bug?
Snippet from printing the out of range samples from the attached file:
Sample file:
01m_40s__01m_50s.mp3.zip
And thanks for writing this amazing piece of software!
The text was updated successfully, but these errors were encountered: