LibXtract 1.6.0
libxtract.h File Reference

main header file and API definition More...

#include "xtract_scalar.h"
#include "xtract_vector.h"
#include "xtract_delta.h"
#include "xtract_multivariate.h"
#include "xtract_grid.h"
#include "xtract_types.h"
#include "xtract_macros.h"
#include "xtract_helper.h"
Include dependency graph for libxtract.h:

Go to the source code of this file.

Data Structures

struct  _xtract_function_descriptor
 Data structure containing useful information about functions provided by LibXtract. More...
struct  xtract_mel_filter_
 A structure to store a set of n_filters Mel filters. More...

Macros

#define XTRACT_FEATURES   XTRACT_FEATURE_COUNT

Typedefs

typedef enum type_ xtract_type_t
 Enumeration of data types.
typedef enum unit_ xtract_unit_t
 Enumeration of units.
typedef enum xtract_vector_ xtract_vector_t
 Enumeration of vector format types.
typedef struct _xtract_function_descriptor xtract_function_descriptor_t
 Data structure containing useful information about functions provided by LibXtract.
typedef struct xtract_mel_filter_ xtract_mel_filter
 A structure to store a set of n_filters Mel filters.
typedef struct xtract_cqt_kernel_ xtract_cqt_kernel
 The kernel xtract_cqt() applies, built by xtract_init_cqt() and freed by xtract_free_cqt().

Enumerations

enum  xtract_features_ {
  XTRACT_MEAN , XTRACT_VARIANCE , XTRACT_STANDARD_DEVIATION , XTRACT_AVERAGE_DEVIATION ,
  XTRACT_SKEWNESS , XTRACT_KURTOSIS , XTRACT_SPECTRAL_MEAN , XTRACT_SPECTRAL_VARIANCE ,
  XTRACT_SPECTRAL_STANDARD_DEVIATION , XTRACT_SPECTRAL_SKEWNESS , XTRACT_SPECTRAL_KURTOSIS , XTRACT_SPECTRAL_CENTROID ,
  XTRACT_IRREGULARITY_K , XTRACT_IRREGULARITY_J , XTRACT_TRISTIMULUS_1 , XTRACT_TRISTIMULUS_2 ,
  XTRACT_TRISTIMULUS_3 , XTRACT_SMOOTHNESS , XTRACT_SPREAD , XTRACT_ZCR ,
  XTRACT_ROLLOFF , XTRACT_LOUDNESS , XTRACT_FLATNESS , XTRACT_FLATNESS_DB ,
  XTRACT_TONALITY , XTRACT_CREST , XTRACT_NOISINESS , XTRACT_RMS_AMPLITUDE ,
  XTRACT_SPECTRAL_INHARMONICITY , XTRACT_POWER , XTRACT_ODD_EVEN_RATIO , XTRACT_SHARPNESS ,
  XTRACT_SPECTRAL_SLOPE , XTRACT_LOWEST_VALUE , XTRACT_HIGHEST_VALUE , XTRACT_SUM ,
  XTRACT_NONZERO_COUNT , XTRACT_HPS , XTRACT_F0 , XTRACT_FAILSAFE_F0 ,
  XTRACT_WAVELET_F0 , XTRACT_MCLEOD_F0 , XTRACT_MIDICENT , XTRACT_LNORM ,
  XTRACT_FLUX , XTRACT_ATTACK_TIME , XTRACT_DECAY_TIME , XTRACT_DIFFERENCE_VECTOR ,
  XTRACT_AUTOCORRELATION , XTRACT_AMDF , XTRACT_ASDF , XTRACT_BARK_COEFFICIENTS ,
  XTRACT_PEAK_SPECTRUM , XTRACT_SPECTRUM , XTRACT_AUTOCORRELATION_FFT , XTRACT_MFCC ,
  XTRACT_DCT , XTRACT_HARMONIC_SPECTRUM , XTRACT_LPC , XTRACT_LPCC ,
  XTRACT_SUBBANDS , XTRACT_MEL_SPECTROGRAM , XTRACT_GFCC , XTRACT_GAMMATONE_SPECTROGRAM ,
  XTRACT_WINDOWED , XTRACT_SMOOTHED , XTRACT_PEAK , XTRACT_MMBSES ,
  XTRACT_SPECTRAL_SUBBAND_CENTROIDS , XTRACT_MOVING_SUM , XTRACT_MOVING_AVERAGE , XTRACT_MOVING_VARIANCE ,
  XTRACT_MOVING_STANDARD_DEVIATION , XTRACT_MOVING_MAX , XTRACT_MOVING_MIN , XTRACT_EWMA_AVERAGE ,
  XTRACT_EWMA_VARIANCE , XTRACT_MEDIAN , XTRACT_MEDIAN_ABSOLUTE_DEVIATION , XTRACT_HJORTH_ACTIVITY ,
  XTRACT_HJORTH_MOBILITY , XTRACT_HJORTH_COMPLEXITY , XTRACT_TIME_REVERSAL_ASYMMETRY , XTRACT_SPECTRAL_ENTROPY ,
  XTRACT_PETROSIAN_FRACTAL_DIMENSION , XTRACT_KATZ_FRACTAL_DIMENSION , XTRACT_HIGUCHI_FRACTAL_DIMENSION , XTRACT_PERMUTATION_ENTROPY ,
  XTRACT_LEMPEL_ZIV_COMPLEXITY , XTRACT_SAMPLE_ENTROPY , XTRACT_APPROXIMATE_ENTROPY , XTRACT_PERIODICITY ,
  XTRACT_SIGNAL_CONFIDENCE , XTRACT_DECAY_RATE , XTRACT_TEMPORAL_CENTROID , XTRACT_MAX_POSITION ,
  XTRACT_MIN_POSITION , XTRACT_PEAK_ASYMMETRY , XTRACT_CROSS_CORRELATION , XTRACT_CROSS_CORRELATION_LAG ,
  XTRACT_KULLBACK_LEIBLER_DIVERGENCE , XTRACT_ITAKURA_SAITO_DIVERGENCE , XTRACT_MODIFIED_KULLBACK_LEIBLER , XTRACT_SPECTRAL_CONTRAST ,
  XTRACT_CHROMA , XTRACT_CQT , XTRACT_PEARSON_CORRELATION , XTRACT_COVARIANCE_MATRIX ,
  XTRACT_CORRELATION_MATRIX , XTRACT_AVERAGE_CORRELATION , XTRACT_PRINCIPAL_VARIANCES , XTRACT_COHERENCE ,
  XTRACT_GRID_MOMENTS , XTRACT_GRID_CENTRAL_MOMENTS , XTRACT_NORMALISED_MOMENTS , XTRACT_HU_MOMENTS ,
  XTRACT_QUANTISE , XTRACT_HISTOGRAM , XTRACT_COOCCURRENCE_MATRIX , XTRACT_COOCCURRENCE_CONTRAST ,
  XTRACT_COOCCURRENCE_CORRELATION , XTRACT_ANGULAR_SECOND_MOMENT , XTRACT_INVERSE_DIFFERENCE_MOMENT , XTRACT_LOCAL_BINARY_PATTERNS ,
  XTRACT_FEATURE_COUNT
}
 Enumeration of features, elements are used as indices to an array of pointers to feature extraction functions.
enum  xtract_feature_init_ {
  XTRACT_INIT_MFCC = 100 , XTRACT_INIT_BARK , XTRACT_INIT_WINDOWED , XTRACT_INIT_GFCC ,
  XTRACT_INIT_CQT
}
 Enumeration of feature initialisation functions.
enum  xtract_feature_types_ { XTRACT_SCALAR , XTRACT_VECTOR , XTRACT_DELTA }
 Enumeration of feature types.
enum  xtract_mfcc_types_ { XTRACT_EQUAL_GAIN , XTRACT_EQUAL_AREA }
 Enumeration of MFCC types. More...
enum  xtract_lnorm_filter_types_ { XTRACT_NO_LNORM_FILTER , XTRACT_POSITIVE_SLOPE , XTRACT_NEGATIVE_SLOPE }
enum  xtract_return_codes_ {
  XTRACT_SUCCESS , XTRACT_MALLOC_FAILED , XTRACT_BAD_ARGV , XTRACT_BAD_VECTOR_SIZE ,
  XTRACT_BAD_STATE , XTRACT_DENORMAL_FOUND , XTRACT_NO_RESULT , XTRACT_FEATURE_NOT_IMPLEMENTED ,
  XTRACT_ARGUMENT_ERROR
}
 Enumeration of return codes. More...
enum  xtract_spectrum_ {
  XTRACT_MAGNITUDE_SPECTRUM , XTRACT_LOG_MAGNITUDE_SPECTRUM , XTRACT_POWER_SPECTRUM , XTRACT_LOG_POWER_SPECTRUM ,
  XTRACT_MAGNITUDE_PHASE_SPECTRUM
}
 Enumeration of spectrum types.
enum  xtract_subband_scales_ { XTRACT_OCTAVE_SUBBANDS , XTRACT_LINEAR_SUBBANDS }
 Subband scales.
enum  type_ {
  XTRACT_FLOAT , XTRACT_FLOATARRAY , XTRACT_INT , XTRACT_MEL_FILTER ,
  XTRACT_CQT_KERNEL
}
 Enumeration of data types.
enum  unit_ {
  XTRACT_UNIT_UNKNOWN = -2 , XTRACT_UNIT_ANY = -1 , XTRACT_UNIT_NONE = 0 , XTRACT_HERTZ = 2 ,
  XTRACT_ANY_AMPLITUDE_HERTZ , XTRACT_DBFS , XTRACT_DBFS_HERTZ , XTRACT_PERCENT ,
  XTRACT_BINS , XTRACT_SONE , XTRACT_MIDI_CENT , XTRACT_ACUM ,
  XTRACT_SECONDS , XTRACT_PER_SECOND
}
 Enumeration of units.
enum  xtract_bool_t { XTRACT_FALSE , XTRACT_TRUE }
 Boolean.
enum  xtract_window_types_ {
  XTRACT_GAUSS , XTRACT_HAMMING , XTRACT_HANN , XTRACT_BARTLETT ,
  XTRACT_TRIANGULAR , XTRACT_BARTLETT_HANN , XTRACT_BLACKMAN , XTRACT_KAISER ,
  XTRACT_BLACKMAN_HARRIS
}
 Window types.
enum  xtract_vector_ {
  XTRACT_SPECTRAL , XTRACT_SPECTRAL_MAGNITUDES , XTRACT_SPECTRAL_PEAKS , XTRACT_SPECTRAL_PEAKS_MAGNITUDES ,
  XTRACT_SPECTRAL_PEAKS_FREQUENCIES , XTRACT_SPECTRAL_HARMONICS , XTRACT_SPECTRAL_HARMONICS_MAGNITUDES , XTRACT_SPECTRAL_HARMONICS_FREQUENCIES ,
  XTRACT_AUTOCORRELATION_COEFFS , XTRACT_ARBITRARY_SERIES , XTRACT_AUDIO_SAMPLES , XTRACT_MEL_COEFFS ,
  XTRACT_LPC_COEFFS , XTRACT_LPCC_COEFFS , XTRACT_BARK_COEFFS , XTRACT_SUBFRAMES ,
  XTRACT_NO_DATA , XTRACT_SPECTRAL_MAGNITUDE_PHASE , XTRACT_CHROMA_COEFFS , XTRACT_CHANNELS ,
  XTRACT_SQUARE_MATRIX , XTRACT_GRID , XTRACT_CENTRAL_MOMENT_COEFFS , XTRACT_NORMALISED_MOMENT_COEFFS
}
 Enumeration of vector format types.

Functions

int xtract_init_wavelet_f0_state (void)
 A function to initialise wavelet f0 detector state.
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.
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.
int xtract_init_bark (int N, double sr, int *band_limits)
 A function to initialise bark filter bounds.
int xtract_init_fft (int N, int feature_name)
 An initialisation function for functions using FFT.
void xtract_free_fft (void)
 Free memory used for FFT plans.
double * xtract_init_window (const int N, const int type)
 Make a window of a given type and return a pointer to it.
void xtract_free_window (double *window)
 Free a window as allocated by xtract_make_window().
double * xtract_init_dct (const int N)
 A function to initialise a cosine table for xtract_dct().
void xtract_free_dct (double *table)
 Free a table as allocated by xtract_init_dct().
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().
void xtract_free_cqt (xtract_cqt_kernel *kernel)
 Free a kernel as allocated by xtract_init_cqt().
xtract_function_descriptor_t * xtract_make_descriptors (void)
int xtract_free_descriptors (xtract_function_descriptor_t *fd)

Variables

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.

Detailed Description

main header file and API definition