BTrack - A Real-Time Beat Tracker
 All Classes Files Functions Enumerations Pages
Public Member Functions | List of all members
OnsetDetectionFunction Class Reference

#include <OnsetDetectionFunction.h>

Public Member Functions

 OnsetDetectionFunction (int hopSize_, int frameSize_)
 
 OnsetDetectionFunction (int hopSize_, int frameSize_, int onsetDetectionFunctionType_, int windowType_)
 
 ~OnsetDetectionFunction ()
 
void initialise (int hopSize_, int frameSize_)
 
void initialise (int hopSize_, int frameSize_, int onsetDetectionFunctionType_, int windowType_)
 
double calculateOnsetDetectionFunctionSample (double *buffer)
 
void setOnsetDetectionFunctionType (int onsetDetectionFunctionType_)
 

Detailed Description

A class for calculating onset detection functions.

Constructor & Destructor Documentation

OnsetDetectionFunction::OnsetDetectionFunction ( int  hopSize_,
int  frameSize_ 
)

Constructor that defaults the onset detection function type to ComplexSpectralDifferenceHWR and the window type to HanningWindow

Parameters
hopSize_the hop size in audio samples
frameSize_the frame size in audio samples
OnsetDetectionFunction::OnsetDetectionFunction ( int  hopSize_,
int  frameSize_,
int  onsetDetectionFunctionType_,
int  windowType_ 
)

Constructor

Parameters
hopSize_the hop size in audio samples
frameSize_the frame size in audio samples
onsetDetectionFunctionType_the type of onset detection function to use - (see OnsetDetectionFunctionType)
windowTypethe type of window to use (see WindowType)
OnsetDetectionFunction::~OnsetDetectionFunction ( )

Destructor

Member Function Documentation

double OnsetDetectionFunction::calculateOnsetDetectionFunctionSample ( double *  buffer)

Process input frame and calculate detection function sample

Parameters
buffera pointer to an array containing the audio samples to be processed
Returns
the onset detection function sample
void OnsetDetectionFunction::initialise ( int  hopSize_,
int  frameSize_ 
)

Initialisation function for only updating hop size and frame size (and not window type or onset detection function type

Parameters
hopSize_the hop size in audio samples
frameSize_the frame size in audio samples
void OnsetDetectionFunction::initialise ( int  hopSize_,
int  frameSize_,
int  onsetDetectionFunctionType_,
int  windowType_ 
)

Initialisation Function

Parameters
hopSize_the hop size in audio samples
frameSize_the frame size in audio samples
onsetDetectionFunctionType_the type of onset detection function to use - (see OnsetDetectionFunctionType)
windowTypethe type of window to use (see WindowType)
void OnsetDetectionFunction::setOnsetDetectionFunctionType ( int  onsetDetectionFunctionType_)

Set the detection function type

Parameters
onsetDetectionFunctionType_the type of onset detection function to use - (see OnsetDetectionFunctionType)

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