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