Add FX chain: per-pad filter, master compressor/EQ/distortion/reverb, VU meter
- Per-pad low-pass filter (cutoff + resonance) applied in DrumPad render - Master bus FX chain in PluginProcessor::applyMasterFx(): - Distortion (tanh waveshaper with drive/mix) - 3-band EQ (low shelf 200Hz, peak 1kHz, high shelf 5kHz) - Compressor (juce::dsp::Compressor with threshold/ratio) - Reverb (juce::dsp::Reverb with size/decay) - Master volume + pan with constant-power pan law - VU meter: RMS level measurement with exponential smoothing - All FX panel and master panel knobs now connected to audio processing - SampleEditorPanel cutoff/reso knobs linked to DrumPad filter params Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,6 @@ public:
|
||||
|
||||
juce::AudioFormatManager& getFormatManager() { return formatManager; }
|
||||
|
||||
// Find pad by MIDI note
|
||||
DrumPad* findPadForNote (int midiNote);
|
||||
|
||||
// Kit management
|
||||
@@ -48,13 +47,42 @@ public:
|
||||
void saveKitPreset (const juce::File& file);
|
||||
void loadKitPreset (const juce::File& file);
|
||||
|
||||
// Master FX parameters (read by editor from FxPanel/MasterPanel)
|
||||
std::atomic<float> masterVolume { 1.0f };
|
||||
std::atomic<float> masterPan { 0.0f };
|
||||
std::atomic<float> masterTune { 0.0f };
|
||||
|
||||
// FX params
|
||||
std::atomic<float> compThreshold { -12.0f };
|
||||
std::atomic<float> compRatio { 4.0f };
|
||||
std::atomic<float> eqLo { 0.0f };
|
||||
std::atomic<float> eqMid { 0.0f };
|
||||
std::atomic<float> eqHi { 0.0f };
|
||||
std::atomic<float> distDrive { 0.0f };
|
||||
std::atomic<float> distMix { 0.0f };
|
||||
std::atomic<float> reverbSize { 0.3f };
|
||||
std::atomic<float> reverbDecay { 0.5f };
|
||||
|
||||
// VU meter levels (written by audio thread, read by GUI)
|
||||
std::atomic<float> vuLevelL { 0.0f };
|
||||
std::atomic<float> vuLevelR { 0.0f };
|
||||
|
||||
private:
|
||||
std::array<DrumPad, maxPads> pads;
|
||||
int numActivePads = defaultNumPads;
|
||||
juce::AudioFormatManager formatManager;
|
||||
|
||||
// Default MIDI mapping (GM drum map)
|
||||
// Master FX chain
|
||||
juce::dsp::Reverb reverb;
|
||||
juce::dsp::Compressor<float> compressor;
|
||||
juce::dsp::IIR::Filter<float> eqLoFilterL, eqLoFilterR;
|
||||
juce::dsp::IIR::Filter<float> eqMidFilterL, eqMidFilterR;
|
||||
juce::dsp::IIR::Filter<float> eqHiFilterL, eqHiFilterR;
|
||||
|
||||
double currentSampleRate = 44100.0;
|
||||
|
||||
void initializeDefaults();
|
||||
void applyMasterFx (juce::AudioBuffer<float>& buffer);
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InstaDrumsProcessor)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user