Mercurial > hg > qm-dsp
diff dsp/tempotracking/TempoTrackV2.h @ 100:d7619173d43c mepd_new_params
Now includes latest changes from MEPD:
* TempoTrackV2::calculatebeats method - exposes "alpha" and "tightness" parameters
* TempoTrackV2::calculateBeatPeriod - user can specify an inputtempo (in BPM) and "constraintempo" (bool)
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 12 Dec 2012 15:10:38 +0000 |
parents | 915365c58758 |
children | fe7552b4f80a |
line wrap: on
line diff
--- a/dsp/tempotracking/TempoTrackV2.h Wed Dec 12 15:05:13 2012 +0000 +++ b/dsp/tempotracking/TempoTrackV2.h Wed Dec 12 15:10:38 2012 +0000 @@ -18,16 +18,14 @@ #define TEMPOTRACKV2_H #include <vector> -#include <cstddef> - -using std::vector; +using namespace std; //!!! Question: how far is this actually sample rate dependent? I // think it does produce plausible results for e.g. 48000 as well as // 44100, but surely the fixed window sizes and comb filtering will // make it prefer double or half time when run at e.g. 96000? -class TempoTrackV2 +class TempoTrackV2 { public: /** @@ -41,15 +39,17 @@ TempoTrackV2(float sampleRate, size_t dfIncrement); ~TempoTrackV2(); - // Returned beat periods are given in df increment units; tempi in bpm + // Returned beat periods are given in df increment units; inputtempo and tempi in bpm + // MEPD 28/11/12 Expose inputtempo and constraintempo parameters void calculateBeatPeriod(const vector<double> &df, vector<double> &beatPeriod, - vector<double> &tempi); + vector<double> &tempi, double inputtempo, bool constraintempo); // Returned beat positions are given in df increment units + // MEPD 28/11/12 Expose alpha and tightness parameters void calculateBeats(const vector<double> &df, const vector<double> &beatPeriod, - vector<double> &beats); + vector<double> &beats, double alpha, double tightness); private: typedef vector<int> i_vec_t;