annotate vamp/CQVamp.h @ 55:2a21b4506d7f

Use MIDI pitch values, as in QM Vamp Plugins implementation
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 28 Nov 2013 17:03:57 +0000
parents a25abb7a21c0
children 27007f8302f4
rev   line source
c@35 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
c@35 2
c@35 3 #ifndef CQVAMP_H
c@35 4 #define CQVAMP_H
c@35 5
c@35 6 #include <vamp-sdk/Plugin.h>
c@35 7
c@35 8 class ConstantQ;
c@35 9
c@35 10 class CQVamp : public Vamp::Plugin
c@35 11 {
c@35 12 public:
c@35 13 CQVamp(float inputSampleRate);
c@35 14 virtual ~CQVamp();
c@35 15
c@35 16 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
c@35 17 void reset();
c@35 18
c@35 19 InputDomain getInputDomain() const { return TimeDomain; }
c@35 20
c@35 21 std::string getIdentifier() const;
c@35 22 std::string getName() const;
c@35 23 std::string getDescription() const;
c@35 24 std::string getMaker() const;
c@35 25 int getPluginVersion() const;
c@35 26 std::string getCopyright() const;
c@35 27
c@35 28 ParameterList getParameterDescriptors() const;
c@35 29 float getParameter(std::string) const;
c@35 30 void setParameter(std::string, float);
c@35 31
c@35 32 size_t getPreferredStepSize() const;
c@35 33 size_t getPreferredBlockSize() const;
c@35 34
c@35 35 OutputList getOutputDescriptors() const;
c@35 36
c@35 37 FeatureSet process(const float *const *inputBuffers,
c@35 38 Vamp::RealTime timestamp);
c@35 39
c@35 40 FeatureSet getRemainingFeatures();
c@35 41
c@35 42 protected:
c@55 43 int m_minMIDIPitch;
c@55 44 int m_maxMIDIPitch;
c@55 45 float m_tuningFrequency;
c@55 46 int m_bpo;
c@55 47
c@35 48 ConstantQ *m_cq;
c@35 49 float m_maxFrequency;
c@35 50 float m_minFrequency;
c@35 51 int m_stepSize;
c@35 52 int m_blockSize;
c@36 53
c@53 54 Vamp::RealTime m_startTime;
c@53 55 bool m_haveStartTime;
c@53 56 int m_columnCount;
c@53 57
c@36 58 std::vector<float> m_prevFeature;
c@36 59 FeatureSet convertToFeatures(const std::vector<std::vector<double> > &);
c@35 60 };
c@35 61
c@35 62
c@35 63 #endif