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