A class specifically designed to extract some kind of useable velocity value from parameters whose values are driven by mouse move messages The signal is very noisy, and unpredictable with respect to when it changes.
More...
#include <OscillatorUtils.h>
A class specifically designed to extract some kind of useable velocity value from parameters whose values are driven by mouse move messages The signal is very noisy, and unpredictable with respect to when it changes.
◆ MouseVelocityExtractor()
| krotos::MouseVelocityExtractor::MouseVelocityExtractor |
( |
| ) |
|
|
inline |
◆ ~MouseVelocityExtractor()
| krotos::MouseVelocityExtractor::~MouseVelocityExtractor |
( |
| ) |
|
|
inline |
◆ getOutput()
| float krotos::MouseVelocityExtractor::getOutput |
( |
| ) |
|
Fetch the processed output.
- Returns
◆ prepare()
| void krotos::MouseVelocityExtractor::prepare |
( |
double | sampleRate, |
|
|
int | samplesPerBlock ) |
Set the sample rate and block size.
- Parameters
-
| sampleRate | |
| samplesPerBlock | |
◆ process()
| void krotos::MouseVelocityExtractor::process |
( |
| ) |
|
◆ setInput()
| void krotos::MouseVelocityExtractor::setInput |
( |
float | val | ) |
|
Input the value to be processed.
- Parameters
-
◆ CALIBRATION_FACTOR
| const float krotos::MouseVelocityExtractor::CALIBRATION_FACTOR {0.1f} |
|
private |
◆ m_blockRateHZ
| float krotos::MouseVelocityExtractor::m_blockRateHZ {0.f} |
|
private |
◆ m_calibration
| float krotos::MouseVelocityExtractor::m_calibration {0} |
|
private |
◆ m_input
| float krotos::MouseVelocityExtractor::m_input {0.0f} |
|
private |
◆ m_previousInput
| float krotos::MouseVelocityExtractor::m_previousInput {0.0f} |
|
private |
◆ m_sampleRate
| double krotos::MouseVelocityExtractor::m_sampleRate {0.0} |
|
private |
◆ m_samplesPerBlock
| int krotos::MouseVelocityExtractor::m_samplesPerBlock {0} |
|
private |
◆ m_smoothedVelocity
◆ m_smoother
| dsp::IIR::Filter<float> krotos::MouseVelocityExtractor::m_smoother |
|
private |
◆ m_velocity
| float krotos::MouseVelocityExtractor::m_velocity {0.0f} |
|
private |
◆ VELOCITY_LP_FILTER_HZ
| const float krotos::MouseVelocityExtractor::VELOCITY_LP_FILTER_HZ {4.5f} |
|
private |
◆ VELOCITY_LP_FILTER_Q
| const float krotos::MouseVelocityExtractor::VELOCITY_LP_FILTER_Q {1.f} |
|
private |
The documentation for this class was generated from the following files: