annotate plugins/Tempo.h @ 35:bcb23bb4b7aa

Get the rest to build
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 10 Jul 2012 17:20:10 +0100
parents 8a20f3488d88
children 4634452ef09f
rev   line source
cannam@7 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@7 2
cannam@7 3 /*
cannam@7 4 Vamp feature extraction plugins using Paul Brossier's Aubio library.
cannam@7 5
cannam@7 6 Centre for Digital Music, Queen Mary, University of London.
cannam@7 7 This file copyright 2006 Chris Cannam.
cannam@7 8
cannam@7 9 This program is free software; you can redistribute it and/or
cannam@7 10 modify it under the terms of the GNU General Public License as
cannam@7 11 published by the Free Software Foundation; either version 2 of the
cannam@7 12 License, or (at your option) any later version. See the file
cannam@7 13 COPYING included with this distribution for more information.
cannam@7 14
cannam@7 15 */
cannam@7 16
cannam@7 17 #ifndef _TEMPO_PLUGIN_H_
cannam@7 18 #define _TEMPO_PLUGIN_H_
cannam@7 19
cannam@7 20 #include <vamp-sdk/Plugin.h>
cannam@7 21 #include <aubio/aubio.h>
cannam@7 22
cannam@30 23 #include "Types.h"
cannam@30 24
cannam@7 25 class Tempo : public Vamp::Plugin
cannam@7 26 {
cannam@7 27 public:
cannam@7 28 Tempo(float inputSampleRate);
cannam@7 29 virtual ~Tempo();
cannam@7 30
cannam@7 31 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
cannam@7 32 void reset();
cannam@7 33
cannam@7 34 InputDomain getInputDomain() const { return TimeDomain; }
cannam@7 35
cannam@13 36 std::string getIdentifier() const;
cannam@7 37 std::string getName() const;
cannam@7 38 std::string getDescription() const;
cannam@7 39 std::string getMaker() const;
cannam@7 40 int getPluginVersion() const;
cannam@7 41 std::string getCopyright() const;
cannam@7 42
cannam@7 43 ParameterList getParameterDescriptors() const;
cannam@7 44 float getParameter(std::string) const;
cannam@7 45 void setParameter(std::string, float);
cannam@7 46
cannam@7 47 size_t getPreferredStepSize() const;
cannam@7 48 size_t getPreferredBlockSize() const;
cannam@7 49
cannam@7 50 OutputList getOutputDescriptors() const;
cannam@7 51
cannam@12 52 FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp);
cannam@7 53
cannam@7 54 FeatureSet getRemainingFeatures();
cannam@7 55
cannam@7 56 protected:
cannam@7 57 fvec_t *m_ibuf;
cannam@35 58 fvec_t *m_beat;
cannam@35 59 smpl_t m_bpm;
cannam@30 60 OnsetType m_onsettype;
cannam@30 61 aubio_tempo_t *m_tempo;
cannam@7 62 float m_threshold;
cannam@7 63 float m_silence;
cannam@7 64 size_t m_stepSize;
cannam@7 65 size_t m_blockSize;
cannam@7 66 Vamp::RealTime m_delay;
cannam@7 67 Vamp::RealTime m_lastBeat;
cannam@7 68 };
cannam@7 69
cannam@7 70
cannam@7 71 #endif