max@1: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ max@1: max@1: /* max@1: QM Vamp Plugin Set max@1: max@1: Centre for Digital Music, Queen Mary, University of London. max@1: max@1: This program is free software; you can redistribute it and/or max@1: modify it under the terms of the GNU General Public License as max@1: published by the Free Software Foundation; either version 2 of the max@1: License, or (at your option) any later version. See the file max@1: COPYING included with this distribution for more information. max@1: */ max@1: max@1: #ifndef _ONSET_DETECT_PLUGIN_H_ max@1: #define _ONSET_DETECT_PLUGIN_H_ max@1: max@1: #include max@1: max@1: class OnsetDetectorData; max@1: max@1: class OnsetDetector : public Vamp::Plugin max@1: { max@1: public: max@1: OnsetDetector(float inputSampleRate); max@1: virtual ~OnsetDetector(); max@1: max@1: bool initialise(size_t channels, size_t stepSize, size_t blockSize); max@1: void reset(); max@1: max@1: InputDomain getInputDomain() const { return FrequencyDomain; } max@1: max@1: std::string getIdentifier() const; max@1: std::string getName() const; max@1: std::string getDescription() const; max@1: std::string getMaker() const; max@1: int getPluginVersion() const; max@1: std::string getCopyright() const; max@1: max@1: ParameterList getParameterDescriptors() const; max@1: float getParameter(std::string) const; max@1: void setParameter(std::string, float); max@1: max@1: ProgramList getPrograms() const; max@1: std::string getCurrentProgram() const; max@1: void selectProgram(std::string program); max@1: max@1: size_t getPreferredStepSize() const; max@1: size_t getPreferredBlockSize() const; max@1: max@1: OutputList getOutputDescriptors() const; max@1: max@1: FeatureSet process(const float *const *inputBuffers, max@1: Vamp::RealTime timestamp); max@1: max@1: FeatureSet getRemainingFeatures(); max@1: max@1: protected: max@1: OnsetDetectorData *m_d; max@1: int m_dfType; max@1: float m_sensitivity; max@1: bool m_whiten; max@1: std::string m_program; max@1: static float m_preferredStepSecs; max@1: }; max@1: max@1: max@1: #endif