c@97
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
c@97
|
2
|
c@97
|
3 /*
|
c@97
|
4 QM Vamp Plugin Set
|
c@97
|
5
|
c@97
|
6 Centre for Digital Music, Queen Mary, University of London.
|
c@97
|
7 This file copyright 2009 Thomas Wilmering.
|
c@97
|
8 All rights reserved.
|
c@97
|
9 */
|
c@97
|
10
|
c@97
|
11 #ifndef _DWT_PLUGIN_H_
|
c@97
|
12 #define _DWT_PLUGIN_H_
|
c@97
|
13
|
c@97
|
14 #include <vamp-sdk/Plugin.h>
|
c@97
|
15
|
c@97
|
16 #include <dsp/wavelet/Wavelet.h>
|
c@97
|
17
|
c@97
|
18 using std::vector;
|
c@97
|
19
|
c@97
|
20 class DWT : public Vamp::Plugin
|
c@97
|
21 {
|
c@97
|
22 public:
|
c@97
|
23 DWT(float inputSampleRate);
|
c@97
|
24 virtual ~DWT();
|
c@97
|
25
|
c@97
|
26 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
|
c@97
|
27 void reset();
|
c@97
|
28
|
c@97
|
29 InputDomain getInputDomain() const { return TimeDomain; }
|
c@97
|
30
|
c@97
|
31 std::string getIdentifier() const;
|
c@97
|
32 std::string getName() const;
|
c@97
|
33 std::string getDescription() const;
|
c@97
|
34 std::string getMaker() const;
|
c@97
|
35 int getPluginVersion() const;
|
c@97
|
36 std::string getCopyright() const;
|
c@129
|
37 size_t getPreferredBlockSize() const;
|
c@97
|
38 size_t getPreferredStepSize() const;
|
c@97
|
39
|
c@97
|
40 OutputList getOutputDescriptors() const;
|
c@97
|
41
|
c@97
|
42 ParameterList getParameterDescriptors() const;
|
c@97
|
43 float getParameter(std::string paramid) const;
|
c@97
|
44 void setParameter(std::string paramid, float newval);
|
c@97
|
45
|
c@97
|
46 FeatureSet process(const float *const *inputBuffers,
|
c@97
|
47 Vamp::RealTime timestamp);
|
c@97
|
48
|
c@97
|
49 FeatureSet getRemainingFeatures();
|
c@97
|
50
|
c@97
|
51 protected:
|
c@97
|
52 size_t m_stepSize;
|
c@97
|
53 size_t m_blockSize;
|
c@97
|
54
|
c@97
|
55 int m_scales;
|
c@97
|
56 int m_flength;
|
c@97
|
57 Wavelet::Type m_wavelet;
|
c@97
|
58 float m_threshold;
|
c@97
|
59 float m_absolute;
|
c@97
|
60
|
c@97
|
61 vector<float> m_lpd;
|
c@97
|
62 vector<float> m_hpd;
|
c@97
|
63
|
c@97
|
64 vector< vector<float> > m_samplePass;
|
c@97
|
65 };
|
c@97
|
66
|
c@97
|
67
|
c@97
|
68 #endif
|