annotate songparts/plugins/ChromagramPlugin.h @ 1:f44aa6d29642

Plugin Code - The main file is songparts.cpp
author maxzanoni76 <max.zanoni@eecs.qmul.ac.uk>
date Wed, 11 Apr 2012 09:31:28 +0100
parents
children
rev   line source
max@1 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
max@1 2
max@1 3 /*
max@1 4 QM Vamp Plugin Set
max@1 5
max@1 6 Centre for Digital Music, Queen Mary, University of London.
max@1 7
max@1 8 This program is free software; you can redistribute it and/or
max@1 9 modify it under the terms of the GNU General Public License as
max@1 10 published by the Free Software Foundation; either version 2 of the
max@1 11 License, or (at your option) any later version. See the file
max@1 12 COPYING included with this distribution for more information.
max@1 13 */
max@1 14
max@1 15 #ifndef _CHROMAGRAM_PLUGIN_H_
max@1 16 #define _CHROMAGRAM_PLUGIN_H_
max@1 17
max@1 18 #include <vamp-sdk/Plugin.h>
max@1 19 #include <dsp/chromagram/Chromagram.h>
max@1 20
max@1 21 class ChromagramPlugin : public Vamp::Plugin
max@1 22 {
max@1 23 public:
max@1 24 ChromagramPlugin(float inputSampleRate);
max@1 25 virtual ~ChromagramPlugin();
max@1 26
max@1 27 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
max@1 28 void reset();
max@1 29
max@1 30 InputDomain getInputDomain() const { return FrequencyDomain; }
max@1 31
max@1 32 std::string getIdentifier() const;
max@1 33 std::string getName() const;
max@1 34 std::string getDescription() const;
max@1 35 std::string getMaker() const;
max@1 36 int getPluginVersion() const;
max@1 37 std::string getCopyright() const;
max@1 38
max@1 39 ParameterList getParameterDescriptors() const;
max@1 40 float getParameter(std::string) const;
max@1 41 void setParameter(std::string, float);
max@1 42
max@1 43 size_t getPreferredStepSize() const;
max@1 44 size_t getPreferredBlockSize() const;
max@1 45
max@1 46 OutputList getOutputDescriptors() const;
max@1 47
max@1 48 FeatureSet process(const float *const *inputBuffers,
max@1 49 Vamp::RealTime timestamp);
max@1 50
max@1 51 FeatureSet getRemainingFeatures();
max@1 52
max@1 53 protected:
max@1 54 int m_minMIDIPitch;
max@1 55 int m_maxMIDIPitch;
max@1 56 float m_tuningFrequency;
max@1 57 MathUtilities::NormaliseType m_normalise;
max@1 58 int m_bpo;
max@1 59
max@1 60 void setupConfig();
max@1 61
max@1 62 ChromaConfig m_config;
max@1 63 Chromagram *m_chromagram;
max@1 64 mutable size_t m_step;
max@1 65 mutable size_t m_block;
max@1 66
max@1 67 vector<double> m_binsums;
max@1 68 size_t m_count;
max@1 69 };
max@1 70
max@1 71
max@1 72 #endif