1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
4 Vamp feature extraction plugins using Paul Brossier's Aubio library.
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006 Chris Cannam.
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information.
17 #ifndef _PITCH_PLUGIN_H_
18 #define _PITCH_PLUGIN_H_
20 #include <vamp-sdk/Plugin.h>
21 #include <aubio/aubio.h>
23 class Pitch : public Vamp::Plugin
26 Pitch(float inputSampleRate);
29 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
32 InputDomain getInputDomain() const { return TimeDomain; }
34 std::string getName() const;
35 std::string getDescription() const;
36 std::string getMaker() const;
37 int getPluginVersion() const;
38 std::string getCopyright() const;
40 ParameterList getParameterDescriptors() const;
41 float getParameter(std::string) const;
42 void setParameter(std::string, float);
44 size_t getPreferredStepSize() const;
45 size_t getPreferredBlockSize() const;
47 OutputList getOutputDescriptors() const;
49 FeatureSet process(float **inputBuffers, Vamp::RealTime timestamp);
51 FeatureSet getRemainingFeatures();
55 aubio_pitchdetection_t *m_pitchdet;
56 aubio_pitchdetection_type m_pitchtype;
57 aubio_pitchdetection_mode m_pitchmode;
60 size_t m_channelCount;