| 123456789101112131415161718192021222324 |
- #pragma once
- #include <JuceHeader.h>
- class CMLSDistortion : public juce::dsp::ProcessorBase {
- public:
- CMLSDistortion();
- ~CMLSDistortion() override = default;
- void prepare(const juce::dsp::ProcessSpec&) override;
- void reset() override;
- void process(const juce::dsp::ProcessContextReplacing<float>&) override;
- void setDrive(float drive); // controls intensity
- void setMix(float mix); // controls the dry/wet mix ratio,how much of the distorted signal is mixed with the original signal
- // 0.0 = dry, 1.0 = full distortion
- private:
- float drive = 1.0f;
- float mix = 1.0f;
- juce::dsp::Gain<float> inputGain, outputGain;
- };
- #pragma once
|