Changeset 2062e48


Ignore:
Timestamp:
Sep 23, 2009, 6:37:24 PM (15 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:
b511fa9
Parents:
75a0f40
Message:

src/spectral/filterbank*.c: reduce filterbank size to n/2+1, other half is always empty

Location:
src/spectral
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank.c

    r75a0f40 r2062e48  
    4545
    4646  /* allocate filter tables, an fvec of length win_s and of filter_cnt channel */
    47   fb->filters = new_fvec (win_s, n_filters);
     47  fb->filters = new_fvec (win_s / 2 + 1, n_filters);
    4848
    4949  return fb;
  • src/spectral/filterbank_mel.c

    r75a0f40 r2062e48  
    7070  /* fill fft_freqs lookup table, which assigns the frequency in hz to each bin */
    7171  for (bin = 0; bin < win_s; bin++) {
    72     fft_freqs->data[0][bin] = aubio_bintofreq (bin, samplerate, win_s);
     72    fft_freqs->data[0][bin] = aubio_bintofreq (bin, samplerate, (win_s - 1) * 2);
    7373  }
    7474
Note: See TracChangeset for help on using the changeset viewer.