c@9: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@9: c@9: /* c@9: QM Vamp Plugin Set c@9: c@9: 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@9: */ c@9: c@9: #ifndef _CONSTANT_Q_SPECTROGRAM_PLUGIN_H_ c@9: #define _CONSTANT_Q_SPECTROGRAM_PLUGIN_H_ c@9: c@9: #include c@9: #include c@9: c@9: #include c@9: c@9: class ConstantQSpectrogram : public Vamp::Plugin c@9: { c@9: public: c@9: ConstantQSpectrogram(float inputSampleRate); c@9: virtual ~ConstantQSpectrogram(); c@9: c@9: bool initialise(size_t channels, size_t stepSize, size_t blockSize); c@9: void reset(); c@9: c@9: InputDomain getInputDomain() const { return FrequencyDomain; } c@9: c@22: std::string getIdentifier() const; c@9: std::string getName() const; c@9: std::string getDescription() const; c@9: std::string getMaker() const; c@9: int getPluginVersion() const; c@9: std::string getCopyright() const; c@9: c@9: ParameterList getParameterDescriptors() const; c@9: float getParameter(std::string) const; c@9: void setParameter(std::string, float); c@9: c@9: size_t getPreferredStepSize() const; c@9: size_t getPreferredBlockSize() const; c@9: c@9: OutputList getOutputDescriptors() const; c@9: c@18: FeatureSet process(const float *const *inputBuffers, c@18: Vamp::RealTime timestamp); c@9: c@9: FeatureSet getRemainingFeatures(); c@9: c@9: protected: c@9: int m_minMIDIPitch; c@9: int m_maxMIDIPitch; c@9: float m_tuningFrequency; c@9: bool m_normalized; c@9: int m_bpo; c@9: int m_bins; c@9: c@9: void setupConfig(); c@9: c@9: CQConfig m_config; c@9: ConstantQ *m_cq; c@9: mutable size_t m_step; c@9: mutable size_t m_block; c@9: c@9: Feature normalize(const Feature &); c@9: }; c@9: c@9: c@9: #endif