Metadata-Version: 2.5
Name: clear-dsp
Version: 0.1.0
Summary: A lightweight JAX-optimized package of pure functions for digital signal processing
Project-URL: Homepage, https://github.com/APWilwerding/clear-dsp
Project-URL: Repository, https://github.com/APWilwerding/clear-dsp
Project-URL: Issues, https://github.com/APWilwerding/clear-dsp/issues
Project-URL: Documentation, https://github.com/APWilwerding/clear-dsp#readme
Author: Andrew Wilwerding
License-Expression: MIT
License-File: LICENSE
Keywords: audio,digital-signal-processing,dsp,fft,filters,jax,scientific-computing,signal-processing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: jax>=0.4.20
Requires-Dist: jaxlib>=0.4.20
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pre-commit>=3.8; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: docs
Requires-Dist: myst-parser>=3.0; extra == 'docs'
Requires-Dist: sphinx-book-theme>=1.1; extra == 'docs'
Requires-Dist: sphinx>=7.0; extra == 'docs'
Description-Content-Type: text/markdown

# clear-dsp

**A lightweight JAX-optimized package of pure functions for digital signal processing.**

`clear-dsp` provides a clean, functional, and high-performance set of DSP primitives built on [JAX](https://github.com/jax-ml/jax). Every function is pure, JIT-compatible, and designed for composition, autodiff, and acceleration on CPU, GPU, or TPU.

## Design Principles

- **Pure functions only** — no classes, no mutable state, no side effects
- **JAX-native** — fully compatible with `jax.jit`, `jax.vmap`, `jax.grad`, and `jax.pmap`
- **Lightweight** — minimal dependencies (just JAX)
- **Composable** — small, focused building blocks that combine cleanly
- **Type-safe** — full type annotations and mypy-friendly

## Installation

```bash
pip install clear-dsp
```

Or for development:

```bash
git clone https://github.com/yourusername/clear-dsp.git
cd clear-dsp
pip install -e ".[dev]"
```

## Quick Start

```python
import jax.numpy as jnp
from clear_dsp import filters, spectral

# Example: simple low-pass FIR filter (placeholder API)
# signal = jnp.sin(jnp.linspace(0, 10 * jnp.pi, 1000))
# filtered = filters.fir_lowpass(signal, cutoff=0.1, num_taps=51)
```

> **Note:** The API is under active development. Check the source and tests for currently implemented functions.

## Project Structure

```
clear-dsp/
├── src/
│   └── clear_dsp/
│       ├── __init__.py
│       ├── filters.py      # FIR/IIR filters, windowing
│       ├── spectral.py     # FFT-related, spectrograms, STFT
│       ├── windows.py      # Window functions
│       └── ...
├── tests/
├── pyproject.toml
└── README.md
```

## Development

```bash
# Install with development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src tests

# Type check
mypy src
```

## Roadmap (initial ideas)

- Window functions (Hann, Hamming, Blackman, Kaiser, etc.)
- FIR filter design and application
- Basic IIR filters (biquads)
- STFT / ISTFT
- Spectral analysis helpers
- Convolution and correlation
- Resampling
- Envelope detection / Hilbert transform
- Signal analysis

Contributions and suggestions are welcome!

## License

MIT License — see [LICENSE](LICENSE).
