Changeset 8b2dc90


Ignore:
Timestamp:
Nov 7, 2007, 4:32:03 PM (17 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:
49407f3
Parents:
aadd27a
Message:

phasevoc.c,pitch{fcomb,yinfft}.c: update to new aubio_fft

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/phasevoc.c

    raadd27a r8b2dc90  
    1919
    2020#include "aubio_priv.h"
    21 #include "sample.h"
     21#include "fvec.h"
     22#include "cvec.h"
    2223#include "fft.h"
    2324#include "mathutils.h"
     
    2930  uint_t hop_s;       /** overlap step */
    3031  uint_t channels;    /** number of channels */
    31   aubio_mfft_t * fft; /** spectral data */
    32   fvec_t * synth;     /**cur output grain [win_s] */
    33   fvec_t * synthold;  /**last input frame [win_s-hop_s] */
    34   fvec_t * data;      /**current input grain [win_s] */
    35   fvec_t * dataold;   /**last input frame [win_s-hop_s] */
    36   smpl_t * w;          /** grain window [win_s] */
     32  aubio_fft_t * fft;  /** fft object */
     33  fvec_t * synth;     /** cur output grain [win_s] */
     34  fvec_t * synthold;  /** last input frame [win_s-hop_s] */
     35  fvec_t * data;      /** current input grain [win_s] */
     36  fvec_t * dataold;   /** last input frame [win_s-hop_s] */
     37  smpl_t * w;         /** grain window [win_s] */
    3738};
    3839
     
    5859  vec_shift(pv->data);
    5960  /* calculate fft */
    60   aubio_mfft_do (pv->fft,pv->data,fftgrain);
     61  aubio_fft_do (pv->fft,pv->data,fftgrain);
    6162}
    6263
     
    6465  uint_t i;
    6566  /* calculate rfft */
    66   aubio_mfft_rdo(pv->fft,fftgrain,pv->synth);
     67  aubio_fft_rdo(pv->fft,fftgrain,pv->synth);
    6768  /* unshift */
    6869  vec_shift(pv->synth);
     
    8889  }
    8990
    90   pv->fft      = new_aubio_mfft(win_s,channels);
     91  pv->fft      = new_aubio_fft(win_s,channels);
    9192
    9293  /* remember old */
     
    112113  del_fvec(pv->dataold);
    113114  del_fvec(pv->synthold);
    114   del_aubio_mfft(pv->fft);
     115  del_aubio_fft(pv->fft);
    115116  AUBIO_FREE(pv->w);
    116117  AUBIO_FREE(pv);
  • src/pitchfcomb.c

    raadd27a r8b2dc90  
    3939        cvec_t * fftOut;
    4040        fvec_t * fftLastPhase;
    41         aubio_mfft_t * fft;
     41        aubio_fft_t * fft;
    4242        //aubio_pvoc_t * pvoc;
    4343};
     
    5252  p->fftOut       = new_cvec(bufsize,1);
    5353  p->fftLastPhase = new_fvec(bufsize,1);
    54   p->fft = new_aubio_mfft(bufsize, 1);
     54  p->fft = new_aubio_fft(bufsize, 1);
    5555  p->win = new_fvec(bufsize,1);
    5656  aubio_window(p->win->data[0], bufsize, aubio_win_hanning);
     
    7474          p->winput->data[0][k] = p->win->data[0][k] * input->data[0][k];
    7575  }
    76   aubio_mfft_do(p->fft,p->winput,p->fftOut);
     76  aubio_fft_do(p->fft,p->winput,p->fftOut);
    7777
    7878  for (k=0; k<=p->fftSize/2; k++) {
     
    130130  del_fvec(p->win);
    131131  del_fvec(p->winput);
    132   del_aubio_mfft(p->fft);
     132  del_aubio_fft(p->fft);
    133133  AUBIO_FREE(p);
    134134}
  • src/pitchyinfft.c

    raadd27a r8b2dc90  
    3131  fvec_t * weight;    /**< spectral weighting window (psychoacoustic model) */
    3232  cvec_t * fftout;    /**< Fourier transform output */
    33   aubio_mfft_t * fft; /**< fft object to compute square difference function */
     33  aubio_fft_t * fft; /**< fft object to compute square difference function */
    3434  fvec_t * yinfft;    /**< Yin function */
    3535};
     
    4949  aubio_pitchyinfft_t * p = AUBIO_NEW(aubio_pitchyinfft_t);
    5050  p->winput       = new_fvec(bufsize,1);
    51   p->fft          = new_aubio_mfft(bufsize, 1);
     51  p->fft          = new_aubio_fft(bufsize, 1);
    5252  p->fftout       = new_cvec(bufsize,1);
    5353  p->sqrmag       = new_fvec(bufsize,1);
     
    9797          p->winput->data[0][l] = p->win->data[0][l] * input->data[0][l];
    9898  }
    99   aubio_mfft_do(p->fft,p->winput,p->fftout);
     99  aubio_fft_do(p->fft,p->winput,p->fftout);
    100100  for (l=0; l < p->fftout->length; l++){
    101101          p->sqrmag->data[0][l] = SQR(p->fftout->norm[0][l]);
     
    112112  }
    113113  sum *= 2.;
    114   aubio_mfft_do(p->fft,p->sqrmag,res);
     114  aubio_fft_do(p->fft,p->sqrmag,res);
    115115  yin->data[0][0] = 1.;
    116116  for (tau=1; tau < yin->length; tau++) {
     
    143143void del_aubio_pitchyinfft(aubio_pitchyinfft_t *p){
    144144        del_fvec(p->win);
    145         del_aubio_mfft(p->fft);
     145        del_aubio_fft(p->fft);
    146146        del_fvec(p->yinfft);
    147147        del_fvec(p->sqrmag);
Note: See TracChangeset for help on using the changeset viewer.