| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- /*
- ==============================================================================
- CMLSChorus.h
- Created: 1 May 2025 11:04:18pm
- Author: Luigi
- ==============================================================================
- */
- #pragma once
- #include <JuceHeader.h>
- #define DELAY_CENTER 0.015 // Center for delay in seconds
- #define LFO_MIN_FREQ 0.0f // Minimum frequency of the LFO
- #define LFO_MAX_FREQ 3.0f // Maximum frequency of the LFO
- #define LFO_FREQ_DELTA 0.3f // Frequency delta between the two LFOs
- #define LFO_MIN_DEPTH 0.0f // Minimum depth of the LFO
- #define LFO_MAX_DEPTH 0.1f // Maximum depth of the LFO
- class CMLSChorus : public juce::dsp::ProcessorBase {
- public:
- CMLSChorus();
- ~CMLSChorus() override;
- void reset() override;
- void prepare(const juce::dsp::ProcessSpec&);
- void process(const juce::dsp::ProcessContextReplacing<float>&);
- // Parameter getters and setters
- void setDryWet(float value);
- void setAmount(float value);
- const float getDryWet();
- const float getAmount();
- private:
- float dryWetProp = 0.0;
- float amount = 0.0;
- juce::dsp::Chorus<float> delayLine1; // 1st chorus delayline
- juce::dsp::Chorus<float> delayLine2; // 2nd chorus delayline
- juce::dsp::DryWetMixer<float> dryWetMixer; // Dry/Wet mixer
- juce::NormalisableRange<float>* freqRange; // Range for LFOs frequencies
- juce::NormalisableRange<float>* depthRange; // Range for LFOs depth
- };
|