Tools for audio/signal processing and package management.
Project description
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.
Audio Processing Made Simple
Load and Save Audio Files
Read audio files with automatic stereo conversion and sample rate control:
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:
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:
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:
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:
# From your terminal or command prompt
python -m Z0Z_tools.pipAnything /path/to/unpackaged/code
Installation
pip install Z0Z_tools
My recovery
How to code
Coding One Step at a Time:
- WRITE CODE.
- Don't write stupid code that's hard to revise.
- Write good code.
- When revising, write better code.
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
File details
Details for the file z0z_tools-1.0.2.tar.gz.
File metadata
- Download URL: z0z_tools-1.0.2.tar.gz
- Upload date:
- Size: 38.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42170e8833b01b288c425bb52c205e6898b9c061f6e7de49ca060db089404cc4
|
|
| MD5 |
88e9508ee51c888b4d8731684f712662
|
|
| BLAKE2b-256 |
0b7aba06d26713630e5373e19ebfd59e8e5309219a8534324344dafa27325414
|