Struct pvoc::PhaseVocoder [] [src]

pub struct PhaseVocoder { /* fields omitted */ }

A phase vocoder.

Roughly translated from http://blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft/

Methods

impl PhaseVocoder
[src]

Constructs a new phase vocoder.

channels is the number of channels of audio.

sample_rate is the sample rate.

frame_size is the fourier transform size. This should be a power of 2 for optimal performance. Will be rounded to a multiple of time_res.

time_res is the number of frames to overlap.

Reads samples from input, processes the samples, then resynthesizes as many samples as possible into output. Returns the number of samples written to output.

processor is a function to manipulate the spectrum before it is resynthesized. Its arguments are respectively num_channels, num_bins, analysis_output and synthesis_input.

Samples are expected to be normalized to the range [-1, 1].