Changeset 1942323 for src/onset


Ignore:
Timestamp:
Oct 1, 2009, 9:04:35 AM (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:
f825dd0
Parents:
bc4e175
Message:

src/onset/onsetdetection.c: fix off by one error in complexdomain without complex.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/onset/onsetdetection.c

    rbc4e175 r1942323  
    8888#else
    8989      o->meas[j]             = (fftgrain->norm[i][j])*COS(o->dev1->data[i][j]);
    90       o->meas[(nbins-1)*2-j] = (fftgrain->norm[i][j])*SIN(o->dev1->data[i][j]);
     90      o->meas[(nbins-1)*2-1-j] = (fftgrain->norm[i][j])*SIN(o->dev1->data[i][j]);
    9191      /* sum on all bins */
    9292      onset->data[i][0]     += //(fftgrain->norm[i][j]);
    9393          SQRT(SQR( (o->oldmag->data[i][j]-o->meas[j]) )
    94             +  SQR( (-o->meas[(nbins-1)*2-j]) )
     94            +  SQR( (-o->meas[(nbins-1)*2-1-j]) )
    9595            );
    9696#endif
Note: See TracChangeset for help on using the changeset viewer.