annotate plugins/ConstantQSpectrogram.h @ 22:6d014fb538db

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