source: src/mfcc.h @ ef1c3b7

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since ef1c3b7 was ef1c3b7, checked in by Amaury Hazan <mahmoudax@gmail.com>, 17 years ago

merged from aubio_mfcc, added slaney filterbank (70% done)

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[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
29extern "C" {
30#endif
31
[b276dee]32#include "sample.h"
[71d3bf0]33#include "filterbank.h"
[88199ce]34
[8708556]35typedef struct aubio_mfcc_t_ aubio_mfcc_t;
[88199ce]36
[8708556]37/** create mfcc object
[88199ce]38
[8708556]39  \param win_s size of analysis buffer (and length the FFT transform)
40  \param samplerate
41  \param n_coefs: number of desired coefs
42  \param lowfreq: lowest frequency to use in filterbank
43  \param highfreq highest frequency to use in filterbank
44  \param channels number of channels
[7c6c806d]45
[8708556]46*/
[7a46bf6]47aubio_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]48/** delete mfcc object
49
50  \param mf mfcc object as returned by new_aubio_mfcc
51
52*/
53void del_aubio_mfcc(aubio_mfcc_t *mf);
54/** mfcc object processing
55
56  \param mf mfcc object as returned by new_aubio_mfcc
57  \param in input spectrum (win_s long)
58  \param out output mel coefficients buffer (n_filters/2 +1 long)
59
60*/
61void aubio_mfcc_do(aubio_mfcc_t * mf, cvec_t *in, fvec_t *out);
62
63/** intermediate dct involved in aubio_mfcc_do
[7c6c806d]64
[8708556]65  \param mf mfcc object as returned by new_aubio_mfcc
66  \param in input spectrum (n_filters long)
67  \param out output mel coefficients buffer (n_filters/2 +1 long)
68
69*/
70void aubio_dct_do(aubio_mfcc_t * mf, fvec_t *in, fvec_t *out);
[88199ce]71
[ef1c3b7]72/** dump filterbank to log file
73
74  \param mf mfcc object as returned by new_aubio_mfcc
75 
76*/
77void dump_filterbank(aubio_mfcc_t * mf);
78
[7c6c806d]79#ifdef __cplusplus
80}
81#endif
[88199ce]82
[73eaa2e]83#endif // MFCC_H
Note: See TracBrowser for help on using the repository browser.