bbc-vamp-plugins  1.0
Intensity.h
00001 
00018 #ifndef _INTENSITY_H_
00019 #define _INTENSITY_H_
00020 
00021 #include <cmath>
00022 #include <complex>
00023 #include <vector>
00024 #include <vamp-sdk/Plugin.h>
00025 
00026 using std::string;
00027 using std::vector;
00028 using std::abs;
00029 using std::complex;
00030 
00063 class Intensity : public Vamp::Plugin
00064 {
00065 public:
00067     Intensity(float inputSampleRate);
00068     virtual ~Intensity();
00069     string getIdentifier() const;
00070     string getName() const;
00071     string getDescription() const;
00072     string getMaker() const;
00073     int getPluginVersion() const;
00074     string getCopyright() const;
00075     InputDomain getInputDomain() const;
00076     size_t getPreferredBlockSize() const;
00077     size_t getPreferredStepSize() const;
00078     size_t getMinChannelCount() const;
00079     size_t getMaxChannelCount() const;
00080     ParameterList getParameterDescriptors() const;
00081     float getParameter(string identifier) const;
00082     void setParameter(string identifier,
00083                             float value);
00084     ProgramList getPrograms() const;
00085     string getCurrentProgram() const;
00086     void selectProgram(string name);
00087     OutputList getOutputDescriptors() const;
00088     bool initialise(size_t channels,
00089                           size_t stepSize,
00090                           size_t blockSize);
00091     void reset();
00092     FeatureSet process(const float *const *inputBuffers,
00093                        Vamp::RealTime timestamp);
00094     FeatureSet getRemainingFeatures();
00096 
00097 protected:
00098     void calculateBandFreqs();
00099 
00101     int m_blockSize, m_stepSize;
00102     float m_sampleRate;
00104 
00105     int numBands;                       
00106     float *bandHighFreq;        
00107 };
00108 
00109 #endif