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 2ae1a58..804de9e 100644 --- a/include/sst/voice-effects/generator/TiltNoise.h +++ b/include/sst/voice-effects/generator/TiltNoise.h @@ -97,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 6304563..9b2c5d1 100644 --- a/include/sst/voice-effects/modulation/NoiseAM.h +++ b/include/sst/voice-effects/modulation/NoiseAM.h @@ -112,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;