-
Notifications
You must be signed in to change notification settings - Fork 231
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
Added linear gain filter #499
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.
If I understand this is a more general version of #217. That is clearly something Rodio needs, nicely done! I've got some small suggestions here and there.
The main two main issues for me are:
- The behavior after the filter is done
- The name
Hey I'm sorry I've missed these replies, I've been swamped irl but let me take a look in the next week or two. |
no worries, its also fine if it takes another few months. Take your time, I do that too. |
added documentation
"elapsed_ns"
...around LinearRamp
with other library structs.
All tests pass, the "lerp" function doesn't seem to work, I want to look into this further.
I think this is ready to go. |
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! just a few nitpicks here and there and we can get this merged!
Also integratd assert_float_eq
I've done the review comments, one note: I've added a dependency on the "assert_float_eq" package to allow soft comparisons of floats in the case float rounding causes results to be off within the system epsilon. |
love the new tests btw, very readable, very clear! |
and not the current position.
Different macro library for testing float equality
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.
Good idea to add an example!
It might however be best to keep this one simple. Lots of user have trouble understanding how to use Rodio. Mixing multiple concepts (the new linear gain ramp and the mixing controller) could confuse them.
Maybe split off the linear gain ramp to a separate example?
How about I just make a I'd like to do an example of a linear gain ramp but I was going to wait until this was accepted and then just write an ADSR envelope source and build a new example around that. |
I think we had a slight miscommunication. The example It is useful to have more difficult examples in there but an example called mix_multiple_sources should in my opinion only do one thing (mix multiple sources). |
good addition! we got fadein so why not fade out 👍 It seems implementation is trivial, and FadeIn and FadeOut are more specific and thus more readable for when someone only wants a fadein or fadeout. |
I see, I'll revert the example. |
oh and you have the honor of editing the changelog 🎉 since these are two nice new api's! (you can add them under unreleased) |
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.
All looks good to me.
This reverts commit 972147a.
Lets get this merged! |
Thanks I'll try to do it in fewer commits next time! |
no worries! again thanks for the contribution! |
Inspired by a comment in #217 I've added a generalized linear gain ramp filter that accepts a beginning and end gain factor and duration.