Struct stft::STFT
[−]
[src]
pub struct STFT<T> { pub window_size: usize, pub step_size: usize, pub fft: FFT<T>, pub window: Option<Vec<T>>, pub sample_ring: SliceRingImpl<T>, pub real_input: Vec<T>, pub complex_input: Vec<Complex<T>>, pub complex_output: Vec<Complex<T>>, }
Fields
window_size: usize
step_size: usize
fft: FFT<T>
window: Option<Vec<T>>
sample_ring: SliceRingImpl<T>
internal ringbuffer used to store samples
real_input: Vec<T>
complex_input: Vec<Complex<T>>
complex_output: Vec<Complex<T>>
Methods
impl<T: Float + Signed + Zero + FromPrimitive + CanRepresentPi> STFT<T>
[src]
fn window_type_to_window_vec(
window_type: WindowType,
window_size: usize
) -> Option<Vec<T>>
window_type: WindowType,
window_size: usize
) -> Option<Vec<T>>
fn new(window_type: WindowType, window_size: usize, step_size: usize) -> STFT<T>
fn new_with_window_vec(
window: Option<Vec<T>>,
window_size: usize,
step_size: usize
) -> STFT<T>
window: Option<Vec<T>>,
window_size: usize,
step_size: usize
) -> STFT<T>
fn output_size(&self) -> usize
fn len(&self) -> usize
fn append_samples(&mut self, input: &[T])
fn contains_enough_to_compute(&self) -> bool
fn compute_complex_column(&mut self, output: &mut [Complex<T>])
Panics
panics unless self.output_size() == output.len()
fn compute_magnitude_column(&mut self, output: &mut [T])
Panics
panics unless self.output_size() == output.len()
fn compute_column(&mut self, output: &mut [T])
fn move_to_next_column(&mut self)
make a step
drops self.step_size
samples from the internal buffer self.sample_ring
.