Mercurial > hg > qm-vamp-plugins
diff plugins/BarBeatTrack.h @ 89:f4a2f5aa743c
* Add bar-and-beat-tracker plugin
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 10 Feb 2009 16:38:02 +0000 |
parents | |
children | dcf5800f0f00 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/BarBeatTrack.h Tue Feb 10 16:38:02 2009 +0000 @@ -0,0 +1,57 @@ +/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ + +/* + QM Vamp Plugin Set + + Centre for Digital Music, Queen Mary, University of London. + All rights reserved. +*/ + +#ifndef _BAR_BEAT_TRACK_PLUGIN_H_ +#define _BAR_BEAT_TRACK_PLUGIN_H_ + +#include <vamp-sdk/Plugin.h> + +class BarBeatTrackerData; + +class BarBeatTracker : public Vamp::Plugin +{ +public: + BarBeatTracker(float inputSampleRate); + virtual ~BarBeatTracker(); + + bool initialise(size_t channels, size_t stepSize, size_t blockSize); + void reset(); + + InputDomain getInputDomain() const { return TimeDomain; } + + std::string getIdentifier() const; + std::string getName() const; + std::string getDescription() const; + std::string getMaker() const; + int getPluginVersion() const; + std::string getCopyright() const; + + ParameterList getParameterDescriptors() const; + float getParameter(std::string) const; + void setParameter(std::string, float); + + size_t getPreferredStepSize() const; + size_t getPreferredBlockSize() const; + + OutputList getOutputDescriptors() const; + + FeatureSet process(const float *const *inputBuffers, + Vamp::RealTime timestamp); + + FeatureSet getRemainingFeatures(); + +protected: + BarBeatTrackerData *m_d; + static float m_stepSecs; + int m_bpb; + FeatureSet barBeatTrack(); +}; + + +#endif