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