- Timestamp:
- Jul 11, 2012, 12:26:51 AM (12 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:
- e7e11bf
- Parents:
- 02418f6
- Location:
- tests/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/onset/test-peakpicker.c
r02418f6 r9d6001cb 17 17 18 18 del_aubio_peakpicker(o); 19 del_fvec(out); 19 20 del_fvec(in); 20 21 return 0; -
tests/src/pitch/test-pitch.c
r02418f6 r9d6001cb 20 20 21 21 del_aubio_pitch (o); 22 del_fvec (out); 22 23 del_fvec (in); 23 24 aubio_cleanup (); -
tests/src/pitch/test-pitchfcomb.c
r02418f6 r9d6001cb 19 19 20 20 del_aubio_pitchfcomb(o); 21 del_fvec(out); 21 22 del_fvec(in); 22 23 aubio_cleanup(); -
tests/src/spectral/test-phasevoc-jack.c
r02418f6 r9d6001cb 11 11 #include <unistd.h> /* sleep() */ 12 12 #include <aubio.h> 13 #ifdef HAVE_JACK 13 14 #include "jackio.h" 15 #endif /* HAVE_JACK */ 14 16 15 17 uint_t testing = 0; /* change this to 1 to listen */ -
tests/src/spectral/test-tss.c
r02418f6 r9d6001cb 11 11 12 12 int main(){ 13 int i; 14 uint_t win_s = 1024; /* window size */ 15 uint_t hop_s = 256; /* hop size */ 16 /* allocate some memory */ 17 fvec_t * in = new_fvec (hop_s); /* input buffer */ 18 cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ 19 cvec_t * cstead = new_cvec (win_s); /* fft norm and phase */ 20 cvec_t * ctrans = new_cvec (win_s); /* fft norm and phase */ 21 fvec_t * stead = new_fvec (hop_s); /* output buffer */ 22 fvec_t * trans = new_fvec (hop_s); /* output buffer */ 23 /* allocate fft and other memory space */ 24 aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s); 25 aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s); 26 aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s); 13 int i; 14 uint_t win_s = 1024; /* window size */ 15 uint_t hop_s = 256; /* hop size */ 27 16 28 aubio_tss_t * tss = new_aubio_tss(win_s,hop_s); 29 /* fill input with some data */ 30 printf("initialised\n"); 31 /* execute stft */ 32 for (i = 0; i < 10; i++) { 33 aubio_pvoc_do (pv,in,fftgrain); 34 aubio_tss_do (tss,fftgrain,ctrans,cstead); 35 aubio_pvoc_rdo(pvt,cstead,stead); 36 aubio_pvoc_rdo(pvs,ctrans,trans); 37 } 38 del_aubio_pvoc(pv); 39 del_fvec(in); 40 del_cvec(fftgrain); 41 del_cvec(cstead); 42 del_cvec(ctrans); 43 del_fvec(stead); 44 del_fvec(trans); 45 aubio_cleanup(); 46 printf("memory freed\n"); 47 return 0; 17 /* allocate some memory */ 18 fvec_t * in = new_fvec (hop_s); /* input buffer */ 19 cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ 20 cvec_t * cstead = new_cvec (win_s); /* fft norm and phase */ 21 cvec_t * ctrans = new_cvec (win_s); /* fft norm and phase */ 22 fvec_t * stead = new_fvec (hop_s); /* output buffer */ 23 fvec_t * trans = new_fvec (hop_s); /* output buffer */ 24 /* allocate phase vocoders and transient steady-state separation */ 25 aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s); 26 aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s); 27 aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s); 28 aubio_tss_t * tss = new_aubio_tss(win_s,hop_s); 29 30 /* fill input with some data */ 31 printf("initialised\n"); 32 33 /* execute stft */ 34 for (i = 0; i < 10; i++) { 35 aubio_pvoc_do (pv,in,fftgrain); 36 aubio_tss_do (tss,fftgrain,ctrans,cstead); 37 aubio_pvoc_rdo(pvt,cstead,stead); 38 aubio_pvoc_rdo(pvs,ctrans,trans); 39 } 40 41 del_aubio_pvoc(pv); 42 del_aubio_pvoc(pvt); 43 del_aubio_pvoc(pvs); 44 del_aubio_tss(tss); 45 46 del_fvec(in); 47 del_cvec(fftgrain); 48 del_cvec(cstead); 49 del_cvec(ctrans); 50 del_fvec(stead); 51 del_fvec(trans); 52 aubio_cleanup(); 53 printf("memory freed\n"); 54 return 0; 48 55 }
Note: See TracChangeset
for help on using the changeset viewer.