c@19
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
c@19
|
2
|
c@19
|
3 /*
|
c@19
|
4 Vamp
|
c@19
|
5
|
c@19
|
6 An API for audio analysis and feature extraction plugins.
|
c@19
|
7
|
c@19
|
8 Centre for Digital Music, Queen Mary, University of London.
|
c@19
|
9 Copyright 2006 Chris Cannam.
|
c@19
|
10
|
c@19
|
11 Permission is hereby granted, free of charge, to any person
|
c@19
|
12 obtaining a copy of this software and associated documentation
|
c@19
|
13 files (the "Software"), to deal in the Software without
|
c@19
|
14 restriction, including without limitation the rights to use, copy,
|
c@19
|
15 modify, merge, publish, distribute, sublicense, and/or sell copies
|
c@19
|
16 of the Software, and to permit persons to whom the Software is
|
c@19
|
17 furnished to do so, subject to the following conditions:
|
c@19
|
18
|
c@19
|
19 The above copyright notice and this permission notice shall be
|
c@19
|
20 included in all copies or substantial portions of the Software.
|
c@19
|
21
|
c@19
|
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
c@19
|
23 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
c@19
|
24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
c@19
|
25 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
|
c@19
|
26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
c@19
|
27 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
c@19
|
28 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
c@19
|
29
|
c@19
|
30 Except as contained in this notice, the names of the Centre for
|
c@19
|
31 Digital Music; Queen Mary, University of London; and Chris Cannam
|
c@19
|
32 shall not be used in advertising or otherwise to promote the sale,
|
c@19
|
33 use or other dealings in this Software without prior written
|
c@19
|
34 authorization.
|
c@19
|
35 */
|
c@19
|
36
|
c@19
|
37 #ifndef _GETMODE_PLUGIN_H_
|
c@19
|
38 #define _GETMODE_PLUGIN_H_
|
c@19
|
39
|
c@19
|
40 #include <vamp-sdk/Plugin.h>
|
c@19
|
41
|
c@19
|
42 #include <dsp/keydetection/GetKeyMode.h>
|
c@19
|
43
|
c@19
|
44 class GetModePlugin : public Vamp::Plugin
|
c@19
|
45 {
|
c@19
|
46 public:
|
c@19
|
47 GetModePlugin(float inputSampleRate);
|
c@19
|
48 virtual ~GetModePlugin();
|
c@19
|
49
|
c@19
|
50 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
|
c@19
|
51 void reset();
|
c@19
|
52
|
c@19
|
53 InputDomain getInputDomain() const { return TimeDomain; }
|
c@19
|
54
|
c@19
|
55 std::string getName() const;
|
c@19
|
56 std::string getDescription() const;
|
c@19
|
57 std::string getMaker() const;
|
c@19
|
58 int getPluginVersion() const;
|
c@19
|
59 std::string getCopyright() const;
|
c@19
|
60
|
c@19
|
61 OutputList getOutputDescriptors() const;
|
c@19
|
62
|
c@19
|
63 FeatureSet process(const float *const *inputBuffers,
|
c@19
|
64 Vamp::RealTime timestamp);
|
c@19
|
65
|
c@19
|
66 FeatureSet getRemainingFeatures();
|
c@19
|
67
|
c@19
|
68 size_t getPreferredStepSize() const;
|
c@19
|
69 size_t getPreferredBlockSize() const;
|
c@19
|
70
|
c@19
|
71 protected:
|
c@19
|
72 size_t m_stepSize;
|
c@19
|
73 size_t m_blockSize;
|
c@19
|
74
|
c@19
|
75 GetKeyMode* m_GetMode;
|
c@19
|
76 double* m_InputFrame;
|
c@19
|
77 unsigned int m_BlockandHopSize;
|
c@19
|
78 };
|
c@19
|
79
|
c@19
|
80
|
c@19
|
81 #endif
|