audioviz

Audioviz is a simple and easy to use library that helps you visualise raw audio-data

This is done with the help of the Fast Fourier Transform algorithm, some frequency-space and volume normalisation and optional effects like gravity.

There are currently only high-level abstractions for live visualisation, where it is consistently fed with data,

but mp3 or wav file abstractions might be added in the future.

Demo

demo

implementations

Features

Rust features

| feature | description | |---------|-------------| | cpal | capturing of systemd audio | | serde | implementation of Serialize and Deserialize traits |

# Code Example with spectrum ``rs // make sure to enable thecpal` feature for audio capturing from system use audioviz::audio_capture::{config::Config as CaptureConfig, capture::Capture}; use audioviz::spectrum::stream::{Stream, StreamController}; use audioviz::spectrum::config::StreamConfig;

fn main() { // captures audio from system using cpal let capture = Capture::init(CaptureConfig::default()) .unwrap();

 // continuous processing of data received from capture
 let audio = Stream::init_with_capture(&capture, StreamConfig::default());
 let audio_controller: StreamController = audio.get_controller();

 loop {
     // stored as Vec<`spectralizer::Frequency`>
     let data = audio_controller.get_frequencies();
     /*
     do something with data ...
     */
 }

} ```

## design goals * highly and easily configurable * high level abstraction but preserving the possibility to do everything manually * pretty output

### non design goals * lightweight * blazingly fast * scientific accurate output