Dplug icon indicating copy to clipboard operation
Dplug copied to clipboard

Smoother behavior

Open jpcima opened this issue 4 years ago • 3 comments

Some requests regarding the smoothers.

  1. the linear smoother does not reach the final value, it just remains up to one dy below. This behavior is not necessarily to be considered a bug, but is a bit counter-intuitive.

  2. it's desired to have a setter for T _current for 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)

jpcima avatar Jan 21 '21 18:01 jpcima

  1. Not sure if easy to fix (EDIT: aaaah, perhaps)
  2. Absolutely, what I prefer even is to make things auto-initialize, that is the first nextBuffer takes the first input as current value.

p0nce avatar Jan 23 '21 13:01 p0nce

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.

p0nce avatar Jan 23 '21 13:01 p0nce

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;

jpcima avatar Jan 23 '21 17:01 jpcima

Smoothers deprecated, one can copy them in own tree to fix them.

p0nce avatar Dec 01 '22 20:12 p0nce