Changeset aea235c
- Timestamp:
- Dec 4, 2009, 1:47:17 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:
- f7b05d4
- Parents:
- 4621cd6
- Location:
- tests/src
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/temporal/test-aweighting.c
r4621cd6 raea235c 8 8 uint_t nrates = 6; 9 9 uint_t samplerate, i = 0; 10 uint_t channels = 2;11 10 12 11 for ( samplerate = rates[i]; i < nrates ; i++ ) { 13 f = new_aubio_filter_a_weighting ( channels,samplerate);12 f = new_aubio_filter_a_weighting (samplerate); 14 13 del_aubio_filter (f); 15 14 16 f = new_aubio_filter (7 , channels*2);15 f = new_aubio_filter (7); 17 16 aubio_filter_set_a_weighting (f, samplerate); 18 17 del_aubio_filter (f); … … 20 19 21 20 // samplerate unknown 22 f = new_aubio_filter_a_weighting ( channels,4200);21 f = new_aubio_filter_a_weighting (4200); 23 22 del_aubio_filter (f); 24 23 25 24 // order to small 26 f = new_aubio_filter (2 , channels*2);25 f = new_aubio_filter (2); 27 26 aubio_filter_set_a_weighting (f, samplerate); 28 27 del_aubio_filter (f); 29 28 30 29 // order to big 31 f = new_aubio_filter (12 , channels*2);30 f = new_aubio_filter (12); 32 31 aubio_filter_set_a_weighting (f, samplerate); 33 32 del_aubio_filter (f); -
tests/src/temporal/test-cweighting.c
r4621cd6 raea235c 8 8 uint_t nrates = 6; 9 9 uint_t samplerate, i = 0; 10 uint_t channels = 2;11 10 12 11 for ( samplerate = rates[i]; i < nrates ; i++ ) { 13 f = new_aubio_filter_c_weighting ( channels,samplerate);12 f = new_aubio_filter_c_weighting (samplerate); 14 13 del_aubio_filter (f); 15 14 16 f = new_aubio_filter (5 , channels*2);15 f = new_aubio_filter (5); 17 16 aubio_filter_set_c_weighting (f, samplerate); 18 17 del_aubio_filter (f); … … 20 19 21 20 // samplerate unknown 22 f = new_aubio_filter_c_weighting ( channels,4200);21 f = new_aubio_filter_c_weighting (4200); 23 22 del_aubio_filter (f); 24 23 25 24 // order to small 26 f = new_aubio_filter (2 , channels*2);25 f = new_aubio_filter (2); 27 26 aubio_filter_set_c_weighting (f, samplerate); 28 27 del_aubio_filter (f); 29 28 30 29 // order to big 31 f = new_aubio_filter (12 , channels*2);30 f = new_aubio_filter (12); 32 31 aubio_filter_set_c_weighting (f, samplerate); 33 32 del_aubio_filter (f); -
tests/src/test-beattracking.c
r4621cd6 raea235c 7 7 /* allocate some memory */ 8 8 uint_t win_s = 1024; /* window size */ 9 uint_t channels = 1; /* number of channel */ 10 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 11 fvec_t * out = new_fvec (win_s/4, channels); /* input buffer */ 9 fvec_t * in = new_fvec (win_s); /* input buffer */ 10 fvec_t * out = new_fvec (win_s/4); /* input buffer */ 12 11 13 12 /* allocate fft and other memory space */ 14 aubio_beattracking_t * tempo = new_aubio_beattracking(win_s , channels);13 aubio_beattracking_t * tempo = new_aubio_beattracking(win_s); 15 14 16 15 uint_t i = 0; -
tests/src/test-biquad.c
r4621cd6 raea235c 4 4 /* allocate some memory */ 5 5 uint_t win_s = 1024; /* window size */ 6 uint_t channels = 1; /* number of channel */ 7 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 8 aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3, channels); 6 fvec_t * in = new_fvec (win_s); /* input buffer */ 7 aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3); 9 8 10 9 aubio_filter_do_filtfilt(o,in,in); -
tests/src/test-cvec.c
r4621cd6 raea235c 4 4 /* allocate some memory */ 5 5 uint_t win_s = 1024; /* window size */ 6 uint_t channels = 1; /* number of channel */ 7 cvec_t * sp = new_cvec (win_s, channels); /* input buffer */ 6 cvec_t * sp = new_cvec (win_s); /* input buffer */ 8 7 del_cvec(sp); 9 8 -
tests/src/test-fft.c
r4621cd6 raea235c 5 5 /* allocate some memory */ 6 6 uint_t win_s = 8; /* window size */ 7 uint_t channels = 1; /* number of channels */ 8 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 9 cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ 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; 7 fvec_t * in = new_fvec (win_s); /* input buffer */ 8 cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ 9 fvec_t * out = new_fvec (win_s); /* output buffer */ 10 in->data[0] = 1; 11 in->data[1] = 2; 12 in->data[2] = 3; 13 in->data[3] = 4; 14 in->data[4] = 5; 15 in->data[5] = 6; 16 in->data[6] = 5; 17 in->data[7] = 6; 19 18 /* allocate fft and other memory space */ 20 aubio_fft_t * fft = new_aubio_fft(win_s ,channels);19 aubio_fft_t * fft = new_aubio_fft(win_s); 21 20 /* fill input with some data */ 22 21 fvec_print(in); -
tests/src/test-filter.c
r4621cd6 raea235c 6 6 /* allocate some memory */ 7 7 uint_t win_s = 32; /* window size */ 8 uint_t channels = 1; /* number of channel */ 9 fvec_t *in = new_fvec (win_s, channels); /* input buffer */ 10 fvec_t *out = new_fvec (win_s, channels); /* input buffer */ 8 fvec_t *in = new_fvec (win_s); /* input buffer */ 9 fvec_t *out = new_fvec (win_s); /* input buffer */ 11 10 12 11 13 aubio_filter_t *o = new_aubio_filter_c_weighting ( channels,44100);14 in->data[ 0][12] = 0.5;12 aubio_filter_t *o = new_aubio_filter_c_weighting (44100); 13 in->data[12] = 0.5; 15 14 fvec_print (in); 16 15 aubio_filter_do (o, in); … … 18 17 del_aubio_filter (o); 19 18 20 o = new_aubio_filter_c_weighting ( channels,44100);21 in->data[ 0][12] = 0.5;19 o = new_aubio_filter_c_weighting (44100); 20 in->data[12] = 0.5; 22 21 fvec_print (in); 23 22 aubio_filter_do_outplace (o, in, out); … … 25 24 del_aubio_filter (o); 26 25 27 o = new_aubio_filter_c_weighting ( channels,44100);28 in->data[ 0][12] = 0.5;26 o = new_aubio_filter_c_weighting (44100); 27 in->data[12] = 0.5; 29 28 fvec_print (in); 30 29 aubio_filter_do_filtfilt (o, in, out); -
tests/src/test-filterbank.c
r4621cd6 raea235c 9 9 /* allocate some memory */ 10 10 uint_t win_s = 1024; /* window size */ 11 uint_t channels = 2; /* number of channel */12 11 uint_t n_filters = 13; /* number of filters */ 13 cvec_t *in = new_cvec (win_s , channels); /* input buffer */14 fvec_t *out = new_fvec (win_s , channels); /* input buffer */15 f vec_t *coeffs = NULL;12 cvec_t *in = new_cvec (win_s); /* input buffer */ 13 fvec_t *out = new_fvec (win_s); /* input buffer */ 14 fmat_t *coeffs = NULL; 16 15 17 16 /* allocate fft and other memory space */ … … 23 22 } 24 23 24 /* 25 25 if (fvec_max (coeffs) != 0.) { 26 26 return -1; … … 30 30 return -1; 31 31 } 32 */ 32 33 33 f vec_print (coeffs);34 fmat_print (coeffs); 34 35 35 36 aubio_filterbank_do (o, in, out); -
tests/src/test-filterbank_mel.c
r4621cd6 raea235c 9 9 /* allocate some memory */ 10 10 uint_t win_s = 512; /* fft size */ 11 uint_t channels = 2; /* number of channel */12 11 uint_t n_filters = 40; /* number of filters */ 13 cvec_t *in = new_cvec (win_s , channels); /* input buffer */14 fvec_t *out = new_fvec (win_s , channels); /* input buffer */15 f vec_t *coeffs = NULL;12 cvec_t *in = new_cvec (win_s); /* input buffer */ 13 fvec_t *out = new_fvec (win_s); /* input buffer */ 14 fmat_t *coeffs = NULL; 16 15 smpl_t samplerate = 16000.; 17 16 … … 27 26 } 28 27 29 //f vec_print (coeffs);28 //fmat_print (coeffs); 30 29 31 30 //fprintf(stderr, "%f\n", fvec_sum(coeffs)); -
tests/src/test-fvec.c
r4621cd6 raea235c 4 4 /* allocate some memory */ 5 5 uint_t win_s = 1024; /* window size */ 6 uint_t channels = 1; /* number of channel */ 7 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 6 fvec_t * in = new_fvec (win_s); /* input buffer */ 8 7 del_fvec(in); 9 8 -
tests/src/test-hist.c
r4621cd6 raea235c 8 8 uint_t length; 9 9 for (length = 1; length < 10; length ++ ) { 10 aubio_hist_t *o = new_aubio_hist(0, 1, length , 5);10 aubio_hist_t *o = new_aubio_hist(0, 1, length); 11 11 fvec_t *t = new_aubio_window("hanning", length); 12 12 aubio_hist_do(o,t); -
tests/src/test-mfcc.c
r4621cd6 raea235c 6 6 /* allocate some memory */ 7 7 uint_t win_s = 512; /* fft size */ 8 uint_t channels = 1; /* number of channel */9 8 uint_t n_filters = 40; /* number of filters */ 10 9 uint_t n_coefs = 13; /* number of coefficients */ 11 cvec_t *in = new_cvec (win_s , channels); /* input buffer */12 fvec_t *out = new_fvec (n_coefs , channels); /* input buffer */10 cvec_t *in = new_cvec (win_s); /* input buffer */ 11 fvec_t *out = new_fvec (n_coefs); /* input buffer */ 13 12 smpl_t samplerate = 16000.; 14 13 -
tests/src/test-onset.c
r4621cd6 raea235c 4 4 /* allocate some memory */ 5 5 uint_t win_s = 1024; /* window size */ 6 uint_t channels = 1; /* number of channel */ 7 fvec_t * in = new_fvec (win_s/4, channels); /* input buffer */ 8 fvec_t * out = new_fvec (2, channels); /* input buffer */ 9 aubio_onset_t * onset = new_aubio_onset("complex", win_s, win_s/4, channels, 44100.); 6 fvec_t * in = new_fvec (win_s/4); /* input buffer */ 7 fvec_t * out = new_fvec (2); /* input buffer */ 8 aubio_onset_t * onset = new_aubio_onset("complex", win_s, win_s/4, 44100.); 10 9 uint_t i = 0; 11 10 -
tests/src/test-onsetdetection.c
r4621cd6 raea235c 8 8 { 9 9 uint_t win_s = 1024; /* window size */ 10 uint_t channels = 1; /* number of channel */ 11 cvec_t *in = new_cvec (win_s, channels); /* input buffer */ 12 fvec_t *out = new_fvec (1, channels); /* input buffer */ 10 cvec_t *in = new_cvec (win_s); /* input buffer */ 11 fvec_t *out = new_fvec (1); /* input buffer */ 13 12 14 13 aubio_specdesc_t *o; 15 14 16 o = new_aubio_specdesc ("energy", win_s , channels);15 o = new_aubio_specdesc ("energy", win_s); 17 16 aubio_specdesc_do (o, in, out); 18 17 del_aubio_specdesc (o); 19 18 20 o = new_aubio_specdesc ("energy", win_s , channels);19 o = new_aubio_specdesc ("energy", win_s); 21 20 aubio_specdesc_do (o, in, out); 22 21 del_aubio_specdesc (o); 23 22 24 o = new_aubio_specdesc ("hfc", win_s , channels);23 o = new_aubio_specdesc ("hfc", win_s); 25 24 aubio_specdesc_do (o, in, out); 26 25 del_aubio_specdesc (o); 27 26 28 o = new_aubio_specdesc ("complex", win_s , channels);27 o = new_aubio_specdesc ("complex", win_s); 29 28 aubio_specdesc_do (o, in, out); 30 29 del_aubio_specdesc (o); 31 30 32 o = new_aubio_specdesc ("phase", win_s , channels);31 o = new_aubio_specdesc ("phase", win_s); 33 32 aubio_specdesc_do (o, in, out); 34 33 del_aubio_specdesc (o); 35 34 36 o = new_aubio_specdesc ("kl", win_s , channels);35 o = new_aubio_specdesc ("kl", win_s); 37 36 aubio_specdesc_do (o, in, out); 38 37 del_aubio_specdesc (o); 39 38 40 o = new_aubio_specdesc ("mkl", win_s , channels);39 o = new_aubio_specdesc ("mkl", win_s); 41 40 aubio_specdesc_do (o, in, out); 42 41 del_aubio_specdesc (o); -
tests/src/test-peakpick.c
r4621cd6 raea235c 6 6 /* allocate some memory */ 7 7 uint_t win_s = 1024; /* window size */ 8 uint_t channels = 1; /* number of channel */ 9 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 10 fvec_t * out = new_fvec (1, channels); /* input buffer */ 8 fvec_t * in = new_fvec (win_s); /* input buffer */ 9 fvec_t * out = new_fvec (1); /* input buffer */ 11 10 aubio_peakpicker_t * o = new_aubio_peakpicker(1); 12 11 aubio_peakpicker_set_threshold (o, 0.3); -
tests/src/test-phasevoc-jack.c
r4621cd6 raea235c 22 22 uint_t pos = 0; /* frames%dspblocksize for jack loop */ 23 23 24 fvec_t * in ;25 cvec_t * fftgrain ;26 fvec_t * out ;24 fvec_t * in[2]; 25 cvec_t * fftgrain[2]; 26 fvec_t * out[2]; 27 27 28 aubio_pvoc_t * pv ;28 aubio_pvoc_t * pv[2]; 29 29 30 30 int aubio_process(float **input, float **output, int nframes); … … 32 32 int main(){ 33 33 /* allocate some memory */ 34 in = new_fvec (hop_s, channels); /* input buffer */ 35 fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ 36 out = new_fvec (hop_s, channels); /* output buffer */ 34 uint_t i; 35 for (i=0;i<channels;i++) { 36 in[i] = new_fvec (hop_s); /* input buffer */ 37 fftgrain[i] = new_cvec (win_s); /* fft norm and phase */ 38 out[i] = new_fvec (hop_s); /* output buffer */ 37 39 /* allocate fft and other memory space */ 38 pv = new_aubio_pvoc(win_s,hop_s,channels); 40 pv[i] = new_aubio_pvoc(win_s,hop_s); 41 } 39 42 40 43 #ifdef HAVE_JACK … … 53 56 #endif 54 57 55 del_aubio_pvoc(pv); 56 del_cvec(fftgrain); 57 del_fvec(in); 58 del_fvec(out); 58 for (i=0;i<channels;i++) { 59 del_aubio_pvoc(pv[i]); 60 del_cvec(fftgrain[i]); 61 del_fvec(in[i]); 62 del_fvec(out[i]); 63 } 59 64 aubio_cleanup(); 60 65 return 0; … … 67 72 for (i=0;i<channels;i++) { 68 73 /* write input to datanew */ 69 fvec_write_sample(in , input[i][j], i, pos);74 fvec_write_sample(in[i], input[i][j], pos); 70 75 /* put synthnew in output */ 71 output[i][j] = fvec_read_sample(out , i, pos);76 output[i][j] = fvec_read_sample(out[i], pos); 72 77 } 73 78 /*time for fft*/ 74 79 if (pos == hop_s-1) { 75 80 /* block loop */ 76 aubio_pvoc_do (pv,in, fftgrain); 81 for (i=0;i<channels;i++) { 82 aubio_pvoc_do (pv[i], in[i], fftgrain[i]); 77 83 // zero phases of first channel 78 for (i=0;i<fftgrain ->length;i++) fftgrain->phas[0][i] = 0.;84 for (i=0;i<fftgrain[i]->length;i++) fftgrain[0]->phas[i] = 0.; 79 85 // double phases of second channel 80 for (i=0;i<fftgrain ->length;i++) {81 fftgrain ->phas[1][i] =82 aubio_unwrap2pi (fftgrain ->phas[1][i] * 2.);86 for (i=0;i<fftgrain[i]->length;i++) { 87 fftgrain[1]->phas[i] = 88 aubio_unwrap2pi (fftgrain[1]->phas[i] * 2.); 83 89 } 84 90 // copy second channel to third one 85 aubio_pvoc_rdo(pv ,fftgrain,out);91 aubio_pvoc_rdo(pv[i], fftgrain[i], out[i]); 86 92 pos = -1; 93 } 87 94 } 88 95 pos++; -
tests/src/test-phasevoc.c
r4621cd6 raea235c 7 7 uint_t win_s = 1024; /* window size */ 8 8 uint_t hop_s = 256; /* hop size */ 9 uint_t channels = 4; /* number of channels */10 9 /* allocate some memory */ 11 fvec_t * in = new_fvec (hop_s , channels); /* input buffer */12 cvec_t * fftgrain = new_cvec (win_s , channels); /* fft norm and phase */13 fvec_t * out = new_fvec (hop_s , channels); /* output buffer */10 fvec_t * in = new_fvec (hop_s); /* input buffer */ 11 cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ 12 fvec_t * out = new_fvec (hop_s); /* output buffer */ 14 13 /* allocate fft and other memory space */ 15 aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s ,channels);14 aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s); 16 15 /* fill input with some data */ 17 16 printf("initialised\n"); -
tests/src/test-pitchdetection.c
r4621cd6 raea235c 8 8 uint_t hop_s = win_s / 4; /* hop size */ 9 9 uint_t samplerate = 44100; /* samplerate */ 10 uint_t channels = 1; /* number of channel */ 11 fvec_t *in = new_fvec (hop_s, channels); /* input buffer */ 12 fvec_t *out = new_fvec (1, channels); /* input buffer */ 10 fvec_t *in = new_fvec (hop_s); /* input buffer */ 11 fvec_t *out = new_fvec (1); /* input buffer */ 13 12 aubio_pitch_t *o = 14 new_aubio_pitch ("default", win_s, hop_s, channels,samplerate);13 new_aubio_pitch ("default", win_s, hop_s, samplerate); 15 14 uint_t i = 0; 16 15 -
tests/src/test-pitchfcomb.c
r4621cd6 raea235c 7 7 uint_t win_s = 1024; /* window size */ 8 8 uint_t hop_s = win_s/4; /* hop size */ 9 uint_t channels = 3; /* number of channel */ 10 fvec_t * in = new_fvec (hop_s, channels); /* input buffer */ 11 fvec_t * out = new_fvec (1, channels); 9 fvec_t * in = new_fvec (hop_s); /* input buffer */ 10 fvec_t * out = new_fvec (1); 12 11 aubio_pitchfcomb_t * o = new_aubio_pitchfcomb ( 13 win_s, hop_s , channels);12 win_s, hop_s); 14 13 uint_t i = 0; 15 14 -
tests/src/test-pitchmcomb.c
r4621cd6 raea235c 7 7 uint_t win_s = 1024; /* window size */ 8 8 uint_t hop_s = win_s/4; /* hop size */ 9 uint_t channels = 1; /* number of channel */ 10 cvec_t * in = new_cvec (win_s, channels); /* input buffer */ 11 fvec_t * out = new_fvec (1, channels); /* input buffer */ 9 cvec_t * in = new_cvec (win_s); /* input buffer */ 10 fvec_t * out = new_fvec (1); /* input buffer */ 12 11 13 aubio_pitchmcomb_t * o = new_aubio_pitchmcomb(win_s, hop_s , channels);12 aubio_pitchmcomb_t * o = new_aubio_pitchmcomb(win_s, hop_s); 14 13 uint_t i = 0; 15 14 -
tests/src/test-pitchschmitt.c
r4621cd6 raea235c 6 6 /* allocate some memory */ 7 7 uint_t win_s = 1024; /* window size */ 8 fvec_t * in = new_fvec (win_s , 1); /* input buffer */9 fvec_t * out = new_fvec (1 , 1); /* input buffer */8 fvec_t * in = new_fvec (win_s); /* input buffer */ 9 fvec_t * out = new_fvec (1); /* input buffer */ 10 10 aubio_pitchschmitt_t * o = new_aubio_pitchschmitt(win_s); 11 11 uint_t i = 0; -
tests/src/test-pitchyin.c
r4621cd6 raea235c 6 6 /* allocate some memory */ 7 7 uint_t win_s = 1024; /* window size */ 8 uint_t channels = 1; /* number of channel */ 9 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 10 fvec_t * out = new_fvec (win_s/2, channels); /* input buffer */ 8 fvec_t * in = new_fvec (win_s); /* input buffer */ 9 fvec_t * out = new_fvec (win_s/2); /* input buffer */ 11 10 aubio_pitchyin_t *p = new_aubio_pitchyin (win_s); 12 11 uint_t i = 0; -
tests/src/test-pitchyinfft.c
r4621cd6 raea235c 6 6 /* allocate some memory */ 7 7 uint_t win_s = 1024; /* window size */ 8 uint_t channels = 1; /* number of channel */ 9 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 10 fvec_t * out = new_fvec (1, channels); /* output pitch periods */ 8 fvec_t * in = new_fvec (win_s); /* input buffer */ 9 fvec_t * out = new_fvec (1); /* output pitch periods */ 11 10 aubio_pitchyinfft_t * o = new_aubio_pitchyinfft(win_s); 12 11 aubio_pitchyinfft_set_tolerance (o, 0.2); -
tests/src/test-resample.c
r4621cd6 raea235c 7 7 /* allocate some memory */ 8 8 uint_t win_s = 1024; /* window size */ 9 uint_t channels = 1; /* number of channel */10 9 smpl_t ratio = 0.5; 11 fvec_t *in = new_fvec (win_s , channels); /* input buffer */12 fvec_t *out = new_fvec ((uint_t) (win_s * ratio) , channels); /* input buffer */10 fvec_t *in = new_fvec (win_s); /* input buffer */ 11 fvec_t *out = new_fvec ((uint_t) (win_s * ratio)); /* input buffer */ 13 12 aubio_resampler_t *o = new_aubio_resampler (0.5, 0); 14 13 uint_t i = 0; -
tests/src/test-scale.c
r4621cd6 raea235c 6 6 /* allocate some memory */ 7 7 uint_t win_s = 1024; /* window size */ 8 uint_t channels = 1; /* number of channel */ 9 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 8 fvec_t * in = new_fvec (win_s); /* input buffer */ 10 9 aubio_scale_t * o = new_aubio_scale(0,1,2,3); 11 10 aubio_scale_set_limits (o,0,1,2,3); -
tests/src/test-tempo.c
r4621cd6 raea235c 5 5 /* allocate some memory */ 6 6 uint_t win_s = 1024; /* window size */ 7 uint_t channels = 1; /* number of channel */ 8 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 9 fvec_t * out = new_fvec (2, channels); /* input buffer */ 10 aubio_tempo_t * o = new_aubio_tempo("complex", win_s, win_s/4, channels, 44100.); 7 fvec_t * in = new_fvec (win_s); /* input buffer */ 8 fvec_t * out = new_fvec (2); /* input buffer */ 9 aubio_tempo_t * o = new_aubio_tempo("complex", win_s, win_s/4, 44100.); 11 10 uint_t i = 0; 12 11 -
tests/src/test-tss.c
r4621cd6 raea235c 14 14 uint_t win_s = 1024; /* window size */ 15 15 uint_t hop_s = 256; /* hop size */ 16 uint_t channels = 4; /* number of channels */17 16 /* allocate some memory */ 18 fvec_t * in = new_fvec (hop_s , channels); /* input buffer */19 cvec_t * fftgrain = new_cvec (win_s , channels); /* fft norm and phase */20 cvec_t * cstead = new_cvec (win_s , channels); /* fft norm and phase */21 cvec_t * ctrans = new_cvec (win_s , channels); /* fft norm and phase */22 fvec_t * stead = new_fvec (hop_s , channels); /* output buffer */23 fvec_t * trans = new_fvec (hop_s , channels); /* output buffer */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 */ 24 23 /* allocate fft and other memory space */ 25 aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s ,channels);26 aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s ,channels);27 aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s ,channels);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); 28 27 29 aubio_tss_t * tss = new_aubio_tss(win_s,hop_s ,channels);28 aubio_tss_t * tss = new_aubio_tss(win_s,hop_s); 30 29 /* fill input with some data */ 31 30 printf("initialised\n");
Note: See TracChangeset
for help on using the changeset viewer.