This commit is contained in:
Armin 2026-08-29 22:55:17 +02:00
commit 517219e035
6 changed files with 733 additions and 110 deletions

View file

@ -22,12 +22,22 @@ struct FilterBand
void prepare(double sampleRate, int blockSize);
void reset();
// Sets the desired (target) values; the coefficients are then smoothed in
// `process` to avoid zipper noise when a slider is dragged.
void setTargets(float gain, float freq, float q);
void process(juce::dsp::AudioBlock<float>& block);
using Filter = juce::dsp::IIR::Filter<float>;
using Coeffs = juce::dsp::IIR::Coefficients<float>;
Filter left, right;
private:
void updateCoeffs();
double sampleRate = 44100.0;
float targetGain = 0.0f, targetFreq = 1000.0f, targetQ = 1.0f;
float curGain = 0.0f, curFreq = 1000.0f, curQ = 1.0f;
};
// Computes the total summed magnitude response (in dB) of a series filter chain