Biquad Filters

Overview

Low-Pass Biquad Filter ResponseThe biquad filter is a versatile and effective audio processing tool. The biquad filter is a second-order filter IIR (Infinite Impulse Response) filter, particularly useful for their simplicity and efficiency in implementation. They can be utilized for a variety of filtering operations.

The biquad class and its supporting infrastructure are based on Robert Bristow Johnson’s Audio-EQ Cookbook, implemented using modern C++.

biquad

The biquad serves as the base class for various forms of filters, including:

  • Low pass filter

  • High pass filter

  • Band pass filter

  • All pass filter

  • Notch filter

  • Peaking filter

  • Low shelf filter

  • High shelf filter

Include

#include <q/fx/biquad.hpp>

Declaration

The Q DSP library’s API implementation hides the majority of the details behind the main biquad struct, with the exception of the copy constructor and the function call operator, which accepts a single s (input sample) parameter and returns the processed value.

struct biquad
{
            biquad(biquad const&) = default;
   float    operator()(float s);
};

Expressions

Notation

s

Input sample.

f, a, b

Objects of type biquad.

Copy Constructor and Assignment

Expression Semantics

biquad(f)

Copy construct from f.

a = b

Assign b to a.

C++ brace initialization may also be used.

Function Call

Expression Semantics Return Type

f(s)

Process the input sample s and return the filtered result.

float