|
Krotos Modules 3
|
Calculates the slope of the Envelope Follower. More...
#include <SlopEnvelopeOnsetdetection.h>
Public Member Functions | |
| SlopeGenerator () | |
| std::vector< float > | createSlopeVectorFromEnvelope (std::vector< float > envelopeVector) |
| void | setNumRegressionPoints (int numRegressionPoints) |
Private Attributes | |
| float | m_sampleRate |
| int | m_numRegressionPoints {} |
Calculates the slope of the Envelope Follower.
This class caclulates the slope of the envelope using a linear regression scheme. This method was chosen over a derivative one as it is more resistant to noise. A moving window skips forward one sample at a time performing a m_numRegressionPoints linear regression to calculate the slope.
|
inline |
| std::vector< float > krotos::SlopeGenerator::createSlopeVectorFromEnvelope | ( | std::vector< float > | envelopeVector | ) |
Returns the slope Vector of an Envelope follower vector.
| envelopeVector | the envelope Follower vector returns a vector<float> containing the slope values |
|
inline |
Sets the number of linear regression points
| numRegressionPoints | the new parameter value |
|
private |
|
private |