Ignore:
Timestamp:
Jun 22, 2016, 1:00:10 PM (9 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:
4b9443c4
Parents:
60fc05b (diff), 6769586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into notes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank.c

    r60fc05b rf264b17  
    5757
    5858void
    59 aubio_filterbank_do (aubio_filterbank_t * f, cvec_t * in, fvec_t * out)
     59aubio_filterbank_do (aubio_filterbank_t * f, const cvec_t * in, fvec_t * out)
    6060{
    61   uint_t j, fn;
     61  /* apply filter to all input channel, provided out has enough channels */
     62  //uint_t max_filters = MIN (f->n_filters, out->length);
     63  //uint_t max_length = MIN (in->length, f->filters->length);
    6264
    63   /* apply filter to all input channel, provided out has enough channels */
    64   uint_t max_filters = MIN (f->n_filters, out->length);
    65   uint_t max_length = MIN (in->length, f->filters->length);
     65  // view cvec->norm as fvec->data
     66  fvec_t tmp;
     67  tmp.length = in->length;
     68  tmp.data = in->norm;
    6669
    67   /* reset all values in output vector */
    68   fvec_zeros (out);
    69 
    70   /* for each filter */
    71   for (fn = 0; fn < max_filters; fn++) {
    72     /* for each sample */
    73     for (j = 0; j < max_length; j++) {
    74       out->data[fn] += in->norm[j] * f->filters->data[fn][j];
    75     }
    76   }
     70  fmat_vecmul(f->filters, &tmp, out);
    7771
    7872  return;
     
    8074
    8175fmat_t *
    82 aubio_filterbank_get_coeffs (aubio_filterbank_t * f)
     76aubio_filterbank_get_coeffs (const aubio_filterbank_t * f)
    8377{
    8478  return f->filters;
     
    8680
    8781uint_t
    88 aubio_filterbank_set_coeffs (aubio_filterbank_t * f, fmat_t * filter_coeffs)
     82aubio_filterbank_set_coeffs (aubio_filterbank_t * f, const fmat_t * filter_coeffs)
    8983{
    9084  fmat_copy(filter_coeffs, f->filters);
Note: See TracChangeset for help on using the changeset viewer.