- Timestamp:
- Sep 25, 2009, 4:20:27 AM (15 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:
- ff9d00c
- Parents:
- e4284c9
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
re4284c9 rd84d19e 25 25 #include "config.h" 26 26 27 void aubio_window(smpl_t *w, uint_t size, aubio_window_type wintype) { 27 fvec_t * new_aubio_window(uint_t size, aubio_window_type wintype) { 28 // create fvec of size x 1 channel 29 fvec_t * win = new_fvec( size, 1); 30 smpl_t * w = win->data[0]; 28 31 uint_t i; 29 32 switch(wintype) { … … 72 75 break; 73 76 } 77 return win; 74 78 } 75 79 -
src/mathutils.h
re4284c9 rd84d19e 56 56 57 57 /** create window */ 58 void aubio_window(smpl_t *w,uint_t size, aubio_window_type wintype);58 fvec_t * new_aubio_window(uint_t size, aubio_window_type wintype); 59 59 60 60 /** principal argument -
src/pitch/pitchfcomb.c
re4284c9 rd84d19e 54 54 p->fftLastPhase = new_fvec(bufsize,1); 55 55 p->fft = new_aubio_fft(bufsize, 1); 56 p->win = new_fvec(bufsize,1); 57 aubio_window(p->win->data[0], bufsize, aubio_win_hanning); 56 p->win = new_aubio_window(bufsize, aubio_win_hanning); 58 57 return p; 59 58 } -
src/pitch/pitchyinfft.c
re4284c9 rd84d19e 55 55 p->res = new_cvec(bufsize,1); 56 56 p->yinfft = new_fvec(bufsize/2+1,1); 57 p->win = new_fvec(bufsize,1); 58 aubio_window(p->win->data[0], bufsize, aubio_win_hanningz); 57 p->win = new_aubio_window(bufsize, aubio_win_hanningz); 59 58 p->weight = new_fvec(bufsize/2+1,1); 60 59 { -
src/spectral/phasevoc.c
re4284c9 rd84d19e 35 35 fvec_t * data; /** current input grain [win_s] */ 36 36 fvec_t * dataold; /** last input frame [win_s-hop_s] */ 37 smpl_t * w; /** grain window [win_s] */37 fvec_t * w; /** grain window [win_s] */ 38 38 }; 39 39 … … 54 54 datanew->data[i],pv->win_s,pv->hop_s); 55 55 /* windowing */ 56 f or (j=0; j<pv->win_s; j++) pv->data->data[i][j] *= pv->w[j];56 fvec_weight(pv->data, pv->w); 57 57 } 58 58 /* shift */ … … 96 96 pv->dataold = new_fvec (win_s-hop_s, channels); 97 97 pv->synthold = new_fvec (win_s-hop_s, channels); 98 pv->w = AUBIO_ARRAY(smpl_t,win_s); 99 aubio_window(pv->w,win_s,aubio_win_hanningz); 98 pv->w = new_aubio_window (win_s, aubio_win_hanningz); 100 99 101 100 pv->channels = channels; … … 111 110 del_fvec(pv->dataold); 112 111 del_fvec(pv->synthold); 112 del_fvec(pv->w); 113 113 del_aubio_fft(pv->fft); 114 AUBIO_FREE(pv->w);115 114 AUBIO_FREE(pv); 116 115 }
Note: See TracChangeset
for help on using the changeset viewer.