annotate ConstrainedHarmonicPeak.h @ 1:ab0b04e1c56b

Implement the plugin!
author Chris Cannam
date Fri, 07 Mar 2014 15:51:20 +0000
parents f559ab000b67
children 3bf29717cc01
rev   line source
Chris@0 1 #ifndef CONSTRAINEDHARMONICPEAK_H
Chris@0 2 #define CONSTRAINEDHARMONICPEAK_H
Chris@0 3
Chris@0 4 #include <vamp-sdk/Plugin.h>
Chris@0 5
Chris@0 6 using std::string;
Chris@0 7
Chris@0 8 class ConstrainedHarmonicPeak : public Vamp::Plugin
Chris@0 9 {
Chris@0 10 public:
Chris@0 11 ConstrainedHarmonicPeak(float inputSampleRate);
Chris@0 12 virtual ~ConstrainedHarmonicPeak();
Chris@0 13
Chris@0 14 string getIdentifier() const;
Chris@0 15 string getName() const;
Chris@0 16 string getDescription() const;
Chris@0 17 string getMaker() const;
Chris@0 18 int getPluginVersion() const;
Chris@0 19 string getCopyright() const;
Chris@0 20
Chris@0 21 InputDomain getInputDomain() const;
Chris@0 22 size_t getPreferredBlockSize() const;
Chris@0 23 size_t getPreferredStepSize() const;
Chris@0 24 size_t getMinChannelCount() const;
Chris@0 25 size_t getMaxChannelCount() const;
Chris@0 26
Chris@0 27 ParameterList getParameterDescriptors() const;
Chris@0 28 float getParameter(string identifier) const;
Chris@0 29 void setParameter(string identifier, float value);
Chris@0 30
Chris@0 31 ProgramList getPrograms() const;
Chris@0 32 string getCurrentProgram() const;
Chris@0 33 void selectProgram(string name);
Chris@0 34
Chris@0 35 OutputList getOutputDescriptors() const;
Chris@0 36
Chris@0 37 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
Chris@0 38 void reset();
Chris@0 39
Chris@0 40 FeatureSet process(const float *const *inputBuffers,
Chris@0 41 Vamp::RealTime timestamp);
Chris@0 42
Chris@0 43 FeatureSet getRemainingFeatures();
Chris@0 44
Chris@0 45 protected:
Chris@0 46 int m_blockSize;
Chris@0 47 float m_minFreq;
Chris@0 48 float m_maxFreq;
Chris@1 49 int m_harmonics;
Chris@1 50
Chris@1 51 static double findInterpolatedPeak(const double *in, int peakbin, int bins);
Chris@0 52 };
Chris@0 53
Chris@0 54
Chris@0 55
Chris@0 56 #endif