pub struct PVoc { /* private fields */ }Expand description
Phase vocoder object
Implementations§
Source§impl PVoc
impl PVoc
Sourcepub fn new(win_size: usize, hop_size: usize) -> Result<Self>
pub fn new(win_size: usize, hop_size: usize) -> Result<Self>
Create phase vocoder object
win_sizeSize of analysis buffer (and length the FFT transform)hop_sizeStep size between two consecutive analysis
Sourcepub fn with_window(self, window_type: WindowType) -> Result<Self>
pub fn with_window(self, window_type: WindowType) -> Result<Self>
Select window type
Sourcepub fn do_<'i, 'o, I, O>(&mut self, input: I, fftgrain: O) -> Status
pub fn do_<'i, 'o, I, O>(&mut self, input: I, fftgrain: O) -> Status
Compute spectral frame
This function accepts an input vector of size hop_size.
The analysis buffer is rotated and filled with the new data.
After windowing of this signal window, the Fourier transform
is computed and returned in fftgrain as two vectors, magnitude
and phase.
inputNew input signal (hop_sizelong)fftgrainOutput spectral frame (win_sizelong)
Sourcepub fn rdo<'i, 'o, I, O>(&mut self, fftgrain: I, output: O) -> Status
pub fn rdo<'i, 'o, I, O>(&mut self, fftgrain: I, output: O) -> Status
Compute signal from spectral frame
This function takes an input spectral frame fftgrain of size win_size
and computes its inverse Fourier transform. Overlap-add synthesis is then
computed using the previously synthetised frames, and the output stored in out.
fftgrainInput spectral frame (win_sizelong)outputOutput signal (hop_sizelong)
Sourcepub fn set_window(&mut self, window_type: WindowType) -> Status
pub fn set_window(&mut self, window_type: WindowType) -> Status
Set window type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PVoc
impl RefUnwindSafe for PVoc
impl !Send for PVoc
impl !Sync for PVoc
impl Unpin for PVoc
impl UnwindSafe for PVoc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more