zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 9a8d262b4d53ab4f8786d5a18a89eaec4f0dd27c
parent 268effbe5c1a8dae5c6c6e134b4d953d120ceb6b
Author: Friedolino <mkirchn@freenet.de>
Date:   Sun, 11 Oct 2020 21:06:27 +0200

use limit function from Util.h

Diffstat:
Msrc/Synth/LFO.cpp | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/Synth/LFO.cpp b/src/Synth/LFO.cpp @@ -21,8 +21,6 @@ namespace zyn { -#define LIMIT(x,lu, ll) (x>lu ? lu : (x<ll ? ll : x) ) - LFO::LFO(const LFOParams &lfopars, float basefreq, const AbsTime &t, WatchManager *m, const char *watch_prefix) :first_half(-1), @@ -136,7 +134,7 @@ float LFO::biquad(float input) { // calculate biquad coefficients FcAbs = (cutoff + 7.0f)*(cutoff + 7.0f)/ 450.56f; // max value < 40 - K = tan(PI * LIMIT(FcAbs * dt_,0.4,0.001)); // FcRel * dt_ max 40 * 0.01 = 0.4, + K = tan(PI * limit(FcAbs * dt_,0.001f,0.4f)); // FcRel * dt_ max 40 * 0.01 = 0.4, // LIMIT in case of LFO sampling frequency lower than 100 Hz norm = 1 / (1 + K / 0.7071f + K * K);