Mercurial > hg > qm-dsp
changeset 386:6acd63422d44
Make the calculation functions available with default parameters again as well (for Segmentino)
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 03 Dec 2013 10:02:46 +0000 |
parents | 0d79970811c7 |
children | 00f66226db5b |
files | dsp/tempotracking/TempoTrackV2.h |
diffstat | 1 files changed, 21 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/dsp/tempotracking/TempoTrackV2.h Tue Nov 05 16:36:53 2013 +0000 +++ b/dsp/tempotracking/TempoTrackV2.h Tue Dec 03 10:02:46 2013 +0000 @@ -40,16 +40,34 @@ ~TempoTrackV2(); // 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, double inputtempo, bool constraintempo); + vector<double> &tempi) { + calculateBeatPeriod(df, beatPeriod, tempi, 120.0, false); + } + + // Returned beat periods are given in df increment units; inputtempo and tempi in bpm + // MEPD 28/11/12 Expose inputtempo and constraintempo parameters + // Note, if inputtempo = 120 and constraintempo = false, then functionality is as it was before + void calculateBeatPeriod(const vector<double> &df, + vector<double> &beatPeriod, + vector<double> &tempi, + double inputtempo, bool constraintempo); + + // Returned beat positions are given in df increment units + void calculateBeats(const vector<double> &df, + const vector<double> &beatPeriod, + vector<double> &beats) { + calculateBeats(df, beatPeriod, beats, 0.9, 4.0); + } // Returned beat positions are given in df increment units // MEPD 28/11/12 Expose alpha and tightness parameters + // Note, if alpha = 0.9 and tightness = 4, then functionality is as it was before void calculateBeats(const vector<double> &df, const vector<double> &beatPeriod, - vector<double> &beats, double alpha, double tightness); + vector<double> &beats, + double alpha, double tightness); private: typedef vector<int> i_vec_t;