From d9c98c59b3120ff9f8914ca810d83ffb44a1875d Mon Sep 17 00:00:00 2001 From: wan-may Date: Tue, 21 Mar 2023 20:05:09 -0300 Subject: [PATCH] Exponential Sigmoid --- src/yaw-brick/dsp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/yaw-brick/dsp.cpp b/src/yaw-brick/dsp.cpp index 901975f..fd7492c 100644 --- a/src/yaw-brick/dsp.cpp +++ b/src/yaw-brick/dsp.cpp @@ -12,7 +12,7 @@ public: protected: const char *getLabel() const override { return "yaw-brick"; } - const char *getDescription() const override { return "Limiter"; } + const char *getDescription() const override { return "Sigma Male Limiter"; } const char *getMaker() const override { return "yaw-audio"; } const char *getHomePage() const override { return "https://yaw.man/plugins/yaw-brick"; } const char *getLicense() const override { return "Fuck you pay me"; } @@ -47,9 +47,9 @@ protected: { for (int chn = 0; chn < 2; ++chn) { - for( uint32_t i = 0; i < frames; ++i){ - float x = inputs[chn][i]; - outputs[chn][i] = gain * limit * x / (1.f + gain * x); + for( uint32_t i = 0; i < frames; ++i) { + + outputs[chn][i] = limit / ( 1.f + expf(-inputs[chn][i] * gain)); } } }