Fix signal-emission order (first re/set instrument info)
[ardour.git] / libs / vamp-plugins / BeatTrack.h
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
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.
13 */
14
15 #ifndef _BEAT_TRACK_PLUGIN_H_
16 #define _BEAT_TRACK_PLUGIN_H_
17
18 #include <vamp-sdk/Plugin.h>
19
20 class BeatTrackerData;
21
22 class BeatTracker : public Vamp::Plugin
23 {
24 public:
25     BeatTracker(float inputSampleRate);
26     virtual ~BeatTracker();
27
28     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
29     void reset();
30
31     InputDomain getInputDomain() const { return FrequencyDomain; }
32
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;
39
40     ParameterList getParameterDescriptors() const;
41     float getParameter(std::string) const;
42     void setParameter(std::string, float);
43
44     size_t getPreferredStepSize() const;
45     size_t getPreferredBlockSize() const;
46
47     OutputList getOutputDescriptors() const;
48
49     FeatureSet process(const float *const *inputBuffers,
50                        Vamp::RealTime timestamp);
51
52     FeatureSet getRemainingFeatures();
53
54 protected:
55     BeatTrackerData *m_d;
56     int m_method;
57     int m_dfType;
58
59     // MEPD new protected parameters to allow the user to control these advanced parameters of the beat tracker
60     double m_alpha;
61     double m_tightness;
62     double m_inputtempo;
63     bool m_constraintempo;
64
65     bool m_whiten;
66     static float m_stepSecs;
67     FeatureSet beatTrackOld();
68     FeatureSet beatTrackNew();
69 };
70
71
72 #endif