Skip to content

State Variable Filters for real-time audio in pure Rust.

Notifications You must be signed in to change notification settings

neodsp/simper-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simper-filter

State Variable IIR Filters for real-time audio in pure Rust. Based on the filter design by Andrew Simper (Cytomic).

Example

use simper_filter::Svf;

// initialize filter with parameters
let mut filter = Svf::new(FilterType::Lowpass, 44100.0, 400.0, 0.771, 0.0);

// update filter with new parameters
filter.set(FilterType::Lowpass, 44100.0, 400.0, 0.771, 0.0);

// get response for specific frequency as complex number
let response = filter.get_response(400.0);

// process a whole buffer
let input = vec![0.0; 100];
let mut output = vec![0.0; 100];
filter.process(&input, &mut output);

// or process on sample basis
for sample in output.iter_mut() {
    *sample = filter.tick(*sample);
}

About

State Variable Filters for real-time audio in pure Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages