This philosophy of 'cascading' features is followed throughout the library, for example with features that operate on the magnitude spectrum of a signal vector (e.g. 'irregularity'), the magnitude spectrum is not calculated 'inside' the respective function, instead, a pointer to the first element in an array containing the magnitude spectrum is passed in as an argument.
Hopefully this not only makes the library more efficient when computing large numbers of features, but also makes it more flexible because extraction functions can be combined arbitrarily (one can take the irregularility of the Mel Frequency Cepstral Coefficients for example).
All feature extraction functions follow the same prototype:
int xtract_function_name(const float *data, const int N, const void *argv, float *result){
const | float *data points to an array of floats representing the input data | |
const | int N represents the number of elementes from *data to be considered in the calculation | |
const | void *argv represents an arbitrary list of arguments. Used to pass in values required by the feature calculation | |
float | *result points to an array of floats, or a single float represnting the result of the calculation |
LibXtract can be downloaded from http://www.sf.net/projects/libxtract