annotate plugins/ChromagramPlugin.h @ 18:99dadc93042e

* Adapt to Vamp API update * Add an output for locked tempo from beat detector
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 08 Dec 2006 18:06:35 +0000
parents 641ce27165bd
children 6d014fb538db
rev   line source
c@0 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
c@0 2
c@0 3 /*
c@0 4 QM Vamp Plugin Set
c@0 5
c@0 6 Centre for Digital Music, Queen Mary, University of London.
c@0 7 All rights reserved.
c@0 8 */
c@0 9
c@0 10 #ifndef _CHROMAGRAM_PLUGIN_H_
c@0 11 #define _CHROMAGRAM_PLUGIN_H_
c@0 12
c@3 13 #include <vamp-sdk/Plugin.h>
c@3 14 #include <dsp/chromagram/Chromagram.h>
c@0 15
c@0 16 #include <queue>
c@0 17
c@0 18 class ChromagramPlugin : public Vamp::Plugin
c@0 19 {
c@0 20 public:
c@0 21 ChromagramPlugin(float inputSampleRate);
c@0 22 virtual ~ChromagramPlugin();
c@0 23
c@0 24 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
c@0 25 void reset();
c@0 26
c@7 27 InputDomain getInputDomain() const { return FrequencyDomain; }
c@0 28
c@0 29 std::string getName() const;
c@0 30 std::string getDescription() const;
c@0 31 std::string getMaker() const;
c@0 32 int getPluginVersion() const;
c@0 33 std::string getCopyright() const;
c@0 34
c@0 35 ParameterList getParameterDescriptors() const;
c@0 36 float getParameter(std::string) const;
c@0 37 void setParameter(std::string, float);
c@0 38
c@0 39 size_t getPreferredStepSize() const;
c@0 40 size_t getPreferredBlockSize() const;
c@0 41
c@0 42 OutputList getOutputDescriptors() const;
c@0 43
c@18 44 FeatureSet process(const float *const *inputBuffers,
c@18 45 Vamp::RealTime timestamp);
c@0 46
c@0 47 FeatureSet getRemainingFeatures();
c@0 48
c@0 49 protected:
c@0 50 int m_minMIDIPitch;
c@0 51 int m_maxMIDIPitch;
c@0 52 float m_tuningFrequency;
c@0 53 bool m_normalized;
c@0 54 int m_bpo;
c@0 55
c@0 56 void setupConfig();
c@0 57
c@0 58 ChromaConfig m_config;
c@0 59 Chromagram *m_chromagram;
c@0 60 mutable size_t m_step;
c@0 61 mutable size_t m_block;
c@0 62
c@0 63 Feature normalize(const Feature &);
c@0 64 };
c@0 65
c@0 66
c@0 67 #endif