aubio  0.4.1
spectral/mfcc.h
Go to the documentation of this file.
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   \example spectral/test-mfcc.c
00027 
00028 */
00029 
00030 #ifndef _AUBIO_MFCC_H
00031 #define _AUBIO_MFCC_H
00032 
00033 #ifdef __cplusplus
00034 extern "C"
00035 {
00036 #endif
00037 
00038 /** mfcc object */
00039 typedef struct _aubio_mfcc_t aubio_mfcc_t;
00040 
00041 /** create mfcc object
00042 
00043   \param buf_size size of analysis buffer (and length the FFT transform)
00044   \param samplerate audio sampling rate
00045   \param n_coeffs number of desired coefficients
00046   \param n_filters number of desired filters
00047 
00048 */
00049 aubio_mfcc_t *new_aubio_mfcc (uint_t buf_size,
00050     uint_t n_filters, uint_t n_coeffs, uint_t samplerate);
00051 
00052 /** delete mfcc object
00053 
00054   \param mf mfcc object as returned by new_aubio_mfcc
00055 
00056 */
00057 void del_aubio_mfcc (aubio_mfcc_t * mf);
00058 
00059 /** mfcc object processing
00060 
00061   \param mf mfcc object as returned by new_aubio_mfcc
00062   \param in input spectrum (buf_size long)
00063   \param out output mel coefficients buffer (n_coeffs long)
00064 
00065 */
00066 void aubio_mfcc_do (aubio_mfcc_t * mf, cvec_t * in, fvec_t * out);
00067 
00068 #ifdef __cplusplus
00069 }
00070 #endif
00071 
00072 #endif /* _AUBIO_MFCC_H */
 All Data Structures Files Functions Variables Typedefs Defines