c@178
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
c@178
|
2
|
c@178
|
3 /*
|
c@178
|
4 QM Vamp Plugin Set
|
c@178
|
5
|
c@178
|
6 Centre for Digital Music, Queen Mary, University of London.
|
c@178
|
7 This file copyright 2009 Thomas Wilmering.
|
c@135
|
8
|
c@135
|
9 This program is free software; you can redistribute it and/or
|
c@135
|
10 modify it under the terms of the GNU General Public License as
|
c@135
|
11 published by the Free Software Foundation; either version 2 of the
|
c@135
|
12 License, or (at your option) any later version. See the file
|
c@178
|
13 COPYING included with this distribution for more information.
|
c@178
|
14 */
|
c@178
|
15
|
c@178
|
16 #ifndef _DWT_PLUGIN_H_
|
c@178
|
17 #define _DWT_PLUGIN_H_
|
c@178
|
18
|
c@178
|
19 #include <vamp-sdk/Plugin.h>
|
c@178
|
20
|
c@178
|
21 #include <dsp/wavelet/Wavelet.h>
|
c@178
|
22
|
c@178
|
23 using std::vector;
|
c@178
|
24
|
c@178
|
25 class DWT : public Vamp::Plugin
|
c@178
|
26 {
|
c@178
|
27 public:
|
c@178
|
28 DWT(float inputSampleRate);
|
c@178
|
29 virtual ~DWT();
|
c@178
|
30
|
c@178
|
31 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
|
c@178
|
32 void reset();
|
c@178
|
33
|
c@178
|
34 InputDomain getInputDomain() const { return TimeDomain; }
|
c@178
|
35
|
c@178
|
36 std::string getIdentifier() const;
|
c@178
|
37 std::string getName() const;
|
c@178
|
38 std::string getDescription() const;
|
c@178
|
39 std::string getMaker() const;
|
c@178
|
40 int getPluginVersion() const;
|
c@178
|
41 std::string getCopyright() const;
|
c@178
|
42 size_t getPreferredBlockSize() const;
|
c@178
|
43 size_t getPreferredStepSize() const;
|
c@178
|
44
|
c@178
|
45 OutputList getOutputDescriptors() const;
|
c@178
|
46
|
c@178
|
47 ParameterList getParameterDescriptors() const;
|
c@178
|
48 float getParameter(std::string paramid) const;
|
c@178
|
49 void setParameter(std::string paramid, float newval);
|
c@178
|
50
|
c@178
|
51 FeatureSet process(const float *const *inputBuffers,
|
c@178
|
52 Vamp::RealTime timestamp);
|
c@178
|
53
|
c@178
|
54 FeatureSet getRemainingFeatures();
|
c@178
|
55
|
c@178
|
56 protected:
|
c@178
|
57 size_t m_stepSize;
|
c@178
|
58 size_t m_blockSize;
|
c@178
|
59
|
c@178
|
60 int m_scales;
|
c@178
|
61 int m_flength;
|
c@178
|
62 Wavelet::Type m_wavelet;
|
c@178
|
63 float m_threshold;
|
c@178
|
64 float m_absolute;
|
c@178
|
65
|
c@190
|
66 vector<double> m_lpd;
|
c@190
|
67 vector<double> m_hpd;
|
c@178
|
68
|
c@178
|
69 vector< vector<float> > m_samplePass;
|
c@178
|
70 };
|
c@178
|
71
|
c@178
|
72
|
c@178
|
73 #endif
|