return phase + TWO_PI * (1. + FLOOR(-(phase+PI)/TWO_PI));
}
-smpl_t vec_mean(fvec_t *s) {
+smpl_t fvec_mean(fvec_t *s) {
uint_t i,j;
smpl_t tmp = 0.0f;
for (i=0; i < s->channels; i++)
*
* \bug mono
*/
-smpl_t vec_mean(fvec_t *s);
+smpl_t fvec_mean(fvec_t *s);
/** returns the max of a vector
*
* \bug mono
aubio_hist_weight(o->histog);
/* its mean is the result */
onset->data[i][0] = aubio_hist_mean(o->histog);
- //onset->data[i][0] = vec_mean(o->dev1);
+ //onset->data[i][0] = fvec_mean(o->dev1);
}
}
/* calculate mean and median for onset_proc */
/* for (i=0;i<onset_proc->channels;i++) { */
- mean = vec_mean(onset_proc);
+ mean = fvec_mean(onset_proc);
/* copy to scratch */
for (j = 0; j < length; j++)
scratch->data[i][j] = onset_proc->data[i][j];
t->win_post = 5;
t->win_pre = 1;
- t->thresholdfn = (aubio_thresholdfn_t)(vec_median); /* (vec_mean); */
+ t->thresholdfn = (aubio_thresholdfn_t)(vec_median); /* (fvec_mean); */
t->pickerfn = (aubio_pickerfn_t)(vec_peakpick);
t->scratch = new_fvec(t->win_post+t->win_pre+1,1);
fvec_t * new_aubio_window(uint_t size, aubio_window_type wintype);
smpl_t aubio_unwrap2pi (smpl_t phase);
-smpl_t vec_mean(fvec_t *s);
+smpl_t fvec_mean(fvec_t *s);
smpl_t vec_max(fvec_t *s);
smpl_t vec_min(fvec_t *s);
uint_t vec_min_elem(fvec_t *s);