c@0: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@0: c@0: /* c@0: QM Vamp Plugin Set c@0: c@0: 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@0: */ c@0: c@0: #ifndef _CHROMAGRAM_PLUGIN_H_ c@0: #define _CHROMAGRAM_PLUGIN_H_ c@0: c@3: #include c@3: #include c@0: c@0: class ChromagramPlugin : public Vamp::Plugin c@0: { c@0: public: c@0: ChromagramPlugin(float inputSampleRate); c@0: virtual ~ChromagramPlugin(); c@0: c@0: bool initialise(size_t channels, size_t stepSize, size_t blockSize); c@0: void reset(); c@0: c@7: InputDomain getInputDomain() const { return FrequencyDomain; } c@0: c@22: std::string getIdentifier() const; c@0: std::string getName() const; c@0: std::string getDescription() const; c@0: std::string getMaker() const; c@0: int getPluginVersion() const; c@0: std::string getCopyright() const; c@0: c@0: ParameterList getParameterDescriptors() const; c@0: float getParameter(std::string) const; c@0: void setParameter(std::string, float); c@0: c@0: size_t getPreferredStepSize() const; c@0: size_t getPreferredBlockSize() const; c@0: c@0: OutputList getOutputDescriptors() const; c@0: c@18: FeatureSet process(const float *const *inputBuffers, c@18: Vamp::RealTime timestamp); c@0: c@0: FeatureSet getRemainingFeatures(); c@0: c@0: protected: c@0: int m_minMIDIPitch; c@0: int m_maxMIDIPitch; c@0: float m_tuningFrequency; c@49: MathUtilities::NormaliseType m_normalise; c@0: int m_bpo; c@0: c@0: void setupConfig(); c@0: c@0: ChromaConfig m_config; c@0: Chromagram *m_chromagram; c@0: mutable size_t m_step; c@0: mutable size_t m_block; c@0: cannam@234: std::vector m_binsums; c@45: size_t m_count; c@0: }; c@0: c@0: c@0: #endif