From 6cca93b85ce2a7648fab154c1acf9d055942b48e Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 4 Dec 2017 12:49:14 -0500 Subject: [PATCH] Add SlewLimiter::setRiseFall() --- include/dsp/filter.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/dsp/filter.hpp b/include/dsp/filter.hpp index 35098ecf..a29785bd 100644 --- a/include/dsp/filter.hpp +++ b/include/dsp/filter.hpp @@ -51,6 +51,11 @@ struct SlewLimiter { float rise = 1.0; float fall = 1.0; float out = 0.0; + + void setRiseFall(float _rise, float _fall) { + rise = _rise; + fall = _fall; + } float process(float in) { float delta = clampf(in - out, -fall, rise); out += delta;