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