Mercurial > hg > chp
view ConstrainedHarmonicPeak.h @ 5:d2f7a8295671
Merge
author | Chris Cannam |
---|---|
date | Fri, 07 Mar 2014 16:21:22 +0000 |
parents | 3bf29717cc01 |
children | f5b9bae2a8c3 |
line wrap: on
line source
#ifndef CONSTRAINEDHARMONICPEAK_H #define CONSTRAINEDHARMONICPEAK_H #include <vamp-sdk/Plugin.h> using std::string; class ConstrainedHarmonicPeak : public Vamp::Plugin { public: ConstrainedHarmonicPeak(float inputSampleRate); virtual ~ConstrainedHarmonicPeak(); string getIdentifier() const; string getName() const; string getDescription() const; string getMaker() const; int getPluginVersion() const; string getCopyright() const; InputDomain getInputDomain() const; size_t getPreferredBlockSize() const; size_t getPreferredStepSize() const; size_t getMinChannelCount() const; size_t getMaxChannelCount() const; ParameterList getParameterDescriptors() const; float getParameter(string identifier) const; void setParameter(string identifier, float value); ProgramList getPrograms() const; string getCurrentProgram() const; void selectProgram(string name); OutputList getOutputDescriptors() const; bool initialise(size_t channels, size_t stepSize, size_t blockSize); void reset(); FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp); FeatureSet getRemainingFeatures(); protected: int m_fftSize; float m_minFreq; float m_maxFreq; int m_harmonics; static double findInterpolatedPeak(const double *in, int peakbin, int bins); }; #endif