#include <OnsetDetectionFunction.h>
A class for calculating onset detection functions.
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) |
windowType | the type of window to use (see WindowType) |
OnsetDetectionFunction::~OnsetDetectionFunction |
( |
| ) |
|
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
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) |
windowType | the 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: