diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2006-10-02 14:18:15 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2006-10-02 14:18:15 +0000 |
commit | 6d00829a8ccef20c0ce7eeecc54cd3bb5f94b3bd (patch) | |
tree | 60022374029d12df117e549132637968e7dcca43 /xtract/xtract_vector.h | |
parent | 0e94c12896dde9bb525a617ed680c6da82b2ed52 (diff) | |
download | LibXtract-6d00829a8ccef20c0ce7eeecc54cd3bb5f94b3bd.tar.gz LibXtract-6d00829a8ccef20c0ce7eeecc54cd3bb5f94b3bd.tar.bz2 LibXtract-6d00829a8ccef20c0ce7eeecc54cd3bb5f94b3bd.zip |
Initial import
Diffstat (limited to 'xtract/xtract_vector.h')
-rw-r--r-- | xtract/xtract_vector.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/xtract/xtract_vector.h b/xtract/xtract_vector.h new file mode 100644 index 0000000..16a6cc3 --- /dev/null +++ b/xtract/xtract_vector.h @@ -0,0 +1,65 @@ +/* libxtract feature extraction library + * + * Copyright (C) 2006 Jamie Bullock + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + */ + +/* xtract_scalar.h: declares functions that extract a feature as a vector from an input vector */ + +#ifndef XTRACT_VECTOR +#define XTRACT_VECTOR + +#ifdef __cplusplus +extern "C" { +#endif + +/* Extracts normalized (0-1) frequency domain magnitude spectrum from time domain signal */ +int xtract_magnitude_spectrum(float *data, int N, void *argv, float *result); + + +/* Autocorrelation */ +int xtract_autocorrelation(float *data, int N, void *argv, float *result); + + +int xtract_autocorrelation_fft(float *data, int N, void *argv, float *result); + +/* Average Magnitude Difference Function */ +int xtract_amdf(float *data, int N, void *argv, float *result); + +/* Average Squared Difference Function */ +int xtract_asdf(float *data, int N, void *argv, float *result); + +/* MFCC */ +/* Rabiner */ +int xtract_mfcc(float *data, int N, void *argv, float *result); + +/* Bark band */ + +int xtract_bark_coefficients(float *data, int N, void *argv, float *result); + +/* Discrete cosine transform */ +int xtract_dct(float *data, int N, void *argv, float *result); + +/* Frequency and amplitude of spectral peaks */ +/* Takes peak threshold as percentage below max peak, and sr as argv, returns a pointer to an array of size N, containing N/2 freqs and N/2 amplitudes, amplitudes are on a decibel scale with dbFS = 0 */ +int xtract_peaks(float *data, int N, void *argv, float *result); + +#ifdef __cplusplus +} +#endif + +#endif |