Crate lowpass_filter[][src]

Expand description

This is a no_std Rust library for simple digital low pass filters. You can use it for example to get the low frequencies from a song.

⚠ Prefer crate biquad and use this crate only for educational purposes.

Example

use lowpass_filter::lowpass_filter;

/// Minimal example how to use this crate/how to apply low pass filter.
fn main() {
    // read this from MP3 for example
    let mut mono_audio_data = [0.0, 1.0, -5.0, 1551.0, 141.0, 24.0];
    // mutates the input buffer
    lowpass_filter(&mut mono_audio_data, 44100.0, 120.0);
}

Functions

Applies a single-order lowpass filter with single precisioun to the data provided in the mutable buffer.

Applies a single-order lowpass filter with double precision to the data provided in the mutable buffer.