- Timestamp:
- Oct 2, 2009, 1:26:08 AM (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:
- c0b295c
- Parents:
- 5c4ec3c
- Location:
- tests/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/test-fft.c
r5c4ec3c r38e9732 4 4 int main(){ 5 5 /* allocate some memory */ 6 uint_t win_s = 4096; /* window size */7 uint_t channels = 1 00; /* number of channels */6 uint_t win_s = 8; /* window size */ 7 uint_t channels = 1; /* number of channels */ 8 8 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 9 9 cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ 10 10 fvec_t * out = new_fvec (win_s, channels); /* output buffer */ 11 in->data[0][0] = 1; 12 in->data[0][1] = 2; 13 in->data[0][2] = 3; 14 in->data[0][3] = 4; 15 in->data[0][4] = 5; 16 in->data[0][5] = 6; 17 in->data[0][6] = 5; 18 in->data[0][7] = 6; 11 19 /* allocate fft and other memory space */ 12 20 aubio_fft_t * fft = new_aubio_fft(win_s,channels); 13 21 /* fill input with some data */ 14 //printf("initialised\n");22 fvec_print(in); 15 23 /* execute stft */ 16 24 aubio_fft_do (fft,in,fftgrain); 17 //printf("computed forward\n");25 cvec_print(fftgrain); 18 26 /* execute inverse fourier transform */ 19 27 aubio_fft_rdo(fft,fftgrain,out); 20 //printf("computed backard\n");28 fvec_print(out); 21 29 del_aubio_fft(fft); 22 30 del_fvec(in); 23 31 del_cvec(fftgrain); 24 32 del_fvec(out); 25 //printf("memory freed\n");26 33 aubio_cleanup(); 27 34 return 0; -
tests/src/test-filterbank_mel.c
r5c4ec3c r38e9732 1 #include <stdio.h> 1 2 #include <aubio.h> 2 3 … … 26 27 //fvec_print (coeffs); 27 28 28 fprintf(stderr, "%f\n",vec_sum(coeffs));29 //fprintf(stderr, "%f\n", fvec_sum(coeffs)); 29 30 30 31 aubio_filterbank_do (o, in, out); -
tests/src/test-mfcc.c
r5c4ec3c r38e9732 22 22 23 23 aubio_mfcc_do (o, in, out); 24 24 fvec_print (out); 25 aubio_mfcc_do (o, in, out); 25 26 fvec_print (out); 26 27
Note: See TracChangeset
for help on using the changeset viewer.