VectorANS is a vector graphics to audio synthesis tool that converts SVG drawings into audio waveforms. It interprets SVG paths as frequency modulation data over time, creating unique sonic textures from visual art.
- SVG to Audio Conversion: Parses SVG files and converts vector paths into audio signals
- Additive Synthesis: Uses multiple oscillators (voices) to create rich, layered sounds
- Configurable Parameters: Control duration, sample rate, frequency range, and more
- Cubic Bézier Curve Support: Handles complex SVG curves with proper monotonic splitting
VectorANS interprets SVG drawings along two axes:
- X-axis (horizontal): Represents time progression
- Y-axis (vertical): Represents frequency (pitch), mapped to a configurable frequency range
Each path in the SVG becomes a "voice" in the synthesizer, and the combined output of all voices creates the final audio.
- CMake 4.1 or higher
- C++17 compatible compiler
mkdir build
cd build
cmake ..
cmake --build ../VectorANS <input_file> [output_file] [duration] [sample_rate] [f_min] [f_max] [logs]input_file(required): Path to the input SVG fileoutput_file(optional): Output WAV file path (default:output.wav)duration(optional): Audio duration in seconds (default:8.0)sample_rate(optional): Sample rate in Hz (default:44100.0)f_min(optional): Minimum frequency in Hz (default:32.0)f_max(optional): Maximum frequency in Hz (default:8192.0)logs(optional): Enable verbose logging (true/false, default:false)
./VectorANS drawing.svg output.wav 10.0 44100 40 10000 trueThis converts drawing.svg to a 10-second audio file with frequencies ranging from 40 Hz to 10 kHz.
- nanosvg: Lightweight SVG parsing library (header-only, included)
MIT License.
Eldar Sadykov