aubio: spectral/mfcc.h Source File

aubio 0.4.7

mfcc.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2007-2013 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 /** \file
23
24 Mel-Frequency Cepstrum Coefficients object
25
26 This object computes MFCC coefficients on an input cvec_t.
27
28 The implementation follows the specifications established by Malcolm Slaney
29 in its Auditory Toolbox, available online (see file mfcc.m).
30
31 http://engineering.ecn.purdue.edu/~malcolm/interval/1998-010/
32
33 \example spectral/test-mfcc.c
34
35 */
36
37 #ifndef AUBIO_MFCC_H
38 #define AUBIO_MFCC_H
39
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44
45 /** mfcc object */
46 typedef struct _aubio_mfcc_t aubio_mfcc_t;
47
48 /** create mfcc object
49
50 \param buf_size size of analysis buffer (and length the FFT transform)
51 \param samplerate audio sampling rate
52 \param n_coeffs number of desired coefficients
53 \param n_filters number of desired filters
54
55 */
56 aubio_mfcc_t *new_aubio_mfcc (uint_t buf_size,
57 uint_t n_filters, uint_t n_coeffs, uint_t samplerate);
58
59 /** delete mfcc object
60
61 \param mf mfcc object as returned by new_aubio_mfcc
62
63 */
64 void del_aubio_mfcc (aubio_mfcc_t * mf);
65
66 /** mfcc object processing
67
68 \param mf mfcc object as returned by new_aubio_mfcc
69 \param in input spectrum (buf_size long)
70 \param out output mel coefficients buffer (n_coeffs long)
71
72 */
73 void aubio_mfcc_do (aubio_mfcc_t * mf, const cvec_t * in, fvec_t * out);
74
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif /* AUBIO_MFCC_H */
aubio_mfcc_t
struct _aubio_mfcc_t aubio_mfcc_t
mfcc object
Definition: mfcc.h:46
new_aubio_mfcc
aubio_mfcc_t * new_aubio_mfcc(uint_t buf_size, uint_t n_filters, uint_t n_coeffs, uint_t samplerate)
create mfcc object
aubio_mfcc_do
void aubio_mfcc_do(aubio_mfcc_t *mf, const cvec_t *in, fvec_t *out)
mfcc object processing
fvec_t
Buffer for real data.
Definition: fvec.h:67
cvec_t
Vector of real-valued phase and spectrum data.
Definition: cvec.h:63
uint_t
unsigned int uint_t
unsigned integer
Definition: types.h:60
del_aubio_mfcc
void del_aubio_mfcc(aubio_mfcc_t *mf)
delete mfcc object