diff --git a/include/sst/voice-effects/eq/TiltEQ.h b/include/sst/voice-effects/eq/TiltEQ.h index ec50944..87cd030 100644 --- a/include/sst/voice-effects/eq/TiltEQ.h +++ b/include/sst/voice-effects/eq/TiltEQ.h @@ -26,6 +26,7 @@ #include "../VoiceEffectCore.h" #include +#include #include "sst/basic-blocks/mechanics/block-ops.h" @@ -73,7 +74,7 @@ template struct TiltEQ : core::VoiceEffectTemplateBasenote_to_pitch_ignoring_tuning(this->getFloatParam(fpFreq)); - float slope = std::clamp(this->getFloatParam(fpTilt), -18, 18) / 2; + float slope = std::clamp(this->getFloatParam(fpTilt), -18.f, 18.f) / 2.f; float posGain = this->dbToLinear(slope); float negGain = this->dbToLinear(-1 * slope); diff --git a/include/sst/voice-effects/generator/TiltNoise.h b/include/sst/voice-effects/generator/TiltNoise.h index 551c913..804de9e 100644 --- a/include/sst/voice-effects/generator/TiltNoise.h +++ b/include/sst/voice-effects/generator/TiltNoise.h @@ -25,6 +25,7 @@ #include #include +#include #include "sst/basic-blocks/params/ParamMetadata.h" #include "sst/basic-blocks/dsp/RNG.h" @@ -96,7 +97,7 @@ template struct TiltNoise : core::VoiceEffectTemplateBasegetFloatParam(fpTilt), -6, 6) / 2; + float slope = std::clamp(this->getFloatParam(fpTilt), -6.f, 6.f) / 2.f; float posGain = this->dbToLinear(slope); float negGain = this->dbToLinear(-1 * slope); float res = .07f; diff --git a/include/sst/voice-effects/modulation/NoiseAM.h b/include/sst/voice-effects/modulation/NoiseAM.h index c131c3e..9b2c5d1 100644 --- a/include/sst/voice-effects/modulation/NoiseAM.h +++ b/include/sst/voice-effects/modulation/NoiseAM.h @@ -25,6 +25,7 @@ #include #include +#include #include "sst/basic-blocks/params/ParamMetadata.h" #include "sst/basic-blocks/dsp/BlockInterpolators.h" @@ -111,7 +112,7 @@ template struct NoiseAM : core::VoiceEffectTemplateBasegetFloatParam(fpTilt), -6, 6) / 2; + float slope = std::clamp(this->getFloatParam(fpTilt), -6.f, 6.f) / 2.f; float posGain = this->dbToLinear(slope); float negGain = this->dbToLinear(-1 * slope); float res = .07f;