High-performance Python DSP toolkit built on C++ libraries via nanobind
Project description
cydsp
High-performance Python DSP toolkit built on C++ libraries via nanobind. All processing uses float32 in a planar [channels, frames] layout with block-based APIs that accept and return AudioBuffer objects.
Backends
| Library | License | What it provides |
|---|---|---|
| signalsmith-dsp | MIT | Filters, FFT, delay, envelopes, spectral processing, rates, mix |
| DaisySP | MIT | Oscillators, effects, dynamics, drums, physical modeling, noise |
| STK | MIT | Physical modeling instruments, generators, filters, delays, effects |
| madronalib | MIT | FDN reverbs, resampling, generators, projections, windows |
| HISSTools Library | BSD-3 | Convolution, spectral processing, statistical analysis, windows |
| CHOC | ISC | FLAC codec (read/write) |
| GrainflowLib | MIT | Granular synthesis (grain collections, panning, recording, phasor) |
Requirements
- Python >= 3.10
- numpy
- C++17 compiler
- CMake >= 3.15
Install
pip install cydsp
Or if you prefer to build from source (requires uv and cmake):
git clone https://github.com/shakfu/cydsp.git
cd cydsp
uv sync # install dependencies + build extension
uv run pytest # run tests
uv build # build wheel
Use make help for additional targets (build, test, lint, format, typecheck, qa, coverage, etc.).
CLI
cydsp ships with a command-line interface accessible via cydsp or python -m cydsp.
# File info
cydsp info drums.wav
cydsp info drums.wav --json
# Process with effect chain (single file)
cydsp process input.wav -o output.wav \
-f highpass:cutoff_hz=80 \
-f compress:ratio=4,threshold=-18 \
-f normalize_peak:target_db=-1
# Apply a preset
cydsp process vocals.wav -o out.wav -p vocal_chain
cydsp process input.wav -o out.wav -f lowpass:cutoff_hz=12000 -p master
# Batch mode -- process multiple files to a directory
cydsp process *.wav -O out/ -f lowpass:cutoff_hz=2000
# Dry run -- show chain without reading/writing files
cydsp process input.wav -n -f highpass:cutoff_hz=80 -f compress:ratio=4
# Verbose / quiet
cydsp -v process input.wav -o out.wav -f lowpass:cutoff_hz=1000
cydsp -q process input.wav -o out.wav -p master
# Analyze
cydsp analyze input.wav loudness
cydsp analyze input.wav pitch --fmin=80 --fmax=800
cydsp analyze input.wav onsets --json
cydsp analyze input.wav info
# Synthesize
cydsp synth tone.wav sine --freq=440 --duration=2.0
cydsp synth kick.wav drum --type=analog_bass_drum --freq=60
cydsp synth melody.wav note --instrument=clarinet --freq=440 --duration=1.0
cydsp synth seq.wav sequence --instrument=flute \
--notes='[{"freq":440,"start":0,"dur":0.5},{"freq":554,"start":0.5,"dur":0.5}]'
# Convert
cydsp convert input.wav output.flac
cydsp convert input.wav output.wav --sample-rate=44100 --channels=1 -b 24
# Presets
cydsp preset list
cydsp preset list spatial
cydsp preset info master
cydsp preset apply master input.wav output.wav target_lufs=-16
# Pipe (stdin/stdout streaming)
cat input.wav | cydsp pipe -f lowpass:cutoff_hz=1000 > output.wav
cat input.wav | cydsp pipe -p telephone > output.wav
cydsp pipe -f highpass:cutoff_hz=80 < in.wav | cydsp pipe -f compress:ratio=4 > out.wav
# Benchmark
cydsp benchmark lowpass:cutoff_hz=1000
cydsp benchmark compress:ratio=4,threshold=-20 -n 100 --duration=2.0
cydsp benchmark reverb:preset=hall --channels=2 --json
# List available functions
cydsp list
cydsp list filters
cydsp list effects
Presets
30 built-in presets across 8 categories:
| Category | Presets |
|---|---|
| mastering | master, master_pop, master_hiphop, master_classical, master_edm, master_podcast |
| voice | vocal_chain |
| spatial | room, hall, plate, cathedral, chamber |
| dynamics | gentle_compress, heavy_compress, brick_wall |
| creative | radio, underwater, megaphone, tape_warmth, shimmer, vaporwave, walkie_talkie |
| lofi | telephone, lo_fi, vinyl, 8bit |
| cleanup | dc_remove, de_noise, normalize, normalize_lufs |
Quick start
from cydsp.buffer import AudioBuffer
from cydsp import effects, analysis
# Read, process, write
buf = (
AudioBuffer.from_file("input.wav")
.pipe(effects.highpass, freq=80.0)
.pipe(effects.compress, threshold=-18.0, ratio=4.0)
.pipe(analysis.normalize_lufs, target_lufs=-14.0)
)
buf.write("output.wav")
Modules
cydsp.buffer -- AudioBuffer
The central data type. A 2D float32 array with shape [channels, frames] plus metadata (sample_rate, channel_layout, label).
from cydsp.buffer import AudioBuffer
# Construction
buf = AudioBuffer(np.zeros((2, 44100), dtype=np.float32), sample_rate=44100)
buf = AudioBuffer.from_file("input.wav") # read WAV/FLAC
buf = AudioBuffer.sine(440.0, channels=1, frames=44100, sample_rate=44100)
buf = AudioBuffer.noise(channels=2, frames=44100, sample_rate=44100)
buf = AudioBuffer.zeros(channels=1, frames=1024, sample_rate=44100)
buf = AudioBuffer.impulse(channels=1, frames=1024, sample_rate=44100)
# Properties
buf.channels # number of channels
buf.frames # number of frames
buf.sample_rate # sample rate in Hz
buf.duration # duration in seconds
buf.mono # 1D view (mono buffers only)
buf.channel(0) # 1D view of channel 0
# Channel operations
buf.to_mono("mean") # downmix
buf.to_channels(2) # upmix mono to stereo
AudioBuffer.concat_channels(a, b) # stack channels
# Arithmetic
buf + other # add
buf * 0.5 # scale
buf.gain_db(-6.0) # apply dB gain
# I/O
buf.write("output.wav") # write WAV/FLAC (detected by extension)
buf.write("output.flac", bit_depth=24)
# Pipeline
buf.pipe(effects.lowpass, freq=1000.0)
cydsp.io -- Audio file I/O
Read and write WAV (8/16/24/32-bit PCM) and FLAC (16/24-bit) files. Zero external dependencies for WAV (uses stdlib wave); FLAC uses the CHOC codec.
from cydsp import io
buf = io.read("file.wav") # auto-detect by extension
buf = io.read("file.flac")
io.write("out.wav", buf) # 16-bit default
io.write("out.flac", buf, bit_depth=24)
# Format-specific
buf = io.read_wav("file.wav")
io.write_wav("out.wav", buf, bit_depth=24)
buf = io.read_flac("file.flac")
io.write_flac("out.flac", buf, bit_depth=16)
# Byte-level (for stdin/stdout/pipe workflows)
buf = io.read_wav_bytes(raw_bytes) # parse WAV from bytes
raw = io.write_wav_bytes(buf, bit_depth=16) # serialize to WAV bytes
cydsp.ops -- Core DSP operations
Low-level building blocks: delay, envelopes, FFT, convolution, sample rates, mixing, panning, normalization, cross-correlation, Hilbert transform, median filter, LMS adaptive filter.
from cydsp import ops
# Delay
ops.delay(buf, delay_samples=100)
ops.delay_varying(buf, delays=delay_curve)
# Envelopes
ops.box_filter(buf, length=64)
ops.box_stack_filter(buf, size=32, layers=4)
ops.peak_hold(buf, length=128)
ops.peak_decay(buf, length=256)
# FFT
spectra = ops.rfft(buf) # forward real FFT
buf = ops.irfft(spectra, size=1024, sample_rate=44100) # inverse
# Convolution
ops.convolve(buf, ir, normalize=True)
# Sample rates
ops.upsample_2x(buf)
ops.oversample_roundtrip(buf)
# Mixing
ops.hadamard(buf) # Hadamard matrix mixing
ops.householder(buf) # Householder reflection
ops.crossfade(buf_a, buf_b, x=0.5)
ops.mix_buffers(a, b, c, gains=[1.0, 0.5, 0.8])
# LFO
lfo_signal = ops.lfo(frames=44100, low=0.0, high=1.0, rate=2.0)
# Normalization
ops.normalize_peak(buf, target_db=-1.0)
ops.trim_silence(buf, threshold_db=-60.0)
# Fades
ops.fade_in(buf, duration_ms=10.0)
ops.fade_out(buf, duration_ms=50.0, curve="exp")
# Panning and stereo
ops.pan(buf, position=0.3) # equal-power pan
ops.mid_side_encode(buf)
ops.mid_side_decode(buf)
ops.stereo_widen(buf, width=1.5)
# Cross-correlation
corr = ops.xcorr(buf_a, buf_b) # cross-correlation
auto = ops.xcorr(buf) # autocorrelation
# Hilbert / envelope
env = ops.hilbert(buf) # analytic signal envelope
env = ops.envelope(buf) # alias for hilbert
# Median filter
ops.median_filter(buf, kernel_size=5)
# LMS adaptive filter
output, error = ops.lms_filter(buf, ref, filter_len=32, step_size=0.01)
cydsp.effects -- Filters, effects, dynamics, mastering
53 functions covering signalsmith biquad filters, DaisySP effects/filters/dynamics, composed effects, reverbs, mastering chains, STK effects, and automatic gain control.
Biquad filters (signalsmith)
All filter functions take freq in Hz, auto-converted to normalized frequency.
from cydsp import effects
effects.lowpass(buf, freq=1000.0, q=0.707)
effects.highpass(buf, freq=80.0)
effects.bandpass(buf, freq=1000.0, q=2.0)
effects.notch(buf, freq=50.0)
effects.peak(buf, freq=1000.0, gain=2.0, q=1.0)
effects.peak_db(buf, freq=1000.0, db=6.0)
effects.high_shelf(buf, freq=8000.0, gain=1.5)
effects.high_shelf_db(buf, freq=8000.0, db=3.0)
effects.low_shelf(buf, freq=200.0, gain=0.8)
effects.low_shelf_db(buf, freq=200.0, db=-2.0)
effects.allpass(buf, freq=1000.0)
DaisySP effects
effects.autowah(buf, wah=0.5)
effects.chorus(buf, rate=1.0, depth=0.5)
effects.decimator(buf, downsample_factor=0.5, bitcrush_factor=0.5)
effects.flanger(buf, rate=0.2, depth=0.5, feedback=0.5)
effects.overdrive(buf, drive=0.7)
effects.phaser(buf, rate=0.3, depth=0.5, feedback=0.5)
effects.pitch_shift(buf, semitones=12.0)
effects.sample_rate_reduce(buf, factor=0.5)
effects.tremolo(buf, rate=5.0, depth=0.8)
effects.wavefold(buf, gain=2.0)
effects.bitcrush(buf, bits=8)
effects.fold(buf, gain=2.0)
effects.reverb_sc(buf, feedback=0.8, lpfreq=10000.0)
effects.dc_block(buf)
DaisySP filters
effects.svf_lowpass(buf, freq=1000.0, res=0.5)
effects.svf_highpass(buf, freq=200.0, res=0.5)
effects.svf_bandpass(buf, freq=1000.0, res=0.7)
effects.svf_notch(buf, freq=1000.0, res=0.5)
effects.svf_peak(buf, freq=1000.0, res=0.8)
effects.ladder_filter(buf, freq=800.0, res=0.6, mode="lp24")
effects.moog_ladder(buf, freq=1000.0, res=0.7)
effects.tone_lowpass(buf, freq=2000.0)
effects.tone_highpass(buf, freq=100.0)
effects.modal_bandpass(buf, freq=440.0, q=50.0)
effects.comb_filter(buf, freq=500.0, revtime=0.5)
Dynamics
effects.compress(buf, threshold=-20.0, ratio=4.0, attack=0.01, release=0.1)
effects.limit(buf, threshold=-1.0)
Composed effects
effects.saturate(buf, drive=0.7, mode="soft") # soft, hard, or tape
effects.exciter(buf, freq=3000.0, drive=0.4)
effects.de_esser(buf, freq=6000.0, threshold=-20.0)
effects.parallel_compress(buf, mix=0.5, threshold=-24.0, ratio=8.0)
effects.noise_gate(buf, threshold_db=-40.0)
effects.stereo_delay(buf, delay_l=0.25, delay_r=0.375, feedback=0.4, ping_pong=True)
effects.multiband_compress(buf, crossovers=[200.0, 2000.0, 8000.0])
Reverb
effects.reverb(buf, preset="hall", decay=2.0, mix=0.3)
# Presets: room, hall, plate, chamber, cathedral
Mastering and vocal chains
effects.master(buf, target_lufs=-14.0)
effects.vocal_chain(buf, de_ess_freq=6000.0, comp_threshold=-18.0)
STK effects
effects.stk_reverb(buf, algorithm="freeverb", decay=1.5, mix=0.3)
effects.stk_chorus(buf, mod_depth=0.02, mod_freq=1.0, mix=0.5)
effects.stk_echo(buf, delay=0.25, max_delay=1.0, mix=0.5)
Automatic gain control
effects.agc(buf, target_level=1.0, max_gain_db=60.0, average_len=100, attack=0.01, release=0.01)
cydsp.spectral -- STFT and spectral processing
Short-time Fourier transform, spectral utilities, and spectral transforms.
from cydsp import spectral
# STFT
spec = spectral.stft(buf, window_size=2048, hop_size=512)
buf = spectral.istft(spec)
# Spectral utilities
mag = spectral.magnitude(spec)
ph = spectral.phase(spec)
spec = spectral.from_polar(mag, ph)
spec = spectral.apply_mask(spec, mask)
spec = spectral.spectral_gate(spec, threshold_db=-40.0)
spec = spectral.spectral_emphasis(spec, low_db=-3.0, high_db=3.0)
freq = spectral.bin_freq(bin_index=10, fft_size=2048, sample_rate=44100)
b = spectral.freq_to_bin(freq=1000.0, fft_size=2048, sample_rate=44100)
# Spectral transforms
stretched = spectral.time_stretch(buf, rate=0.5) # half speed
locked = spectral.phase_lock(spec) # identity phase-locking
frozen = spectral.spectral_freeze(buf, frame_index=10) # frozen texture
morphed = spectral.spectral_morph(spec_a, spec_b, x=0.5)
shifted = spectral.pitch_shift_spectral(buf, semitones=5.0)
denoised = spectral.spectral_denoise(buf, noise_frames=10)
# EQ matching
matched = spectral.eq_match(source_buf, target_buf, strength=1.0)
cydsp.synthesis -- Oscillators, noise, drums, physical modeling
Sound generators using DaisySP and STK backends.
from cydsp import synthesis
# Oscillators
synthesis.oscillator(freq=440.0, waveform="saw", frames=44100)
synthesis.fm2(freq=440.0, ratio=2.0, index=1.0, frames=44100)
synthesis.formant_oscillator(freq=440.0, formant_freq=800.0, frames=44100)
synthesis.bl_oscillator(freq=440.0, waveform="saw", frames=44100)
# Noise
synthesis.white_noise(frames=44100, amp=0.5)
synthesis.clocked_noise(freq=1000.0, frames=44100)
synthesis.dust(density=100.0, frames=44100)
# Drums
synthesis.analog_bass_drum(freq=60.0, frames=44100)
synthesis.analog_snare_drum(freq=200.0, frames=44100)
synthesis.hihat(freq=3000.0, frames=44100)
synthesis.synthetic_bass_drum(freq=60.0, frames=44100)
synthesis.synthetic_snare_drum(freq=200.0, frames=44100)
# Physical modeling
synthesis.karplus_strong(buf, freq=440.0, brightness=0.5, damping=0.5)
synthesis.modal_voice(freq=440.0, frames=44100)
synthesis.string_voice(freq=440.0, frames=44100)
synthesis.pluck(freq=440.0, frames=44100)
synthesis.drip(freq=1000.0, frames=44100)
# STK synthesis
synthesis.synth_note("clarinet", freq=440.0, amplitude=0.8, duration=1.0)
synthesis.synth_sequence("flute", notes=[
{"freq": 440.0, "amp": 0.8, "start": 0.0, "dur": 0.5},
{"freq": 554.37, "amp": 0.7, "start": 0.5, "dur": 0.5},
])
Available STK instruments: clarinet, flute, brass, bowed, plucked, sitar, stifkarp, saxofony, recorder, blowbotl, blowhole, whistle.
cydsp.analysis -- Loudness, spectral features, pitch, onsets, resampling
from cydsp import analysis
# Loudness (ITU-R BS.1770-4)
lufs = analysis.loudness_lufs(buf)
buf = analysis.normalize_lufs(buf, target_lufs=-14.0)
# Spectral features
centroid = analysis.spectral_centroid(buf)
bandwidth = analysis.spectral_bandwidth(buf)
rolloff = analysis.spectral_rolloff(buf, percentile=0.85)
flux = analysis.spectral_flux(buf, rectify=True)
flatness = analysis.spectral_flatness_curve(buf)
chroma = analysis.chromagram(buf, n_chroma=12, tuning_hz=440.0)
# Pitch detection (YIN algorithm)
f0, confidence = analysis.pitch_detect(buf, method="yin", fmin=50.0, fmax=2000.0)
# Onset detection
onsets = analysis.onset_detect(buf, method="spectral_flux", threshold=0.5)
# Resampling
buf_48k = analysis.resample(buf, target_sr=48000.0) # madronalib backend
buf_22k = analysis.resample_fft(buf, target_sr=22050.0) # FFT-based
# GCC-PHAT delay estimation
delay_sec, corr = analysis.gcc_phat(buf, ref)
cydsp.stream -- Real-time streaming infrastructure
Block-based processing, ring buffers, and processor chains for streaming audio.
from cydsp.stream import (
RingBuffer, BlockProcessor, CallbackProcessor, ProcessorChain, process_blocks
)
# Ring buffer
rb = RingBuffer(channels=2, capacity=8192)
rb.write(frame_data)
chunk = rb.read(512)
# Block processor
class MyProcessor(BlockProcessor):
def process_block(self, block):
return block * 0.5
proc = MyProcessor(block_size=512)
out = proc.process(buf)
# Callback processor
proc = CallbackProcessor(block_size=512, fn=lambda b: b * 0.5)
# Chain processors
chain = ProcessorChain([proc1, proc2, proc3])
out = chain.process(buf)
# Process with overlap-add
out = process_blocks(buf, block_size=2048, hop_size=512, fn=my_spectral_fn)
cydsp._core.grainflow -- Granular synthesis (low-level)
Direct access to GrainflowLib's granular synthesis engine.
from cydsp._core import grainflow as gf
# Create a buffer and fill with audio data
buf = gf.GfBuffer(4096, 1, 48000)
buf.set_data(audio_array) # [channels, frames] float32
# Create a grain collection
gc = gf.GrainCollection(num_grains=8, samplerate=48000)
gc.set_buffer(buf, gf.BUF_BUFFER, 0) # 0 = set for all grains
# Set parameters (enum-based or string reflection)
gc.param_set(0, gf.PARAM_RATE, gf.PTYPE_BASE, 1.0)
gc.param_set_str(0, "delayRandom", 10.0)
# Generate a clock and process
phasor = gf.Phasor(rate=10.0, samplerate=48000)
clock = phasor.perform(256).reshape(1, 256)
traversal = np.linspace(0, 0.5, 256, dtype=np.float32).reshape(1, 256)
fm = np.zeros((1, 256), dtype=np.float32)
am = np.zeros((1, 256), dtype=np.float32)
# Returns 8-element tuple: (output, state, progress, playhead, amp, envelope, buf_ch, stream_ch)
result = gc.process(clock, traversal, fm, am, 48000)
grain_output = result[0] # [num_grains, block_size]
# Pan grains to stereo
panner = gf.Panner(in_channels=8, out_channels=2, pan_mode=gf.PAN_STEREO)
panner.set_pan_spread(0.5)
stereo = panner.process(grain_output, result[1], out_channels=2) # [2, block_size]
cydsp._core -- C++ bindings (low-level)
Direct access to the C++ extension module with 13 submodules. All high-level Python modules build on these.
| Submodule | Backend | Contents |
|---|---|---|
filters |
signalsmith | Biquad with 16 filter designs, BiquadDesign enum |
fft |
signalsmith | FFT (complex), RealFFT (real) |
delay |
signalsmith | Delay (linear), DelayCubic (cubic interpolation) |
envelopes |
signalsmith | CubicLfo, BoxFilter, BoxStackFilter, PeakHold, PeakDecayLinear |
spectral |
signalsmith | STFT (multi-channel analysis/synthesis) |
rates |
signalsmith | Oversampler2x |
mix |
signalsmith | Hadamard, Householder, cheap_energy_crossfade |
daisysp |
DaisySP | 9 submodules, ~60 classes (oscillators, filters, effects, dynamics, drums, noise, physical modeling, control, utility) |
stk |
STK | 5 submodules, 39 classes (instruments, generators, filters, delays, effects) |
madronalib |
madronalib | FDN reverbs, resampling, generators, 18 projection functions, 6 window functions |
hisstools |
HISSTools | Convolution (mono/multi), spectral processing, 24 statistics functions, 28 window functions, partial tracking |
choc |
CHOC | FLAC read/write |
grainflow |
GrainflowLib | GfBuffer, GrainCollection, Panner, Recorder, Phasor, 37 enum constants |
from cydsp._core import filters, fft, delay, daisysp, stk, madronalib, hisstools, grainflow
# Example: direct biquad usage
bq = filters.Biquad()
bq.lowpass(0.1, 0.707)
out = bq.process(input_array)
# Example: direct FFT
f = fft.RealFFT(1024)
spectrum = f.fft(signal)
# Example: DaisySP oscillator
osc = daisysp.oscillators.Oscillator()
osc.init(44100.0)
osc.set_freq(440.0)
samples = osc.process(1024)
Full type stubs are provided in _core.pyi for IDE autocompletion and type checking.
Architecture
cydsp/
__init__.py # package root (__version__ only)
__main__.py # CLI entry point (argparse, subcommand handlers)
_cli.py # function/preset registries, fx parser, type coercion
_core.cpython-*.so # compiled C++ extension (nanobind)
_core.pyi # type stubs for C++ extension
_helpers.py # shared private utilities
buffer.py # AudioBuffer class
io.py # audio file I/O (WAV + FLAC)
ops.py # delay, envelopes, FFT, convolution, rates, mix, pan, xcorr, hilbert, median, LMS
effects.py # filters, effects, dynamics, reverb, mastering, AGC
spectral.py # STFT, spectral transforms, eq_match
synthesis.py # oscillators, noise, drums, physical modeling
analysis.py # loudness, spectral features, pitch, onsets, resample, gcc_phat
stream.py # ring buffer, block processors, overlap-add
Demos
16 demo scripts in demos/ showcase the full API surface. Run them all at once:
make demos # uses demos/s01.wav
make demos DEMO_INPUT=my_audio.wav # use a custom input file
Or run individual demos:
uv run python demos/demo_filters.py demos/s01.wav
uv run python demos/demo_reverb.py demos/s01.wav -o /tmp/reverb-output
uv run python demos/demo_distortion.py demos/s01.wav --no-normalize
uv run python demos/demo_synthesis.py # no input file needed
uv run python demos/demo_analysis.py demos/s01.wav # prints to stdout
| Script | Variants | What it demonstrates |
|---|---|---|
demo_filters.py |
13 | Lowpass, highpass, bandpass, notch, peak EQ, high/low shelf |
demo_modulation.py |
10 | Chorus, flanger, phaser, tremolo |
demo_distortion.py |
14 | Overdrive, wavefold, bitcrush, decimator, saturation, fold |
demo_reverb.py |
12 | FDN presets, ReverbSc, STK freeverb/jcrev/nrev/prcrev |
demo_dynamics.py |
9 | Compression, limiting, noise gate, parallel/multiband compression |
demo_delay.py |
8 | Stereo delay, ping-pong, slapback, STK echo |
demo_pitch.py |
10 | Time-domain and spectral pitch shifting |
demo_spectral.py |
12 | Time stretch, phase lock, spectral gate, tilt EQ, freeze |
demo_daisysp_filters.py |
21 | SVF, ladder, moog, tone, modal, comb filters |
demo_composed.py |
13 | Autowah, SR reduce, DC block, exciter, de-esser, vocal chain, mastering, STK chorus |
demo_spectral_extra.py |
8 | Spectral denoise, EQ match, spectral morph |
demo_ops.py |
29 | Delay, vibrato, convolution, envelopes, fades, panning, stereo widening, crossfade |
demo_resample.py |
6 | Madronalib and FFT resampling at 22k/48k/96k |
demo_synthesis.py |
44 | Oscillators, FM, noise, drums, physical modeling, STK instruments (no input file) |
demo_analysis.py |
-- | Loudness, spectral features, pitch, onsets, chromagram (stdout only) |
demo_grainflow.py |
7 | Granular clouds (basic, dense), pitch shift, sparse stochastic, stereo panning, recorder |
File-processing scripts share the same interface:
usage: demo_*.py [-h] [-o OUT_DIR] [-n] infile
positional arguments:
infile Input .wav file
options:
-o, --out-dir DIR Output directory (default: build/demo-output)
-n, --no-normalize Skip peak normalization (may clip on PCM output)
demo_synthesis.py generates sounds from scratch (no input file; takes -o and -n only). demo_analysis.py prints measurements to stdout (no audio output). demo_grainflow.py processes an input file through granular synthesis.
Development
make build # rebuild extension after C++ changes
make test # run 1163 tests
make demos # run all 16 demo scripts
make qa # test + lint + typecheck + format
make coverage # tests with coverage report
License
MIT
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
Built Distributions
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 cydsp-0.1.3.tar.gz.
File metadata
- Download URL: cydsp-0.1.3.tar.gz
- Upload date:
- Size: 36.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ee224cc3efbe3b645b352ec5c08c33e9e7c8b2bde2bdf13646a812bb99f04f5
|
|
| MD5 |
9ef12f3e9b5c9deea91ced99f20bc9ad
|
|
| BLAKE2b-256 |
e82a90818fac6a39676c3f3a2284828a81392d7008e49f20d01e4ff6cd9afaf4
|
File details
Details for the file cydsp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: cydsp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef80799ef8964420cf39f0a0fd1fdeca1c9c59a715e1067af9960bd619ed892e
|
|
| MD5 |
58962ad3f4704224ece27ca8f9336904
|
|
| BLAKE2b-256 |
6a77e611bde12d46df8ec170409be4582e1f4f28615bc2abadc5d54fd61addfc
|
File details
Details for the file cydsp-0.1.3-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 737.3 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cadb6e0ca9ec313b3d016bbf664501334d92b3331a0ea09064dece174375e3d2
|
|
| MD5 |
c75121c0d85287a94efcc28abd067c5d
|
|
| BLAKE2b-256 |
7aeae2e5af1e98a1326e3d6082e7235c36acb6c8f392268cc83efa09995673bd
|
File details
Details for the file cydsp-0.1.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 819.4 kB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4365a1bbed5c5b9fb5633597e8073a096d6f299b8f84695829ab75ba7e556d85
|
|
| MD5 |
44fa800594c4381eff67b15d87adc285
|
|
| BLAKE2b-256 |
dcf8b1bcf6627bdb2cd19e30d665b4cbfe023a2a41a543961e01068f6821800b
|
File details
Details for the file cydsp-0.1.3-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 691.6 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13f511d16d107723c46f06fb35826117cc3f7263bc1e6b908990b63162b15db3
|
|
| MD5 |
eeb8df56a6f1fd4d1e79bca97d6cb0b7
|
|
| BLAKE2b-256 |
0f11295916b780a9876a23867bde736fdd63cf25210fe15e338b78d530795305
|
File details
Details for the file cydsp-0.1.3-cp314-cp314-macosx_10_15_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp314-cp314-macosx_10_15_x86_64.whl
- Upload date:
- Size: 757.9 kB
- Tags: CPython 3.14, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
460e945c34138df97868716a49109f9251d4bd94a8cdf85b0e952f937ba93523
|
|
| MD5 |
aa3dcb18e700d7df4c47f468b599d8bc
|
|
| BLAKE2b-256 |
81299b44639167b9b7ddd0bf8e7186609ada6e640e8c6b77c6b89754cb092f3d
|
File details
Details for the file cydsp-0.1.3-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 715.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
074c149f2500639069aaccdb8d7d7bd74caef63389c92160a7de2fa026b07837
|
|
| MD5 |
f9e560d3652991b2bc7f2e7adb29e9c9
|
|
| BLAKE2b-256 |
cce595d01ace992af39ebc90fff32cb575303716b9231ec5119715950a648710
|
File details
Details for the file cydsp-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 819.0 kB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57bc6da9ee6b0378119a7aad277f80b8e8c1c03d295db9441a3bfaa94911a297
|
|
| MD5 |
13d2333b0e640a703fc63973bc2fca1b
|
|
| BLAKE2b-256 |
e045e99bcace19049f95c22f65a084761965aceaed8d2c6cde77b9034a8b17a3
|
File details
Details for the file cydsp-0.1.3-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 691.6 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa34490e6f9b51c68061f67acc04c6ba7c9a2ae9696ddd3174b565c194050fce
|
|
| MD5 |
d0f8268c0e7c012d59b0a03730239a71
|
|
| BLAKE2b-256 |
dda5f0a089aa3a4707e3f159633937b24e3373b232ab58c285df2969554ad1bd
|
File details
Details for the file cydsp-0.1.3-cp313-cp313-macosx_10_15_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp313-cp313-macosx_10_15_x86_64.whl
- Upload date:
- Size: 757.7 kB
- Tags: CPython 3.13, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37e2fb6bdae2ad47fe149e2591748f69e5d9fa24f9403b315872c4b4b8059258
|
|
| MD5 |
6c2ea7e56e5fcad8010dd6d3b4df645b
|
|
| BLAKE2b-256 |
81d51107fc74e1e1165ade2bcca121c7867f5f622b71030ce4707005a9dd0d03
|
File details
Details for the file cydsp-0.1.3-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 715.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa60e10d25f6f28b8dded416c65b3489579acaf8da4ad4061ff8f76359c57c6
|
|
| MD5 |
b0bcdc47dcfd77a25cde46e23ef53965
|
|
| BLAKE2b-256 |
44c360556afa73c5e13b61209a27c8fef0322b0d1bd4eb6031df6e93383d9aab
|
File details
Details for the file cydsp-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 819.0 kB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5f3426ad2b0d38279a8cebd21386b999e5d5cd6085bc8e668a0a07b8c6a7fc8
|
|
| MD5 |
e64cdd9b19f9253a8d19f8e67691f81c
|
|
| BLAKE2b-256 |
0931efaf74a346220473e1d54a28850a8e379fd73f52ed6355ea5db1087f58da
|
File details
Details for the file cydsp-0.1.3-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 691.6 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a46c57b5a87b214afb74e0d5e4ba2be0bf59704ffed8e5ee2fe2925a0e14245e
|
|
| MD5 |
ef6d716dd805394d8f841d06995d7c87
|
|
| BLAKE2b-256 |
5a0b090d4cb564d293fddea1e9833cbbd76c933c98e032da4fd05998d4d2a86d
|
File details
Details for the file cydsp-0.1.3-cp312-cp312-macosx_10_15_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp312-cp312-macosx_10_15_x86_64.whl
- Upload date:
- Size: 757.8 kB
- Tags: CPython 3.12, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
303d1e98b46aebef4b862d8ade3abb4497b76fab9a7c31395968a1ba9dee408d
|
|
| MD5 |
4edb81c9a1a0d3799494fea18909db56
|
|
| BLAKE2b-256 |
29cb9f05a297694c69c46d535b254124f9652ada1a42adcbd0dfcb43322310c1
|
File details
Details for the file cydsp-0.1.3-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 715.1 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83cc4c8553c68a4a1cc1881d930619413cd5b8b42f23844d251e09a1958ee5a3
|
|
| MD5 |
28b230181110ccfd5941b7812798e9d2
|
|
| BLAKE2b-256 |
45f0e9bfc9982d01e2b4ddb809cca0bc04983250e15dbc64d260a7621939cc03
|
File details
Details for the file cydsp-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 819.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb8e33a2d4dcffeeeb5bd51512d54414d54608c5274305c497125689daf444de
|
|
| MD5 |
8ad3c845267d95dca024ca955cd842b1
|
|
| BLAKE2b-256 |
3a1157c68110fa9be3e4cb6108f0c5fd77880b9c1c8bc4dc46de80b6bb0ecaaf
|
File details
Details for the file cydsp-0.1.3-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 691.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
408b44d91c36994bfeed21462220090a7a6587a27383aa42577894cd5dfd3344
|
|
| MD5 |
1fa9e200a8e9cb66e5138c0b3ac90e4e
|
|
| BLAKE2b-256 |
459eefeb4979fea7d85484e846c1078b9c5a75e12769f120e561141b02df99c4
|
File details
Details for the file cydsp-0.1.3-cp311-cp311-macosx_10_15_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp311-cp311-macosx_10_15_x86_64.whl
- Upload date:
- Size: 753.7 kB
- Tags: CPython 3.11, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
528826138f750c9cdda4d0f928d018ef16c6e7fd574eed08b0cab4a19d8acafb
|
|
| MD5 |
00b58b4eae58275fd02075880d32bcc2
|
|
| BLAKE2b-256 |
6f5a4a4ae29a504082711ea379008a84addeb7ee4a9a603d362b21e46043073e
|
File details
Details for the file cydsp-0.1.3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 714.8 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
616ab90d15c1592401338eb7eb3a8270bbe7c2e2584c95b7b4e6d4a11c2dcd1b
|
|
| MD5 |
92d8e7befab111b4500be80721b4643c
|
|
| BLAKE2b-256 |
4a199d24fde7c5f2f53dbab0bd590f9630cf1f6e2d56e1279f2305dad4d74e7c
|
File details
Details for the file cydsp-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 819.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52fc70402bd9c509b690b25db9b7e0478ef125a7092a2c481d8fe133f01aa9ab
|
|
| MD5 |
ead12538097c9b6d5994575161de0cea
|
|
| BLAKE2b-256 |
aa89f3284f0d3d5a09b3c89562790e34b682b762c8a5f93ac15a470f4b6bba51
|
File details
Details for the file cydsp-0.1.3-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 691.8 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1d1c1604f32e2bfca7e891a3204bb18f69c0d1d868f31c9f490e5808184f119
|
|
| MD5 |
3caf6f02f6421ec097701fb7973b69b3
|
|
| BLAKE2b-256 |
cfa9dea1c0394ca8ce076f5a616b81f40a05a9f79cfb22ac790d23b300b25d8c
|
File details
Details for the file cydsp-0.1.3-cp310-cp310-macosx_10_15_x86_64.whl.
File metadata
- Download URL: cydsp-0.1.3-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 753.3 kB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56d5e8fd79ecfe5b0e03443da0ced39a693784407579ef1ee15d94bbf0f6df3d
|
|
| MD5 |
b20255529732fa3484b8be60a0dd9cbb
|
|
| BLAKE2b-256 |
19d9e426ffeb30b35dbb15a745ff38aa58bec8e8266a9c5484d88feeb8d7c3dd
|