!! Question: how far is this actually sample rate dependent? I More...

#include <TempoTrackV2.h>

Public Member Functions

 TempoTrackV2 (float sampleRate, int dfIncrement)
 Construct a tempo tracker that will operate on beat detection function data calculated from audio at the given sample rate with the given frame increment. More...
 
 ~TempoTrackV2 ()
 
void calculateBeatPeriod (const std::vector< double > &df, std::vector< double > &beatPeriod, std::vector< double > &tempi)
 
void calculateBeatPeriod (const std::vector< double > &df, std::vector< double > &beatPeriod, std::vector< double > &tempi, double inputtempo, bool constraintempo)
 
void calculateBeats (const std::vector< double > &df, const std::vector< double > &beatPeriod, std::vector< double > &beats)
 
void calculateBeats (const std::vector< double > &df, const std::vector< double > &beatPeriod, std::vector< double > &beats, double alpha, double tightness)
 

Private Types

typedef std::vector< int > i_vec_t
 
typedef std::vector< std::vector< int > > i_mat_t
 
typedef std::vector< double > d_vec_t
 
typedef std::vector< std::vector< double > > d_mat_t
 

Private Member Functions

void adapt_thresh (d_vec_t &df)
 
double mean_array (const d_vec_t &dfin, int start, int end)
 
void filter_df (d_vec_t &df)
 
void get_rcf (const d_vec_t &dfframe, const d_vec_t &wv, d_vec_t &rcf)
 
void viterbi_decode (const d_mat_t &rcfmat, const d_vec_t &wv, d_vec_t &bp, d_vec_t &tempi)
 
double get_max_val (const d_vec_t &df)
 
int get_max_ind (const d_vec_t &df)
 
void normalise_vec (d_vec_t &df)
 

Private Attributes

float m_rate
 
int m_increment
 

Detailed Description

!! Question: how far is this actually sample rate dependent? I

Definition at line 26 of file TempoTrackV2.h.

Member Typedef Documentation

typedef std::vector<int> TempoTrackV2::i_vec_t
private

Definition at line 71 of file TempoTrackV2.h.

typedef std::vector<std::vector<int> > TempoTrackV2::i_mat_t
private

Definition at line 72 of file TempoTrackV2.h.

typedef std::vector<double> TempoTrackV2::d_vec_t
private

Definition at line 73 of file TempoTrackV2.h.

typedef std::vector<std::vector<double> > TempoTrackV2::d_mat_t
private

Definition at line 74 of file TempoTrackV2.h.

Constructor & Destructor Documentation

TempoTrackV2::TempoTrackV2 ( float  sampleRate,
int  dfIncrement 
)

Construct a tempo tracker that will operate on beat detection function data calculated from audio at the given sample rate with the given frame increment.

Currently the sample rate and increment are used only for the conversion from beat frame location to bpm in the tempo array.

Definition at line 28 of file TempoTrackV2.cpp.

TempoTrackV2::~TempoTrackV2 ( )

Definition at line 32 of file TempoTrackV2.cpp.

Member Function Documentation

void TempoTrackV2::calculateBeatPeriod ( const std::vector< double > &  df,
std::vector< double > &  beatPeriod,
std::vector< double > &  tempi 
)
inline

Definition at line 41 of file TempoTrackV2.h.

Referenced by filter_df().

void TempoTrackV2::calculateBeatPeriod ( const std::vector< double > &  df,
std::vector< double > &  beatPeriod,
std::vector< double > &  tempi,
double  inputtempo,
bool  constraintempo 
)
void TempoTrackV2::calculateBeats ( const std::vector< double > &  df,
const std::vector< double > &  beatPeriod,
std::vector< double > &  beats 
)
inline

Definition at line 56 of file TempoTrackV2.h.

Referenced by normalise_vec().

void TempoTrackV2::calculateBeats ( const std::vector< double > &  df,
const std::vector< double > &  beatPeriod,
std::vector< double > &  beats,
double  alpha,
double  tightness 
)
void TempoTrackV2::adapt_thresh ( d_vec_t df)
private
double TempoTrackV2::mean_array ( const d_vec_t dfin,
int  start,
int  end 
)
private
void TempoTrackV2::filter_df ( d_vec_t df)
private

Definition at line 35 of file TempoTrackV2.cpp.

References calculateBeatPeriod(), get_rcf(), and viterbi_decode().

void TempoTrackV2::get_rcf ( const d_vec_t dfframe,
const d_vec_t wv,
d_vec_t rcf 
)
private

Definition at line 176 of file TempoTrackV2.cpp.

References MathUtilities::adaptiveThreshold(), and EPS.

Referenced by filter_df().

void TempoTrackV2::viterbi_decode ( const d_mat_t rcfmat,
const d_vec_t wv,
d_vec_t bp,
d_vec_t tempi 
)
private

Definition at line 231 of file TempoTrackV2.cpp.

References EPS, get_max_ind(), get_max_val(), m_increment, and m_rate.

Referenced by filter_df().

double TempoTrackV2::get_max_val ( const d_vec_t df)
private

Definition at line 356 of file TempoTrackV2.cpp.

Referenced by normalise_vec(), and viterbi_decode().

int TempoTrackV2::get_max_ind ( const d_vec_t df)
private

Definition at line 371 of file TempoTrackV2.cpp.

Referenced by normalise_vec(), and viterbi_decode().

void TempoTrackV2::normalise_vec ( d_vec_t df)
private

Definition at line 388 of file TempoTrackV2.cpp.

References calculateBeats(), EPS, get_max_ind(), and get_max_val().

Member Data Documentation

float TempoTrackV2::m_rate
private

Definition at line 76 of file TempoTrackV2.h.

Referenced by viterbi_decode().

int TempoTrackV2::m_increment
private

Definition at line 77 of file TempoTrackV2.h.

Referenced by viterbi_decode().


The documentation for this class was generated from the following files: