feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 6938a20 was
6938a20,
checked in by Paul Brossier <piem@piem.org>, 11 years ago
|
tests/src/spectral/: improve examples
|
-
Property mode set to
100644
|
File size:
687 bytes
|
Rev | Line | |
---|
[addc9ec] | 1 | #include <aubio.h> |
---|
| 2 | |
---|
[6938a20] | 3 | int main () |
---|
| 4 | { |
---|
[8f68dfb] | 5 | uint_t win_s = 1024; // window size |
---|
| 6 | uint_t n_filters = 13; // number of filters |
---|
[addc9ec] | 7 | |
---|
[6938a20] | 8 | cvec_t *in_spec = new_cvec (win_s); // input vector of samples |
---|
| 9 | fvec_t *out_filters = new_fvec (n_filters); // per-band outputs |
---|
| 10 | fmat_t *coeffs; // pointer to the coefficients |
---|
| 11 | |
---|
| 12 | // create filterbank object |
---|
[addc9ec] | 13 | aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s); |
---|
| 14 | |
---|
| 15 | coeffs = aubio_filterbank_get_coeffs (o); |
---|
| 16 | |
---|
[6938a20] | 17 | aubio_filterbank_do (o, in_spec, out_filters); |
---|
[addc9ec] | 18 | |
---|
[6938a20] | 19 | // fmat_print (coeffs); |
---|
| 20 | // cvec_print(in_spec); |
---|
| 21 | // fvec_print(out_filters); |
---|
[addc9ec] | 22 | |
---|
| 23 | del_aubio_filterbank (o); |
---|
[6938a20] | 24 | del_cvec (in_spec); |
---|
| 25 | del_fvec (out_filters); |
---|
[addc9ec] | 26 | aubio_cleanup (); |
---|
| 27 | |
---|
| 28 | return 0; |
---|
| 29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.