piem@84: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ piem@84: piem@84: /* piem@84: Vamp feature extraction plugins using Paul Brossier's Aubio library. piem@84: piem@84: Copyright (C) 2006-2015 Paul Brossier piem@84: piem@110: This file is part of vamp-aubio-plugins. piem@84: piem@84: vamp-aubio is free software: you can redistribute it and/or modify piem@84: it under the terms of the GNU General Public License as published by piem@84: the Free Software Foundation, either version 3 of the License, or piem@84: (at your option) any later version. piem@84: piem@84: vamp-aubio is distributed in the hope that it will be useful, piem@84: but WITHOUT ANY WARRANTY; without even the implied warranty of piem@84: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the piem@84: GNU General Public License for more details. piem@84: piem@84: You should have received a copy of the GNU General Public License piem@84: along with aubio. If not, see . piem@84: piem@84: */ piem@84: piem@84: #ifndef _MELENERGY_PLUGIN_H_ piem@84: #define _MELENERGY_PLUGIN_H_ piem@84: piem@84: #include piem@84: #include piem@84: piem@84: #include "Types.h" piem@84: piem@84: class MelEnergy : public Vamp::Plugin piem@84: { piem@84: public: piem@84: MelEnergy(float inputSampleRate); piem@84: virtual ~MelEnergy(); piem@84: piem@84: bool initialise(size_t channels, size_t stepSize, size_t blockSize); piem@84: void reset(); piem@84: piem@84: InputDomain getInputDomain() const { return TimeDomain; } piem@84: piem@84: std::string getIdentifier() const; piem@84: std::string getName() const; piem@84: std::string getDescription() const; piem@84: std::string getMaker() const; piem@84: int getPluginVersion() const; piem@84: std::string getCopyright() const; piem@84: piem@84: ParameterList getParameterDescriptors() const; piem@84: float getParameter(std::string) const; piem@84: void setParameter(std::string, float); piem@84: piem@84: size_t getPreferredStepSize() const; piem@84: size_t getPreferredBlockSize() const; piem@84: piem@84: OutputList getOutputDescriptors() const; piem@84: piem@84: FeatureSet process(const float *const *inputBuffers, piem@84: Vamp::RealTime timestamp); piem@84: piem@84: FeatureSet getRemainingFeatures(); piem@84: piem@84: protected: piem@84: fvec_t *m_ibuf; piem@84: aubio_pvoc_t *m_pvoc; piem@84: cvec_t *m_ispec; piem@84: aubio_filterbank_t *m_melbank; piem@84: fvec_t *m_ovec; piem@84: piem@84: size_t m_nfilters; piem@84: piem@84: size_t m_stepSize; piem@84: size_t m_blockSize; piem@84: }; piem@84: piem@84: piem@84: #endif /* _MELENERGY_PLUGIN_H_ */