5 uint_t n = 6; // compute n times
6 uint_t win_s = 32; // window size
7 uint_t hop_s = win_s / 4; // hop size
9 fvec_t * in = new_fvec (hop_s); // input buffer
10 cvec_t * fftgrain = new_cvec (win_s); // fft norm and phase
11 fvec_t * out = new_fvec (hop_s); // output buffer
13 // allocate fft and other memory space
14 aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s);
16 if (new_aubio_pvoc(win_s, 0)) return 1;
18 if (aubio_pvoc_get_win(pv) != win_s) return 1;
19 if (aubio_pvoc_get_hop(pv) != hop_s) return 1;
21 if (aubio_pvoc_set_window(pv, "hanningz") != 0) return 1;
23 // fill input with some data
24 fvec_set_all (in, 1.);
28 // get some fresh input data
31 // execute phase vocoder
32 aubio_pvoc_do (pv,in,fftgrain);
34 // do something with fftgrain
36 cvec_print (fftgrain);
38 // optionally rebuild the signal
39 aubio_pvoc_rdo(pv,fftgrain,out);
41 // and do something with the result