- Timestamp:
- Feb 21, 2014, 5:06:27 PM (11 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:
- 10b11d6
- Parents:
- 098925a5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
r098925a5 r8f14c6e 35 35 cvec_t * fftgrain; /**< phase vocoder output */ 36 36 fvec_t * desc; /**< spectral description */ 37 smpl_t threshold; /**< onset peak picking threshold */38 37 smpl_t silence; /**< silence threhsold */ 39 38 uint_t minioi; /**< minimum inter onset interval */ … … 102 101 103 102 uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold) { 104 o->threshold = threshold; 105 aubio_peakpicker_set_threshold(o->pp, o->threshold); 103 aubio_peakpicker_set_threshold(o->pp, threshold); 106 104 return AUBIO_OK; 107 105 } … … 171 169 { 172 170 aubio_onset_t * o = AUBIO_NEW(aubio_onset_t); 173 /* * set some default parameter*/171 /* store creation parameters */ 174 172 o->samplerate = samplerate; 175 173 o->hop_size = hop_size; 176 o->last_onset = 0; 177 o->threshold = 0.3; 178 o->delay = 4.3 * hop_size; 179 o->minioi = 5 * hop_size; 180 o->silence = -70; 181 o->total_frames = 0; 174 175 /* allocate memory */ 182 176 o->pv = new_aubio_pvoc(buf_size, o->hop_size); 183 177 o->pp = new_aubio_peakpicker(); 184 aubio_peakpicker_set_threshold (o->pp, o->threshold);185 178 o->od = new_aubio_specdesc(onset_mode,buf_size); 186 179 o->fftgrain = new_cvec(buf_size); 187 180 o->desc = new_fvec(1); 181 182 /* set some default parameter */ 183 aubio_onset_set_threshold (o, 0.3); 184 aubio_onset_set_delay_ms(o, 50.); 185 aubio_onset_set_minioi_ms(o, 20.); 186 aubio_onset_set_silence(o, -70.); 187 188 /* initialize internal variables */ 189 o->last_onset = 0; 190 o->total_frames = 0; 188 191 return o; 189 192 }
Note: See TracChangeset
for help on using the changeset viewer.