diff options
Diffstat (limited to 'xtract')
-rw-r--r-- | xtract/libxtract.h | 3 | ||||
-rw-r--r-- | xtract/xtract_scalar.h | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h index f1da9c1..c9e43d2 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -38,7 +38,7 @@ extern "C" { #include "xtract_types.h" #include "xtract_macros.h" -#define XTRACT_FEATURES 42 +#define XTRACT_FEATURES 43 #define LOG_LIMIT 10e-10 #define VERY_BIG_NUMBER 2e10 #define SR_LIMIT 192000 @@ -52,6 +52,7 @@ enum features_ { AVERAGE_DEVIATION, SKEWNESS, KURTOSIS, + CENTROID, IRREGULARITY_K, IRREGULARITY_J, TRISTIMULUS_1, diff --git a/xtract/xtract_scalar.h b/xtract/xtract_scalar.h index 6ddea98..bea7298 100644 --- a/xtract/xtract_scalar.h +++ b/xtract/xtract_scalar.h @@ -82,6 +82,15 @@ int xtract_skewness(float *data, int N, void *argv, float *result); */ int xtract_kurtosis(float *data, int N, void *argv, float *result); +/** \brief Extract the kurtosis of an input vector + * + * \param *data: a pointer to the first element in an array of floats represeting a frequency spectrum of size N/2 and a magnitude peak spectrum of size N/2 (This is the output format of xtract_peaks) + * \param N: the number of elements to be considered + * \param *argv: a pointer to NULL + * \param *result: the centroid of the values pointed to by *data + */ +int xtract_centroid(float *data, int N, void *argv, float *result); + /** \brief Calculate the Irregularity of an input vector using a method described by Krimphoff (1994) * * \param *data: a pointer to the first element in an array of floats representing the magnitude spectrum of an audio vector |