Collection of alterable digital biquad filters for dynamic audio effect creation
Project description
Alterable biquad filters
This is a collection of digital biquad filters whose parameters f
(frequency in Hz), g
(gain in dB) and q
(quality) can be varied at runtime. Following DF1 filter implementations are available:
- Allpass
- Bandpass
- Highpass
- Lowpass
- Highshelf
- Lowshelf
- Notch
- Peak
Basic usage
Filter with static configuration:
import biquad
import numpy as np
# load audio samples somehow
x, sr = np.zeros(...), 44100
# create a filter of your choice
f = biquad.bandpass(sr, f=sr/4, q=1)
# process all audio samples
y = f(x)
Filter with dynamic configuration:
import biquad
import numpy as np
# load audio samples somehow
x, sr = np.zeros(...), 44100
# create a filter of your choice
f = biquad.bandpass(sr)
# create parameter modifications as you like
myf = np.linspace(1, sr/4, len(x))
myq = np.linspace(2, 1/2, len(x))
# process all audio samples
y = f(x, f=myf, q=myq)
Keep in mind:
- All filters have a default value for the persistent parameters
g
andq
, which is set in the particular__init__
method. - Parameter
f
must be set either in the__init__
or in the__call__
method. - The optional instantaneous parameters
f
,g
andq
, if specified in the__call__
method, override the persistent ones.
References
- Cookbook formulae for audio EQ biquad filter coefficients by Robert Bristow-Johnson
- Introduction to Digital Filters with Audio Applications by Julius O. Smith III
License
github.com/jurihock/biquad is licensed under the terms of the MIT license. For details please refer to the accompanying LICENSE file distributed with it.
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
biquad-0.4.tar.gz
(9.0 kB
view details)
Built Distribution
biquad-0.4-py3-none-any.whl
(15.2 kB
view details)
File details
Details for the file biquad-0.4.tar.gz
.
File metadata
- Download URL: biquad-0.4.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f432a6fe83fabd7c785021b0a81b848765a6f2d8f0707620bb3d875b343fadd9 |
|
MD5 | f18e71b72e8386c6865b541435e440d0 |
|
BLAKE2b-256 | 506548e2c7e10a29c68b49161d1569c89420cd946dd5508e7dec92b331b2aa3b |
File details
Details for the file biquad-0.4-py3-none-any.whl
.
File metadata
- Download URL: biquad-0.4-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c61e21d4c9bda16cb5604b24df2cd6f6116481c9497992ae5c7e441b140043f |
|
MD5 | fac4d15c7b6af44903aee6a8d32c0a9f |
|
BLAKE2b-256 | 90294eec58e3c453906b275aa275ae656177af4394657e931b7f10a3b0a1452d |