- Timestamp:
- Sep 28, 2009, 9:27:10 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:
- d90db7d4
- Parents:
- d37400c
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/vecutils.c
rd37400c r6940b55 26 26 AUBIO_OP_C_AND_F(abs, ABS) 27 27 AUBIO_OP_C_AND_F(sqrt, SQRT) 28 AUBIO_OP_C_AND_F(log10, SAFE LOG10)29 AUBIO_OP_C_AND_F(log, SAFE LOG)28 AUBIO_OP_C_AND_F(log10, SAFE_LOG10) 29 AUBIO_OP_C_AND_F(log, SAFE_LOG) 30 30 AUBIO_OP_C_AND_F(floor, FLOOR) 31 31 AUBIO_OP_C_AND_F(ceil, CEIL) … … 43 43 } 44 44 45 void cvec_pow (cvec_t *s, smpl_t power) 46 { 47 uint_t i,j; 48 for (i = 0; i < s->channels; i++) { 49 for (j = 0; j < s->length; j++) { 50 s->norm[i][j] = POW(s->norm[i][j], power); 51 } 52 } 53 } 54 -
src/vecutils.h
rd37400c r6940b55 31 31 #endif 32 32 33 #define AUBIO_OP_PROTO(OPNAME, TYPE) \ 34 void TYPE ## _ ## OPNAME (TYPE ## _t *o); 33 /** compute \f$e^x\f$ of each vector elements 35 34 36 #define AUBIO_OP_C_AND_F_PROTO(OPNAME) \ 37 AUBIO_OP_PROTO(OPNAME, fvec) \ 38 AUBIO_OP_PROTO(OPNAME, cvec) 35 \param s vector to modify 39 36 40 AUBIO_OP_C_AND_F_PROTO(exp) 41 AUBIO_OP_C_AND_F_PROTO(cos) 42 AUBIO_OP_C_AND_F_PROTO(sin) 43 AUBIO_OP_C_AND_F_PROTO(abs) 44 //AUBIO_OP_C_AND_F_PROTO(pow) 45 AUBIO_OP_C_AND_F_PROTO(sqrt) 46 AUBIO_OP_C_AND_F_PROTO(log10) 47 AUBIO_OP_C_AND_F_PROTO(log) 48 AUBIO_OP_C_AND_F_PROTO(floor) 49 AUBIO_OP_C_AND_F_PROTO(ceil) 50 AUBIO_OP_C_AND_F_PROTO(round) 37 */ 38 void fvec_exp (fvec_t *s); 39 40 /** compute \f$cos(x)\f$ of each vector elements 41 42 \param s vector to modify 43 44 */ 45 void fvec_cos (fvec_t *s); 46 47 /** compute \f$sin(x)\f$ of each vector elements 48 49 \param s vector to modify 50 51 */ 52 void fvec_sin (fvec_t *s); 53 54 /** compute the \f$abs(x)\f$ of each vector elements 55 56 \param s vector to modify 57 58 */ 59 void fvec_abs (fvec_t *s); 60 61 /** compute the \f$sqrt(x)\f$ of each vector elements 62 63 \param s vector to modify 64 65 */ 66 void fvec_sqrt (fvec_t *s); 67 68 /** compute the \f$log10(x)\f$ of each vector elements 69 70 \param s vector to modify 71 72 */ 73 void fvec_log10 (fvec_t *s); 74 75 /** compute the \f$log(x)\f$ of each vector elements 76 77 \param s vector to modify 78 79 */ 80 void fvec_log (fvec_t *s); 81 82 /** compute the \f$floor(x)\f$ of each vector elements 83 84 \param s vector to modify 85 86 */ 87 void fvec_floor (fvec_t *s); 88 89 /** compute the \f$ceil(x)\f$ of each vector elements 90 91 \param s vector to modify 92 93 */ 94 void fvec_ceil (fvec_t *s); 95 96 /** compute the \f$round(x)\f$ of each vector elements 97 98 \param s vector to modify 99 100 */ 101 void fvec_round (fvec_t *s); 51 102 52 103 /** raise each vector elements to the power pow … … 58 109 void fvec_pow (fvec_t *s, smpl_t pow); 59 110 60 //void fvec_log10 (fvec_t *s); 111 /** compute \f$e^x\f$ of each vector norm elements 112 113 \param s vector to modify 114 115 */ 116 void cvec_exp (cvec_t *s); 117 118 /** compute \f$cos(x)\f$ of each vector norm elements 119 120 \param s vector to modify 121 122 */ 123 void cvec_cos (cvec_t *s); 124 125 /** compute \f$sin(x)\f$ of each vector norm elements 126 127 \param s vector to modify 128 129 */ 130 void cvec_sin (cvec_t *s); 131 132 /** compute the \f$abs(x)\f$ of each vector norm elements 133 134 \param s vector to modify 135 136 */ 137 void cvec_abs (cvec_t *s); 138 139 /** compute the \f$sqrt(x)\f$ of each vector norm elements 140 141 \param s vector to modify 142 143 */ 144 void cvec_sqrt (cvec_t *s); 145 146 /** compute the \f$log10(x)\f$ of each vector norm elements 147 148 \param s vector to modify 149 150 */ 151 void cvec_log10 (cvec_t *s); 152 153 /** compute the \f$log(x)\f$ of each vector norm elements 154 155 \param s vector to modify 156 157 */ 158 void cvec_log (cvec_t *s); 159 160 /** compute the \f$floor(x)\f$ of each vector norm elements 161 162 \param s vector to modify 163 164 */ 165 void cvec_floor (cvec_t *s); 166 167 /** compute the \f$ceil(x)\f$ of each vector norm elements 168 169 \param s vector to modify 170 171 */ 172 void cvec_ceil (cvec_t *s); 173 174 /** compute the \f$round(x)\f$ of each vector norm elements 175 176 \param s vector to modify 177 178 */ 179 void cvec_round (cvec_t *s); 180 181 /** raise each vector norm elements to the power pow 182 183 \param s vector to modify 184 \param pow power to raise to 185 186 */ 187 void cvec_pow (cvec_t *s, smpl_t pow); 61 188 62 189 #ifdef __cplusplus
Note: See TracChangeset
for help on using the changeset viewer.