Changeset 422edfb for src/onset/peakpick.c
- Timestamp:
- Oct 6, 2009, 5:02:54 PM (14 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:
- eb089fb
- Parents:
- 020d80e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/peakpick.c
r020d80e r422edfb 68 68 * is slightly more permissive than the offline one, and yelds to an increase 69 69 * of false positives. best */ 70 smpl_t aubio_peakpick _pimrt(fvec_t * onset, aubio_pickpeak_t * p) {70 smpl_t aubio_peakpicker_do(aubio_pickpeak_t * p, fvec_t * onset) { 71 71 fvec_t * onset_keep = (fvec_t *)p->onset_keep; 72 72 fvec_t * onset_proc = (fvec_t *)p->onset_proc; … … 121 121 * after smoothing 122 122 */ 123 smpl_t aubio_peakpick _pimrt_getval(aubio_pickpeak_t * p)123 smpl_t aubio_peakpicker_get_thresholded_input(aubio_pickpeak_t * p) 124 124 { 125 uint_t i = 0; 126 return p->onset_peek->data[i][1]; 125 return p->onset_peek->data[0][1]; 127 126 } 128 127 129 128 /** function added by Miguel Ramirez to return the onset detection amplitude in peakval */ 130 uint_t aubio_peakpick_pimrt_wt(fvec_t * onset, aubio_pickpeak_t * p, smpl_t* peakval)131 {132 uint_t isonset = 0;133 isonset = aubio_peakpick_pimrt(onset,p);134 135 //if ( isonset && peakval != NULL )136 if ( peakval != NULL )137 *peakval = aubio_peakpick_pimrt_getval(p);138 139 return isonset;140 }141 142 129 void aubio_peakpicker_set_threshold(aubio_pickpeak_t * p, smpl_t threshold) { 143 130 p->threshold = threshold;
Note: See TracChangeset
for help on using the changeset viewer.