| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- /*
- ==============================================================================
- This file contains the basic framework code for a JUCE plugin processor.
- ==============================================================================
- */
- #pragma once
- #include <JuceHeader.h>
- #include "CMLSReverb.h"
- #include "CMLSDelay.h"
- #include "CMLSChorus.h"
- #include "CMLSProcessorChain.h"
- #include "CMLSEqualizer.h"
- #include "CMLSDistortion.h"
- #include "APVTSListeners.h"
- //==============================================================================
- /**
- */
- class CMLSProjectAudioProcessor : public juce::AudioProcessor
- {
- public:
- //==============================================================================
- CMLSProjectAudioProcessor();
- ~CMLSProjectAudioProcessor() override;
- //==============================================================================
- void prepareToPlay (double sampleRate, int samplesPerBlock) override;
- void releaseResources() override;
- #ifndef JucePlugin_PreferredChannelConfigurations
- bool isBusesLayoutSupported (const BusesLayout& layouts) const override;
- #endif
- void processBlock (juce::AudioBuffer<float>&, juce::MidiBuffer&) override;
- //==============================================================================
- juce::AudioProcessorEditor* createEditor() override;
- bool hasEditor() const override;
- //==============================================================================
- const juce::String getName() const override;
- bool acceptsMidi() const override;
- bool producesMidi() const override;
- bool isMidiEffect() const override;
- double getTailLengthSeconds() const override;
- //==============================================================================
- int getNumPrograms() override;
- int getCurrentProgram() override;
- void setCurrentProgram (int index) override;
- const juce::String getProgramName (int index) override;
- void changeProgramName (int index, const juce::String& newName) override;
- //==============================================================================
- void getStateInformation (juce::MemoryBlock& destData) override;
- void setStateInformation (const void* data, int sizeInBytes) override;
- // Mute/unmute slot by number
- void muteEffectInSlot(int slot);
- void unmuteEffectInSlot(int slot);
- void swapEffectInSlot(int slot1, int slot2);
- // Parameter controls
- void setEqLowGain(float value);
- void setEqHighGain(float value);
- void setDistortionDrive(float value);
- void setDistortionMix(float value);
- void setChorusDryWet(float value);
- void setChorusAmount(float value);
- void setReverbDryWet(float value);
- void setReverbRoomSize(float value);
- void setDelayDryWet(float value);
- void setDelayAmount(float value);
- // Value Tree State for parameters
- juce::AudioProcessorValueTreeState apvts;
- private:
- //==============================================================================
- // Effects processing chain
- juce::dsp::ProcessorBase* equalizer;
- juce::dsp::ProcessorBase* distortion;
- juce::dsp::ProcessorBase* chorus;
- juce::dsp::ProcessorBase* delay;
- juce::dsp::ProcessorBase* reverb;
- CMLSProcessorChain processorChain;
- APVTSListeners apvtsListeners;
- juce::AudioProcessorValueTreeState::ParameterLayout createParameters();
- JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CMLSProjectAudioProcessor)
- };
|