- Timestamp:
- Oct 7, 2009, 8:31:43 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:
- a808d05
- Parents:
- cfa0f12
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
rcfa0f12 r8766cb6 31 31 aubio_pvoc_t * pv; /**< phase vocoder */ 32 32 aubio_onsetdetection_t * od; /**< onset detection */ 33 aubio_p ickpeak_t * pp;/**< peak picker */33 aubio_peakpicker_t * pp; /**< peak picker */ 34 34 cvec_t * fftgrain; /**< phase vocoder output */ 35 35 fvec_t * of; /**< onset detection function */ -
src/onset/peakpick.c
rcfa0f12 r8766cb6 30 30 * time-> ^now 31 31 */ 32 struct _aubio_p ickpeak_t {32 struct _aubio_peakpicker_t { 33 33 /** thresh: offset threshold [0.033 or 0.01] */ 34 34 smpl_t threshold; … … 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_peakpicker_do(aubio_p ickpeak_t * p, fvec_t * onset) {70 smpl_t aubio_peakpicker_do(aubio_peakpicker_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_peakpicker_get_thresholded_input(aubio_p ickpeak_t * p)123 smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t * p) 124 124 { 125 125 return p->onset_peek->data[0][1]; … … 127 127 128 128 /** function added by Miguel Ramirez to return the onset detection amplitude in peakval */ 129 void aubio_peakpicker_set_threshold(aubio_p ickpeak_t * p, smpl_t threshold) {129 void aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold) { 130 130 p->threshold = threshold; 131 131 return; 132 132 } 133 133 134 smpl_t aubio_peakpicker_get_threshold(aubio_p ickpeak_t * p) {134 smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p) { 135 135 return p->threshold; 136 136 } 137 137 138 void aubio_peakpicker_set_thresholdfn(aubio_p ickpeak_t * p, aubio_thresholdfn_t thresholdfn) {138 void aubio_peakpicker_set_thresholdfn(aubio_peakpicker_t * p, aubio_thresholdfn_t thresholdfn) { 139 139 p->thresholdfn = thresholdfn; 140 140 return; 141 141 } 142 142 143 aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_p ickpeak_t * p) {143 aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_peakpicker_t * p) { 144 144 return (aubio_thresholdfn_t) (p->thresholdfn); 145 145 } 146 146 147 aubio_p ickpeak_t * new_aubio_peakpicker(smpl_t threshold) {148 aubio_p ickpeak_t * t = AUBIO_NEW(aubio_pickpeak_t);147 aubio_peakpicker_t * new_aubio_peakpicker(smpl_t threshold) { 148 aubio_peakpicker_t * t = AUBIO_NEW(aubio_peakpicker_t); 149 149 t->threshold = 0.1; /* 0.0668; 0.33; 0.082; 0.033; */ 150 150 if (threshold > 0. && threshold < 10.) … … 167 167 } 168 168 169 void del_aubio_peakpicker(aubio_p ickpeak_t * p) {169 void del_aubio_peakpicker(aubio_peakpicker_t * p) { 170 170 del_aubio_biquad(p->biquad); 171 171 del_fvec(p->onset_keep); -
src/onset/peakpick.h
rcfa0f12 r8766cb6 36 36 typedef uint_t (*aubio_pickerfn_t)(fvec_t *input, uint_t pos); 37 37 /** peak-picker structure */ 38 typedef struct _aubio_p ickpeak_t aubio_pickpeak_t;38 typedef struct _aubio_peakpicker_t aubio_peakpicker_t; 39 39 40 40 /** peak-picker creation function */ 41 aubio_p ickpeak_t * new_aubio_peakpicker(smpl_t threshold);41 aubio_peakpicker_t * new_aubio_peakpicker(smpl_t threshold); 42 42 /** real time peak picking function */ 43 smpl_t aubio_peakpicker_do(aubio_p ickpeak_t * p, fvec_t * DF);43 smpl_t aubio_peakpicker_do(aubio_peakpicker_t * p, fvec_t * DF); 44 44 /** get current peak value */ 45 smpl_t aubio_peakpicker_get_thresholded_input(aubio_p ickpeak_t * p);45 smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t * p); 46 46 /** destroy peak picker structure */ 47 void del_aubio_peakpicker(aubio_p ickpeak_t * p);47 void del_aubio_peakpicker(aubio_peakpicker_t * p); 48 48 49 49 /** set peak picking threshold */ 50 void aubio_peakpicker_set_threshold(aubio_p ickpeak_t * p, smpl_t threshold);50 void aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold); 51 51 /** get peak picking threshold */ 52 smpl_t aubio_peakpicker_get_threshold(aubio_p ickpeak_t * p);52 smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p); 53 53 /** set peak picker thresholding function */ 54 void aubio_peakpicker_set_thresholdfn(aubio_p ickpeak_t * p, aubio_thresholdfn_t thresholdfn);54 void aubio_peakpicker_set_thresholdfn(aubio_peakpicker_t * p, aubio_thresholdfn_t thresholdfn); 55 55 /** get peak picker thresholding function */ 56 aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_p ickpeak_t * p);56 aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_peakpicker_t * p); 57 57 58 58 #ifdef __cplusplus -
src/tempo/tempo.c
rcfa0f12 r8766cb6 32 32 aubio_onsetdetection_t * od; /** onset detection */ 33 33 aubio_pvoc_t * pv; /** phase vocoder */ 34 aubio_p ickpeak_t * pp;/** peak picker */34 aubio_peakpicker_t * pp; /** peak picker */ 35 35 aubio_beattracking_t * bt; /** beat tracking */ 36 36 cvec_t * fftgrain; /** spectral frame */
Note: See TracChangeset
for help on using the changeset viewer.