![]() |
Mixxx
|
#include <pitchfilter.h>
Public Member Functions | |
| void | init (float dt, float v, float alpha=1.0/512, float beta=(1.0/512)/1024) |
| void | observation (float dx) |
| float | currentPitch () |
Protected Attributes | |
| float | m_dt |
| float | m_x |
| float | m_v |
| float | m_alpha |
| float | m_beta |
Definition at line 24 of file pitchfilter.h.
| float PitchFilter::currentPitch | ( | ) | [inline] |
Get the pitch after filtering
Definition at line 56 of file pitchfilter.h.
| void PitchFilter::init | ( | float | dt, |
| float | v, | ||
| float | alpha = 1.0/512, |
||
| float | beta = (1.0/512)/1024 |
||
| ) | [inline] |
Prepare the filter for observations every dt seconds Default filter values were concluded experimentally for time code vinyl
Definition at line 28 of file pitchfilter.h.
| void PitchFilter::observation | ( | float | dx | ) | [inline] |
Input an observation to the filter; in the last dt seconds the position has moved by dx.
Because the values come from a digital controller, the values for dx are discrete rather than smooth.
Definition at line 41 of file pitchfilter.h.
float PitchFilter::m_alpha [protected] |
Definition at line 62 of file pitchfilter.h.
float PitchFilter::m_beta [protected] |
Definition at line 62 of file pitchfilter.h.
float PitchFilter::m_dt [protected] |
State of the pitch calculation filter
Definition at line 62 of file pitchfilter.h.
float PitchFilter::m_v [protected] |
Definition at line 62 of file pitchfilter.h.
float PitchFilter::m_x [protected] |
Definition at line 62 of file pitchfilter.h.