1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
4 pYIN - A fundamental frequency estimator for monophonic audio
5 Centre for Digital Music, Queen Mary, University of London.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version. See the file
11 COLocalCandidatePYING included with this distribution for more information.
14 #ifndef _LOCALCANDIDATEPYIN_H_
15 #define _LOCALCANDIDATEPYIN_H_
17 #include <vamp-sdk/Plugin.h>
21 class LocalCandidatePYIN : public Vamp::Plugin
24 LocalCandidatePYIN(float inputSampleRate);
25 virtual ~LocalCandidatePYIN();
27 std::string getIdentifier() const;
28 std::string getName() const;
29 std::string getDescription() const;
30 std::string getMaker() const;
31 int getPluginVersion() const;
32 std::string getCopyright() const;
34 InputDomain getInputDomain() const;
35 size_t getPreferredBlockSize() const;
36 size_t getPreferredStepSize() const;
37 size_t getMinChannelCount() const;
38 size_t getMaxChannelCount() const;
40 ParameterList getParameterDescriptors() const;
41 float getParameter(std::string identifier) const;
42 void setParameter(std::string identifier, float value);
44 ProgramList getPrograms() const;
45 std::string getCurrentProgram() const;
46 void selectProgram(std::string name);
48 OutputList getOutputDescriptors() const;
50 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
53 FeatureSet process(const float *const *inputBuffers,
54 Vamp::RealTime timestamp);
56 FeatureSet getRemainingFeatures();
65 mutable int m_oPitchTrackCandidates;
68 float m_outputUnvoiced;
70 vector<vector<pair<double, double> > > m_pitchProb;
71 vector<Vamp::RealTime> m_timestamp;