Vector of complex-valued data. More...
Go to the source code of this file.
Data Structures | |
struct | cvec_t |
Buffer for complex data. More... | |
Functions | |
cvec_t * | new_cvec (uint_t length) |
cvec_t buffer creation function More... | |
void | del_cvec (cvec_t *s) |
cvec_t buffer deletion function More... | |
void | cvec_write_norm (cvec_t *s, smpl_t data, uint_t position) |
write norm value in a complex buffer More... | |
void | cvec_write_phas (cvec_t *s, smpl_t data, uint_t position) |
write phase value in a complex buffer More... | |
smpl_t | cvec_read_norm (cvec_t *s, uint_t position) |
read norm value from a complex buffer More... | |
smpl_t | cvec_read_phas (cvec_t *s, uint_t position) |
read phase value from a complex buffer More... | |
smpl_t * | cvec_get_norm (cvec_t *s) |
read norm data from a complex buffer More... | |
smpl_t * | cvec_get_phas (cvec_t *s) |
read phase data from a complex buffer More... | |
void | cvec_print (cvec_t *s) |
print out cvec data More... | |
void | cvec_copy (cvec_t *s, cvec_t *t) |
make a copy of a vector More... | |
void | cvec_set_all_norm (cvec_t *s, smpl_t val) |
set all norm elements to a given value More... | |
void | cvec_zeros_norm (cvec_t *s) |
set all norm elements to zero More... | |
void | cvec_ones_norm (cvec_t *s) |
set all norm elements to one More... | |
void | cvec_set_all_phas (cvec_t *s, smpl_t val) |
set all phase elements to a given value More... | |
void | cvec_zeros_phas (cvec_t *s) |
set all phase elements to zero More... | |
void | cvec_ones_phas (cvec_t *s) |
set all phase elements to one More... | |
void | cvec_zeros (cvec_t *s) |
set all norm and phas elements to zero More... | |
Vector of complex-valued data.
This file specifies the cvec_t buffer type, which is used throughout aubio to store complex data. Complex values are stored in terms of cvec_t.phas and norm, within size/2+1 long vectors of smpl_t.
Definition in file cvec.h.
read norm data from a complex buffer
Note that this function is not used in the aubio library, since the same result can be obtained with vec->norm. Its purpose is to access these values from wrappers, as created by swig.
s | vector to read from |
read phase data from a complex buffer
Note that this function is not used in the aubio library, since the same result can be obtained with vec->phas. Its purpose is to access these values from wrappers, as created by swig.
s | vector to read from |
void cvec_ones_norm | ( | cvec_t * | s | ) |
void cvec_ones_phas | ( | cvec_t * | s | ) |
void cvec_print | ( | cvec_t * | s | ) |
print out cvec data
s | vector to print out |
read norm value from a complex buffer
Note that this function is not used in the aubio library, since the same result can be obtained with vec->norm[position]. Its purpose is to access these values from wrappers, as created by swig.
s | vector to read from |
position | sample position to read from |
read phase value from a complex buffer
Note that this function is not used in the aubio library, since the same result can be obtained with vec->phas[position]. Its purpose is to access these values from wrappers, as created by swig.
s | vector to read from |
position | sample position to read from |
set all norm elements to a given value
s | vector to modify |
val | value to set elements to |
set all phase elements to a given value
s | vector to modify |
val | value to set elements to |
write norm value in a complex buffer
Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->norm[position]. Its purpose is to access these values from wrappers, as created by swig.
s | vector to write to |
data | norm value to write in s->norm[position] |
position | sample position to write to |
write phase value in a complex buffer
Note that this function is not used in the aubio library, since the same result can be obtained by assigning vec->phas[position]. Its purpose is to access these values from wrappers, as created by swig.
s | vector to write to |
data | phase value to write in s->phas[position] |
position | sample position to write to |
void cvec_zeros | ( | cvec_t * | s | ) |
void cvec_zeros_norm | ( | cvec_t * | s | ) |
void cvec_zeros_phas | ( | cvec_t * | s | ) |
void del_cvec | ( | cvec_t * | s | ) |
cvec_t buffer deletion function
s | buffer to delete as returned by new_cvec() |
cvec_t buffer creation function
This function creates a cvec_t structure holding two arrays of size [length/2+1], corresponding to the norm and phase values of the spectral frame. The length stored in the structure is the actual size of both arrays, not the length of the complex and symmetrical vector, specified as creation argument.
length | the length of the buffer to create |