cannam@0: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ cannam@0: cannam@0: /* cannam@0: Vamp feature extraction plugins using Paul Brossier's Aubio library. cannam@0: cannam@0: Centre for Digital Music, Queen Mary, University of London. cannam@0: This file copyright 2006 Chris Cannam. cannam@0: cannam@0: This program is free software; you can redistribute it and/or cannam@0: modify it under the terms of the GNU General Public License as cannam@0: published by the Free Software Foundation; either version 2 of the cannam@0: License, or (at your option) any later version. See the file cannam@0: COPYING included with this distribution for more information. cannam@0: cannam@0: */ cannam@0: cannam@0: #ifndef _PITCH_PLUGIN_H_ cannam@0: #define _PITCH_PLUGIN_H_ cannam@0: cannam@0: #include cannam@0: #include cannam@0: cannam@0: class Pitch : public Vamp::Plugin cannam@0: { cannam@0: public: cannam@0: Pitch(float inputSampleRate); cannam@0: virtual ~Pitch(); cannam@0: cannam@0: bool initialise(size_t channels, size_t stepSize, size_t blockSize); cannam@0: void reset(); cannam@0: cannam@0: InputDomain getInputDomain() const { return TimeDomain; } cannam@0: cannam@13: std::string getIdentifier() const; cannam@0: std::string getName() const; cannam@0: std::string getDescription() const; cannam@0: std::string getMaker() const; cannam@0: int getPluginVersion() const; cannam@0: std::string getCopyright() const; cannam@0: cannam@0: ParameterList getParameterDescriptors() const; cannam@0: float getParameter(std::string) const; cannam@0: void setParameter(std::string, float); cannam@0: cannam@0: size_t getPreferredStepSize() const; cannam@0: size_t getPreferredBlockSize() const; cannam@0: cannam@0: OutputList getOutputDescriptors() const; cannam@0: cannam@12: FeatureSet process(const float *const *inputBuffers, cannam@12: Vamp::RealTime timestamp); cannam@0: cannam@0: FeatureSet getRemainingFeatures(); cannam@0: cannam@0: protected: cannam@0: fvec_t *m_ibuf; cannam@30: aubio_pitch_t *m_pitchdet; cannam@30: PitchType m_pitchtype; cannam@23: float m_minfreq; cannam@23: float m_maxfreq; cannam@23: float m_silence; cannam@23: bool m_wrapRange; cannam@23: cannam@0: size_t m_stepSize; cannam@0: size_t m_blockSize; cannam@0: size_t m_channelCount; cannam@0: }; cannam@0: cannam@0: cannam@0: #endif