comparison plugins/OnsetDetect.h @ 27:3256bfa04ed8

* split out tempo/beat/onset plugin into tempo/beat and onset
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 21 May 2007 13:09:12 +0000
parents
children 56fe3bd9de6e
comparison
equal deleted inserted replaced
26:166cc6d39390 27:3256bfa04ed8
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 QM Vamp Plugin Set
5
6 Centre for Digital Music, Queen Mary, University of London.
7 All rights reserved.
8 */
9
10 #ifndef _ONSET_DETECT_PLUGIN_H_
11 #define _ONSET_DETECT_PLUGIN_H_
12
13 #include <vamp-sdk/Plugin.h>
14
15 class OnsetDetectorData;
16
17 class OnsetDetector : public Vamp::Plugin
18 {
19 public:
20 OnsetDetector(float inputSampleRate);
21 virtual ~OnsetDetector();
22
23 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
24 void reset();
25
26 InputDomain getInputDomain() const { return FrequencyDomain; }
27
28 std::string getIdentifier() const;
29 std::string getName() const;
30 std::string getDescription() const;
31 std::string getMaker() const;
32 int getPluginVersion() const;
33 std::string getCopyright() const;
34
35 ParameterList getParameterDescriptors() const;
36 float getParameter(std::string) const;
37 void setParameter(std::string, float);
38
39 size_t getPreferredStepSize() const;
40 size_t getPreferredBlockSize() const;
41
42 OutputList getOutputDescriptors() const;
43
44 FeatureSet process(const float *const *inputBuffers,
45 Vamp::RealTime timestamp);
46
47 FeatureSet getRemainingFeatures();
48
49 protected:
50 OnsetDetectorData *m_d;
51 int m_dfType;
52 float m_sensitivity;
53 static float m_stepSecs;
54 };
55
56
57 #endif