annotate Tempogram.h @ 4:597f033fa7a2

* Some cleaning and rearranging to prepare for band processing implementation
author Carl Bussey <c.bussey@se10.qmul.ac.uk>
date Tue, 05 Aug 2014 15:56:59 +0100
parents 5125d34fda67
children 21147df9cb2d
rev   line source
c@0 1
c@0 2 // This is a skeleton file for use in creating your own plugin
c@0 3 // libraries. Replace MyPlugin and myPlugin throughout with the name
c@0 4 // of your first plugin class, and fill in the gaps as appropriate.
c@0 5
c@0 6
c@0 7 // Remember to use a different guard symbol in each header!
c@0 8 #ifndef _TEMPOGRAM_H_
c@0 9 #define _TEMPOGRAM_H_
c@0 10
c@0 11 #include <vamp-sdk/Plugin.h>
c@0 12
c@0 13 using std::string;
c@0 14 using std::vector;
c@0 15
c@0 16 class Tempogram : public Vamp::Plugin
c@0 17 {
c@0 18 public:
c@0 19 Tempogram(float inputSampleRate);
c@0 20 virtual ~Tempogram();
c@0 21
c@0 22 string getIdentifier() const;
c@0 23 string getName() const;
c@0 24 string getDescription() const;
c@0 25 string getMaker() const;
c@0 26 int getPluginVersion() const;
c@0 27 string getCopyright() const;
c@0 28
c@0 29 InputDomain getInputDomain() const;
c@0 30 size_t getPreferredBlockSize() const;
c@0 31 size_t getPreferredStepSize() const;
c@0 32 size_t getMinChannelCount() const;
c@0 33 size_t getMaxChannelCount() const;
c@0 34
c@0 35 ParameterList getParameterDescriptors() const;
c@0 36 float getParameter(string identifier) const;
c@0 37 void setParameter(string identifier, float value);
c@0 38
c@0 39 ProgramList getPrograms() const;
c@0 40 string getCurrentProgram() const;
c@0 41 void selectProgram(string name);
c@0 42
c@0 43 OutputList getOutputDescriptors() const;
c@0 44
c@0 45 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
c@0 46 void initialiseForGRF();
c@0 47 void cleanupForGRF();
c@0 48 void reset();
c@0 49
c@0 50 FeatureSet process(const float *const *inputBuffers,
c@0 51 Vamp::RealTime timestamp);
c@0 52
c@0 53 FeatureSet getRemainingFeatures();
c@0 54
c@0 55 protected:
c@0 56 // plugin-specific data and methods go here
c@0 57 size_t m_blockSize;
c@1 58 size_t m_stepSize;
c@0 59 float compressionConstant;
c@3 60 float specMax;
c@0 61 float *previousY;
c@0 62 float *currentY;
c@4 63 vector< vector<float> > specData;
c@4 64 float ** spectrogram;
c@0 65 vector<float> noveltyCurve;
c@3 66 float minDB;
c@0 67
c@0 68 unsigned int tN;
c@0 69 unsigned int thopSize;
c@0 70 double * fftInput;
c@0 71 double * fftOutputReal;
c@0 72 double * fftOutputImag;
c@0 73
c@3 74 int numberOfBlocks;
c@0 75 float *hannWindowtN;
c@0 76
c@0 77 vector<Vamp::RealTime> ncTimestamps;
c@0 78 };
c@0 79
c@0 80
c@0 81 #endif