source:
tests/src/pitch/test-pitchyinfft.c
@
fcd963a
Last change on this file since fcd963a was 9c9202f, checked in by , 12 years ago | |
---|---|
|
|
File size: 705 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 | ||
[c71aa44] | 8 | int main () |
9 | { | |
10 | uint_t n = 10; // compute n times | |
11 | uint_t win_s = 1024; // window size | |
12 | // create some vectors | |
13 | fvec_t * in = new_fvec (win_s); // input buffer | |
14 | fvec_t * out = new_fvec (1); // output candidates | |
15 | // create pitch object | |
[9c9202f] | 16 | aubio_pitchyinfft_t *p = new_aubio_pitchyinfft(44100, win_s); |
[c71aa44] | 17 | aubio_pitchyinfft_set_tolerance (p, 0.2); |
[4e9101e] | 18 | |
[c71aa44] | 19 | while ( n-- ) { |
20 | aubio_pitchyinfft_do (p, in,out); | |
21 | }; | |
[4e9101e] | 22 | |
[c71aa44] | 23 | fvec_print(out); |
[4e9101e] | 24 | |
[c71aa44] | 25 | del_fvec(in); |
26 | del_fvec(out); | |
27 | del_aubio_pitchyinfft(p); | |
28 | aubio_cleanup(); | |
[4e9101e] | 29 | |
[c71aa44] | 30 | return 0; |
31 | } |
Note: See TracBrowser
for help on using the repository browser.