Chris@0: #ifndef CONSTRAINEDHARMONICPEAK_H Chris@0: #define CONSTRAINEDHARMONICPEAK_H Chris@0: Chris@0: #include Chris@0: Chris@0: using std::string; Chris@0: Chris@0: class ConstrainedHarmonicPeak : public Vamp::Plugin Chris@0: { Chris@0: public: Chris@0: ConstrainedHarmonicPeak(float inputSampleRate); Chris@0: virtual ~ConstrainedHarmonicPeak(); Chris@0: Chris@0: string getIdentifier() const; Chris@0: string getName() const; Chris@0: string getDescription() const; Chris@0: string getMaker() const; Chris@0: int getPluginVersion() const; Chris@0: string getCopyright() const; Chris@0: Chris@0: InputDomain getInputDomain() const; Chris@0: size_t getPreferredBlockSize() const; Chris@0: size_t getPreferredStepSize() const; Chris@0: size_t getMinChannelCount() const; Chris@0: size_t getMaxChannelCount() const; Chris@0: Chris@0: ParameterList getParameterDescriptors() const; Chris@0: float getParameter(string identifier) const; Chris@0: void setParameter(string identifier, float value); Chris@0: Chris@0: ProgramList getPrograms() const; Chris@0: string getCurrentProgram() const; Chris@0: void selectProgram(string name); Chris@0: Chris@0: OutputList getOutputDescriptors() const; Chris@0: Chris@0: bool initialise(size_t channels, size_t stepSize, size_t blockSize); Chris@0: void reset(); Chris@0: Chris@0: FeatureSet process(const float *const *inputBuffers, Chris@0: Vamp::RealTime timestamp); Chris@0: Chris@0: FeatureSet getRemainingFeatures(); Chris@0: Chris@0: protected: Chris@0: int m_blockSize; Chris@0: float m_minFreq; Chris@0: float m_maxFreq; Chris@1: int m_harmonics; Chris@1: Chris@1: static double findInterpolatedPeak(const double *in, int peakbin, int bins); Chris@0: }; Chris@0: Chris@0: Chris@0: Chris@0: #endif