IIR coefficients for A,B,C and ITU_R_468 weighting filters
Project description
Two modules which provide the zpk coefficients for the A,B,C and ITU_R_468 weighting filters. These can then be used by signal.lfilter to filter audio signals.
In contrast to other implementations which get the high frequency end completely wrong (because of the bilinear transform) here I have used the matched z-transform which aims to match 1:1 the analogue and digital frequency response.
The precision towards the Nyquist frequency can be increased by using a higher sampling rate but given that audio has such low energies over 10kHz there is probably not much point to it.
On the other hand lower sampling rates are possible for example 8kHz if only low frequency noise has been measured.
Installation
` pip install sound_weighting_filters `
Usage
` import ABC_weighting `
This has a single function:
` get_zpk(curve='A', fs=False) `
curve defines the weighting filter and can be ‘A’, ‘B’ or ‘C’.
fs sets the sampling rate of the digital system.
Returns zeros, poles, gain of the filter.
For example: ` z,p,k = ABC_weighting.get_zpk(fs = 48000) `
## Demo plots
Run: ` python ABC_weighting.py `
The same applies to the ITU_R_468 module using get_zpk(fs=False).
# Credits
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for sound_weighting_filters-0.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3523b1da23b9998b5f42d3885ccfdbede69fd831e1458c42e0ccace948f713a0 |
|
MD5 | d51acd21588746c3db43ed45ac217598 |
|
BLAKE2b-256 | 837ecdd57f1dcf5585eb6517141c2e5fc6ae8b94a91b9308213079c0256d472c |