45 double c4,
double c5,
double c6)
noexcept
57 double frequency)
noexcept
66 jassert (sampleRate > 0.0);
67 jassert (frequency > 0.0 && frequency <= sampleRate * 0.5);
83 double frequency)
noexcept
85 return makeHighPass (sampleRate, frequency, 1.0 / std::sqrt(2.0));
92 jassert (sampleRate > 0.0);
93 jassert (frequency > 0.0 && frequency <= sampleRate * 0.5);
109 double frequency)
noexcept
118 jassert (sampleRate > 0.0);
119 jassert (frequency > 0.0 && frequency <= sampleRate * 0.5);
135 double frequency)
noexcept
144 jassert (sampleRate > 0.0);
145 jassert (frequency > 0.0 && frequency <= sampleRate * 0.5);
161 double frequency)
noexcept
170 jassert (sampleRate > 0.0);
171 jassert (frequency > 0.0 && frequency <= sampleRate * 0.5);
191 jassert (sampleRate > 0.0);
216 jassert (sampleRate > 0.0);
241 jassert (sampleRate > 0.0);
242 jassert (frequency > 0.0 && frequency <= sampleRate * 0.5);
248 auto c2 = -2.0 * std::cos (
omega);
268 coefficients =
other.coefficients;
298 auto out = coefficients.coefficients[0] *
in + v1;
300 JUCE_SNAP_TO_ZERO (
out);
302 v1 = coefficients.coefficients[1] *
in - coefficients.coefficients[3] *
out + v2;
303 v2 = coefficients.coefficients[2] *
in - coefficients.coefficients[4] *
out;
314 auto c0 = coefficients.coefficients[0];
315 auto c1 = coefficients.coefficients[1];
316 auto c2 = coefficients.coefficients[2];
317 auto c3 = coefficients.coefficients[3];
318 auto c4 = coefficients.coefficients[4];
321 for (
int i = 0; i < numSamples; ++i)
331 JUCE_SNAP_TO_ZERO (
lv1); v1 =
lv1;
332 JUCE_SNAP_TO_ZERO (
lv2); v2 =
lv2;
Holds a resizable array of primitive or copy-by-value objects.
A set of coefficients for use in an IIRFilter object.
static IIRCoefficients makeAllPass(double sampleRate, double frequency) noexcept
Returns the coefficients for an all-pass filter.
IIRCoefficients & operator=(const IIRCoefficients &) noexcept
Creates a copy of another filter.
static IIRCoefficients makeLowPass(double sampleRate, double frequency) noexcept
Returns the coefficients for a low-pass filter.
float coefficients[5]
The raw coefficients.
IIRCoefficients() noexcept
Creates a null set of coefficients (which will produce silence).
static IIRCoefficients makeNotchFilter(double sampleRate, double frequency) noexcept
Returns the coefficients for a notch filter.
static IIRCoefficients makePeakFilter(double sampleRate, double centreFrequency, double Q, float gainFactor) noexcept
Returns the coefficients for a peak filter centred around a given frequency, with a variable Q and ga...
~IIRCoefficients() noexcept
Destructor.
static IIRCoefficients makeBandPass(double sampleRate, double frequency) noexcept
Returns the coefficients for a band-pass filter.
static IIRCoefficients makeHighShelf(double sampleRate, double cutOffFrequency, double Q, float gainFactor) noexcept
Returns the coefficients for a high-pass shelf filter with variable Q and gain.
static IIRCoefficients makeLowShelf(double sampleRate, double cutOffFrequency, double Q, float gainFactor) noexcept
Returns the coefficients for a low-pass shelf filter with variable Q and gain.
static IIRCoefficients makeHighPass(double sampleRate, double frequency) noexcept
Returns the coefficients for a high-pass filter.
An IIR filter that can perform low, high, or band-pass filtering on an audio signal.
float processSingleSampleRaw(float sample) noexcept
Processes a single sample, without any locking or checking.
void reset() noexcept
Resets the filter's processing pipeline, ready to start a new stream of data.
~IIRFilter() noexcept
Destructor.
void processSamples(float *samples, int numSamples) noexcept
Performs the filter operation on the given set of samples.
void setCoefficients(const IIRCoefficients &newCoefficients) noexcept
Applies a set of coefficients to this filter.
IIRFilter() noexcept
Creates a filter.
void makeInactive() noexcept
Clears the filter so that any incoming data passes through unchanged.
Commonly used mathematical constants.