annotate plugins/Tempo.h @ 198:3a76aa26b578 tip master

wscript: check for 64bit using sys.maxsize (closes #3)
author Paul Brossier <piem@piem.org>
date Mon, 04 Dec 2017 01:42:19 +0100
parents f80b207ccd15
children
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
piem@112 9 This file is part of vamp-aubio-plugins.
piem@112 10
piem@112 11 vamp-aubio is free software: you can redistribute it and/or modify
piem@112 12 it under the terms of the GNU General Public License as published by
piem@112 13 the Free Software Foundation, either version 3 of the License, or
piem@112 14 (at your option) any later version.
piem@112 15
piem@112 16 vamp-aubio is distributed in the hope that it will be useful,
piem@112 17 but WITHOUT ANY WARRANTY; without even the implied warranty of
piem@112 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
piem@112 19 GNU General Public License for more details.
piem@112 20
piem@112 21 You should have received a copy of the GNU General Public License
piem@112 22 along with aubio. If not, see <http://www.gnu.org/licenses/>.
cannam@7 23
cannam@7 24 */
cannam@7 25
cannam@7 26 #ifndef _TEMPO_PLUGIN_H_
cannam@7 27 #define _TEMPO_PLUGIN_H_
cannam@7 28
cannam@7 29 #include <vamp-sdk/Plugin.h>
piem@51 30 #include <aubio/aubio.h>
cannam@7 31
cannam@30 32 #include "Types.h"
cannam@30 33
cannam@7 34 class Tempo : public Vamp::Plugin
cannam@7 35 {
cannam@7 36 public:
cannam@7 37 Tempo(float inputSampleRate);
cannam@7 38 virtual ~Tempo();
cannam@7 39
cannam@7 40 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
cannam@7 41 void reset();
cannam@7 42
cannam@7 43 InputDomain getInputDomain() const { return TimeDomain; }
cannam@7 44
cannam@13 45 std::string getIdentifier() const;
cannam@7 46 std::string getName() const;
cannam@7 47 std::string getDescription() const;
cannam@7 48 std::string getMaker() const;
cannam@7 49 int getPluginVersion() const;
cannam@7 50 std::string getCopyright() const;
cannam@7 51
cannam@7 52 ParameterList getParameterDescriptors() const;
cannam@7 53 float getParameter(std::string) const;
cannam@7 54 void setParameter(std::string, float);
cannam@7 55
cannam@7 56 size_t getPreferredStepSize() const;
cannam@7 57 size_t getPreferredBlockSize() const;
cannam@7 58
cannam@7 59 OutputList getOutputDescriptors() const;
cannam@7 60
cannam@12 61 FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp);
cannam@7 62
cannam@7 63 FeatureSet getRemainingFeatures();
cannam@7 64
cannam@7 65 protected:
cannam@7 66 fvec_t *m_ibuf;
cannam@35 67 fvec_t *m_beat;
cannam@35 68 smpl_t m_bpm;
cannam@30 69 OnsetType m_onsettype;
cannam@30 70 aubio_tempo_t *m_tempo;
cannam@7 71 float m_threshold;
cannam@7 72 float m_silence;
cannam@7 73 size_t m_stepSize;
cannam@7 74 size_t m_blockSize;
cannam@7 75 Vamp::RealTime m_delay;
cannam@7 76 Vamp::RealTime m_lastBeat;
cannam@7 77 };
cannam@7 78
cannam@7 79
cannam@7 80 #endif