annotate plugins/DWT.h @ 135:dcf5800f0f00

* Add GPL
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 13 Dec 2010 14:03:46 +0000
parents 1a24b134cd79
children f96ea0e4b475
rev   line source
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@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@135 13 COPYING included with this distribution for more information.
c@97 14 */
c@97 15
c@97 16 #ifndef _DWT_PLUGIN_H_
c@97 17 #define _DWT_PLUGIN_H_
c@97 18
c@97 19 #include <vamp-sdk/Plugin.h>
c@97 20
c@97 21 #include <dsp/wavelet/Wavelet.h>
c@97 22
c@97 23 using std::vector;
c@97 24
c@97 25 class DWT : public Vamp::Plugin
c@97 26 {
c@97 27 public:
c@97 28 DWT(float inputSampleRate);
c@97 29 virtual ~DWT();
c@97 30
c@97 31 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
c@97 32 void reset();
c@97 33
c@97 34 InputDomain getInputDomain() const { return TimeDomain; }
c@97 35
c@97 36 std::string getIdentifier() const;
c@97 37 std::string getName() const;
c@97 38 std::string getDescription() const;
c@97 39 std::string getMaker() const;
c@97 40 int getPluginVersion() const;
c@97 41 std::string getCopyright() const;
c@129 42 size_t getPreferredBlockSize() const;
c@97 43 size_t getPreferredStepSize() const;
c@97 44
c@97 45 OutputList getOutputDescriptors() const;
c@97 46
c@97 47 ParameterList getParameterDescriptors() const;
c@97 48 float getParameter(std::string paramid) const;
c@97 49 void setParameter(std::string paramid, float newval);
c@97 50
c@97 51 FeatureSet process(const float *const *inputBuffers,
c@97 52 Vamp::RealTime timestamp);
c@97 53
c@97 54 FeatureSet getRemainingFeatures();
c@97 55
c@97 56 protected:
c@97 57 size_t m_stepSize;
c@97 58 size_t m_blockSize;
c@97 59
c@97 60 int m_scales;
c@97 61 int m_flength;
c@97 62 Wavelet::Type m_wavelet;
c@97 63 float m_threshold;
c@97 64 float m_absolute;
c@97 65
c@97 66 vector<float> m_lpd;
c@97 67 vector<float> m_hpd;
c@97 68
c@97 69 vector< vector<float> > m_samplePass;
c@97 70 };
c@97 71
c@97 72
c@97 73 #endif