annotate plugins/ConstantQSpectrogram.h @ 266:d04675d44928 tip master

Refer to SDK from Github
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 02 Jun 2021 14:41:26 +0100
parents dcf5800f0f00
children
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@135 7
c@135 8 This program is free software; you can redistribute it and/or
c@135 9 modify it under the terms of the GNU General Public License as
c@135 10 published by the Free Software Foundation; either version 2 of the
c@135 11 License, or (at your option) any later version. See the file
c@135 12 COPYING included with this distribution for more information.
c@9 13 */
c@9 14
c@9 15 #ifndef _CONSTANT_Q_SPECTROGRAM_PLUGIN_H_
c@9 16 #define _CONSTANT_Q_SPECTROGRAM_PLUGIN_H_
c@9 17
c@9 18 #include <vamp-sdk/Plugin.h>
c@9 19 #include <dsp/chromagram/ConstantQ.h>
c@9 20
c@9 21 #include <queue>
c@9 22
c@9 23 class ConstantQSpectrogram : public Vamp::Plugin
c@9 24 {
c@9 25 public:
c@9 26 ConstantQSpectrogram(float inputSampleRate);
c@9 27 virtual ~ConstantQSpectrogram();
c@9 28
c@9 29 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
c@9 30 void reset();
c@9 31
c@9 32 InputDomain getInputDomain() const { return FrequencyDomain; }
c@9 33
c@22 34 std::string getIdentifier() const;
c@9 35 std::string getName() const;
c@9 36 std::string getDescription() const;
c@9 37 std::string getMaker() const;
c@9 38 int getPluginVersion() const;
c@9 39 std::string getCopyright() const;
c@9 40
c@9 41 ParameterList getParameterDescriptors() const;
c@9 42 float getParameter(std::string) const;
c@9 43 void setParameter(std::string, float);
c@9 44
c@9 45 size_t getPreferredStepSize() const;
c@9 46 size_t getPreferredBlockSize() const;
c@9 47
c@9 48 OutputList getOutputDescriptors() const;
c@9 49
c@18 50 FeatureSet process(const float *const *inputBuffers,
c@18 51 Vamp::RealTime timestamp);
c@9 52
c@9 53 FeatureSet getRemainingFeatures();
c@9 54
c@9 55 protected:
c@9 56 int m_minMIDIPitch;
c@9 57 int m_maxMIDIPitch;
c@9 58 float m_tuningFrequency;
c@9 59 bool m_normalized;
c@9 60 int m_bpo;
c@9 61 int m_bins;
c@9 62
c@9 63 void setupConfig();
c@9 64
c@9 65 CQConfig m_config;
c@9 66 ConstantQ *m_cq;
c@9 67 mutable size_t m_step;
c@9 68 mutable size_t m_block;
c@9 69
c@9 70 Feature normalize(const Feature &);
c@9 71 };
c@9 72
c@9 73
c@9 74 #endif