1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
6 Centre for Digital Music, Queen Mary, University of London.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version. See the file
12 COPYING included with this distribution for more information.
15 #ifndef _CHROMAGRAM_PLUGIN_H_
16 #define _CHROMAGRAM_PLUGIN_H_
18 #include <vamp-sdk/Plugin.h>
19 #include <dsp/chromagram/Chromagram.h>
21 class ChromagramPlugin : public Vamp::Plugin
24 ChromagramPlugin(float inputSampleRate);
25 virtual ~ChromagramPlugin();
27 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
30 InputDomain getInputDomain() const { return FrequencyDomain; }
32 std::string getIdentifier() const;
33 std::string getName() const;
34 std::string getDescription() const;
35 std::string getMaker() const;
36 int getPluginVersion() const;
37 std::string getCopyright() const;
39 ParameterList getParameterDescriptors() const;
40 float getParameter(std::string) const;
41 void setParameter(std::string, float);
43 size_t getPreferredStepSize() const;
44 size_t getPreferredBlockSize() const;
46 OutputList getOutputDescriptors() const;
48 FeatureSet process(const float *const *inputBuffers,
49 Vamp::RealTime timestamp);
51 FeatureSet getRemainingFeatures();
56 float m_tuningFrequency;
57 MathUtilities::NormaliseType m_normalise;
62 ChromaConfig m_config;
63 Chromagram *m_chromagram;
64 mutable size_t m_step;
65 mutable size_t m_block;
67 vector<double> m_binsums;