-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add options to fix clipping and apply peak normalization to the generated soundscape #132
Conversation
NOTE: missing unit tests, coverage at 98% right now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far, I've left some comments and thoughts.
If we can unpin pyrsistent in this PR as well, that'd be great. We pinned it to be compat with 2.7 and 3.4, but we dropped support for those a few versions ago, so we can unpin. |
…e fix_clipping and peak_normalization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, there are a few tiny things that should be looked at before we merge, I think. See comments.
…everb AFTER peak normalization, doesn't work otherwise (in sox)
ok @pseeth I believe I've addressed all of your comments. Let's CR and SqM. |
Right now, it's very easy for the user to generate a soundscape the clips if they're not careful with their choice of
ref_db
and the SNR values they give to foreground events.This PR adds two new optional parameters to both
generate
andgenerate_from_jams
:fix_clipping
- if True (default=False), will apply peak normalization in the case that the soundscape is clippingpeak_normalization
- allows the user to apply peak normalization (abs(max) sample = 1) even if the soundscape isn't clippingThis PR addresses #131
Checklist:
generate:
generate_from_jams:
testing: