aubio  0.4.9
Typedefs | Functions
phasevoc.h File Reference

Phase vocoder object. More...

Go to the source code of this file.

Typedefs

typedef struct _aubio_pvoc_t aubio_pvoc_t
 phasevocoder object
 

Functions

aubio_pvoc_tnew_aubio_pvoc (uint_t win_s, uint_t hop_s)
 create phase vocoder object More...
 
void del_aubio_pvoc (aubio_pvoc_t *pv)
 delete phase vocoder object More...
 
void aubio_pvoc_do (aubio_pvoc_t *pv, const fvec_t *in, cvec_t *fftgrain)
 compute spectral frame More...
 
void aubio_pvoc_rdo (aubio_pvoc_t *pv, cvec_t *fftgrain, fvec_t *out)
 compute signal from spectral frame More...
 
uint_t aubio_pvoc_get_win (aubio_pvoc_t *pv)
 get window size More...
 
uint_t aubio_pvoc_get_hop (aubio_pvoc_t *pv)
 get hop size More...
 
uint_t aubio_pvoc_set_window (aubio_pvoc_t *pv, const char_t *window_type)
 set window type More...
 

Detailed Description

Phase vocoder object.

This object implements a phase vocoder. The spectral frames are computed using a HanningZ window and a swapped version of the signal to simplify the phase relationships across frames. The window sizes and overlap are specified at creation time.

Definition in file phasevoc.h.

Function Documentation

◆ aubio_pvoc_do()

void aubio_pvoc_do ( aubio_pvoc_t pv,
const fvec_t in,
cvec_t fftgrain 
)

compute spectral frame

This function accepts an input vector of size [hop_s]. 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.

Parameters
pvphase vocoder object as returned by new_aubio_pvoc
innew input signal (hop_s long)
fftgrainoutput spectral frame
Examples:
spectral/test-mfcc.c, spectral/test-phasevoc.c, and spectral/test-tss.c.

◆ aubio_pvoc_get_hop()

uint_t aubio_pvoc_get_hop ( aubio_pvoc_t pv)

get hop size

Parameters
pvphase vocoder to get the hop size from
Examples:
spectral/test-phasevoc.c.

◆ aubio_pvoc_get_win()

uint_t aubio_pvoc_get_win ( aubio_pvoc_t pv)

get window size

Parameters
pvphase vocoder to get the window size from
Examples:
spectral/test-phasevoc.c.

◆ aubio_pvoc_rdo()

void aubio_pvoc_rdo ( aubio_pvoc_t pv,
cvec_t fftgrain,
fvec_t out 
)

compute signal from spectral frame

This function takes an input spectral frame fftgrain of size [buf_s] and computes its inverse Fourier transform. Overlap-add synthesis is then computed using the previously synthetised frames, and the output stored in out.

Parameters
pvphase vocoder object as returned by new_aubio_pvoc
fftgraininput spectral frame
outoutput signal (hop_s long)
Examples:
spectral/test-phasevoc.c, and spectral/test-tss.c.

◆ aubio_pvoc_set_window()

uint_t aubio_pvoc_set_window ( aubio_pvoc_t pv,
const char_t window_type 
)

set window type

Parameters
pvphase vocoder to set the window type
window_typea string representing a window
Returns
0 if successful, non-zero otherwise
Examples:
spectral/test-phasevoc.c.

◆ del_aubio_pvoc()

void del_aubio_pvoc ( aubio_pvoc_t pv)

delete phase vocoder object

Parameters
pvphase vocoder object as returned by new_aubio_pvoc
Examples:
spectral/test-mfcc.c, spectral/test-phasevoc.c, and spectral/test-tss.c.

◆ new_aubio_pvoc()

aubio_pvoc_t* new_aubio_pvoc ( uint_t  win_s,
uint_t  hop_s 
)

create phase vocoder object

Parameters
win_ssize of analysis buffer (and length the FFT transform)
hop_sstep size between two consecutive analysis
Examples:
spectral/test-mfcc.c, spectral/test-phasevoc.c, and spectral/test-tss.c.