Browse Source

Add SlewLimiter::setRiseFall()

tags/v0.6.0
Andrew Belt 7 years ago
parent
commit
c6cd497e17
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      include/dsp/filter.hpp

+ 5
- 0
include/dsp/filter.hpp View File

@@ -51,6 +51,11 @@ struct SlewLimiter {
float rise = 1.0; float rise = 1.0;
float fall = 1.0; float fall = 1.0;
float out = 0.0; float out = 0.0;

void setRiseFall(float _rise, float _fall) {
rise = _rise;
fall = _fall;
}
float process(float in) { float process(float in) {
float delta = clampf(in - out, -fall, rise); float delta = clampf(in - out, -fall, rise);
out += delta; out += delta;


Loading…
Cancel
Save