rconvolve
Fast convolution and impulse response extraction for audio applications in Rust.
Overview
rconvolve provides FFT-based convolution and deconvolution for audio processing. It supports:
- Batch and real-time convolution for applying impulse responses to audio
- Exponential sine sweep generation for acoustic measurement
- Impulse response extraction from recorded sweeps via deconvolution
- Mono, stereo, and true stereo (4-channel matrix) processing
- WebAssembly support for browser-based applications
no_stdcompatibility (requiresalloc) for embedded systems
Live Demo: Try the WebAssembly demo at rconvolve.pages.dev
Installation
Add to your Cargo.toml:
[]
= "*"
Feature Flags
| Feature | Default | Description |
|---|---|---|
std |
Yes | Enables standard library. Disable for no_std environments. |
wasm |
No | Enables WebAssembly bindings via wasm-bindgen. |
Quick Start
Batch Convolution
use convolve;
let dry_audio = vec!;
let impulse_response = vec!;
let wet_audio = apply_ir?;
# Ok::
Real-Time Convolution
use PartitionedConvolution;
let impulse_response = vec!;
let input_block = vec!;
let mut processor = new?;
let output = processor.process_block?;
# Ok::
Impulse Response Extraction
use ;
let sweep_signal = exponential?;
let recorded_response = vec!; // Your recorded sweep response
let ir = extract_ir?;
# Ok::
Examples
The crate includes some examples:
apply_reverb
Apply convolution reverb to a WAV file:
realtime_reverb
Real-time convolution reverb using system audio input/output:
simple_wav_to_ir
Convert a recorded sweep to an impulse response:
WebAssembly
See the full documentation for the WASM API reference, or try the live demo.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.