Changeset f8714ee for src


Ignore:
Timestamp:
May 28, 2005, 1:56:41 AM (19 years ago)
Author:
Paul Brossier <piem@altern.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:
f88a326
Parents:
0c20582
Message:

fixed yin overlapping and fast version

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/pitchdetection.c

    r0c20582 rf8714ee  
    9090smpl_t aubio_pitchdetection(aubio_pitchdetection_t *p, fvec_t * ibuf) {
    9191        smpl_t pitch = 0.;
    92         uint_t i,j = 0;
     92        uint_t i,j = 0, overlap_size = 0;
    9393        switch(p->type) {
    9494                case aubio_yin:
     95                        overlap_size = p->buf->length-ibuf->length;
    9596                        /* do sliding window blocking */
    9697                        for (i=0;i<p->buf->channels;i++){
    97                                 for (j=0;j<p->buf->length-ibuf->length;j++){
    98                                         p->buf->data[i][j] = p->buf->data[i][j+ibuf->length];
     98                                for (j=0;j<overlap_size;j++){
     99                                        p->buf->data[i][j] =
     100                                                p->buf->data[i][j+ibuf->length];
    99101                                }
    100102                        }
    101103                        for (i=0;i<ibuf->channels;i++){
    102104                                for (j=0;j<ibuf->length;j++){
    103                                         p->buf->data[i][j] = ibuf->data[i][j];
     105                                        p->buf->data[i][j+overlap_size] =
     106                                                ibuf->data[i][j];
    104107                                }
    105108                        }
  • src/pitchyin.c

    r0c20582 rf8714ee  
    9191uint_t aubio_pitchyin_getpitchfast(fvec_t * input, fvec_t * yin, smpl_t tol){
    9292        uint_t c=0,j,tau = 0;
    93         smpl_t tmp = 0, tmp2;
     93        smpl_t tmp = 0;
    9494        for (tau=0;tau<yin->length;tau++)
    9595        {
     
    104104                }
    105105        }
    106         tmp2 = 0.;
    107106        yin->data[c][0] = 1.;
     107        tmp = 0.;
    108108        for (tau=1;tau<yin->length;tau++)
    109109        {
Note: See TracChangeset for help on using the changeset viewer.