- Timestamp:
- Oct 2, 2009, 2:10:25 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:
- 1498ced
- Parents:
- c0b295c
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/aubio_priv.h
rc0b295c racf7d30 183 183 184 184 /* handy shortcuts */ 185 #define DB2LIN(g) (POW(10.0 f,(g)*0.05f))186 #define LIN2DB(v) (20.0 f*LOG10(v))185 #define DB2LIN(g) (POW(10.0,(g)*0.05f)) 186 #define LIN2DB(v) (20.0*LOG10(v)) 187 187 #define SQR(_a) (_a*_a) 188 188 -
src/mathutils.c
rc0b295c racf7d30 86 86 smpl_t fvec_mean(fvec_t *s) { 87 87 uint_t i,j; 88 smpl_t tmp = 0.0 f;88 smpl_t tmp = 0.0; 89 89 for (i=0; i < s->channels; i++) 90 90 for (j=0; j < s->length; j++) … … 95 95 smpl_t fvec_sum(fvec_t *s) { 96 96 uint_t i,j; 97 smpl_t tmp = 0.0 f;97 smpl_t tmp = 0.0; 98 98 for (i=0; i < s->channels; i++) 99 99 for (j=0; j < s->length; j++) … … 104 104 smpl_t fvec_max(fvec_t *s) { 105 105 uint_t i,j; 106 smpl_t tmp = 0.0 f;106 smpl_t tmp = 0.0; 107 107 for (i=0; i < s->channels; i++) 108 108 for (j=0; j < s->length; j++) … … 133 133 uint_t fvec_max_elem(fvec_t *s) { 134 134 uint_t i,j=0, pos=0.; 135 smpl_t tmp = 0.0 f;135 smpl_t tmp = 0.0; 136 136 for (i=0; i < s->channels; i++) 137 137 for (j=0; j < s->length; j++) { … … 144 144 void fvec_shift(fvec_t *s) { 145 145 uint_t i,j; 146 //smpl_t tmp = 0.0 f;146 //smpl_t tmp = 0.0; 147 147 for (i=0; i < s->channels; i++) 148 148 for (j=0; j < s->length / 2 ; j++) { -
src/onset/onsetdetection.c
rc0b295c racf7d30 98 98 uint_t nbins = fftgrain->length; 99 99 for (i=0;i<fftgrain->channels; i++) { 100 onset->data[i][0] = 0.0 f;100 onset->data[i][0] = 0.0; 101 101 o->dev1->data[i][0]=0.; 102 102 for ( j=0;j<nbins; j++ ) { … … 109 109 o->dev1->data[i][j] = ABS(o->dev1->data[i][j]); 110 110 else 111 o->dev1->data[i][j] = 0.0 f;111 o->dev1->data[i][j] = 0.0; 112 112 /* keep a track of the past frames */ 113 113 o->theta2->data[i][j] = o->theta1->data[i][j]; … … 130 130 uint_t nbins = fftgrain->length; 131 131 for (i=0;i<fftgrain->channels; i++) { 132 onset->data[i][0] = 0.0 f;132 onset->data[i][0] = 0.0; 133 133 for (j=0;j<nbins; j++) { 134 134 o->dev1->data[i][j] = SQRT( … … 138 138 o->dev1->data[i][j] = ABS(o->dev1->data[i][j]); 139 139 else 140 o->dev1->data[i][j] = 0.0 f;140 o->dev1->data[i][j] = 0.0; 141 141 o->oldmag->data[i][j] = fftgrain->norm[i][j]; 142 142 } … … 230 230 o->theta1 = new_fvec(rsize,channels); 231 231 o->theta2 = new_fvec(rsize,channels); 232 o->histog = new_aubio_hist(0.0 f, PI, 10, channels);232 o->histog = new_aubio_hist(0.0, PI, 10, channels); 233 233 o->threshold = 0.1; 234 234 break; … … 236 236 o->oldmag = new_fvec(rsize,channels); 237 237 o->dev1 = new_fvec(rsize,channels); 238 o->histog = new_aubio_hist(0.0 f, PI, 10, channels);238 o->histog = new_aubio_hist(0.0, PI, 10, channels); 239 239 o->threshold = 0.1; 240 240 break; -
src/utils/hist.c
rc0b295c racf7d30 149 149 smpl_t aubio_hist_mean (aubio_hist_t *s) { 150 150 uint_t i,j; 151 smpl_t tmp = 0.0 f;151 smpl_t tmp = 0.0; 152 152 for (i=0; i < s->channels; i++) 153 153 for (j=0; j < s->nelems; j++) -
src/utils/scale.c
rc0b295c racf7d30 57 57 s->ohig = ohig; 58 58 if (inputrange == 0) { 59 s->scaler = 0.0 f;59 s->scaler = 0.0; 60 60 } else { 61 61 s->scaler = outputrange/inputrange;
Note: See TracChangeset
for help on using the changeset viewer.