Changeset 845c435 for tests/src/spectral


Ignore:
Timestamp:
Sep 30, 2013, 5:18:50 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
50d56cc
Parents:
c0916f2
git-author:
Paul Brossier <piem@piem.org> (09/30/13 15:58:12)
git-committer:
Paul Brossier <piem@piem.org> (09/30/13 17:18:50)
Message:

tests/src/spectral/test-filterbank*: improve comments, print coeffs

Location:
tests/src/spectral
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/src/spectral/test-filterbank.c

    rc0916f2 r845c435  
    88  cvec_t *in_spec = new_cvec (win_s); // input vector of samples
    99  fvec_t *out_filters = new_fvec (n_filters); // per-band outputs
    10   fmat_t *coeffs; // pointer to the coefficients
    1110
    1211  // create filterbank object
    1312  aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
    1413
     14  // apply filterbank ten times
     15  uint_t n = 10;
     16  while (n) {
     17    aubio_filterbank_do (o, in_spec, out_filters);
     18    n--;
     19  }
     20
     21  // print out filterbank coeffs
     22  fmat_t *coeffs; // pointer to the coefficients
    1523  coeffs = aubio_filterbank_get_coeffs (o);
     24  fmat_print (coeffs);
    1625
    17   aubio_filterbank_do (o, in_spec, out_filters);
     26  //fvec_print (out_filters);
    1827
    19   // fmat_print (coeffs);
    20   // cvec_print(in_spec);
    21   // fvec_print(out_filters);
    22 
     28  // clean up
    2329  del_aubio_filterbank (o);
    2430  del_cvec (in_spec);
  • tests/src/spectral/test-filterbank_mel.c

    rc0916f2 r845c435  
    99  cvec_t *in_spec = new_cvec (win_s); // input vector of samples
    1010  fvec_t *out_filters = new_fvec (n_filters); // per-band outputs
    11   fmat_t *coeffs; // pointer to the coefficients
    1211
    1312  // create filterbank object
     
    1716  aubio_filterbank_set_mel_coeffs_slaney (o, samplerate);
    1817
     18  // apply filterbank ten times
     19  uint_t n = 10;
     20  while (n) {
     21    aubio_filterbank_do (o, in_spec, out_filters);
     22    n--;
     23  }
     24
     25  // print out filter coefficients
     26  fmat_t *coeffs; // pointer to the coefficients
    1927  coeffs = aubio_filterbank_get_coeffs (o);
     28  fmat_print (coeffs);
    2029
    21   aubio_filterbank_do (o, in_spec, out_filters);
    22 
    23   // fmat_print (coeffs);
    24   // cvec_print(in_spec);
    25   // fvec_print(out_filters);
     30  //fvec_print (out_filters);
    2631
    2732  del_aubio_filterbank (o);
Note: See TracChangeset for help on using the changeset viewer.