Changeset 340f5c7
- Timestamp:
- Mar 26, 2017, 5:45:07 PM (8 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, sampler
- Children:
- 7b711b3
- Parents:
- b63c7d3
- Location:
- src/onset
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
rb63c7d3 r340f5c7 129 129 } 130 130 131 uint_t aubio_onset_set_ logmag_compression (aubio_onset_t *o, smpl_t lambda)131 uint_t aubio_onset_set_compression (aubio_onset_t *o, smpl_t lambda) 132 132 { 133 133 if (lambda < 0.) { … … 139 139 } 140 140 141 smpl_t aubio_onset_get_ logmag_compression (aubio_onset_t *o)141 smpl_t aubio_onset_get_compression (aubio_onset_t *o) 142 142 { 143 143 return o->apply_compression ? o->lambda_compression : 0; … … 285 285 aubio_onset_set_awhitening (o, 0); 286 286 // disable logarithmic magnitude 287 aubio_onset_set_ logmag_compression (o, 0.);287 aubio_onset_set_compression (o, 0.); 288 288 289 289 /* method specific optimisations */ … … 291 291 } else if (strcmp (onset_mode, "hfc") == 0 || strcmp (onset_mode, "default") == 0) { 292 292 aubio_onset_set_threshold (o, 0.058); 293 o->apply_compression = 1; 294 o->lambda_compression = 1.; 295 aubio_onset_set_adaptive_whitening (o, 0); 293 aubio_onset_set_compression (o, 1.); 296 294 } else if (strcmp (onset_mode, "complexdomain") == 0 297 295 || strcmp (onset_mode, "complex") == 0) { -
src/onset/onset.h
rb63c7d3 r340f5c7 140 140 141 141 \param o onset detection object as returned by new_aubio_onset() 142 \param lambda logarithmic compression factor 142 \param lambda logarithmic compression factor, 0 to disable 143 143 144 144 \return 0 if successful, 1 otherwise 145 145 146 146 */ 147 uint_t aubio_onset_set_ logmag_compression(aubio_onset_t *o, smpl_t lambda);147 uint_t aubio_onset_set_compression(aubio_onset_t *o, smpl_t lambda); 148 148 149 149 /** get onset detection log compression 150 151 \param o onset detection object as returned by new_aubio_onset() 152 153 \returns 0 if disabled, compression factor otherwise 154 150 155 */ 151 smpl_t aubio_onset_get_ logmag_compression(aubio_onset_t *o);156 smpl_t aubio_onset_get_compression(aubio_onset_t *o); 152 157 153 158 /** set onset detection silence threshold
Note: See TracChangeset
for help on using the changeset viewer.