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