insta-fun
SVG snapshot testing for FunDSP audio nodes.
Generate visual snapshots of audio processing nodes to catch regressions and verify signal behavior.
Note: Snapshot assertion uses
insta::assert_binary_snapshotwhich is currently experimental.
Usage
use *;
use *;
// Simple snapshot
let node = ;
let svg = snapshot_audio_node;
// With input signal
let filter = lowpass_hz;
let svg = snapshot_audio_node_with_input;
// Custom configuration
let config = with_samples;
let svg = snapshot_audio_node_with_options;
// With a macro
let node = ;
assert_audio_node_snapshot!;
Features
- Visualizes audio node inputs and outputs as SVG waveforms
- Supports multi-channel audio with color-coded traces
- Configurable sample count, SVG dimensions, and processing modes
- Built-in input generators (impulse, sine, custom)
- Batch or tick-by-tick processing
- Assertion macro
Processing Modes
- Tick: Process one sample at a time (default)
- Batch: Process up to 64 samples at once for efficiency
The Unlicense
See LICENSE file for details.