Metadata-Version: 2.4
Name: Z0Z_tools
Version: 1.0.0
Summary: Tools for audio/signal processing and package management.
Author-email: Hunter Hogan <HunterHogan@pm.me>
License: CC-BY-NC-4.0
Project-URL: Donate, https://www.patreon.com/integrated
Project-URL: Homepage, https://github.com/hunterhogan/Z0Z_tools
Project-URL: Issues, https://github.com/hunterhogan/Z0Z_tools/issues
Project-URL: Repository, https://github.com/hunterhogan/Z0Z_tools.git
Keywords: Python,development,tools
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Other Audience
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
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
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
Classifier: Topic :: Multimedia :: Sound/Audio :: Editors
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: System :: Installation/Setup
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: hunterMakesPy
Requires-Dist: numpy
Requires-Dist: packaging
Requires-Dist: resampy
Requires-Dist: scipy
Requires-Dist: soundfile
Requires-Dist: tqdm
Provides-Extra: pytorch
Requires-Dist: torch; extra == "pytorch"
Provides-Extra: testing
Requires-Dist: astToolkit; extra == "testing"
Requires-Dist: mypy; extra == "testing"
Requires-Dist: pandas; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Requires-Dist: pytest-mock; extra == "testing"
Requires-Dist: pytest-xdist; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pyupgrade; extra == "testing"
Requires-Dist: scipy-stubs; extra == "testing"
Requires-Dist: setuptools-scm; extra == "testing"
Requires-Dist: torch; extra == "testing"
Requires-Dist: trove_classifiers; extra == "testing"
Dynamic: license-file

# Z0Z_tools

A comprehensive collection of Python utilities for developers and audio processing enthusiasts. "Z0Z_" indicates a prototype package where individual components may eventually evolve into focused standalone packages or move to existing
packages. Please suggest a good home for the audio processing tools or any of the other functions.

## Why Choose Z0Z_tools?

Z0Z_tools solves common development challenges with clean, well-documented functions that emphasize self-explanatory code and robust error handling.

## Audio Processing Made Simple

### Load and Save Audio Files

Read audio files with automatic stereo conversion and sample rate control:

```python
from Z0Z_tools import readAudioFile, writeWAV

# Load audio with sample rate conversion
waveform = readAudioFile('input.wav', sampleRate=44100)

# Save in WAV format (always 32-bit float)
writeWAV('output.wav', waveform)
```

### Process Multiple Audio Files at Once

Load and process batches of audio files:

```python
from Z0Z_tools import loadWaveforms

# Load multiple files with consistent formatting
array_waveforms = loadWaveforms(['file1.wav', 'file2.wav', 'file3.wav'])

# The result is a unified array with shape (channels, samples, file_count)
```

### Work with Spectrograms

Convert between waveforms and spectrograms:

```python
from Z0Z_tools import stft, halfsine

# Create a spectrogram with a half-sine window
spectrogram = stft(waveform, windowingFunction=halfsine(1024))

# Convert back to a waveform
reconstructed = stft(spectrogram, inverse=True, lengthWaveform=original_length)
```

### Process Audio in the Frequency Domain

Create functions that operate on spectrograms:

```python
from Z0Z_tools import waveformSpectrogramWaveform

def boost_low_frequencies(spectrogram):
    # Boost frequencies below 500 Hz
    spectrogram[:, :10, :] *= 2.0
    return spectrogram

# Create a processor that handles the STFT/ISTFT automatically
processor = waveformSpectrogramWaveform(boost_low_frequencies)

# Apply the processor to a waveform
processed_waveform = processor(original_waveform)
```

## File System Utilities

### Install Packages Lacking Setup Files

Install unpackaged Python code with a simple command:

```bash
# From your terminal or command prompt
python -m Z0Z_tools.pipAnything /path/to/unpackaged/code
```

## Installation

```bash
pip install Z0Z_tools
```

## My recovery

[![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)

## How to code

Coding One Step at a Time:

0. WRITE CODE.
1. Don't write stupid code that's hard to revise.
2. Write good code.
3. When revising, write better code.

[![CC-BY-NC-4.0](https://github.com/hunterhogan/Z0Z_tools/blob/main/CC-BY-NC-4.0.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
