Changeset 9e56228


Ignore:
Timestamp:
Mar 3, 2013, 4:48:49 AM (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:
33cd81f
Parents:
b173ca1
Message:

src/mathutils.c: fix computation of gauss window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    rb173ca1 r9e56228  
    105105      break;
    106106    case aubio_win_gaussian:
    107       for (i=0;i<size;i++)
    108         w[i] = EXP(- 1.0 / SQR(size) * SQR(2.0*i-size));
     107      {
     108        lsmp_t a, b, c = 0.5;
     109        uint_t n;
     110        for (n = 0; n < size; n++)
     111        {
     112          a = (n-c*(size-1))/(SQR(c)*(size-1));
     113          b = -c*SQR(a);
     114          w[n] = EXP(b);
     115        }
     116      }
    109117      break;
    110118    case aubio_win_welch:
Note: See TracChangeset for help on using the changeset viewer.