[88199ce] | 1 | /* |
---|
[73eaa2e] | 2 | Copyright (C) 2007 Amaury Hazan <ahazan@iua.upf.edu> |
---|
| 3 | and Paul Brossier <piem@piem.org> |
---|
[88199ce] | 4 | |
---|
| 5 | This program is free software; you can redistribute it and/or modify |
---|
| 6 | it under the terms of the GNU General Public License as published by |
---|
| 7 | the Free Software Foundation; either version 2 of the License, or |
---|
| 8 | (at your option) any later version. |
---|
| 9 | |
---|
| 10 | This program is distributed in the hope that it will be useful, |
---|
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 13 | GNU General Public License for more details. |
---|
| 14 | |
---|
| 15 | You should have received a copy of the GNU General Public License |
---|
| 16 | along with this program; if not, write to the Free Software |
---|
| 17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
| 18 | |
---|
| 19 | */ |
---|
| 20 | |
---|
[73eaa2e] | 21 | /* part of this mfcc implementation were inspired from LibXtract |
---|
| 22 | http://libxtract.sourceforge.net/ |
---|
| 23 | */ |
---|
| 24 | |
---|
[88199ce] | 25 | #ifndef MFCC_H |
---|
| 26 | #define MFCC_H |
---|
| 27 | |
---|
[7c6c806d] | 28 | #ifdef __cplusplus |
---|
| 29 | extern "C" { |
---|
| 30 | #endif |
---|
| 31 | |
---|
[8708556] | 32 | typedef struct aubio_mfcc_t_ aubio_mfcc_t; |
---|
[88199ce] | 33 | |
---|
[8708556] | 34 | /** create mfcc object |
---|
[88199ce] | 35 | |
---|
[8708556] | 36 | \param win_s size of analysis buffer (and length the FFT transform) |
---|
| 37 | \param samplerate |
---|
| 38 | \param n_coefs: number of desired coefs |
---|
| 39 | \param lowfreq: lowest frequency to use in filterbank |
---|
| 40 | \param highfreq highest frequency to use in filterbank |
---|
| 41 | \param channels number of channels |
---|
[7c6c806d] | 42 | |
---|
[8708556] | 43 | */ |
---|
[7a46bf6] | 44 | aubio_mfcc_t * new_aubio_mfcc (uint_t win_s, uint_t samplerate, uint_t n_filters, uint_t n_coefs, smpl_t lowfreq, smpl_t highfreq, uint_t channels); |
---|
[8708556] | 45 | /** delete mfcc object |
---|
| 46 | |
---|
| 47 | \param mf mfcc object as returned by new_aubio_mfcc |
---|
| 48 | |
---|
| 49 | */ |
---|
| 50 | void del_aubio_mfcc(aubio_mfcc_t *mf); |
---|
| 51 | /** mfcc object processing |
---|
| 52 | |
---|
| 53 | \param mf mfcc object as returned by new_aubio_mfcc |
---|
| 54 | \param in input spectrum (win_s long) |
---|
| 55 | \param out output mel coefficients buffer (n_filters/2 +1 long) |
---|
| 56 | |
---|
| 57 | */ |
---|
| 58 | void aubio_mfcc_do(aubio_mfcc_t * mf, cvec_t *in, fvec_t *out); |
---|
| 59 | |
---|
[7c6c806d] | 60 | #ifdef __cplusplus |
---|
| 61 | } |
---|
| 62 | #endif |
---|
[88199ce] | 63 | |
---|
[73eaa2e] | 64 | #endif // MFCC_H |
---|