Smoother behavior
Some requests regarding the smoothers.
-
the linear smoother does not reach the final value, it just remains up to one
dybelow. This behavior is not necessarily to be considered a bug, but is a bit counter-intuitive. -
it's desired to have a setter for
T _currentfor allowing to set the current smooth value. Other frameworks have this. It's to ensure that a smoother can take the direct value right away on start. (in particular for synth, for example when keying a new voice)
- Not sure if easy to fix (EDIT: aaaah, perhaps)
- Absolutely, what I prefer even is to make things auto-initialize, that is the first
nextBuffertakes the first input as current value.
I don't find the smoothers very good, what would you say of removing them? I feel like anyone can build better ones, and the linear smoother isn't very useful either.
It's your choice, personnally it's a nice thing to have these readily available in the framework.
I notice how LinearSmoother can be slightly simplified.
If phase decrements toward zero, the firstNextAfterInit can then be eliminated, and period will have the possibility to be dynamically changed.
_phase -= _sampleRateInv;
if (_phase < 0)
_phase = _period;
Smoothers deprecated, one can copy them in own tree to fix them.