Changeset fdf39ba for src/mfcc.h
- Timestamp:
- Sep 7, 2007, 10:49:45 AM (17 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 8708556
- Parents:
- 97886fa (diff), 7c6c806d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mfcc.h
r97886fa rfdf39ba 24 24 #define MFCC_H 25 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 26 30 #include "filterbank.h" 27 31 28 //libXtract enums32 //libXtract constants and enums 29 33 // TODO: remove them 34 35 #define XTRACT_SQ(a) ((a) * (a)) 36 #define XTRACT_MIN(a, b) ((a) < (b) ? (a) : (b)) 37 #define XTRACT_MAX(a, b) ((a) > (b) ? (a) : (b)) 38 #define XTRACT_NEEDS_FFTW printf("LibXtract must be compiled with fftw support to use this function.\n") 39 #define XTRACT_VERY_SMALL_NUMBER 2e-42 40 #define XTRACT_LOG_LIMIT XTRACT_VERY_SMALL_NUMBER 41 #define XTRACT_LOG_LIMIT_DB -96.0 42 #define XTRACT_DB_SCALE_OFFSET 96.0 43 #define XTRACT_VERY_BIG_NUMBER 2e42 44 #define XTRACT_SR_UPPER_LIMIT 192000.0 45 #define XTRACT_SR_LOWER_LIMIT 22050.0 46 #define XTRACT_SR_DEFAULT 44100.0 47 #define XTRACT_FUNDAMENTAL_DEFAULT 440.0 48 #define XTRACT_CHECK_nyquist if(!nyquist) nyquist = XTRACT_SR_DEFAULT / 2 49 #define XTRACT_CHECK_q if(!q) q = XTRACT_SR_DEFAULT / N 50 #define XTRACT_IS_ODD(x) (x % 2 != 0 ? 1 : 0) 51 #define XTRACT_SR_LIMIT SR_UPPER_LIMIT 52 #define XTRACT_FFT_BANDS_MIN 16 53 #define XTRACT_FFT_BANDS_MAX 65536 54 #define XTRACT_FFT_BANDS_DEF 1024 55 #define XTRACT_SPEC_BW_MIN 0.168 /* Minimum spectral bandwidth \ 56 (= SR_LOWER_LIMIT / FFT_BANDS_MAX*/ 57 #define XTRACT_SPEC_BW_MAX 12000.0 /* SR_UPPER_LIMIT / FFT_BANDS_MIN */ 58 #define XTRACT_SPEC_BW_DEF 43.066 /* SR_DEFAULT / FFT_BANDS_DEF */ 30 59 31 60 /** \brief Enumeration of feature initialisation functions */ … … 132 161 * The data structure pointed to by *argv must be obtained by first calling xtract_init_mfcc 133 162 */ 134 int aubio_mfcc_do(const float *data, const int N, const void *argv, float *result); 163 164 165 int aubio_mfcc_do(const float *data, const int N, const void *argv, float *result, aubio_mfft_t *fft_dct, cvec_t *fftgrain_dct); 135 166 136 167 /** \brief Extract the Discrete Cosine transform of a time domain signal … … 140 171 * \param *result: a pointer to an array containing resultant dct coefficients 141 172 */ 142 int aubio_dct_do(const float *data, const int N, const void *argv, float *result );173 int aubio_dct_do(const float *data, const int N, const void *argv, float *result, aubio_mfft_t *fft_dct, cvec_t *fftgrain_dct); 143 174 175 #ifdef __cplusplus 176 } 177 #endif 144 178 145 179 #endif
Note: See TracChangeset
for help on using the changeset viewer.