Changeset 5c4ec3c for src/mathutils.h
- Timestamp:
- Oct 2, 2009, 1:19:10 AM (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:
- 38e9732
- Parents:
- 2f64b0e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.h
r2f64b0e r5c4ec3c 97 97 * a[n/2+1],...a[n],a[0]...,a[n/2] 98 98 */ 99 void vec_shift(fvec_t *s);99 void fvec_shift(fvec_t *s); 100 100 /** returns sum */ 101 smpl_t vec_sum(fvec_t *s);101 smpl_t fvec_sum(fvec_t *s); 102 102 103 103 /** returns energy … … 105 105 * \bug mono 106 106 */ 107 smpl_t vec_local_energy(fvec_t * f);107 smpl_t fvec_local_energy(fvec_t * f); 108 108 /** returns High Frequency Energy Content 109 109 * 110 110 * \bug mono */ 111 smpl_t vec_local_hfc(fvec_t * f);111 smpl_t fvec_local_hfc(fvec_t * f); 112 112 /** return alpha norm. 113 113 * … … 119 119 * \bug should not use POW :( 120 120 */ 121 smpl_t vec_alpha_norm(fvec_t * DF, smpl_t alpha);121 smpl_t fvec_alpha_norm(fvec_t * DF, smpl_t alpha); 122 122 /** dc(min) removal */ 123 void vec_dc_removal(fvec_t * mag);123 void fvec_dc_removal(fvec_t * mag); 124 124 /** alpha normalisation */ 125 void vec_alpha_normalise(fvec_t * mag, uint_t alpha);125 void fvec_alpha_normalise(fvec_t * mag, uint_t alpha); 126 126 /** add a constant to all members of a vector */ 127 void vec_add(fvec_t * mag, smpl_t threshold);127 void fvec_add(fvec_t * mag, smpl_t threshold); 128 128 129 129 /** compute adaptive threshold of input vector */ 130 void vec_adapt_thres(fvec_t * vec, fvec_t * tmp,130 void fvec_adapt_thres(fvec_t * vec, fvec_t * tmp, 131 131 uint_t win_post, uint_t win_pre); 132 132 /** adaptative thresholding … … 149 149 * see SPARMS for explanation of post and pre 150 150 */ 151 smpl_t vec_moving_thres(fvec_t * vec, fvec_t * tmp,151 smpl_t fvec_moving_thres(fvec_t * vec, fvec_t * tmp, 152 152 uint_t win_post, uint_t win_pre, uint_t win_pos); 153 153 … … 161 161 * available at http://ndevilla.free.fr/median/median/ 162 162 */ 163 smpl_t vec_median(fvec_t * input);163 smpl_t fvec_median(fvec_t * input); 164 164 165 165 /** finds exact peak index by quadratic interpolation*/ 166 smpl_t vec_quadint(fvec_t * x, uint_t pos, uint_t span);166 smpl_t fvec_quadint(fvec_t * x, uint_t pos, uint_t span); 167 167 168 168 /** Quadratic interpolation using Lagrange polynomial. … … 179 179 180 180 /** returns 1 if X1 is a peak and positive */ 181 uint_t vec_peakpick(fvec_t * input, uint_t pos);181 uint_t fvec_peakpick(fvec_t * input, uint_t pos); 182 182 183 183 /** convert frequency bin to midi value */
Note: See TracChangeset
for help on using the changeset viewer.