Changeset 155cc10 for src/spectral/statistics.c
- Timestamp:
- Mar 10, 2017, 2:26:32 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:
- ee8a57c
- Parents:
- 00d0275 (diff), 67b6618 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/statistics.c
r00d0275 r155cc10 23 23 #include "spectral/specdesc.h" 24 24 25 void aubio_specdesc_centroid (aubio_specdesc_t * o, c vec_t * spec,26 fvec_t * desc); 27 void aubio_specdesc_spread (aubio_specdesc_t * o, c vec_t * spec,28 fvec_t * desc); 29 void aubio_specdesc_skewness (aubio_specdesc_t * o, c vec_t * spec,30 fvec_t * desc); 31 void aubio_specdesc_kurtosis (aubio_specdesc_t * o, c vec_t * spec,32 fvec_t * desc); 33 void aubio_specdesc_slope (aubio_specdesc_t * o, c vec_t * spec,34 fvec_t * desc); 35 void aubio_specdesc_decrease (aubio_specdesc_t * o, c vec_t * spec,36 fvec_t * desc); 37 void aubio_specdesc_rolloff (aubio_specdesc_t * o, c vec_t * spec,38 fvec_t * desc); 39 40 41 smpl_t cvec_sum (c vec_t * s);42 smpl_t cvec_mean (c vec_t * s);43 smpl_t cvec_centroid (c vec_t * s);44 smpl_t cvec_moment (c vec_t * s, uint_t moment);45 46 smpl_t 47 cvec_sum (c vec_t * s)25 void aubio_specdesc_centroid (aubio_specdesc_t * o, const cvec_t * spec, 26 fvec_t * desc); 27 void aubio_specdesc_spread (aubio_specdesc_t * o, const cvec_t * spec, 28 fvec_t * desc); 29 void aubio_specdesc_skewness (aubio_specdesc_t * o, const cvec_t * spec, 30 fvec_t * desc); 31 void aubio_specdesc_kurtosis (aubio_specdesc_t * o, const cvec_t * spec, 32 fvec_t * desc); 33 void aubio_specdesc_slope (aubio_specdesc_t * o, const cvec_t * spec, 34 fvec_t * desc); 35 void aubio_specdesc_decrease (aubio_specdesc_t * o, const cvec_t * spec, 36 fvec_t * desc); 37 void aubio_specdesc_rolloff (aubio_specdesc_t * o, const cvec_t * spec, 38 fvec_t * desc); 39 40 41 smpl_t cvec_sum (const cvec_t * s); 42 smpl_t cvec_mean (const cvec_t * s); 43 smpl_t cvec_centroid (const cvec_t * s); 44 smpl_t cvec_moment (const cvec_t * s, uint_t moment); 45 46 smpl_t 47 cvec_sum (const cvec_t * s) 48 48 { 49 49 uint_t j; … … 56 56 57 57 smpl_t 58 cvec_mean (c vec_t * s)58 cvec_mean (const cvec_t * s) 59 59 { 60 60 return cvec_sum (s) / (smpl_t) (s->length); … … 62 62 63 63 smpl_t 64 cvec_centroid (c vec_t * spec)64 cvec_centroid (const cvec_t * spec) 65 65 { 66 66 smpl_t sum = 0., sc = 0.; … … 78 78 79 79 smpl_t 80 cvec_moment (c vec_t * spec, uint_t order)80 cvec_moment (const cvec_t * spec, uint_t order) 81 81 { 82 82 smpl_t sum = 0., centroid = 0., sc = 0.; … … 95 95 96 96 void 97 aubio_specdesc_centroid (aubio_specdesc_t * o UNUSED, c vec_t * spec,97 aubio_specdesc_centroid (aubio_specdesc_t * o UNUSED, const cvec_t * spec, 98 98 fvec_t * desc) 99 99 { … … 102 102 103 103 void 104 aubio_specdesc_spread (aubio_specdesc_t * o UNUSED, c vec_t * spec,104 aubio_specdesc_spread (aubio_specdesc_t * o UNUSED, const cvec_t * spec, 105 105 fvec_t * desc) 106 106 { … … 109 109 110 110 void 111 aubio_specdesc_skewness (aubio_specdesc_t * o UNUSED, c vec_t * spec,111 aubio_specdesc_skewness (aubio_specdesc_t * o UNUSED, const cvec_t * spec, 112 112 fvec_t * desc) 113 113 { … … 123 123 124 124 void 125 aubio_specdesc_kurtosis (aubio_specdesc_t * o UNUSED, c vec_t * spec,125 aubio_specdesc_kurtosis (aubio_specdesc_t * o UNUSED, const cvec_t * spec, 126 126 fvec_t * desc) 127 127 { … … 137 137 138 138 void 139 aubio_specdesc_slope (aubio_specdesc_t * o UNUSED, c vec_t * spec,139 aubio_specdesc_slope (aubio_specdesc_t * o UNUSED, const cvec_t * spec, 140 140 fvec_t * desc) 141 141 { … … 165 165 166 166 void 167 aubio_specdesc_decrease (aubio_specdesc_t *o UNUSED, c vec_t * spec,167 aubio_specdesc_decrease (aubio_specdesc_t *o UNUSED, const cvec_t * spec, 168 168 fvec_t * desc) 169 169 { … … 183 183 184 184 void 185 aubio_specdesc_rolloff (aubio_specdesc_t *o UNUSED, c vec_t * spec,185 aubio_specdesc_rolloff (aubio_specdesc_t *o UNUSED, const cvec_t * spec, 186 186 fvec_t *desc) 187 187 {
Note: See TracChangeset
for help on using the changeset viewer.