A differentiable implementation of an all-pole filter in JAX
Project description
jaxpole
This is an implementation of a differentiable time-varying all-pole filter in JAX based on torchlpc.
Install
pip install jaxpole
or locally from source
pip install -e '.[dev]'
How to use
import jax.numpy as jnp
import jax
pole = 0.99 * jnp.exp(1j * jnp.pi / 4)
coeffs = jnp.array([-2 * pole.real, pole.real**2 + pole.imag**2])
x = jax.random.normal(jax.random.PRNGKey(0), (1, 1000)) # (B, T)
A = jnp.tile(coeffs, (1, x.shape[-1], 1)) # (B, T, P)
zi = jnp.zeros((1, 2)) # (B, P)
# filter the signal
y = allpole(x, A, zi)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jaxpole-0.0.3.tar.gz
(9.7 kB
view details)
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 jaxpole-0.0.3.tar.gz.
File metadata
- Download URL: jaxpole-0.0.3.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31f4537c0985d51a30c5321afc15e64a03a14a3bca39429f1c42de6ca33c471f
|
|
| MD5 |
608dc884feb6287c470ad5711c1663ea
|
|
| BLAKE2b-256 |
84c9da59cfc7b09e6904a4ba405c8380e3ae1ccd438099a109341f68ed75aece
|
File details
Details for the file jaxpole-0.0.3-py3-none-any.whl.
File metadata
- Download URL: jaxpole-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a25717242b759a8f4c76e87f282ca5f7613165f13fddf949a17c1156416c055
|
|
| MD5 |
927f068ba042ca01a61c3ad120074ae1
|
|
| BLAKE2b-256 |
cf099dc60b82c7ea913a836168b178056d47c4d7317c615bc850b9bb1cb0765a
|