diff vamp/CQVamp.h @ 109:f5325762ff6d

Make CQVamp implement two plugins, one with MIDI pitch range and one with Hz
author Chris Cannam <c.cannam@qmul.ac.uk>
date Wed, 14 May 2014 12:49:10 +0100
parents bfc7cf71f2ef
children fdd32f995b0d
line wrap: on
line diff
--- a/vamp/CQVamp.h	Wed May 14 11:40:18 2014 +0100
+++ b/vamp/CQVamp.h	Wed May 14 12:49:10 2014 +0100
@@ -41,7 +41,7 @@
 class CQVamp : public Vamp::Plugin
 {
 public:
-    CQVamp(float inputSampleRate);
+    CQVamp(float inputSampleRate, bool midiPitchParameters);
     virtual ~CQVamp();
 
     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
@@ -71,6 +71,7 @@
     FeatureSet getRemainingFeatures();
 
 protected:
+    bool m_midiPitchParameters;
     int m_minMIDIPitch;
     int m_maxMIDIPitch;
     float m_tuningFrequency;
@@ -87,6 +88,10 @@
     bool m_haveStartTime;
     int m_columnCount;
 
+    std::string noteName(int i) const;
+    float noteFrequency(int i) const;
+    int noteNumber(float freq) const;
+
     std::vector<float> m_prevFeature;
     FeatureSet convertToFeatures(const std::vector<std::vector<double> > &);
 };