Mercurial > hg > vamp-aubio-plugins
comparison plugins/Mfcc.h @ 69:ecaaac755073
plugins/Mfcc.{cpp,h}: added first Mfcc drafts
author | Paul Brossier <piem@piem.org> |
---|---|
date | Wed, 28 Jan 2015 13:26:09 +0100 |
parents | |
children | a35ba53eef7a |
comparison
equal
deleted
inserted
replaced
68:43e22cc4992d | 69:ecaaac755073 |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Vamp feature extraction plugins using Paul Brossier's Aubio library. | |
5 | |
6 Copyright (C) 2006-2015 Paul Brossier <piem@aubio.org> | |
7 | |
8 This file is part of vamp-aubio. | |
9 | |
10 vamp-aubio is free software: you can redistribute it and/or modify | |
11 it under the terms of the GNU General Public License as published by | |
12 the Free Software Foundation, either version 3 of the License, or | |
13 (at your option) any later version. | |
14 | |
15 vamp-aubio is distributed in the hope that it will be useful, | |
16 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 GNU General Public License for more details. | |
19 | |
20 You should have received a copy of the GNU General Public License | |
21 along with aubio. If not, see <http://www.gnu.org/licenses/>. | |
22 | |
23 | |
24 */ | |
25 | |
26 #ifndef _MFCC_PLUGIN_H_ | |
27 #define _MFCC_PLUGIN_H_ | |
28 | |
29 #include <vamp-sdk/Plugin.h> | |
30 #include <aubio/aubio.h> | |
31 | |
32 #include "Types.h" | |
33 | |
34 class Mfcc : public Vamp::Plugin | |
35 { | |
36 public: | |
37 Mfcc(float inputSampleRate); | |
38 virtual ~Mfcc(); | |
39 | |
40 bool initialise(size_t channels, size_t stepSize, size_t blockSize); | |
41 void reset(); | |
42 | |
43 InputDomain getInputDomain() const { return TimeDomain; } | |
44 | |
45 std::string getIdentifier() const; | |
46 std::string getName() const; | |
47 std::string getDescription() const; | |
48 std::string getMaker() const; | |
49 int getPluginVersion() const; | |
50 std::string getCopyright() const; | |
51 | |
52 ParameterList getParameterDescriptors() const; | |
53 float getParameter(std::string) const; | |
54 void setParameter(std::string, float); | |
55 | |
56 size_t getPreferredStepSize() const; | |
57 size_t getPreferredBlockSize() const; | |
58 | |
59 OutputList getOutputDescriptors() const; | |
60 | |
61 FeatureSet process(const float *const *inputBuffers, | |
62 Vamp::RealTime timestamp); | |
63 | |
64 FeatureSet getRemainingFeatures(); | |
65 | |
66 protected: | |
67 fvec_t *m_ibuf; | |
68 aubio_pvoc_t *m_pvoc; | |
69 cvec_t *m_ispec; | |
70 aubio_mfcc_t *m_mfcc; | |
71 fvec_t *m_ovec; | |
72 | |
73 size_t m_nfilters; | |
74 size_t m_ncoeffs; | |
75 | |
76 size_t m_stepSize; | |
77 size_t m_blockSize; | |
78 }; | |
79 | |
80 | |
81 #endif |