source: src/mfcc.h @ 73eaa2e

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 73eaa2e was 73eaa2e, checked in by Paul Brossier <piem@piem.org>, 17 years ago

update copyrights, remove old libxtract code, cosmetic header changes

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2   Copyright (C) 2007 Amaury Hazan <ahazan@iua.upf.edu>
3                  and Paul Brossier <piem@piem.org>
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
21/* part of this mfcc implementation were inspired from LibXtract
22   http://libxtract.sourceforge.net/
23*/
24
25#ifndef MFCC_H
26#define MFCC_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#include "filterbank.h"
33
34typedef struct aubio_mfcc_t_ aubio_mfcc_t;
35
36/** create mfcc object
37
38  \param win_s size of analysis buffer (and length the FFT transform)
39  \param samplerate
40  \param n_coefs: number of desired coefs
41  \param lowfreq: lowest frequency to use in filterbank
42  \param highfreq highest frequency to use in filterbank
43  \param channels number of channels
44
45*/
46aubio_mfcc_t * new_aubio_mfcc (uint_t win_s, uint_t samplerate ,uint_t n_coefs, smpl_t lowfreq, smpl_t highfreq, uint_t channels);
47/** delete mfcc object
48
49  \param mf mfcc object as returned by new_aubio_mfcc
50
51*/
52void del_aubio_mfcc(aubio_mfcc_t *mf);
53/** mfcc object processing
54
55  \param mf mfcc object as returned by new_aubio_mfcc
56  \param in input spectrum (win_s long)
57  \param out output mel coefficients buffer (n_filters/2 +1 long)
58
59*/
60void aubio_mfcc_do(aubio_mfcc_t * mf, cvec_t *in, fvec_t *out);
61
62/** intermediate dct involved in aubio_mfcc_do
63
64  \param mf mfcc object as returned by new_aubio_mfcc
65  \param in input spectrum (n_filters long)
66  \param out output mel coefficients buffer (n_filters/2 +1 long)
67
68*/
69void aubio_dct_do(aubio_mfcc_t * mf, fvec_t *in, fvec_t *out);
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif // MFCC_H
Note: See TracBrowser for help on using the repository browser.