#channel #builder #visualizer #mono #music #cava

cavacore

A rust wrapper of cavacore from the cava music visualizer

1 unstable release

new 0.1.0 Jan 26, 2025

#258 in Audio

Download history 90/week @ 2025-01-21

90 downloads per month

GPL-2.0-or-later

390KB
9K SLoC

C 5K SLoC // 0.1% comments Rust 3K SLoC // 0.0% comments Kotlin 753 SLoC // 0.0% comments GLSL 277 SLoC // 0.1% comments Visual Studio Project 222 SLoC Bitbake 104 SLoC Automake 70 SLoC Batch 68 SLoC Visual Studio Solution 31 SLoC Shell 19 SLoC // 0.3% comments Prolog 18 SLoC NuGet Config 10 SLoC Just 6 SLoC

Contains (JAR file, 60KB) gradle-wrapper.jar, (obscure autoconf code, 13KB) cava/configure.ac

Cava-rs

A rust wrapper for cavacore.

Required dependencies

Example

use cavacore::{Builder, Cavacore, Channel};

// Configure cava with the builder first...
let builder = Builder {
    // we will only listen to one channel
    channel: Channel::Mono,
    .. Builder::default()
};

let mut cava = builder.build().expect("Build cava");

// feed cava with some samples
let mut new_samples: [f64; 3] = [1., 2., 3.];

// and let it give you the bars back
let bars = cava.execute(&mut new_samples);

lib.rs:

A safe rust wrapper of the cavacore engine.

Example

use cavacore::{Builder, Cavacore, Channel};

// Configure cava with the builder first...
let builder = Builder {
    // we will only listen to one channel
    channel: Channel::Mono,
    .. Builder::default()
};

let mut cava = builder.build().expect("Build cava");

// feed cava with some samples
let mut new_samples: [f64; 3] = [1., 2., 3.];

// and let it give you the bars back
let bars = cava.execute(&mut new_samples);

No runtime deps

~0–2.2MB
~45K SLoC