49#include "xtract_types.h"
59#define XTRACT_FEATURES XTRACT_FEATURE_COUNT
66 XTRACT_STANDARD_DEVIATION,
67 XTRACT_AVERAGE_DEVIATION,
71 XTRACT_SPECTRAL_VARIANCE,
72 XTRACT_SPECTRAL_STANDARD_DEVIATION,
74 XTRACT_SPECTRAL_SKEWNESS,
75 XTRACT_SPECTRAL_KURTOSIS,
76 XTRACT_SPECTRAL_CENTROID,
77 XTRACT_IRREGULARITY_K,
78 XTRACT_IRREGULARITY_J,
93 XTRACT_SPECTRAL_INHARMONICITY,
95 XTRACT_ODD_EVEN_RATIO,
97 XTRACT_SPECTRAL_SLOPE,
101 XTRACT_NONZERO_COUNT,
112 XTRACT_DIFFERENCE_VECTOR,
113 XTRACT_AUTOCORRELATION,
116 XTRACT_BARK_COEFFICIENTS,
117 XTRACT_PEAK_SPECTRUM,
119 XTRACT_AUTOCORRELATION_FFT,
122 XTRACT_HARMONIC_SPECTRUM,
126 XTRACT_MEL_SPECTROGRAM,
128 XTRACT_GAMMATONE_SPECTROGRAM,
135 XTRACT_SPECTRAL_SUBBAND_CENTROIDS,
137 XTRACT_MOVING_AVERAGE,
138 XTRACT_MOVING_VARIANCE,
139 XTRACT_MOVING_STANDARD_DEVIATION,
143 XTRACT_EWMA_VARIANCE,
145 XTRACT_MEDIAN_ABSOLUTE_DEVIATION,
146 XTRACT_HJORTH_ACTIVITY,
147 XTRACT_HJORTH_MOBILITY,
148 XTRACT_HJORTH_COMPLEXITY,
149 XTRACT_TIME_REVERSAL_ASYMMETRY,
150 XTRACT_SPECTRAL_ENTROPY,
151 XTRACT_PETROSIAN_FRACTAL_DIMENSION,
152 XTRACT_KATZ_FRACTAL_DIMENSION,
153 XTRACT_HIGUCHI_FRACTAL_DIMENSION,
154 XTRACT_PERMUTATION_ENTROPY,
155 XTRACT_LEMPEL_ZIV_COMPLEXITY,
156 XTRACT_SAMPLE_ENTROPY,
157 XTRACT_APPROXIMATE_ENTROPY,
159 XTRACT_SIGNAL_CONFIDENCE,
161 XTRACT_TEMPORAL_CENTROID,
164 XTRACT_PEAK_ASYMMETRY,
165 XTRACT_CROSS_CORRELATION,
166 XTRACT_CROSS_CORRELATION_LAG,
167 XTRACT_KULLBACK_LEIBLER_DIVERGENCE,
168 XTRACT_ITAKURA_SAITO_DIVERGENCE,
169 XTRACT_MODIFIED_KULLBACK_LEIBLER,
170 XTRACT_SPECTRAL_CONTRAST,
173 XTRACT_PEARSON_CORRELATION,
174 XTRACT_COVARIANCE_MATRIX,
175 XTRACT_CORRELATION_MATRIX,
176 XTRACT_AVERAGE_CORRELATION,
177 XTRACT_PRINCIPAL_VARIANCES,
180 XTRACT_GRID_CENTRAL_MOMENTS,
181 XTRACT_NORMALISED_MOMENTS,
185 XTRACT_COOCCURRENCE_MATRIX,
186 XTRACT_COOCCURRENCE_CONTRAST,
187 XTRACT_COOCCURRENCE_CORRELATION,
188 XTRACT_ANGULAR_SECOND_MOMENT,
189 XTRACT_INVERSE_DIFFERENCE_MOMENT,
190 XTRACT_LOCAL_BINARY_PATTERNS,
197 XTRACT_INIT_MFCC = 100,
199 XTRACT_INIT_WINDOWED,
220 enum xtract_lnorm_filter_types_
222 XTRACT_NO_LNORM_FILTER,
223 XTRACT_POSITIVE_SLOPE,
224 XTRACT_NEGATIVE_SLOPE
242 XTRACT_MALLOC_FAILED,
244 XTRACT_BAD_VECTOR_SIZE,
246 XTRACT_DENORMAL_FOUND,
248 XTRACT_FEATURE_NOT_IMPLEMENTED,
249 XTRACT_ARGUMENT_ERROR
255 XTRACT_MAGNITUDE_SPECTRUM,
256 XTRACT_LOG_MAGNITUDE_SPECTRUM,
257 XTRACT_POWER_SPECTRUM,
258 XTRACT_LOG_POWER_SPECTRUM,
259 XTRACT_MAGNITUDE_PHASE_SPECTRUM
265 XTRACT_OCTAVE_SUBBANDS,
266 XTRACT_LINEAR_SUBBANDS
282 XTRACT_UNIT_UNKNOWN = -2,
283 XTRACT_UNIT_ANY = -1,
284 XTRACT_UNIT_NONE = 0,
288 XTRACT_ANY_AMPLITUDE_HERTZ,
315 XTRACT_BARTLETT_HANN,
318 XTRACT_BLACKMAN_HARRIS
327 XTRACT_SPECTRAL_MAGNITUDES,
330 XTRACT_SPECTRAL_PEAKS,
332 XTRACT_SPECTRAL_PEAKS_MAGNITUDES,
334 XTRACT_SPECTRAL_PEAKS_FREQUENCIES,
337 XTRACT_SPECTRAL_HARMONICS,
339 XTRACT_SPECTRAL_HARMONICS_MAGNITUDES,
341 XTRACT_SPECTRAL_HARMONICS_FREQUENCIES,
342 XTRACT_AUTOCORRELATION_COEFFS,
343 XTRACT_ARBITRARY_SERIES,
344 XTRACT_AUDIO_SAMPLES,
353 XTRACT_SPECTRAL_MAGNITUDE_PHASE,
355 XTRACT_CHROMA_COEFFS,
359 XTRACT_SQUARE_MATRIX,
363 XTRACT_CENTRAL_MOMENT_COEFFS,
365 XTRACT_NORMALISED_MOMENT_COEFFS
375 char name[XTRACT_MAX_NAME_LENGTH];
376 char p_name[XTRACT_MAX_NAME_LENGTH];
377 char desc[XTRACT_MAX_DESC_LENGTH];
378 char p_desc[XTRACT_MAX_DESC_LENGTH];
379 char author[XTRACT_MAX_AUTHOR_LENGTH];
394 double min[XTRACT_MAXARGS];
395 double max[XTRACT_MAXARGS];
396 double def[XTRACT_MAXARGS];
398 int donor[XTRACT_MAXARGS];
467 extern int (*
xtract[XTRACT_FEATURES])(
const double *data,
const int N,
const void *argv,
double *result);
495 int xtract_init_mfcc(
int N,
double nyquist,
int style,
double freq_min,
double freq_max,
int freq_bands,
double **fft_tables);
508 int xtract_init_gfcc(
int N,
double nyquist,
double freq_min,
double freq_max,
int freq_bands,
double **fft_tables);
int xtract_init_fft(int N, int feature_name)
An initialisation function for functions using FFT.
xtract_return_codes_
Enumeration of return codes.
Definition libxtract.h:240
type_
Enumeration of data types.
Definition libxtract.h:271
void xtract_free_dct(double *table)
Free a table as allocated by xtract_init_dct().
void xtract_free_cqt(xtract_cqt_kernel *kernel)
Free a kernel as allocated by xtract_init_cqt().
enum unit_ xtract_unit_t
Enumeration of units.
xtract_mfcc_types_
Enumeration of MFCC types.
Definition libxtract.h:215
int(* xtract[XTRACT_FEATURES])(const double *data, const int N, const void *argv, double *result)
An array of pointers to functions that perform the extraction.
xtract_feature_types_
Enumeration of feature types.
Definition libxtract.h:206
xtract_vector_
Enumeration of vector format types.
Definition libxtract.h:323
struct _xtract_function_descriptor xtract_function_descriptor_t
Data structure containing useful information about functions provided by LibXtract.
xtract_bool_t
Boolean.
Definition libxtract.h:302
void xtract_free_window(double *window)
Free a window as allocated by xtract_make_window().
int xtract_init_bark(int N, double sr, int *band_limits)
A function to initialise bark filter bounds.
xtract_spectrum_
Enumeration of spectrum types.
Definition libxtract.h:254
xtract_subband_scales_
Subband scales.
Definition libxtract.h:264
xtract_cqt_kernel * xtract_init_cqt(const int N, const double sr, const double fmin, const int bins_per_octave, const int n_bins, const double threshold)
Build a constant-Q kernel for xtract_cqt().
int xtract_init_wavelet_f0_state(void)
A function to initialise wavelet f0 detector state.
double * xtract_init_dct(const int N)
A function to initialise a cosine table for xtract_dct().
struct xtract_cqt_kernel_ xtract_cqt_kernel
The kernel xtract_cqt() applies, built by xtract_init_cqt() and freed by xtract_free_cqt().
Definition libxtract.h:566
int xtract_init_mfcc(int N, double nyquist, int style, double freq_min, double freq_max, int freq_bands, double **fft_tables)
A function to initialise a mel filter bank.
unit_
Enumeration of units.
Definition libxtract.h:281
struct xtract_mel_filter_ xtract_mel_filter
A structure to store a set of n_filters Mel filters.
void xtract_free_fft(void)
Free memory used for FFT plans.
xtract_feature_init_
Enumeration of feature initialisation functions.
Definition libxtract.h:196
xtract_window_types_
Window types.
Definition libxtract.h:309
xtract_features_
Enumeration of features, elements are used as indices to an array of pointers to feature extraction f...
Definition libxtract.h:63
int xtract_init_gfcc(int N, double nyquist, double freq_min, double freq_max, int freq_bands, double **fft_tables)
A function to initialise a gammatone filter bank for GFCC extraction.
enum type_ xtract_type_t
Enumeration of data types.
enum xtract_vector_ xtract_vector_t
Enumeration of vector format types.
double * xtract_init_window(const int N, const int type)
Make a window of a given type and return a pointer to it.
Data structure containing useful information about functions provided by LibXtract.
Definition libxtract.h:370
A structure to store a set of n_filters Mel filters.
Definition libxtract.h:477