|
aubio 0.4.5
|
00001 /* 00002 Copyright (C) 2007-2013 Paul Brossier <piem@aubio.org> 00003 and Amaury Hazan <ahazan@iua.upf.edu> 00004 00005 This file is part of aubio. 00006 00007 aubio is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 aubio is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with aubio. If not, see <http://www.gnu.org/licenses/>. 00019 00020 */ 00021 00022 /** \file 00023 00024 Mel-Frequency Cepstrum Coefficients object 00025 00026 This object computes MFCC coefficients on an input cvec_t. 00027 00028 The implementation follows the specifications established by Malcolm Slaney 00029 in its Auditory Toolbox, available online (see file mfcc.m). 00030 00031 http://engineering.ecn.purdue.edu/~malcolm/interval/1998-010/ 00032 00033 \example spectral/test-mfcc.c 00034 00035 */ 00036 00037 #ifndef AUBIO_MFCC_H 00038 #define AUBIO_MFCC_H 00039 00040 #ifdef __cplusplus 00041 extern "C" 00042 { 00043 #endif 00044 00045 /** mfcc object */ 00046 typedef struct _aubio_mfcc_t aubio_mfcc_t; 00047 00048 /** create mfcc object 00049 00050 \param buf_size size of analysis buffer (and length the FFT transform) 00051 \param samplerate audio sampling rate 00052 \param n_coeffs number of desired coefficients 00053 \param n_filters number of desired filters 00054 00055 */ 00056 aubio_mfcc_t *new_aubio_mfcc (uint_t buf_size, 00057 uint_t n_filters, uint_t n_coeffs, uint_t samplerate); 00058 00059 /** delete mfcc object 00060 00061 \param mf mfcc object as returned by new_aubio_mfcc 00062 00063 */ 00064 void del_aubio_mfcc (aubio_mfcc_t * mf); 00065 00066 /** mfcc object processing 00067 00068 \param mf mfcc object as returned by new_aubio_mfcc 00069 \param in input spectrum (buf_size long) 00070 \param out output mel coefficients buffer (n_coeffs long) 00071 00072 */ 00073 void aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out); 00074 00075 #ifdef __cplusplus 00076 } 00077 #endif 00078 00079 #endif /* AUBIO_MFCC_H */
1.7.3