Mercurial > hg > vamp-simple-cepstrum
comparison SimpleCepstrum.h @ 0:02587f02ef41
First cut at extracting this from its previous home
author | Chris Cannam |
---|---|
date | Fri, 22 Jun 2012 13:38:51 +0100 |
parents | |
children | e6faf01e25d8 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:02587f02ef41 |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 #ifndef _SIMPLE_CEPSTRUM_H_ | |
4 #define _SIMPLE_CEPSTRUM_H_ | |
5 | |
6 #include <vamp-sdk/Plugin.h> | |
7 | |
8 class SimpleCepstrum : public Vamp::Plugin | |
9 { | |
10 public: | |
11 SimpleCepstrum(float inputSampleRate); | |
12 virtual ~SimpleCepstrum(); | |
13 | |
14 std::string getIdentifier() const; | |
15 std::string getName() const; | |
16 std::string getDescription() const; | |
17 std::string getMaker() const; | |
18 int getPluginVersion() const; | |
19 std::string getCopyright() const; | |
20 | |
21 InputDomain getInputDomain() const; | |
22 size_t getPreferredBlockSize() const; | |
23 size_t getPreferredStepSize() const; | |
24 size_t getMinChannelCount() const; | |
25 size_t getMaxChannelCount() const; | |
26 | |
27 ParameterList getParameterDescriptors() const; | |
28 float getParameter(std::string identifier) const; | |
29 void setParameter(std::string identifier, float value); | |
30 | |
31 ProgramList getPrograms() const; | |
32 std::string getCurrentProgram() const; | |
33 void selectProgram(std::string name); | |
34 | |
35 OutputList getOutputDescriptors() const; | |
36 | |
37 bool initialise(size_t channels, size_t stepSize, size_t blockSize); | |
38 void reset(); | |
39 | |
40 FeatureSet process(const float *const *inputBuffers, | |
41 Vamp::RealTime timestamp); | |
42 | |
43 FeatureSet getRemainingFeatures(); | |
44 | |
45 protected: | |
46 size_t m_channels; | |
47 size_t m_stepSize; | |
48 size_t m_blockSize; | |
49 float m_fmin; | |
50 float m_fmax; | |
51 bool m_clamp; | |
52 | |
53 mutable int m_f0Output; | |
54 mutable int m_rawOutput; | |
55 mutable int m_varOutput; | |
56 mutable int m_p2mOutput; | |
57 mutable int m_cepOutput; | |
58 mutable int m_pvOutput; | |
59 mutable int m_amOutput; | |
60 | |
61 void fft(unsigned int n, bool inverse, | |
62 double *ri, double *ii, double *ro, double *io); | |
63 }; | |
64 | |
65 #endif |