return tmp;
}
-smpl_t vec_max(fvec_t *s) {
+smpl_t fvec_max(fvec_t *s) {
uint_t i,j;
smpl_t tmp = 0.0f;
for (i=0; i < s->channels; i++)
return pos;
}
-uint_t vec_max_elem(fvec_t *s) {
+uint_t fvec_max_elem(fvec_t *s) {
uint_t i,j=0, pos=0.;
smpl_t tmp = 0.0f;
for (i=0; i < s->channels; i++)
*
* \bug mono
*/
-smpl_t vec_max(fvec_t *s);
+smpl_t fvec_max(fvec_t *s);
/** returns the min of a vector
*
* \bug mono
*
* \bug mono
*/
-uint_t vec_max_elem(fvec_t *s);
+uint_t fvec_max_elem(fvec_t *s);
/** implement 'fftshift' like function
*
* a[0]...,a[n/2],a[n/2+1],...a[n]
fvec_weight (bt->acfout, bt->rwv);
/* find non-zero Rayleigh period */
- maxindex = vec_max_elem (bt->acfout);
+ maxindex = fvec_max_elem (bt->acfout);
bt->rp = maxindex ? vec_quadint (bt->acfout, maxindex, 1) : 1;
//rp = (maxindex==127) ? 43 : maxindex; //rayparam
bt->rp = (maxindex == bt->acfout->length - 1) ? bt->rayparam : maxindex; //rayparam
fvec_weight (bt->phout, bt->phwv);
/* find Rayleigh period */
- maxindex = vec_max_elem (bt->phout);
+ maxindex = fvec_max_elem (bt->phout);
if (maxindex >= winlen - 1) {
#if AUBIO_BEAT_WARNINGS
AUBIO_WRN ("no idea what this groove's phase is\n");
}
}
fvec_weight (acfout, bt->gwv);
- gp = vec_quadint (acfout, vec_max_elem (acfout), 1);
+ gp = vec_quadint (acfout, fvec_max_elem (acfout), 1);
/*
while(gp<32) gp =gp*2;
while(gp>64) gp = gp/2;
aubio_beattracking_get_confidence (aubio_beattracking_t * bt)
{
if (bt->gp) {
- return vec_max (bt->acfout);
+ return fvec_max (bt->acfout);
} else {
return 0.;
}
#include "aubio_priv.h"
#include "fvec.h"
#include "utils/scale.h"
-#include "mathutils.h" //vec_min vec_max
+#include "mathutils.h" //vec_min fvec_max
#include "utils/hist.h"
/********
uint_t i,j;
sint_t tmp = 0;
smpl_t ilow = vec_min(input);
- smpl_t ihig = vec_max(input);
+ smpl_t ihig = fvec_max(input);
smpl_t step = (ihig-ilow)/(smpl_t)(s->nelems);
/* readapt */
fvec_t * new_aubio_window(uint_t size, aubio_window_type wintype);
smpl_t aubio_unwrap2pi (smpl_t phase);
smpl_t fvec_mean(fvec_t *s);
-smpl_t vec_max(fvec_t *s);
+smpl_t fvec_max(fvec_t *s);
smpl_t vec_min(fvec_t *s);
uint_t vec_min_elem(fvec_t *s);
-uint_t vec_max_elem(fvec_t *s);
+uint_t fvec_max_elem(fvec_t *s);
void vec_shift(fvec_t *s);
smpl_t vec_sum(fvec_t *s);
smpl_t vec_local_energy(fvec_t * f);
return -1;
}
- if (vec_max (coeffs) != 0.) {
+ if (fvec_max (coeffs) != 0.) {
return -1;
}