annotate plugins/Tempo.h @ 13:1169d00391d8

* Update along with latest Vamp API change
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 26 Feb 2007 18:10:34 +0000
parents 62414aaaaa7e
children 7fd8f7a0b088
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@7 23 class Tempo : public Vamp::Plugin
cannam@7 24 {
cannam@7 25 public:
cannam@7 26 Tempo(float inputSampleRate);
cannam@7 27 virtual ~Tempo();
cannam@7 28
cannam@7 29 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
cannam@7 30 void reset();
cannam@7 31
cannam@7 32 InputDomain getInputDomain() const { return TimeDomain; }
cannam@7 33
cannam@13 34 std::string getIdentifier() const;
cannam@7 35 std::string getName() const;
cannam@7 36 std::string getDescription() const;
cannam@7 37 std::string getMaker() const;
cannam@7 38 int getPluginVersion() const;
cannam@7 39 std::string getCopyright() const;
cannam@7 40
cannam@7 41 ParameterList getParameterDescriptors() const;
cannam@7 42 float getParameter(std::string) const;
cannam@7 43 void setParameter(std::string, float);
cannam@7 44
cannam@7 45 size_t getPreferredStepSize() const;
cannam@7 46 size_t getPreferredBlockSize() const;
cannam@7 47
cannam@7 48 OutputList getOutputDescriptors() const;
cannam@7 49
cannam@12 50 FeatureSet process(const float *const *inputBuffers, Vamp::RealTime timestamp);
cannam@7 51
cannam@7 52 FeatureSet getRemainingFeatures();
cannam@7 53
cannam@7 54 protected:
cannam@7 55 fvec_t *m_ibuf;
cannam@7 56 cvec_t *m_fftgrain;
cannam@7 57 fvec_t *m_onset;
cannam@7 58 aubio_pvoc_t *m_pv;
cannam@7 59 aubio_pickpeak_t *m_peakpick;
cannam@7 60 aubio_onsetdetection_t *m_onsetdet;
cannam@7 61 aubio_onsetdetection_type m_onsettype;
cannam@7 62 aubio_beattracking_t *m_beattracking;
cannam@7 63 fvec_t *m_dfframe;
cannam@7 64 fvec_t *m_btout;
cannam@7 65 uint_t m_winlen;
cannam@7 66 sint_t m_btstep;
cannam@7 67 sint_t m_btcounter;
cannam@7 68 float m_threshold;
cannam@7 69 float m_silence;
cannam@7 70 size_t m_stepSize;
cannam@7 71 size_t m_blockSize;
cannam@7 72 size_t m_channelCount;
cannam@7 73 Vamp::RealTime m_delay;
cannam@7 74 Vamp::RealTime m_lastBeat;
cannam@7 75 };
cannam@7 76
cannam@7 77
cannam@7 78 #endif