aubio 0.4.9
spectral/test-specdesc.c
#include <aubio.h>
int main (void)
{
uint_t win_s = 1024; // window size
cvec_t *in = new_cvec (win_s); // input buffer
fvec_t *out = new_fvec (1); // output spectral descriptor
o = new_aubio_specdesc ("energy", win_s);
aubio_specdesc_do (o, in, out);
o = new_aubio_specdesc ("energy", win_s);
aubio_specdesc_do (o, in, out);
o = new_aubio_specdesc ("hfc", win_s);
aubio_specdesc_do (o, in, out);
o = new_aubio_specdesc ("complex", win_s);
aubio_specdesc_do (o, in, out);
o = new_aubio_specdesc ("phase", win_s);
aubio_specdesc_do (o, in, out);
o = new_aubio_specdesc ("kl", win_s);
aubio_specdesc_do (o, in, out);
o = new_aubio_specdesc ("mkl", win_s);
aubio_specdesc_do (o, in, out);
del_cvec (in);
del_fvec (out);
return 0;
}
Global aubio include file.
cvec_t * new_cvec(uint_t length)
cvec_t buffer creation function
void del_cvec(cvec_t *s)
cvec_t buffer deletion function
fvec_t * new_fvec(uint_t length)
fvec_t buffer creation function
void del_fvec(fvec_t *s)
fvec_t buffer deletion function
void aubio_cleanup(void)
clean up cached memory at the end of program
aubio_specdesc_t * new_aubio_specdesc(const char_t *method, uint_t buf_size)
creation of a spectral description object
void del_aubio_specdesc(aubio_specdesc_t *o)
deletion of a spectral descriptor
void aubio_specdesc_do(aubio_specdesc_t *o, const cvec_t *fftgrain, fvec_t *desc)
execute spectral description function on a spectral frame
struct _aubio_specdesc_t aubio_specdesc_t
spectral description structure
Definition: specdesc.h:163
Vector of real-valued phase and spectrum data.
Definition: cvec.h:63
Buffer for real data.
Definition: fvec.h:67
unsigned int uint_t
unsigned integer
Definition: types.h:60