feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 7ce0701 was
aea235c,
checked in by Paul Brossier <piem@piem.org>, 15 years ago
|
tests/src: switch to mono
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[40536fa] | 1 | /* test sample for phase vocoder */ |
---|
[437fa65] | 2 | |
---|
[47eabeb] | 3 | #include <stdio.h> |
---|
[40536fa] | 4 | #include <aubio.h> |
---|
[437fa65] | 5 | |
---|
| 6 | int main(){ |
---|
| 7 | uint_t win_s = 1024; /* window size */ |
---|
| 8 | uint_t hop_s = 256; /* hop size */ |
---|
| 9 | /* allocate some memory */ |
---|
[aea235c] | 10 | fvec_t * in = new_fvec (hop_s); /* input buffer */ |
---|
| 11 | cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ |
---|
| 12 | fvec_t * out = new_fvec (hop_s); /* output buffer */ |
---|
[437fa65] | 13 | /* allocate fft and other memory space */ |
---|
[aea235c] | 14 | aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s); |
---|
[437fa65] | 15 | /* fill input with some data */ |
---|
| 16 | printf("initialised\n"); |
---|
| 17 | /* execute stft */ |
---|
| 18 | aubio_pvoc_do (pv,in,fftgrain); |
---|
| 19 | printf("computed forward\n"); |
---|
| 20 | /* execute inverse fourier transform */ |
---|
| 21 | aubio_pvoc_rdo(pv,fftgrain,out); |
---|
| 22 | printf("computed backard\n"); |
---|
| 23 | del_aubio_pvoc(pv); |
---|
| 24 | del_fvec(in); |
---|
| 25 | del_cvec(fftgrain); |
---|
| 26 | del_fvec(out); |
---|
[40536fa] | 27 | aubio_cleanup(); |
---|
[437fa65] | 28 | printf("memory freed\n"); |
---|
| 29 | return 0; |
---|
| 30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.