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
gandq, which is set in the particular__init__method. - Parameter
fmust be set either in the__init__or in the__call__method. - The optional instantaneous parameters
f,gandq, 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file biquad-0.5.tar.gz.
File metadata
- Download URL: biquad-0.5.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3546110c33f14f0bf426f25709fdf5c5f9e7d491feca08d8206033d33507cd61
|
|
| MD5 |
1a7753516b664c7726a791deaedd5059
|
|
| BLAKE2b-256 |
4e521a70663028f24cb05d176f89b1a412d0710acfcfa5b857c519921ce755cf
|
File details
Details for the file biquad-0.5-py3-none-any.whl.
File metadata
- Download URL: biquad-0.5-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed4740636c22720503e309d18bb7692b66f53090857caaed86dfce0a620967f5
|
|
| MD5 |
2f319f62a6ff3e4263f1382ce7dc09c6
|
|
| BLAKE2b-256 |
82af073e483455bf98a78b857a5e61501fc0517b40296bec0f117d445fddaf63
|