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
Translate db_to_gain before smoothing the parameter #18
Comments
Essentially I'm saying that the actual parameter should store its value in raw amplitude, and only do the translation between db and amplitude when interacting with the UI/host. |
(Sorry for all the title changes, lol. I kept thinking there was more to add when looking at the code, but then I realized it was fine). |
This is intentional. Check out the other non-example plugins in the repo. The examples have gain parameters in the logarithmic domain, while the non-example plugins have the parameters in linear space using |
Ah, I see. That makes perfect sense. Thanks for the help! |
But thanks for bringing this to my attention! I'll probably update the gain example and leave the sine example alone because showing off those formatters is probably also a good idea. (so I'm reopening this issue as a reminder for myself 😄) |
Okay, the basic and GUI gain examples now use linear gain to show off all of the utilities there. Makes things more complex, but it's probably good to show this off. There's a new |
You should definitely add the ability for a parameter to translate its value using
util::db_to_gain
before smoothing it.The current gain example is woefully inefficient since it is converting from db to gain every single sample:
This is how baseplug implements this: https://github.com/wrl/baseplug/blob/trunk/src/parameter.rs#L116
The text was updated successfully, but these errors were encountered: