1 | /* |
---|
2 | Copyright (C) 2007-2009 Paul Brossier <piem@aubio.org> |
---|
3 | and Amaury Hazan <ahazan@iua.upf.edu> |
---|
4 | |
---|
5 | This file is part of Aubio. |
---|
6 | |
---|
7 | Aubio is free software: you can redistribute it and/or modify |
---|
8 | it under the terms of the GNU General Public License as published by |
---|
9 | the Free Software Foundation, either version 3 of the License, or |
---|
10 | (at your option) any later version. |
---|
11 | |
---|
12 | Aubio is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | GNU General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU General Public License |
---|
18 | along with Aubio. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef MFCC_H |
---|
23 | #define MFCC_H |
---|
24 | |
---|
25 | #ifdef __cplusplus |
---|
26 | extern "C" |
---|
27 | { |
---|
28 | #endif |
---|
29 | |
---|
30 | typedef struct aubio_mfcc_t_ aubio_mfcc_t; |
---|
31 | |
---|
32 | /** create mfcc object |
---|
33 | |
---|
34 | \param win_s size of analysis buffer (and length the FFT transform) |
---|
35 | \param samplerate audio sampling rate |
---|
36 | \param n_coefs number of desired coefficientss |
---|
37 | |
---|
38 | */ |
---|
39 | aubio_mfcc_t *new_aubio_mfcc (uint_t win_s, uint_t samplerate, |
---|
40 | uint_t n_filters, uint_t n_coefs); |
---|
41 | |
---|
42 | /** delete mfcc object |
---|
43 | |
---|
44 | \param mf mfcc object as returned by new_aubio_mfcc |
---|
45 | |
---|
46 | */ |
---|
47 | void del_aubio_mfcc (aubio_mfcc_t * mf); |
---|
48 | |
---|
49 | /** mfcc object processing |
---|
50 | |
---|
51 | \param mf mfcc object as returned by new_aubio_mfcc |
---|
52 | \param in input spectrum (win_s long) |
---|
53 | \param out output mel coefficients buffer (n_coeffs long) |
---|
54 | |
---|
55 | */ |
---|
56 | void aubio_mfcc_do (aubio_mfcc_t * mf, cvec_t * in, fvec_t * out); |
---|
57 | |
---|
58 | #ifdef __cplusplus |
---|
59 | } |
---|
60 | #endif |
---|
61 | |
---|
62 | #endif // MFCC_H |
---|