matthiasm@49
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
matthiasm@49
|
2
|
matthiasm@49
|
3 /*
|
matthiasm@49
|
4 pYIN - A fundamental frequency estimator for monophonic audio
|
matthiasm@49
|
5 Centre for Digital Music, Queen Mary, University of London.
|
matthiasm@49
|
6
|
matthiasm@49
|
7 This program is free software; you can redistribute it and/or
|
matthiasm@49
|
8 modify it under the terms of the GNU General Public License as
|
matthiasm@49
|
9 published by the Free Software Foundation; either version 2 of the
|
matthiasm@49
|
10 License, or (at your option) any later version. See the file
|
matthiasm@49
|
11 COPYING included with this distribution for more information.
|
matthiasm@49
|
12 */
|
matthiasm@49
|
13
|
matthiasm@49
|
14 #ifndef _YINVAMPFREQCONSTRAINED_H_
|
matthiasm@49
|
15 #define _YINVAMPFREQCONSTRAINED_H_
|
matthiasm@49
|
16
|
matthiasm@49
|
17 #include <vamp-sdk/Plugin.h>
|
matthiasm@49
|
18
|
matthiasm@49
|
19 #include "Yin.h"
|
matthiasm@49
|
20
|
matthiasm@49
|
21 class YinVampFreqConstrained : public Vamp::Plugin
|
matthiasm@49
|
22 {
|
matthiasm@49
|
23 public:
|
matthiasm@49
|
24 YinVampFreqConstrained(float inputSampleRate);
|
matthiasm@49
|
25 virtual ~YinVampFreqConstrained();
|
matthiasm@49
|
26
|
matthiasm@49
|
27 std::string getIdentifier() const;
|
matthiasm@49
|
28 std::string getName() const;
|
matthiasm@49
|
29 std::string getDescription() const;
|
matthiasm@49
|
30 std::string getMaker() const;
|
matthiasm@49
|
31 int getPluginVersion() const;
|
matthiasm@49
|
32 std::string getCopyright() const;
|
matthiasm@49
|
33
|
matthiasm@49
|
34 InputDomain getInputDomain() const;
|
matthiasm@49
|
35 size_t getPreferredBlockSize() const;
|
matthiasm@49
|
36 size_t getPreferredStepSize() const;
|
matthiasm@49
|
37 size_t getMinChannelCount() const;
|
matthiasm@49
|
38 size_t getMaxChannelCount() const;
|
matthiasm@49
|
39
|
matthiasm@49
|
40 ParameterList getParameterDescriptors() const;
|
matthiasm@49
|
41 float getParameter(std::string identifier) const;
|
matthiasm@49
|
42 void setParameter(std::string identifier, float value);
|
matthiasm@49
|
43
|
matthiasm@49
|
44 ProgramList getPrograms() const;
|
matthiasm@49
|
45 std::string getCurrentProgram() const;
|
matthiasm@49
|
46 void selectProgram(std::string name);
|
matthiasm@49
|
47
|
matthiasm@49
|
48 OutputList getOutputDescriptors() const;
|
matthiasm@49
|
49
|
matthiasm@49
|
50 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
|
matthiasm@49
|
51 void reset();
|
matthiasm@49
|
52
|
matthiasm@49
|
53 FeatureSet process(const float *const *inputBuffers,
|
matthiasm@49
|
54 Vamp::RealTime timestamp);
|
matthiasm@49
|
55
|
matthiasm@49
|
56 FeatureSet getRemainingFeatures();
|
matthiasm@49
|
57
|
matthiasm@49
|
58 protected:
|
matthiasm@49
|
59 size_t m_channels;
|
matthiasm@49
|
60 size_t m_stepSize;
|
matthiasm@49
|
61 size_t m_blockSize;
|
matthiasm@49
|
62 float m_fmin;
|
matthiasm@49
|
63 float m_fmax;
|
matthiasm@49
|
64 Yin m_yin;
|
matthiasm@49
|
65
|
matthiasm@49
|
66 float m_yinFmin;
|
matthiasm@49
|
67 float m_yinFmax;
|
matthiasm@49
|
68 };
|
matthiasm@49
|
69
|
matthiasm@49
|
70 #endif
|