Skip to main content

Alterable biquad filters

language license pypi

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 and q, 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 and q, if specified in the __call__ method, override the persistent ones.

References

  1. Cookbook formulae for audio EQ biquad filter coefficients by Robert Bristow-Johnson
  2. 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.

Metadata

Release files for biquad 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biquad 0.5
File Size Uploaded Provenance Actions
biquad-0.5.tar.gz 8.8 kB Without provenance Details for biquad-0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for biquad 0.5
File Interpreter ABI Platform Actions
biquad-0.5-py3-none-any.whl Python 3 none any Details for biquad-0.5-py3-none-any.whl

Total release size: 24.1 kB

Release files / biquad-0.5.tar.gz

Download URL biquad-0.5.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3546110c33f14f0bf426f25709fdf5c5f9e7d491feca08d8206033d33507cd61
BLAKE2b-256 checksum
How to use checksums
4e521a70663028f24cb05d176f89b1a412d0710acfcfa5b857c519921ce755cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / biquad-0.5-py3-none-any.whl

Download URL biquad-0.5-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed4740636c22720503e309d18bb7692b66f53090857caaed86dfce0a620967f5
BLAKE2b-256 checksum
How to use checksums
82af073e483455bf98a78b857a5e61501fc0517b40296bec0f117d445fddaf63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Security for biquad 0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page