aboutsummaryrefslogtreecommitdiff
path: root/xtract
diff options
context:
space:
mode:
Diffstat (limited to 'xtract')
-rw-r--r--xtract/Makefile.am8
-rw-r--r--xtract/libxtract.h19
-rw-r--r--xtract/xtract_vector.h47
3 files changed, 34 insertions, 40 deletions
diff --git a/xtract/Makefile.am b/xtract/Makefile.am
index 0dd9942..b29e60d 100644
--- a/xtract/Makefile.am
+++ b/xtract/Makefile.am
@@ -1,11 +1,5 @@
libxtractdir = $(includedir)/xtract
-if BUILD_VECTOR
-XTRACT_VECTOR = xtract_vector.h
-else
-XTRACT_VECTOR =
-endif
-
libxtract_HEADERS = libxtract.h xtract_macros.h xtract_types.h xtract_delta.h \
- xtract_scalar.h $(XTRACT_VECTOR)
+ xtract_scalar.h xtract_vector.h
diff --git a/xtract/libxtract.h b/xtract/libxtract.h
index 6b90da3..235353e 100644
--- a/xtract/libxtract.h
+++ b/xtract/libxtract.h
@@ -53,7 +53,8 @@ extern "C" {
* @{
*/
-#define XTRACT_FEATURES 43
+#define XTRACT_FEATURES 42
+
#define LOG_LIMIT 10e-10
#define VERY_BIG_NUMBER 2e10
#define SR_LIMIT 192000
@@ -91,19 +92,19 @@ enum features_ {
LOWEST_MATCH,
HPS,
F0,
- MAGNITUDE_SPECTRUM,
+ FLUX,
+ ATTACK_TIME,
+ DECAY_TIME,
+ DELTA_FEATURE,
AUTOCORRELATION,
- AUTOCORRELATION_FFT,
AMDF,
ASDF,
- MFCC,
- DCT,
BARK_COEFFICIENTS,
PEAKS,
- FLUX,
- ATTACK_TIME,
- DECAY_TIME,
- DELTA_FEATURE
+ MAGNITUDE_SPECTRUM,
+ AUTOCORRELATION_FFT,
+ MFCC,
+ DCT
};
/** \brief Enumeration of feature types */
diff --git a/xtract/xtract_vector.h b/xtract/xtract_vector.h
index fc39aa7..d72d051 100644
--- a/xtract/xtract_vector.h
+++ b/xtract/xtract_vector.h
@@ -43,24 +43,42 @@ extern "C" {
*/
int xtract_magnitude_spectrum(float *data, int N, void *argv, float *result);
-
-/** \brief Extract autocorrelation from time domain signal using time-domain autocorrelation technique
+/** \brief Extract autocorrelation from time domain signal using FFT based method
*
* \param *data: a pointer to the first element in an array of floats representing an audio vector
* \param N: the number of array elements to be considered
* \param *argv: a pointer to NULL
* \param *result: the autocorrelation of N values from the array pointed to by *data
*/
-int xtract_autocorrelation(float *data, int N, void *argv, float *result);
+int xtract_autocorrelation_fft(float *data, int N, void *argv, float *result);
-/** \brief Extract autocorrelation from time domain signal using FFT based method
+/** \brief Extract Mel Frequency Cepstral Coefficients based on a method described by Rabiner
+ *
+ * \param *data: a pointer to the first element in an array of floats
+ * \param N: the number of array elements to be considered
+ * \param *argv: a pointer to a data structure of type xtract_mel_filter, containing n_filters coefficient tables to make up a mel-spaced filterbank
+ * \param *result: a pointer to an array containing the resultant MFCC
+ *
+ * The data structure pointed to by *argv must be obtained by first calling xtract_init_mfcc
+ */
+int xtract_mfcc(float *data, int N, void *argv, float *result);
+
+/** \brief Extract the Discrete Cosine transform of a time domain signal
+ * \param *data: a pointer to the first element in an array of floats representing an audio vector
+ * \param N: the number of array elements to be considered
+ * \param *argv: a pointer to NULL
+ * \param *result: a pointer to an array containing resultant dct coefficients
+ */
+int xtract_dct(float *data, int N, void *argv, float *result);
+
+/** \brief Extract autocorrelation from time domain signal using time-domain autocorrelation technique
*
* \param *data: a pointer to the first element in an array of floats representing an audio vector
* \param N: the number of array elements to be considered
* \param *argv: a pointer to NULL
* \param *result: the autocorrelation of N values from the array pointed to by *data
*/
-int xtract_autocorrelation_fft(float *data, int N, void *argv, float *result);
+int xtract_autocorrelation(float *data, int N, void *argv, float *result);
/** \brief Extract Average Magnitude Difference Function from time domain signal
*
@@ -80,17 +98,6 @@ int xtract_amdf(float *data, int N, void *argv, float *result);
*/
int xtract_asdf(float *data, int N, void *argv, float *result);
-/** \brief Extract Mel Frequency Cepstral Coefficients based on a method described by Rabiner
- *
- * \param *data: a pointer to the first element in an array of floats
- * \param N: the number of array elements to be considered
- * \param *argv: a pointer to a data structure of type xtract_mel_filter, containing n_filters coefficient tables to make up a mel-spaced filterbank
- * \param *result: a pointer to an array containing the resultant MFCC
- *
- * The data structure pointed to by *argv must be obtained by first calling xtract_init_mfcc
- */
-int xtract_mfcc(float *data, int N, void *argv, float *result);
-
/** \brief Extract Bark band coefficients based on a method
* \param *data: a pointer to the first element in an array of floats representing the magnitude spectrum of an audio vector
* \param N: the number of array elements to be considered
@@ -102,14 +109,6 @@ int xtract_mfcc(float *data, int N, void *argv, float *result);
*/
int xtract_bark_coefficients(float *data, int N, void *argv, float *result);
-/** \brief Extract the Discrete Cosine transform of a time domain signal
- * \param *data: a pointer to the first element in an array of floats representing an audio vector
- * \param N: the number of array elements to be considered
- * \param *argv: a pointer to NULL
- * \param *result: a pointer to an array containing resultant dct coefficients
- */
-int xtract_dct(float *data, int N, void *argv, float *result);
-
/** \brief Extract the frequency and amplitude of spectral peaks from a of a magnitude spectrum
* \param *data: a pointer to the first element in an array of floats representing the magnitude spectrum of an audio vector
* \param N: the number of array elements to be considered