Struct pvoc::PhaseVocoder
[−]
[src]
pub struct PhaseVocoder { // some fields omitted }
Methods
impl PhaseVocoder
[src]
fn new(channels: usize, sample_rate: f64, freq_res: usize, time_res: usize) -> PhaseVocoder
Constructs a new phase vocoder.
channels: number of channels of audio sample_rate: it's the sample rate freq_res: log2 size of fourier transform time_res: number of frames to overlap
fn process<S, F>(&mut self, input: &[&[S]], output: &mut [&mut [S]], processor: F) where S: Float + ToPrimitive + FromPrimitive, F: Fn(usize, usize, &[Vec<Bin>], &mut [Vec<Bin>])
Read samples from input into queue, processs, then fill as much of output as possible.
processor
is a function to manipulate the spectrum before it is resynthesized. It's called
like: processor(num_channels, num_bins, &analysis_output, &mut synthesis_input)
Samples are expected to be normalized to the range [-1, 1].