aubio
0.4.0
Main Page
Data Structures
Files
Examples
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
spectral/test-phasevoc.c
#include <
aubio.h
>
int
main ()
{
uint_t
n = 6;
// compute n times
uint_t
win_s = 32;
// window size
uint_t
hop_s = win_s / 4;
// hop size
fvec_t
* in =
new_fvec
(hop_s);
// input buffer
cvec_t
* fftgrain =
new_cvec
(win_s);
// fft norm and phase
fvec_t
* out =
new_fvec
(hop_s);
// output buffer
// allocate fft and other memory space
aubio_pvoc_t
* pv =
new_aubio_pvoc
(win_s,hop_s);
// fill input with some data
fvec_set_all
(in, 1.);
fvec_print
(in);
while
( n-- ) {
// get some fresh input data
// ..
// execute phase vocoder
aubio_pvoc_do
(pv,in,fftgrain);
// do something with fftgrain
// ...
cvec_print
(fftgrain);
// optionnaly rebuild the signa
aubio_pvoc_rdo
(pv,fftgrain,out);
// and do something with the result
// ...
fvec_print
(out);
}
// clean up
del_fvec
(in);
del_cvec
(fftgrain);
del_fvec
(out);
del_aubio_pvoc
(pv);
aubio_cleanup
();
return
0;
}
Generated on Wed Dec 18 2013 02:14:35 for aubio by
1.8.5