Hello audio folks,
What are your preferred methods/algorithms for general parameter smoothing? I'm trying to figure out how I'm going to do parameter smoothing and would like to design a class that would let me easily implement it, and I'd love to know what y'all think.
In Reaktor, I have like this great smoother that I found called Mnogo Smusas, but I'm really not sure how that can be implemented in C++. I believe the general idea is that it interpolated between previous and current values over a specified amount of time. I'm certain it achieves more than just that though.
Anyways, I know you can use an accumulator to crossfade between previous and current values and specify the frequency of the accumulator. I really like that idea.
I'm trying to think of how and how often you should trigger that accumulation. Should you do it every sample? Every N samples? Would/could you make it only happen when a parameter is changed? How would you do that? Possibly using a duplicate filter (testing if the current value != previous value)?
There's a lot of things to factor in and in my opinion, these things really matter.
Consider designing a filter class.
You might have a function that sets the cutoff frequency. You might also have a function that calculates the coefficients when a parameter has changed, which could be called by the cutoff function.
How would you design a parameter smoother that takes this into account? I know you wouldn't want to calculate the coefficients every sample. Maybe the answers to those questions I asked earlier could could prevent this.
I would love to have some discussion on this topic. Parameter smoothing is important to me. Who doesn't like to have smooth parameter changes when tweaking knobs, or when using automation. By the way, does JUCE have anything for parameter smoothing? It almost seems like it has just about anything one would need. If it doesn't, it could be a good idea to implement a general smoother with an easy to use interface. Do any of you have any classes you've made for this type of thing? I can't find much discussion on this topic.