Changeset 38e9732


Ignore:
Timestamp:
Oct 2, 2009, 1:26:08 AM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
c0b295c
Parents:
5c4ec3c
Message:

tests/src/: various updates

Location:
tests/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tests/src/test-fft.c

    r5c4ec3c r38e9732  
    44int main(){
    55        /* allocate some memory */
    6         uint_t win_s      = 4096;                       /* window size        */
    7         uint_t channels   = 100;                        /* number of channels */
     6        uint_t win_s      = 8;                       /* window size        */
     7        uint_t channels   = 1;                        /* number of channels */
    88        fvec_t * in       = new_fvec (win_s, channels); /* input buffer       */
    99        cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
    1010        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;
    1119        /* allocate fft and other memory space */
    1220        aubio_fft_t * fft = new_aubio_fft(win_s,channels);
    1321        /* fill input with some data */
    14         //printf("initialised\n");
     22        fvec_print(in);
    1523        /* execute stft */
    1624        aubio_fft_do (fft,in,fftgrain);
    17         //printf("computed forward\n");
     25        cvec_print(fftgrain);
    1826        /* execute inverse fourier transform */
    1927        aubio_fft_rdo(fft,fftgrain,out);
    20         //printf("computed backard\n");
     28        fvec_print(out);
    2129        del_aubio_fft(fft);
    2230        del_fvec(in);
    2331        del_cvec(fftgrain);
    2432        del_fvec(out);
    25         //printf("memory freed\n");
    2633        aubio_cleanup();
    2734        return 0;
  • tests/src/test-filterbank_mel.c

    r5c4ec3c r38e9732  
     1#include <stdio.h>
    12#include <aubio.h>
    23
     
    2627  //fvec_print (coeffs);
    2728
    28   fprintf(stderr, "%f\n", vec_sum(coeffs));
     29  //fprintf(stderr, "%f\n", fvec_sum(coeffs));
    2930
    3031  aubio_filterbank_do (o, in, out);
  • tests/src/test-mfcc.c

    r5c4ec3c r38e9732  
    2222
    2323  aubio_mfcc_do (o, in, out);
    24 
     24  fvec_print (out);
     25  aubio_mfcc_do (o, in, out);
    2526  fvec_print (out);
    2627
Note: See TracChangeset for help on using the changeset viewer.