c@21: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@21: c@21: /* c@92: QM Vamp Plugin Set c@21: c@21: 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@21: */ c@21: c@21: #ifndef _GETMODE_PLUGIN_H_ c@21: #define _GETMODE_PLUGIN_H_ c@21: c@21: #include c@21: c@21: #include c@21: c@21: class KeyDetector : public Vamp::Plugin c@21: { c@21: public: c@21: KeyDetector(float inputSampleRate); c@21: virtual ~KeyDetector(); c@21: c@21: bool initialise(size_t channels, size_t stepSize, size_t blockSize); c@21: void reset(); c@21: c@21: InputDomain getInputDomain() const { return TimeDomain; } c@21: c@22: std::string getIdentifier() const; c@21: std::string getName() const; c@21: std::string getDescription() const; c@21: std::string getMaker() const; c@21: int getPluginVersion() const; c@21: std::string getCopyright() const; c@21: c@21: ParameterList getParameterDescriptors() const; c@21: float getParameter(std::string) const; c@21: void setParameter(std::string, float); c@21: c@21: OutputList getOutputDescriptors() const; c@21: c@21: FeatureSet process(const float *const *inputBuffers, c@21: Vamp::RealTime timestamp); c@21: c@21: FeatureSet getRemainingFeatures(); c@21: c@21: size_t getPreferredStepSize() const; c@21: size_t getPreferredBlockSize() const; c@21: c@21: protected: c@21: mutable size_t m_stepSize; c@21: mutable size_t m_blockSize; c@21: float m_tuningFrequency; c@21: int m_length; c@21: cannam@242: GetKeyMode::Config getConfig() const; c@63: std::string getKeyName(int index, bool minor, bool includeMajMin) const; cannam@247: std::string getBothKeyNames(int index) const; c@21: c@21: GetKeyMode* m_getKeyMode; c@21: double* m_inputFrame; c@21: int m_prevKey; c@95: bool m_first; c@21: }; c@21: c@21: c@21: #endif