annotate plugins/OnsetDetect.h @ 32:8cde4a0f36ef

* Permit onset detector to use different step and block sizes from preferred (this produces wrong results for the beat tracker, but not onset detector)
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 09 Nov 2007 17:03:58 +0000
parents ff5a09e45209
children dcf5800f0f00
rev   line source
c@27 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
c@27 2
c@27 3 /*
c@27 4 QM Vamp Plugin Set
c@27 5
c@27 6 Centre for Digital Music, Queen Mary, University of London.
c@27 7 All rights reserved.
c@27 8 */
c@27 9
c@27 10 #ifndef _ONSET_DETECT_PLUGIN_H_
c@27 11 #define _ONSET_DETECT_PLUGIN_H_
c@27 12
c@27 13 #include <vamp-sdk/Plugin.h>
c@27 14
c@27 15 class OnsetDetectorData;
c@27 16
c@27 17 class OnsetDetector : public Vamp::Plugin
c@27 18 {
c@27 19 public:
c@27 20 OnsetDetector(float inputSampleRate);
c@27 21 virtual ~OnsetDetector();
c@27 22
c@27 23 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
c@27 24 void reset();
c@27 25
c@27 26 InputDomain getInputDomain() const { return FrequencyDomain; }
c@27 27
c@27 28 std::string getIdentifier() const;
c@27 29 std::string getName() const;
c@27 30 std::string getDescription() const;
c@27 31 std::string getMaker() const;
c@27 32 int getPluginVersion() const;
c@27 33 std::string getCopyright() const;
c@27 34
c@27 35 ParameterList getParameterDescriptors() const;
c@27 36 float getParameter(std::string) const;
c@27 37 void setParameter(std::string, float);
c@27 38
c@29 39 ProgramList getPrograms() const;
c@29 40 std::string getCurrentProgram() const;
c@29 41 void selectProgram(std::string program);
c@29 42
c@27 43 size_t getPreferredStepSize() const;
c@27 44 size_t getPreferredBlockSize() const;
c@27 45
c@27 46 OutputList getOutputDescriptors() const;
c@27 47
c@27 48 FeatureSet process(const float *const *inputBuffers,
c@27 49 Vamp::RealTime timestamp);
c@27 50
c@27 51 FeatureSet getRemainingFeatures();
c@27 52
c@27 53 protected:
c@27 54 OnsetDetectorData *m_d;
c@27 55 int m_dfType;
c@27 56 float m_sensitivity;
c@30 57 bool m_whiten;
c@29 58 std::string m_program;
c@32 59 static float m_preferredStepSecs;
c@27 60 };
c@27 61
c@27 62
c@27 63 #endif