Multichannel Biquadratic IIR Filters

Overview

Multichannel biquad filtering is implemented, for each channel of a specified set, as a cascade of individual IIR filters called sections; each section has its own set of feedback and feedforward coefficients.

Each section implements a direct-form 2 filter. When the biquad filter function executes, the sections execute in sequence, each section processing the entire input signal and leaving its output to be processed by the next section.

Topics

Equalizing Audio with Biquadratic Filters

Equalizing Audio with vDSP

Shape audio output using discrete cosine transforms and biquadratic filters.

Creating a Multichannel Biquadratic IIR Setup

func vDSP_biquadm_CreateSetup(UnsafePointer<Double>, vDSP_Length, vDSP_Length) -> vDSP_biquadm_Setup?

Builds a data structure that contains precalculated single-precision data for use by multichannel cascaded biquad IIR filter functions.

func vDSP_biquadm_CreateSetupD(UnsafePointer<Double>, vDSP_Length, vDSP_Length) -> vDSP_biquadm_SetupD?

Builds a data structure that contains precalculated double-precision data for use by multichannel cascaded biquad IIR filter functions.

Copying State

func vDSP_biquadm_CopyState(vDSP_biquadm_Setup, OpaquePointer)

Copies the filter state from one single-precision multichannel biquad IIR filter object to another.

func vDSP_biquadm_CopyStateD(vDSP_biquadm_SetupD, OpaquePointer)

Copies the filter state from one double-precision multichannel biquad IIR filter object to another.

Resetting State

func vDSP_biquadm_ResetState(vDSP_biquadm_Setup)

Resets the filter state of a single-precision multichannel biquad IIR filter object.

func vDSP_biquadm_ResetStateD(vDSP_biquadm_SetupD)

Resets the filter state of a double-precision multichannel biquad IIR filter object.

Setting Filter States

func vDSP_biquadm_SetActiveFilters(vDSP_biquadm_Setup, UnsafePointer<Bool>)

Sets the overall active/inactive filter state of a valid single-precision multichannel biquad IIR filter setup of type vDSP_biquadm_Setup.

Setting Coefficients

func vDSP_biquadm_SetCoefficientsSingle(vDSP_biquadm_Setup, UnsafePointer<Float>, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Updates the filter coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are given in single precision.

func vDSP_biquadm_SetCoefficientsDouble(vDSP_biquadm_Setup, UnsafePointer<Double>, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Updates the filter coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are given in double precision.

Setting Target Values

func vDSP_biquadm_SetTargetsSingle(vDSP_biquadm_Setup, UnsafePointer<Float>, Float, Float, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Sets target values for selected coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are given in single precision. Each selected coefficient is incremented at each sample until the difference between its value and the target value is less than a specified threshold.

func vDSP_biquadm_SetTargetsDouble(vDSP_biquadm_Setup, UnsafePointer<Double>, Float, Float, vDSP_Length, vDSP_Length, vDSP_Length, vDSP_Length)

Sets target values for selected coefficients within a valid single-precision multichannel biquad IIR filter object. Filter coefficients are specified in double precision. Each selected coefficient is incremented at each sample until the difference between its value and the target value is less than a specified threshold.

Destroying a Mulitchannel Biquadratic IIR Setup

func vDSP_biquadm_DestroySetup(vDSP_biquadm_Setup)

Destroys a single-precision multichannel biquad IIR setup object.

func vDSP_biquadm_DestroySetupD(vDSP_biquadm_SetupD)

Destroys a double-precision multichannel biquad IIR setup object.