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 _TONALCHANGEDETECT_ max@1: #define _TONALCHANGEDETECT_ max@1: max@1: #include max@1: max@1: #include max@1: #include max@1: #include max@1: max@1: #include max@1: #include max@1: #include max@1: max@1: class TonalChangeDetect : public Vamp::Plugin max@1: { max@1: public: max@1: TonalChangeDetect(float fInputSampleRate); max@1: virtual ~TonalChangeDetect(); 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 TimeDomain; } 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: 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: private: max@1: void setupConfig(); max@1: max@1: ChromaConfig m_config; max@1: Chromagram *m_chromagram; max@1: TonalEstimator m_TonalEstimator; max@1: mutable size_t m_step; max@1: mutable size_t m_block; max@1: size_t m_stepDelay; max@1: std::queue m_pending; max@1: ChromaVector m_vaCurrentVector; max@1: TCSGram m_TCSGram; max@1: max@1: int m_iSmoothingWidth; // smoothing window size max@1: int m_minMIDIPitch; // chromagram parameters max@1: int m_maxMIDIPitch; max@1: float m_tuningFrequency; max@1: max@1: Vamp::RealTime m_origin; max@1: bool m_haveOrigin; max@1: }; max@1: max@1: max@1: #endif // _TONALCHANGEDETECT_