- Timestamp:
- Oct 7, 2009, 10:58:25 PM (15 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 0ce97483
- Parents:
- cb158ab
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/test-onsetdetection.c
rcb158ab r01b8fcc 2 2 #include <aubio.h> 3 3 4 int main(){ 5 /* allocate some memory */ 6 uint_t win_s = 1024; /* window size */ 7 uint_t channels = 1; /* number of channel */ 8 cvec_t * in = new_cvec (win_s, channels); /* input buffer */ 9 fvec_t * out = new_fvec (1, channels); /* input buffer */ 4 int 5 main () 6 { 7 uint_t win_s = 1024; /* window size */ 8 uint_t channels = 1; /* number of channel */ 9 cvec_t *in = new_cvec (win_s, channels); /* input buffer */ 10 fvec_t *out = new_fvec (1, channels); /* input buffer */ 11 12 aubio_onsetdetection_t *o; 10 13 11 /* allocate fft and other memory space */ 12 aubio_onsetdetection_t * o = 13 new_aubio_onsetdetection(aubio_onset_energy, win_s, channels); 14 aubio_onsetdetection(o,in,out); 15 aubio_onsetdetection_energy(o,in,out); 16 del_aubio_onsetdetection(o); 14 o = new_aubio_onsetdetection (aubio_onset_energy, win_s, channels); 15 aubio_onsetdetection_do (o, in, out); 16 del_aubio_onsetdetection (o); 17 17 18 o = new_aubio_onsetdetection(aubio_onset_specdiff, win_s, channels); 19 aubio_onsetdetection(o,in,out); 20 aubio_onsetdetection_specdiff(o,in,out); 21 del_aubio_onsetdetection(o); 18 o = new_aubio_onsetdetection (aubio_onset_specdiff, win_s, channels); 19 aubio_onsetdetection_do (o, in, out); 20 del_aubio_onsetdetection (o); 22 21 23 o = new_aubio_onsetdetection(aubio_onset_hfc, win_s, channels); 24 aubio_onsetdetection(o,in,out); 25 aubio_onsetdetection_hfc(o,in,out); 26 del_aubio_onsetdetection(o); 22 o = new_aubio_onsetdetection (aubio_onset_hfc, win_s, channels); 23 aubio_onsetdetection_do (o, in, out); 24 del_aubio_onsetdetection (o); 27 25 28 o = new_aubio_onsetdetection(aubio_onset_complex, win_s, channels); 29 aubio_onsetdetection(o,in,out); 30 aubio_onsetdetection_complex(o,in,out); 31 del_aubio_onsetdetection(o); 26 o = new_aubio_onsetdetection (aubio_onset_complex, win_s, channels); 27 aubio_onsetdetection_do (o, in, out); 28 del_aubio_onsetdetection (o); 32 29 33 o = new_aubio_onsetdetection(aubio_onset_phase, win_s, channels); 34 aubio_onsetdetection(o,in,out); 35 aubio_onsetdetection_phase(o,in,out); 36 del_aubio_onsetdetection(o); 30 o = new_aubio_onsetdetection (aubio_onset_phase, win_s, channels); 31 aubio_onsetdetection_do (o, in, out); 32 del_aubio_onsetdetection (o); 37 33 38 o = new_aubio_onsetdetection(aubio_onset_kl, win_s, channels); 39 aubio_onsetdetection(o,in,out); 40 aubio_onsetdetection_kl(o,in,out); 41 del_aubio_onsetdetection(o); 34 o = new_aubio_onsetdetection (aubio_onset_kl, win_s, channels); 35 aubio_onsetdetection_do (o, in, out); 36 del_aubio_onsetdetection (o); 42 37 43 o = new_aubio_onsetdetection(aubio_onset_mkl, win_s, channels); 44 aubio_onsetdetection(o,in,out); 45 aubio_onsetdetection_mkl(o,in,out); 46 del_aubio_onsetdetection(o); 38 o = new_aubio_onsetdetection (aubio_onset_mkl, win_s, channels); 39 aubio_onsetdetection_do (o, in, out); 40 del_aubio_onsetdetection (o); 47 41 48 del_cvec(in);49 del_fvec(out);50 aubio_cleanup();42 del_cvec (in); 43 del_fvec (out); 44 aubio_cleanup (); 51 45 52 46 return 0; 53 47 } 54
Note: See TracChangeset
for help on using the changeset viewer.