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