aubio: spectral/test-specdesc.c

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