Skip to content

Commit

Permalink
like
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreya-Autumn committed Oct 15, 2024
1 parent f2b7ec3 commit d640567
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/sst/voice-effects/generator/TiltNoise.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <iostream>
#include <math.h>
#include <algorithm>

#include "sst/basic-blocks/params/ParamMetadata.h"
#include "sst/basic-blocks/dsp/RNG.h"
Expand Down Expand Up @@ -96,7 +97,7 @@ template <typename VFXConfig> struct TiltNoise : core::VoiceEffectTemplateBase<V

void setCoeffs()
{
float slope = clamp(this->getFloatParam(fpTilt), -6, 6) / 2;
float slope = std::clamp(this->getFloatParam(fpTilt), -6, 6) / 2;
float posGain = this->dbToLinear(slope);
float negGain = this->dbToLinear(-1 * slope);
float res = .07f;
Expand Down
3 changes: 2 additions & 1 deletion include/sst/voice-effects/modulation/NoiseAM.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <iostream>
#include <math.h>
#include <algorithm>

#include "sst/basic-blocks/params/ParamMetadata.h"
#include "sst/basic-blocks/dsp/BlockInterpolators.h"
Expand Down Expand Up @@ -111,7 +112,7 @@ template <typename VFXConfig> struct NoiseAM : core::VoiceEffectTemplateBase<VFX

void setCoeffs()
{
float slope = clamp(this->getFloatParam(fpTilt), -6, 6) / 2;
float slope = std::clamp(this->getFloatParam(fpTilt), -6, 6) / 2;
float posGain = this->dbToLinear(slope);
float negGain = this->dbToLinear(-1 * slope);
float res = .07f;
Expand Down

0 comments on commit d640567

Please sign in to comment.