annotate plugins/Tempo.h @ 30:7fd8f7a0b088

Start overhaul for (current git, presumably later v0.4.0) aubio API
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 09 Jul 2012 15:10:35 +0100
parents 1169d00391d8
children 8a20f3488d88
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@7 58 cvec_t *m_fftgrain;
cannam@7 59 fvec_t *m_onset;
cannam@7 60 aubio_pvoc_t *m_pv;
cannam@30 61 aubio_peakpicker_t *m_peakpick;
cannam@30 62 aubio_onset_t *m_onsetdet;
cannam@30 63 OnsetType m_onsettype;
cannam@30 64 aubio_tempo_t *m_tempo;
cannam@7 65 fvec_t *m_dfframe;
cannam@7 66 fvec_t *m_btout;
cannam@7 67 uint_t m_winlen;
cannam@7 68 sint_t m_btstep;
cannam@7 69 sint_t m_btcounter;
cannam@7 70 float m_threshold;
cannam@7 71 float m_silence;
cannam@7 72 size_t m_stepSize;
cannam@7 73 size_t m_blockSize;
cannam@7 74 size_t m_channelCount;
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