Crates.io | goertzel-filter |
lib.rs | goertzel-filter |
version | 0.2.0 |
source | src |
created_at | 2016-10-08 20:17:51.139195 |
updated_at | 2016-10-13 03:34:35.216192 |
description | Implementation of Goertzel filter-based single-frequency DFT. Accurate to 0.1%. |
homepage | |
repository | https://gitlab.com/bright-star/goertzel |
max_upload_size | |
id | 6789 |
size | 34,526 |
Rust implementation of the Goertzel filter.
The Goertzel filter is faster than the FFT for a small range of frequencies of interest.
pub fn filter_naive(input: &Vec<f64>, linear_freq: f64) -> Vec<Complex<f64>>
Just applies the filter equations and gives you the complete output.
pub fn dft(input: &Vec<f64>, linear_freq: f64) -> Complex<f64>
Computes the associated (closest) DFT term to a given linear frequency.
pub fn dft_power(input: &Vec<f64>, linear_freq: f64) -> f64
Computes the power of the signal at a given DFT bin.