#include <OnsetDetectionFunction.h>
A class for calculating onset detection functions.
◆ OnsetDetectionFunction() [1/2]
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() [2/2]
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) |
windowType | the type of window to use (see WindowType) |
◆ ~OnsetDetectionFunction()
OnsetDetectionFunction::~OnsetDetectionFunction |
( |
| ) |
|
◆ calculateOnsetDetectionFunctionSample()
double OnsetDetectionFunction::calculateOnsetDetectionFunctionSample |
( |
double * |
buffer | ) |
|
Process input frame and calculate detection function sample
- Parameters
-
buffer | a pointer to an array containing the audio samples to be processed |
- Returns
- the onset detection function sample
◆ initialise() [1/2]
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 |
◆ initialise() [2/2]
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) |
windowType | the type of window to use (see WindowType) |
◆ setOnsetDetectionFunctionType()
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: