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 _ONSET_DETECT_PLUGIN_H_ c@27: #define _ONSET_DETECT_PLUGIN_H_ c@27: c@27: #include c@27: c@27: class OnsetDetectorData; c@27: c@27: class OnsetDetector : public Vamp::Plugin c@27: { c@27: public: c@27: OnsetDetector(float inputSampleRate); c@27: virtual ~OnsetDetector(); 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@29: ProgramList getPrograms() const; c@29: std::string getCurrentProgram() const; c@29: void selectProgram(std::string program); c@29: 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: OnsetDetectorData *m_d; c@27: int m_dfType; c@27: float m_sensitivity; c@30: bool m_whiten; c@29: std::string m_program; c@32: static float m_preferredStepSecs; c@27: }; c@27: c@27: c@27: #endif