feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since bea5389 was
c71aa44,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
tests/src/pitch/: improve examples
|
-
Property mode set to
100644
|
File size:
709 bytes
|
Line | |
---|
1 | #define AUBIO_UNSTABLE 1 |
---|
2 | |
---|
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 | |
---|
6 | #include <aubio.h> |
---|
7 | |
---|
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 * input_signal = new_fvec (win_s); // input signal |
---|
14 | fvec_t * output_cands = new_fvec (1); // output candidates |
---|
15 | // create pitch object |
---|
16 | aubio_pitchyin_t *p = new_aubio_pitchyin (win_s); |
---|
17 | |
---|
18 | while ( n-- ) { |
---|
19 | aubio_pitchyin_do (p, input_signal, output_cands); |
---|
20 | }; |
---|
21 | |
---|
22 | fvec_print(output_cands); |
---|
23 | |
---|
24 | del_fvec(input_signal); |
---|
25 | del_fvec(output_cands); |
---|
26 | del_aubio_pitchyin(p); |
---|
27 | aubio_cleanup(); |
---|
28 | |
---|
29 | return 0; |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.