Digital filters

class aubio.digital_filter(order=7)

Create a digital filter.

set_a_weighting(samplerate)

Set filter coefficients to A-weighting.

samplerate should be one of 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, or 192000. order of the filter should be 7.

Parameters:samplerate (int) – Sampling-rate of the input signal.
set_biquad(b0, b1, b2, a1, a2)

Set biquad coefficients. order of the filter should be 3.

Parameters:
  • b0 (float) – Forward filter coefficient.
  • b1 (float) – Forward filter coefficient.
  • b2 (float) – Forward filter coefficient.
  • a1 (float) – Feedback filter coefficient.
  • a2 (float) – Feedback filter coefficient.
set_c_weighting(samplerate)

Set filter coefficients to C-weighting.

samplerate should be one of 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 88200, 96000, or 192000. order of the filter should be 5.

Parameters:samplerate (int) – Sampling-rate of the input signal, in Hz.
order

order of the filter