- Timestamp:
- Nov 7, 2007, 4:32:03 PM (17 years ago)
- 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
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/phasevoc.c
raadd27a r8b2dc90 19 19 20 20 #include "aubio_priv.h" 21 #include "sample.h" 21 #include "fvec.h" 22 #include "cvec.h" 22 23 #include "fft.h" 23 24 #include "mathutils.h" … … 29 30 uint_t hop_s; /** overlap step */ 30 31 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; 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] */ 37 38 }; 38 39 … … 58 59 vec_shift(pv->data); 59 60 /* calculate fft */ 60 aubio_ mfft_do (pv->fft,pv->data,fftgrain);61 aubio_fft_do (pv->fft,pv->data,fftgrain); 61 62 } 62 63 … … 64 65 uint_t i; 65 66 /* calculate rfft */ 66 aubio_ mfft_rdo(pv->fft,fftgrain,pv->synth);67 aubio_fft_rdo(pv->fft,fftgrain,pv->synth); 67 68 /* unshift */ 68 69 vec_shift(pv->synth); … … 88 89 } 89 90 90 pv->fft = new_aubio_ mfft(win_s,channels);91 pv->fft = new_aubio_fft(win_s,channels); 91 92 92 93 /* remember old */ … … 112 113 del_fvec(pv->dataold); 113 114 del_fvec(pv->synthold); 114 del_aubio_ mfft(pv->fft);115 del_aubio_fft(pv->fft); 115 116 AUBIO_FREE(pv->w); 116 117 AUBIO_FREE(pv); -
src/pitchfcomb.c
raadd27a r8b2dc90 39 39 cvec_t * fftOut; 40 40 fvec_t * fftLastPhase; 41 aubio_ mfft_t * fft;41 aubio_fft_t * fft; 42 42 //aubio_pvoc_t * pvoc; 43 43 }; … … 52 52 p->fftOut = new_cvec(bufsize,1); 53 53 p->fftLastPhase = new_fvec(bufsize,1); 54 p->fft = new_aubio_ mfft(bufsize, 1);54 p->fft = new_aubio_fft(bufsize, 1); 55 55 p->win = new_fvec(bufsize,1); 56 56 aubio_window(p->win->data[0], bufsize, aubio_win_hanning); … … 74 74 p->winput->data[0][k] = p->win->data[0][k] * input->data[0][k]; 75 75 } 76 aubio_ mfft_do(p->fft,p->winput,p->fftOut);76 aubio_fft_do(p->fft,p->winput,p->fftOut); 77 77 78 78 for (k=0; k<=p->fftSize/2; k++) { … … 130 130 del_fvec(p->win); 131 131 del_fvec(p->winput); 132 del_aubio_ mfft(p->fft);132 del_aubio_fft(p->fft); 133 133 AUBIO_FREE(p); 134 134 } -
src/pitchyinfft.c
raadd27a r8b2dc90 31 31 fvec_t * weight; /**< spectral weighting window (psychoacoustic model) */ 32 32 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 */ 34 34 fvec_t * yinfft; /**< Yin function */ 35 35 }; … … 49 49 aubio_pitchyinfft_t * p = AUBIO_NEW(aubio_pitchyinfft_t); 50 50 p->winput = new_fvec(bufsize,1); 51 p->fft = new_aubio_ mfft(bufsize, 1);51 p->fft = new_aubio_fft(bufsize, 1); 52 52 p->fftout = new_cvec(bufsize,1); 53 53 p->sqrmag = new_fvec(bufsize,1); … … 97 97 p->winput->data[0][l] = p->win->data[0][l] * input->data[0][l]; 98 98 } 99 aubio_ mfft_do(p->fft,p->winput,p->fftout);99 aubio_fft_do(p->fft,p->winput,p->fftout); 100 100 for (l=0; l < p->fftout->length; l++){ 101 101 p->sqrmag->data[0][l] = SQR(p->fftout->norm[0][l]); … … 112 112 } 113 113 sum *= 2.; 114 aubio_ mfft_do(p->fft,p->sqrmag,res);114 aubio_fft_do(p->fft,p->sqrmag,res); 115 115 yin->data[0][0] = 1.; 116 116 for (tau=1; tau < yin->length; tau++) { … … 143 143 void del_aubio_pitchyinfft(aubio_pitchyinfft_t *p){ 144 144 del_fvec(p->win); 145 del_aubio_ mfft(p->fft);145 del_aubio_fft(p->fft); 146 146 del_fvec(p->yinfft); 147 147 del_fvec(p->sqrmag);
Note: See TracChangeset
for help on using the changeset viewer.