-
Notifications
You must be signed in to change notification settings - Fork 292
feat: add distortion effect #743
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
feat: add distortion effect #743
Conversation
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.
nice example! its great to have more stuff showing how to use periodic_access!
src/source/distortion.rs
Outdated
| self.input.next().map(|value| { | ||
| let v = value * self.gain; | ||
| let t = self.threshold; | ||
| if v > t { |
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.
actually the if/else if/else here can be replaced by f32::clamp right? Might be a little cleaner (and maybe that gets optimized in the future)
yara-blue
left a comment
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.
Lets change the if/else if/else to a f32::clamp and then we are good to merge!
|
Looks great! just one more thing and we can merge. This deserves a changelog entry! 🥳 🎈 |
|
thanks! merged into 0.21 instead of master, fixed that with some manual gitting |
|
Thanks! |
This PR adds a simple distortion effect to the source.
Run examples: