feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 02418f6 was
02418f6,
checked in by Paul Brossier <piem@piem.org>, 12 years ago
|
tests/: move file around to match src/
|
-
Property mode set to
100644
|
File size:
895 bytes
|
Rev | Line | |
---|
[21f0655] | 1 | #define AUBIO_UNSTABLE 1 |
---|
| 2 | |
---|
[38e9732] | 3 | #include <stdio.h> |
---|
[afc584d] | 4 | #include <aubio.h> |
---|
| 5 | |
---|
| 6 | int |
---|
| 7 | main (void) |
---|
| 8 | { |
---|
| 9 | /* allocate some memory */ |
---|
| 10 | uint_t win_s = 512; /* fft size */ |
---|
| 11 | uint_t n_filters = 40; /* number of filters */ |
---|
[aea235c] | 12 | cvec_t *in = new_cvec (win_s); /* input buffer */ |
---|
| 13 | fvec_t *out = new_fvec (win_s); /* input buffer */ |
---|
| 14 | fmat_t *coeffs = NULL; |
---|
[afc584d] | 15 | smpl_t samplerate = 16000.; |
---|
| 16 | |
---|
| 17 | /* allocate fft and other memory space */ |
---|
| 18 | aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s); |
---|
| 19 | |
---|
| 20 | /* assign Mel-frequency coefficients */ |
---|
| 21 | aubio_filterbank_set_mel_coeffs_slaney (o, samplerate); |
---|
| 22 | |
---|
| 23 | coeffs = aubio_filterbank_get_coeffs (o); |
---|
| 24 | if (coeffs == NULL) { |
---|
| 25 | return -1; |
---|
| 26 | } |
---|
| 27 | |
---|
[aea235c] | 28 | //fmat_print (coeffs); |
---|
[afc584d] | 29 | |
---|
[38e9732] | 30 | //fprintf(stderr, "%f\n", fvec_sum(coeffs)); |
---|
[afc584d] | 31 | |
---|
| 32 | aubio_filterbank_do (o, in, out); |
---|
| 33 | |
---|
| 34 | del_aubio_filterbank (o); |
---|
| 35 | del_cvec (in); |
---|
| 36 | del_fvec (out); |
---|
| 37 | aubio_cleanup (); |
---|
| 38 | |
---|
| 39 | return 0; |
---|
| 40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.