feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change
on this file since f9ed504 was
158e031,
checked in by Paul Brossier <piem@piem.org>, 11 years ago
|
tests/: add void to prototypes to build with -Wstrict-prototypes
|
-
Property mode set to
100644
|
File size:
785 bytes
|
Rev | Line | |
---|
[21f0655] | 1 | #define AUBIO_UNSTABLE 1 |
---|
| 2 | |
---|
[c71aa44] | 3 | // this file uses the unstable aubio api, please use aubio_pitch instead |
---|
| 4 | // see src/pitch/pitch.h and tests/src/pitch/test-pitch.c |
---|
| 5 | |
---|
[4e9101e] | 6 | #include <aubio.h> |
---|
| 7 | |
---|
[158e031] | 8 | int main (void) |
---|
[c71aa44] | 9 | { |
---|
| 10 | uint_t n = 10; // compute n times |
---|
| 11 | uint_t win_s = 1024; // window size |
---|
| 12 | uint_t hop_s = win_s/4; // hop size |
---|
| 13 | // create some vectors |
---|
| 14 | cvec_t * in_cvec = new_cvec (win_s); // input fftgrain |
---|
| 15 | fvec_t * out_cands = new_fvec (1); // pitch candidate |
---|
| 16 | // create pitch object |
---|
| 17 | aubio_pitchmcomb_t * mcomb = new_aubio_pitchmcomb(win_s, hop_s); |
---|
[e5757cf] | 18 | |
---|
[c71aa44] | 19 | while ( n-- ) { |
---|
| 20 | aubio_pitchmcomb_do (mcomb, in_cvec, out_cands); |
---|
| 21 | // fvec_print(out_cands); |
---|
| 22 | }; |
---|
[4e9101e] | 23 | |
---|
[c71aa44] | 24 | // clean up before exiting |
---|
| 25 | del_aubio_pitchmcomb(mcomb); |
---|
| 26 | del_cvec(in_cvec); |
---|
| 27 | del_fvec(out_cands); |
---|
[4e9101e] | 28 | |
---|
[c71aa44] | 29 | aubio_cleanup(); |
---|
[4e9101e] | 30 | |
---|
[c71aa44] | 31 | return 0; |
---|
[4e9101e] | 32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.