feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change
on this file since 986131d was
986131d,
checked in by Eduard Müller <mueller.eduard@googlemail.com>, 7 years ago
|
Intel IPP support for aubio
See emuell/aubio/ intel_ipp2 for details please
|
-
Property mode set to
100644
|
File size:
985 bytes
|
Line | |
---|
1 | #include <aubio.h> |
---|
2 | |
---|
3 | int main (void) |
---|
4 | { |
---|
5 | aubio_init(); |
---|
6 | |
---|
7 | uint_t n = 6; // compute n times |
---|
8 | uint_t win_s = 32; // window size |
---|
9 | uint_t hop_s = win_s / 4; // hop size |
---|
10 | |
---|
11 | fvec_t * in = new_fvec (hop_s); // input buffer |
---|
12 | cvec_t * fftgrain = new_cvec (win_s); // fft norm and phase |
---|
13 | fvec_t * out = new_fvec (hop_s); // output buffer |
---|
14 | |
---|
15 | // allocate fft and other memory space |
---|
16 | aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s); |
---|
17 | |
---|
18 | // fill input with some data |
---|
19 | fvec_set_all (in, 1.); |
---|
20 | fvec_print (in); |
---|
21 | |
---|
22 | while ( n-- ) { |
---|
23 | // get some fresh input data |
---|
24 | // .. |
---|
25 | |
---|
26 | // execute phase vocoder |
---|
27 | aubio_pvoc_do (pv,in,fftgrain); |
---|
28 | |
---|
29 | // do something with fftgrain |
---|
30 | // ... |
---|
31 | cvec_print (fftgrain); |
---|
32 | |
---|
33 | // optionally rebuild the signal |
---|
34 | aubio_pvoc_rdo(pv,fftgrain,out); |
---|
35 | |
---|
36 | // and do something with the result |
---|
37 | // ... |
---|
38 | fvec_print (out); |
---|
39 | } |
---|
40 | |
---|
41 | // clean up |
---|
42 | del_fvec(in); |
---|
43 | del_cvec(fftgrain); |
---|
44 | del_fvec(out); |
---|
45 | del_aubio_pvoc(pv); |
---|
46 | |
---|
47 | aubio_cleanup(); |
---|
48 | |
---|
49 | return 0; |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.