Changeset b799241
- Timestamp:
- Mar 10, 2017, 8:16:28 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:
- d0f0d55
- Parents:
- b75f890
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
rb75f890 rb799241 298 298 } 299 299 300 void fvec_clamp(fvec_t *in, smpl_t absmax) { 301 uint_t i; 302 for (i = 0; i < in->length; i++) { 303 if (in->data[i] > 0 && in->data[i] > ABS(absmax)) { 304 in->data[i] = absmax; 305 } else if (in->data[i] < 0 && in->data[i] < -ABS(absmax)) { 306 in->data[i] = -absmax; 307 } 308 } 309 } 310 300 311 smpl_t 301 312 aubio_level_lin (const fvec_t * f) -
src/musicutils.h
rb75f890 rb799241 157 157 smpl_t aubio_level_detection (const fvec_t * v, smpl_t threshold); 158 158 159 /** clamp the values of a vector within the range [-abs(max), abs(max)] 160 161 \param in vector to clamp 162 \param max maximum value over which input vector elements should be clamped 163 164 */ 165 void fvec_clamp(fvec_t *in, smpl_t absmax); 166 159 167 #ifdef __cplusplus 160 168 }
Note: See TracChangeset
for help on using the changeset viewer.