c@27: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@27: c@27: /* c@27: QM Vamp Plugin Set c@27: c@27: Centre for Digital Music, Queen Mary, University of London. c@135: c@135: This program is free software; you can redistribute it and/or c@135: modify it under the terms of the GNU General Public License as c@135: published by the Free Software Foundation; either version 2 of the c@135: License, or (at your option) any later version. See the file c@135: COPYING included with this distribution for more information. c@27: */ c@27: c@27: #ifndef _BEAT_TRACK_PLUGIN_H_ c@27: #define _BEAT_TRACK_PLUGIN_H_ c@27: c@27: #include c@27: c@27: class BeatTrackerData; c@27: c@27: class BeatTracker : public Vamp::Plugin c@27: { c@27: public: c@27: BeatTracker(float inputSampleRate); c@27: virtual ~BeatTracker(); c@27: c@27: bool initialise(size_t channels, size_t stepSize, size_t blockSize); c@27: void reset(); c@27: c@27: InputDomain getInputDomain() const { return FrequencyDomain; } c@27: c@27: std::string getIdentifier() const; c@27: std::string getName() const; c@27: std::string getDescription() const; c@27: std::string getMaker() const; c@27: int getPluginVersion() const; c@27: std::string getCopyright() const; c@27: c@27: ParameterList getParameterDescriptors() const; c@27: float getParameter(std::string) const; c@27: void setParameter(std::string, float); c@27: c@27: size_t getPreferredStepSize() const; c@27: size_t getPreferredBlockSize() const; c@27: c@27: OutputList getOutputDescriptors() const; c@27: c@27: FeatureSet process(const float *const *inputBuffers, c@27: Vamp::RealTime timestamp); c@27: c@27: FeatureSet getRemainingFeatures(); c@27: c@27: protected: c@27: BeatTrackerData *m_d; c@86: int m_method; c@27: int m_dfType; luis@144: luis@144: // MEPD new protected parameters to allow the user to control these advanced parameters of the beat tracker luis@144: double m_alpha; luis@144: double m_tightness; luis@144: double m_inputtempo; luis@144: bool m_constraintempo; luis@144: c@30: bool m_whiten; c@27: static float m_stepSecs; c@86: FeatureSet beatTrackOld(); c@86: FeatureSet beatTrackNew(); c@27: }; c@27: c@27: c@27: #endif