clear-dsp 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
clear_dsp/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """clear-dsp: Lightweight JAX-optimized pure functions for digital signal processing."""
2
+
3
+ from clear_dsp import filters, spectral, windows
4
+
5
+ __version__ = "0.1.0"
6
+
7
+ __all__ = [
8
+ "filters",
9
+ "spectral",
10
+ "windows",
11
+ "__version__",
12
+ ]
clear_dsp/filters.py ADDED
@@ -0,0 +1,12 @@
1
+ """Filter design and application utilities.
2
+
3
+ All functions are pure and JAX-compatible.
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ import jax.numpy as jnp
9
+ from jax import Array
10
+
11
+ __all__ = [
12
+ ]
clear_dsp/py.typed ADDED
File without changes
clear_dsp/spectral.py ADDED
@@ -0,0 +1,10 @@
1
+ """Spectral analysis utilities built on JAX FFT primitives."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import jax.numpy as jnp
6
+ from jax import Array
7
+
8
+
9
+ __all__ = [
10
+ ]
clear_dsp/windows.py ADDED
@@ -0,0 +1,19 @@
1
+ """Window functions for digital signal processing.
2
+
3
+ All functions return JAX arrays and are pure / JIT-compatible.
4
+ """
5
+
6
+ from __future__ import annotations
7
+
8
+ import jax
9
+ import jax.numpy as jnp
10
+ from jax import Array
11
+
12
+
13
+ def rectangular(n: int) -> Array:
14
+ """Rectangular (boxcar) window of length ``n``."""
15
+ return jnp.ones(n, dtype=jnp.float32)
16
+
17
+ __all__ = [
18
+ "rectangular",
19
+ ]
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.5
2
+ Name: clear-dsp
3
+ Version: 0.1.0
4
+ Summary: A lightweight JAX-optimized package of pure functions for digital signal processing
5
+ Project-URL: Homepage, https://github.com/APWilwerding/clear-dsp
6
+ Project-URL: Repository, https://github.com/APWilwerding/clear-dsp
7
+ Project-URL: Issues, https://github.com/APWilwerding/clear-dsp/issues
8
+ Project-URL: Documentation, https://github.com/APWilwerding/clear-dsp#readme
9
+ Author: Andrew Wilwerding
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: audio,digital-signal-processing,dsp,fft,filters,jax,scientific-computing,signal-processing
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
24
+ Classifier: Topic :: Scientific/Engineering
25
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
26
+ Classifier: Typing :: Typed
27
+ Requires-Python: >=3.10
28
+ Requires-Dist: jax>=0.4.20
29
+ Requires-Dist: jaxlib>=0.4.20
30
+ Provides-Extra: dev
31
+ Requires-Dist: mypy>=1.11; extra == 'dev'
32
+ Requires-Dist: pre-commit>=3.8; extra == 'dev'
33
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
34
+ Requires-Dist: pytest>=8.0; extra == 'dev'
35
+ Requires-Dist: ruff>=0.6; extra == 'dev'
36
+ Provides-Extra: docs
37
+ Requires-Dist: myst-parser>=3.0; extra == 'docs'
38
+ Requires-Dist: sphinx-book-theme>=1.1; extra == 'docs'
39
+ Requires-Dist: sphinx>=7.0; extra == 'docs'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # clear-dsp
43
+
44
+ **A lightweight JAX-optimized package of pure functions for digital signal processing.**
45
+
46
+ `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.
47
+
48
+ ## Design Principles
49
+
50
+ - **Pure functions only** — no classes, no mutable state, no side effects
51
+ - **JAX-native** — fully compatible with `jax.jit`, `jax.vmap`, `jax.grad`, and `jax.pmap`
52
+ - **Lightweight** — minimal dependencies (just JAX)
53
+ - **Composable** — small, focused building blocks that combine cleanly
54
+ - **Type-safe** — full type annotations and mypy-friendly
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ pip install clear-dsp
60
+ ```
61
+
62
+ Or for development:
63
+
64
+ ```bash
65
+ git clone https://github.com/yourusername/clear-dsp.git
66
+ cd clear-dsp
67
+ pip install -e ".[dev]"
68
+ ```
69
+
70
+ ## Quick Start
71
+
72
+ ```python
73
+ import jax.numpy as jnp
74
+ from clear_dsp import filters, spectral
75
+
76
+ # Example: simple low-pass FIR filter (placeholder API)
77
+ # signal = jnp.sin(jnp.linspace(0, 10 * jnp.pi, 1000))
78
+ # filtered = filters.fir_lowpass(signal, cutoff=0.1, num_taps=51)
79
+ ```
80
+
81
+ > **Note:** The API is under active development. Check the source and tests for currently implemented functions.
82
+
83
+ ## Project Structure
84
+
85
+ ```
86
+ clear-dsp/
87
+ ├── src/
88
+ │ └── clear_dsp/
89
+ │ ├── __init__.py
90
+ │ ├── filters.py # FIR/IIR filters, windowing
91
+ │ ├── spectral.py # FFT-related, spectrograms, STFT
92
+ │ ├── windows.py # Window functions
93
+ │ └── ...
94
+ ├── tests/
95
+ ├── pyproject.toml
96
+ └── README.md
97
+ ```
98
+
99
+ ## Development
100
+
101
+ ```bash
102
+ # Install with development dependencies
103
+ pip install -e ".[dev]"
104
+
105
+ # Run tests
106
+ pytest
107
+
108
+ # Lint
109
+ ruff check src tests
110
+
111
+ # Type check
112
+ mypy src
113
+ ```
114
+
115
+ ## Roadmap (initial ideas)
116
+
117
+ - Window functions (Hann, Hamming, Blackman, Kaiser, etc.)
118
+ - FIR filter design and application
119
+ - Basic IIR filters (biquads)
120
+ - STFT / ISTFT
121
+ - Spectral analysis helpers
122
+ - Convolution and correlation
123
+ - Resampling
124
+ - Envelope detection / Hilbert transform
125
+ - Signal analysis
126
+
127
+ Contributions and suggestions are welcome!
128
+
129
+ ## License
130
+
131
+ MIT License — see [LICENSE](LICENSE).
@@ -0,0 +1,9 @@
1
+ clear_dsp/__init__.py,sha256=qIgWndPJ_IJ0Xei6Pwlg_k2-nbfMnWuI1HwoD7og_yE,242
2
+ clear_dsp/filters.py,sha256=jFHmelb8uk53XdMgYdTj6-LLtW97v4Bj-hK2PO5yaAs,190
3
+ clear_dsp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ clear_dsp/spectral.py,sha256=_cGC2qraDmw3NcZNwZJNJrhDTURxjHIRp2Ic-3sPso4,162
5
+ clear_dsp/windows.py,sha256=z_LEqf1ogXG7WEix8pTAwpKz-Q2akPyhf8ksK0v9W7o,380
6
+ clear_dsp-0.1.0.dist-info/METADATA,sha256=3-_U4N7EdHd_B336HlWcyeFR4UKkS9wFV5KOqhNL-oo,4067
7
+ clear_dsp-0.1.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
8
+ clear_dsp-0.1.0.dist-info/licenses/LICENSE,sha256=0krBZxoHKGOpbznOeyRyij2jSetRfOOiHsA2Aiklx8A,1074
9
+ clear_dsp-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrew Wilwerding
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.