Skip to content
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

Bitcrush does not work properly #134

Open
jerry20091103 opened this issue Feb 4, 2021 · 2 comments
Open

Bitcrush does not work properly #134

jerry20091103 opened this issue Feb 4, 2021 · 2 comments

Comments

@jerry20091103
Copy link

The bitcrush module is outputing a huge DC offset in my testing, it seems that there's a bug in the code.
In line 27 of bitcrush.cpp:
out *= (65536.0f / bits) - 32768;
I believe it should be
out *= (65536.0f / bits);
out -= 32768;
or something equivalent instead.

@stephenhensley
Copy link
Collaborator

Thanks for pointing this out.

I was just discussing with someone this morning how we have multiple modules that accomplish similar goals, and we may remove a few to consolidate all downsampling/bitcrushing to a single module.

For now, you can try the Decimator module as an alternative.

@PaulBatchelor
Copy link

Another issue with BitCrush is that the internal fold transformation will eventually suffer from numerical overflow (both integer AND floating point), which is UB. Reason for this is that fold uses two indefinitely incrementing counters to keep track of absolute time. It's also been a longstanding bug in Soundpipe all this time. Oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants