Ardour  9.0-pre0-582-g084a23a80d
TempoTrackV2 Class Reference

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

#include <TempoTrackV2.h>

Public Member Functions

 TempoTrackV2 (float sampleRate, size_t dfIncrement)
 
 ~TempoTrackV2 ()
 
void calculateBeatPeriod (const vector< double > &df, vector< double > &beatPeriod, vector< double > &tempi)
 
void calculateBeatPeriod (const vector< double > &df, vector< double > &beatPeriod, vector< double > &tempi, double inputtempo, bool constraintempo)
 
void calculateBeats (const vector< double > &df, const vector< double > &beatPeriod, vector< double > &beats)
 
void calculateBeats (const vector< double > &df, const vector< double > &beatPeriod, vector< double > &beats, double alpha, double tightness)
 

Private Types

typedef vector< int > i_vec_t
 
typedef vector< vector< int > > i_mat_t
 
typedef vector< double > d_vec_t
 
typedef vector< 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
 
size_t m_increment
 

Detailed Description

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

Definition at line 28 of file TempoTrackV2.h.

Member Typedef Documentation

◆ d_mat_t

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

Definition at line 76 of file TempoTrackV2.h.

◆ d_vec_t

typedef vector<double> TempoTrackV2::d_vec_t
private

Definition at line 75 of file TempoTrackV2.h.

◆ i_mat_t

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

Definition at line 74 of file TempoTrackV2.h.

◆ i_vec_t

typedef vector<int> TempoTrackV2::i_vec_t
private

Definition at line 73 of file TempoTrackV2.h.

Constructor & Destructor Documentation

◆ TempoTrackV2()

TempoTrackV2::TempoTrackV2 ( float  sampleRate,
size_t  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.

◆ ~TempoTrackV2()

TempoTrackV2::~TempoTrackV2 ( )

Member Function Documentation

◆ adapt_thresh()

void TempoTrackV2::adapt_thresh ( d_vec_t df)
private

◆ calculateBeatPeriod() [1/2]

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

Definition at line 43 of file TempoTrackV2.h.

◆ calculateBeatPeriod() [2/2]

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

◆ calculateBeats() [1/2]

void TempoTrackV2::calculateBeats ( const vector< double > &  df,
const vector< double > &  beatPeriod,
vector< double > &  beats 
)
inline

Definition at line 58 of file TempoTrackV2.h.

◆ calculateBeats() [2/2]

void TempoTrackV2::calculateBeats ( const vector< double > &  df,
const vector< double > &  beatPeriod,
vector< double > &  beats,
double  alpha,
double  tightness 
)

◆ filter_df()

void TempoTrackV2::filter_df ( d_vec_t df)
private

◆ get_max_ind()

int TempoTrackV2::get_max_ind ( const d_vec_t df)
private

◆ get_max_val()

double TempoTrackV2::get_max_val ( const d_vec_t df)
private

◆ get_rcf()

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

◆ mean_array()

double TempoTrackV2::mean_array ( const d_vec_t dfin,
int  start,
int  end 
)
private

◆ normalise_vec()

void TempoTrackV2::normalise_vec ( d_vec_t df)
private

◆ viterbi_decode()

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

Member Data Documentation

◆ m_increment

size_t TempoTrackV2::m_increment
private

Definition at line 79 of file TempoTrackV2.h.

◆ m_rate

float TempoTrackV2::m_rate
private

Definition at line 78 of file TempoTrackV2.h.


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