comparison VampYin.h @ 0:99bac62ee2da

added PYIN sources, should be compileable
author matthiasm
date Wed, 27 Nov 2013 11:59:49 +0000
parents
children 3a588ec86a82
comparison
equal deleted inserted replaced
-1:000000000000 0:99bac62ee2da
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 /*
3 This file is Copyright (c) 2012 Matthias Mauch
4
5 */
6
7 #ifndef _VAMPYIN_H_
8 #define _VAMPYIN_H_
9
10 #include <vamp-sdk/Plugin.h>
11
12 #include "Yin.h"
13
14 class VampYin : public Vamp::Plugin
15 {
16 public:
17 VampYin(float inputSampleRate);
18 virtual ~VampYin();
19
20 std::string getIdentifier() const;
21 std::string getName() const;
22 std::string getDescription() const;
23 std::string getMaker() const;
24 int getPluginVersion() const;
25 std::string getCopyright() const;
26
27 InputDomain getInputDomain() const;
28 size_t getPreferredBlockSize() const;
29 size_t getPreferredStepSize() const;
30 size_t getMinChannelCount() const;
31 size_t getMaxChannelCount() const;
32
33 ParameterList getParameterDescriptors() const;
34 float getParameter(std::string identifier) const;
35 void setParameter(std::string identifier, float value);
36
37 ProgramList getPrograms() const;
38 std::string getCurrentProgram() const;
39 void selectProgram(std::string name);
40
41 OutputList getOutputDescriptors() const;
42
43 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
44 void reset();
45
46 FeatureSet process(const float *const *inputBuffers,
47 Vamp::RealTime timestamp);
48
49 FeatureSet getRemainingFeatures();
50
51 protected:
52 size_t m_channels;
53 size_t m_stepSize;
54 size_t m_blockSize;
55 float m_fmin;
56 float m_fmax;
57 Yin m_yin;
58
59 mutable int m_outNoF0;
60 mutable int m_outNoPeriodicity;
61 mutable int m_outNoRms;
62 mutable int m_outNoSalience;
63 mutable float m_yinParameter;
64 mutable float m_outputUnvoiced;
65 };
66
67 #endif