diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2007-12-29 17:33:17 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2007-12-29 17:33:17 +0000 |
commit | eb32acabd365e47e36863ee737505db463bd9f91 (patch) | |
tree | 5258b5b6e2ae35fc3c72b356f6e26f37660bf6c1 /xtract | |
parent | 2e66bd6092fe93ca7fa953c4af9d0e16bbf69905 (diff) | |
download | LibXtract-eb32acabd365e47e36863ee737505db463bd9f91.tar.gz LibXtract-eb32acabd365e47e36863ee737505db463bd9f91.tar.bz2 LibXtract-eb32acabd365e47e36863ee737505db463bd9f91.zip |
- PD example brought in line with new delta features and subframe function
- subframe-test.pd added
- fix to a_blockswap~.pd
Diffstat (limited to 'xtract')
-rw-r--r-- | xtract/libxtract.h | 8 | ||||
-rw-r--r-- | xtract/xtract_helper.h | 3 | ||||
-rw-r--r-- | xtract/xtract_macros.h | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h index 1b787b0..ae70efb 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -68,7 +68,7 @@ extern "C" { * @{ */ -#define XTRACT_FEATURES 58 +#define XTRACT_FEATURES 59 /** \brief Enumeration of features, elements are used as indixes to an array of pointers to feature extracton functions */ enum xtract_features_ { @@ -136,7 +136,8 @@ enum xtract_features_ { /** \brief Enumeration of feature initialisation functions */ enum xtract_feature_init_ { XTRACT_INIT_MFCC = 100, - XTRACT_INIT_BARK + XTRACT_INIT_BARK, + XTRACT_INIT_WINDOWED }; /** \brief Enumeration of feature types */ @@ -153,6 +154,7 @@ enum xtract_mfcc_types_ { }; enum xtract_lnorm_filter_types_ { + XTRACT_NO_LNORM_FILTER, XTRACT_POSITIVE_SLOPE, XTRACT_NEGATIVE_SLOPE }; @@ -240,6 +242,7 @@ typedef enum xtract_vector_ { XTRACT_LPC_COEFFS, XTRACT_LPCC_COEFFS, XTRACT_BARK_COEFFS, + XTRACT_SUBFRAMES, XTRACT_NO_DATA } xtract_vector_t; @@ -272,6 +275,7 @@ typedef struct _xtract_function_descriptor { } argv; xtract_bool_t is_scalar; + xtract_bool_t is_delta; /* features in xtract_delta.h can be scalar or vector */ /* The result.<> entries in descritors.c need to be checked */ union { diff --git a/xtract/xtract_helper.h b/xtract/xtract_helper.h index 31a2183..645f1cd 100644 --- a/xtract/xtract_helper.h +++ b/xtract/xtract_helper.h @@ -57,6 +57,9 @@ int xtract_windowed(const float *data, const int N, const void *argv, float *res * \param *argv a pointer to the argument vector to be passed to the feature extraction function as determined by feature * \param *result a pointer to the 'packed' results of the feature calculation. This may be passed in as *data to xtract_features_from_subframes() to calculate further features on the subframes, or xtract_difference_vector(), to get the difference between the subframes. * + * + * It is important to ensure that any _init_*() functions that are called in preparation for functions that are called on subframes are given the subframe size as 'N', and not the frame size. i.e. if xtract_features_from_subframes() is called with N=64, and feature=XTRACT_SPECTRUM, then xtract_init_fft() should be called with N=32. + * */ int xtract_features_from_subframes(const float *data, const int N, const int feature, const void *argv, float *result); diff --git a/xtract/xtract_macros.h b/xtract/xtract_macros.h index bd01ab7..2eed28e 100644 --- a/xtract/xtract_macros.h +++ b/xtract/xtract_macros.h @@ -30,6 +30,7 @@ extern "C" { #endif #define XTRACT_BARK_BANDS 26 +#define XTRACT_WINDOW_SIZE 1024/* dummy macro for descriptors where argc is window size */ #define XTRACT_NONE 0 #define XTRACT_ANY -1 #define XTRACT_UNKNOWN -2 |