JUCE: IIRFilter Class Reference

JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Loading...
Searching...
No Matches
Public Member Functions | List of all members
IIRFilter Class Reference
juce_audio_basics » utilities

An IIR filter that can perform low, high, or band-pass filtering on an audio signal, and which attempts to implement basic thread-safety. More...

`#include <juce_IIRFilter.h>`

Inheritance diagram for IIRFilter:

## Public Member Functions
| IIRFilterBase () noexcept
| Creates a filter.
| IIRFilterBase (const IIRFilterBase &) noexcept
| Creates a copy of another filter.
Public Member Functions inherited from IIRFilterBase< SpinLock >
| IIRFilterBase () noexcept
| Creates a filter.
| IIRFilterBase (const IIRFilterBase &) noexcept
| Creates a copy of another filter.
void | makeInactive () noexcept
| Clears the filter so that any incoming data passes through unchanged.
void | setCoefficients (const IIRCoefficients &newCoefficients) noexcept
| Applies a set of coefficients to this filter.
IIRCoefficients | getCoefficients () const noexcept
| Returns the coefficients that this filter is using.
void | reset () noexcept
| Resets the filter's processing pipeline, ready to start a new stream of data.
void | processSamples (float *samples, int numSamples) noexcept
| Performs the filter operation on the given set of samples.
float | processSingleSampleRaw (float sample) noexcept
| Processes a single sample, without any locking or checking.

## Additional Inherited Members
Protected Member Functions inherited from IIRFilterBase< SpinLock >
IIRFilter & | operator= (const IIRFilter &)=delete
Protected Attributes inherited from IIRFilterBase< SpinLock >
SpinLock | processLock
IIRCoefficients | coefficients
float | v1
float | v2
bool | active

## Detailed Description

An IIR filter that can perform low, high, or band-pass filtering on an audio signal, and which attempts to implement basic thread-safety.

This class synchronises calls to some of its member functions, making it safe (although not necessarily real-time-safe) to reset the filter or apply new coefficients while the filter is processing on another thread. In most cases this style of internal locking should not be used, and you should attempt to provide thread-safety at a higher level in your program. If you can guarantee that calls to the filter will be synchronised externally, you could consider switching to SingleThreadedIIRFilter instead.

See also
  SingleThreadedIIRFilter, IIRCoefficient, IIRFilterAudioSource

## Member Function Documentation

## ◆ IIRFilterBase() [1/2]

IIRFilterBase< Mutex >::IIRFilterBase | ( |  | ) |
| noexcept

Creates a filter.

Initially the filter is inactive, so will have no effect on samples that you process with it. Use the setCoefficients() method to turn it into the type of filter needed.

## ◆ IIRFilterBase() [2/2]

IIRFilterBase< Mutex >::IIRFilterBase | ( | const IIRFilterBase & |  | ) |
| noexcept

Creates a copy of another filter.

The documentation for this class was generated from the following file:

- juce_audio_basics/utilities/juce_IIRFilter.h