arduino-audio-tools
Loading...
Searching...
No Matches
Classes | Namespaces
Filter.h File Reference
#include <math.h>
#include "AudioToolsConfig.h"

Go to the source code of this file.

Classes

class  BandPassFilter< T >
 Second-order band-pass filter (BiQuad DF2). Passes frequencies near the center frequency and attenuates those further away. The bandwidth is controlled by the Q factor: higher Q produces a narrower passband. Coefficients are derived from the Audio EQ Cookbook. More...
 
class  BiQuadDF1< T >
 Second-order IIR filter in Direct Form I. Maintains separate input and output histories (x and y delay lines). Requires more memory than DF2 but is less susceptible to quantization issues with fixed-point arithmetic. More...
 
class  BiQuadDF2< T >
 Second-order IIR filter in Direct Form II. Uses a single delay line, requiring less memory than DF1. This is the base class for the ready-to-use filter types (LowPassFilter, HighPassFilter, BandPassFilter, NotchFilter, LowShelfFilter, HighShelfFilter) which compute their coefficients from frequency, sample rate and Q/gain parameters. More...
 
class  Filter< T >
 Abstract filter interface definition. Subclasses implement process() to transform audio samples one at a time. Use reset() to clear internal state (e.g. delay lines) without changing the filter coefficients. More...
 
class  FilterChain< T, N >
 A cascade of N arbitrary filters applied in series. Each sample is passed through all filters in order. The caller owns the filter pointers and must ensure they outlive the chain. More...
 
class  FIR< T >
 Finite Impulse Response (FIR) filter. Performs convolution of the input signal with a set of feedforward coefficients b[]. For integer types, an optional scaling factor is applied to preserve precision. You can use https://www.arc.id.au/FilterDesign.html to design the coefficients. More...
 
class  HighPassFilter< T >
 Second-order high-pass filter (BiQuad DF2). Attenuates frequencies below the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook. More...
 
class  HighShelfFilter< T >
 Second-order high-shelf filter (BiQuad DF2). Boosts or cuts frequencies above the shelf frequency by the specified gain (in dB) while leaving lower frequencies unchanged. Commonly used in tone controls and equalization. Coefficients are derived from the Audio EQ Cookbook. More...
 
class  IIR< T >
 Infinite Impulse Response (IIR) filter. Uses both feedforward (b[]) and feedback (a[]) coefficients. The a[0] coefficient is used to normalize all other coefficients. For integer types, an optional scaling factor is applied to preserve precision. More...
 
class  LowPassFilter< T >
 Second-order low-pass filter (BiQuad DF2). Attenuates frequencies above the cutoff frequency. Coefficients are derived from the Audio EQ Cookbook. More...
 
class  LowShelfFilter< T >
 Second-order low-shelf filter (BiQuad DF2). Boosts or cuts frequencies below the shelf frequency by the specified gain (in dB) while leaving higher frequencies unchanged. Commonly used in tone controls and equalization. Coefficients are derived from the Audio EQ Cookbook. More...
 
class  NoFilter< T >
 Passes the input through unchanged. Useful as a placeholder when a Filter is required but no processing is desired. More...
 
class  NotchFilter< T >
 Second-order notch (band-reject) filter (BiQuad DF2). Rejects frequencies near the center frequency and passes those further away. Useful for removing a specific unwanted frequency (e.g. mains hum at 50/60 Hz). Coefficients are derived from the Audio EQ Cookbook. More...
 
class  SOSFilter< T, N >
 Second Order Sections (SOS) filter — a cascade of N BiQuad DF2 stages. Higher-order filters should be decomposed into second-order sections to avoid numerical instability. Each section has its own b[3]/a[3] coefficients and optional gain. Tools like scipy.signal.butter(..., output='sos') or MATLAB's tf2sos produce the required coefficient arrays. More...
 

Namespaces

namespace  audio_tools
 Generic Implementation of sound input and output for desktop environments using portaudio.