- Timestamp:
- Oct 19, 2009, 2:45:13 PM (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:
- b849106
- Parents:
- 59c046d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/peakpick.c
r59c046d rb01bd4a 21 21 #include "fvec.h" 22 22 #include "mathutils.h" 23 #include "lvec.h" 24 #include "temporal/filter.h" 23 25 #include "temporal/biquad.h" 24 26 #include "onset/peakpick.h" … … 43 45 44 46 /** biquad lowpass filter */ 45 aubio_ biquad_t * biquad;47 aubio_filter_t * biquad; 46 48 /** original onsets */ 47 49 fvec_t * onset_keep; … … 95 97 /* filter onset_proc */ 96 98 /** \bug filtfilt calculated post+pre times, should be only once !? */ 97 //aubio_biquad_do_filtfilt(p->biquad,onset_proc,scratch);99 aubio_filter_do_filtfilt (p->biquad, onset_proc, scratch); 98 100 99 101 for (i = 0; i < p->channels; i++) { … … 160 162 t->onset_peek = new_fvec(3, channels); 161 163 162 /* cutoff: low-pass filter cutoff [0.34, 1] */ 163 /* t->cutoff=0.34; */ 164 t->biquad = new_aubio_biquad(0.1600,0.3200,0.1600,-0.5949,0.2348); 164 /* cutoff: low-pass filter with cutoff reduced frequency at 0.34 165 generated with octave butter function: [b,a] = butter(2, 0.34); 166 */ 167 t->biquad = new_aubio_filter_biquad (0.15998789, 0.31997577, 0.15998789, 168 -0.59488894, 0.23484048, channels); 169 165 170 return t; 166 171 } 167 172 168 173 void del_aubio_peakpicker(aubio_peakpicker_t * p) { 169 del_aubio_ biquad(p->biquad);174 del_aubio_filter(p->biquad); 170 175 del_fvec(p->onset_keep); 171 176 del_fvec(p->onset_proc);
Note: See TracChangeset
for help on using the changeset viewer.