feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 47f17fc was
2f64b0e,
checked in by Paul Brossier <piem@piem.org>, 15 years ago
|
rename vec_min and vec_min_elem to fvec_min and fvec_max_elem
|
-
Property mode set to
100644
|
File size:
873 bytes
|
Rev | Line | |
---|
[d57c879] | 1 | #include <stdio.h> |
---|
[addc9ec] | 2 | #include <aubio.h> |
---|
| 3 | |
---|
| 4 | int |
---|
| 5 | main (void) |
---|
| 6 | { |
---|
| 7 | /* allocate some memory */ |
---|
| 8 | uint_t win_s = 1024; /* window size */ |
---|
| 9 | uint_t channels = 2; /* number of channel */ |
---|
| 10 | uint_t n_filters = 13; /* number of filters */ |
---|
| 11 | cvec_t *in = new_cvec (win_s, channels); /* input buffer */ |
---|
| 12 | fvec_t *out = new_fvec (win_s, channels); /* input buffer */ |
---|
| 13 | fvec_t *coeffs = NULL; |
---|
| 14 | |
---|
| 15 | /* allocate fft and other memory space */ |
---|
| 16 | aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s); |
---|
| 17 | |
---|
| 18 | coeffs = aubio_filterbank_get_coeffs (o); |
---|
| 19 | if (coeffs == NULL) { |
---|
| 20 | return -1; |
---|
| 21 | } |
---|
| 22 | |
---|
[1e2c82f] | 23 | if (fvec_max (coeffs) != 0.) { |
---|
[addc9ec] | 24 | return -1; |
---|
| 25 | } |
---|
| 26 | |
---|
[2f64b0e] | 27 | if (fvec_min (coeffs) != 0.) { |
---|
[addc9ec] | 28 | return -1; |
---|
| 29 | } |
---|
| 30 | |
---|
[d57c879] | 31 | fvec_print (coeffs); |
---|
[addc9ec] | 32 | |
---|
| 33 | aubio_filterbank_do (o, in, out); |
---|
| 34 | |
---|
| 35 | del_aubio_filterbank (o); |
---|
| 36 | del_cvec (in); |
---|
| 37 | del_fvec (out); |
---|
| 38 | aubio_cleanup (); |
---|
| 39 | |
---|
| 40 | return 0; |
---|
| 41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.