libiir
1.0.2
|
This library allows the user to describe an IIR filter chain as a string, which is useful to allow configurable filtering using e.g. a configuration file. This page describes the format of such strings.
The string is first split into individual IIR filters. Each filter is written as type(params)
and separated by whitespace. The string must contain at least one filter but may contain an arbitrary number.
An IIR filter may be specified as raw coefficients, in which case the type
is raw
and the params
consists of a string:
c[0],c[1],…,c[n]/d[0],d[1]…d[n]
The coefficients c[0]…c[i]
and d[0]…d[i]
are written in standard C floating-point notation. They are separated by commas, except the transition between c
and d
coefficients, which is separated by a slash.
For a low-pass filter, type is butterworth_lowpass
. For a high-pass filter, type is butterworth_highpass
. Parameters as per iir_butterworth_lowpass(), i.e.:
order,gain,corner
For band-pass filters, type is butterworth_bandpass
. For band-stop filters, type is butterworth_bandstop
. Parameters as per iir_butterworth_bandpass(), i.e.:
order,gain,low_corner,high_corner
Anything greater than 4th order will be split into multiple 4th-order (or less) segments. Note however this will lead to the corner frequencies being off.