ReMAS  1.5
Real-time Musical Accompaniment System
Macros | Functions
TempoFunctions.h File Reference

File with TEMPO and auxiliar functions using by ReMAS, both CPU and GPU. More...

#include "defines.h"

Go to the source code of this file.

Macros

#define ATEMPO_H
 
#define SizeGauss   5
 

Functions

void ComputeTempo (STempo *, int, int, int, int *, int)
 ComputeTempo calculates the tempo for current frame using gaussian filter. More...
 
void ComputeTempoRL (STempoRL *, int, int, int, int *)
 ComputeTempoRL calculates tempo and controls synthesizer speed using linear regression. More...
 
int cmpfunc (const void *, const void *)
 cmpfunc compares two values. More...
 
MyType TheilSenRegression (int *, int *, int, bool *)
 TheilSenRegression computes Theil-Sen linear regression. More...
 

Detailed Description

File with TEMPO and auxiliar functions using by ReMAS, both CPU and GPU.

Author
Information Retrieval and Parallel Computing Group, University of Oviedo, Spain
Interdisciplinary Computation and Communication Group, Universitat Politecnica de Valencia, Spain
Signal Processing and Telecommunication Systems Research Group, University of Jaen, Spain.
Contact: remas.nosp@m.pack.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Date
February 13, 2017

Definition in file TempoFunctions.h.

Function Documentation

◆ cmpfunc()

int cmpfunc ( const void *  a,
const void *  b 
)

cmpfunc compares two values.

Parameters
a(in) First value
b(in) Second value
Returns
: comparison result

Definition at line 130 of file TempoFunctions.h.

◆ ComputeTempo()

void ComputeTempo ( STempo TEMPO,
int  current,
int  pos_min,
int  count_min,
int *  states_corr,
int  NStates 
)

ComputeTempo calculates the tempo for current frame using gaussian filter.

Parameters
TEMPO(inout) Struct for control the tempo
current(in) Current frame
pos_min(in) The position of the minimum in Current frame
count_min(in) Times pos_min verify one hypothesis over vector states_time_e
states_corr(in) states_corr vector
NStates(in) Number of states
Returns
: None, it is void

Definition at line 401 of file TempoFunctions.h.

◆ ComputeTempoRL()

void ComputeTempoRL ( STempoRL TEMPO,
int  current,
int  pos_min,
int  count_min,
int *  states_corr 
)

ComputeTempoRL calculates tempo and controls synthesizer speed using linear regression.

Parameters
TEMPO(inout) Struct for control the tempo
current(in) Current frame
pos_min(in) Estimated score position (frame) in Current frame
count_min(in) Estimated score position (state) in Current frame
states_corr(in) states_corr vector
Returns
: None, it is void

Definition at line 466 of file TempoFunctions.h.

◆ TheilSenRegression()

MyType TheilSenRegression ( int *  x,
int *  y,
int  L,
bool *  outlier 
)

TheilSenRegression computes Theil-Sen linear regression.

Parameters
x(in) Audio time of anchor points
y(in) Score time of anchor points
L(in) Number of the last anchor point
outlier(out) 1 if last anchor point is an outlier, 0 otherwise
Returns
: Estimated slope

Definition at line 151 of file TempoFunctions.h.