cannam@7: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ cannam@7: cannam@7: /* cannam@7: Vamp feature extraction plugins using Paul Brossier's Aubio library. cannam@7: cannam@7: Centre for Digital Music, Queen Mary, University of London. cannam@7: This file copyright 2006 Chris Cannam. cannam@7: piem@112: This file is part of vamp-aubio-plugins. piem@112: piem@112: vamp-aubio is free software: you can redistribute it and/or modify piem@112: it under the terms of the GNU General Public License as published by piem@112: the Free Software Foundation, either version 3 of the License, or piem@112: (at your option) any later version. piem@112: piem@112: vamp-aubio is distributed in the hope that it will be useful, piem@112: but WITHOUT ANY WARRANTY; without even the implied warranty of piem@112: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the piem@112: GNU General Public License for more details. piem@112: piem@112: You should have received a copy of the GNU General Public License piem@112: along with aubio. If not, see . cannam@7: cannam@7: */ cannam@7: cannam@7: #ifndef _TEMPO_PLUGIN_H_ cannam@7: #define _TEMPO_PLUGIN_H_ cannam@7: cannam@7: #include piem@51: #include cannam@7: cannam@30: #include "Types.h" cannam@30: cannam@7: class Tempo : public Vamp::Plugin cannam@7: { cannam@7: public: cannam@7: Tempo(float inputSampleRate); cannam@7: virtual ~Tempo(); cannam@7: cannam@7: bool initialise(size_t channels, size_t stepSize, size_t blockSize); cannam@7: void reset(); cannam@7: cannam@7: InputDomain getInputDomain() const { return TimeDomain; } cannam@7: cannam@13: std::string getIdentifier() const; cannam@7: std::string getName() const; cannam@7: std::string getDescription() const; cannam@7: std::string getMaker() const; cannam@7: int getPluginVersion() const; cannam@7: std::string getCopyright() const; cannam@7: cannam@7: ParameterList getParameterDescriptors() const; cannam@7: float getParameter(std::string) const; cannam@7: void setParameter(std::string, float); cannam@7: cannam@7: size_t getPreferredStepSize() const; cannam@7: size_t getPreferredBlockSize() const; cannam@7: cannam@7: OutputList getOutputDescriptors() const; cannam@7: cannam@12: FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp); cannam@7: cannam@7: FeatureSet getRemainingFeatures(); cannam@7: cannam@7: protected: cannam@7: fvec_t *m_ibuf; cannam@35: fvec_t *m_beat; cannam@35: smpl_t m_bpm; cannam@30: OnsetType m_onsettype; cannam@30: aubio_tempo_t *m_tempo; cannam@7: float m_threshold; cannam@7: float m_silence; cannam@7: size_t m_stepSize; cannam@7: size_t m_blockSize; cannam@7: Vamp::RealTime m_delay; cannam@7: Vamp::RealTime m_lastBeat; cannam@7: }; cannam@7: cannam@7: cannam@7: #endif