Changeset 422edfb
- Timestamp:
- Oct 6, 2009, 5:02:54 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:
- eb089fb
- Parents:
- 020d80e
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
r020d80e r422edfb 51 51 onset->data[0][0] *= onset2->data[0][0]; 52 52 }*/ 53 isonset = aubio_peakpick _pimrt(o->of,o->pp);53 isonset = aubio_peakpicker_do(o->pp, o->of); 54 54 if (isonset > 0.) { 55 55 if (aubio_silence_detection(input, o->silence)==1) { -
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; -
src/onset/peakpick.h
r020d80e r422edfb 41 41 aubio_pickpeak_t * new_aubio_peakpicker(smpl_t threshold); 42 42 /** real time peak picking function */ 43 smpl_t aubio_peakpick_pimrt(fvec_t * DF, aubio_pickpeak_t * p); 44 /** function added by Miguel Ramirez to return the onset detection amplitude in peakval */ 45 uint_t aubio_peakpick_pimrt_wt( fvec_t* DF, aubio_pickpeak_t* p, smpl_t* peakval ); 43 smpl_t aubio_peakpicker_do(aubio_pickpeak_t * p, fvec_t * DF); 46 44 /** get current peak value */ 47 smpl_t aubio_peakpick _pimrt_getval(aubio_pickpeak_t * p);45 smpl_t aubio_peakpicker_get_thresholded_input(aubio_pickpeak_t * p); 48 46 /** destroy peak picker structure */ 49 47 void del_aubio_peakpicker(aubio_pickpeak_t * p); -
src/tempo/tempo.c
r020d80e r422edfb 69 69 } 70 70 o->blockpos++; 71 tempo->data[0][1] = aubio_peakpick_pimrt_wt(o->of,o->pp, 72 &(o->dfframe->data[0][winlen - step + o->blockpos])); 71 tempo->data[0][1] = aubio_peakpicker_do (o->pp, o->of); 72 o->dfframe->data[0][winlen - step + o->blockpos] = 73 aubio_peakpicker_get_thresholded_input(o->pp); 73 74 /* end of second level loop */ 74 75 tempo->data[0][0] = 0; /* reset tactus */
Note: See TracChangeset
for help on using the changeset viewer.