This processing estimates the most probable tunning of a set of chromatic peaks. More...
#include <InstantTunningEstimator.hxx>
Public Types | |
typedef std::vector< std::pair < double, double > > | PeakList |
Public Member Functions | |
InstantTunningEstimator (double inertia=0.0) | |
~InstantTunningEstimator () | |
void | setInertia (double inertia) |
void | doIt (const std::vector< std::pair< double, double > > &peaks) |
std::pair< double, double > | output () const |
std::pair< double, double > | instantTunning () const |
This processing estimates the most probable tunning of a set of chromatic peaks.
It does it by mapping the chromatic peaks as fasors in a semitone wheel and vectorially adding them. The inertia sets how much of the previous computed value it kept for the next execution. The instantTunning output doesn't take into account the inertia.
Definition at line 40 of file InstantTunningEstimator.hxx.
typedef std::vector<std::pair<double, double> > Simac::InstantTunningEstimator::PeakList |
Definition at line 43 of file InstantTunningEstimator.hxx.
Simac::InstantTunningEstimator::InstantTunningEstimator | ( | double | inertia = 0.0 |
) | [inline] |
Definition at line 51 of file InstantTunningEstimator.hxx.
Simac::InstantTunningEstimator::~InstantTunningEstimator | ( | ) | [inline] |
Definition at line 57 of file InstantTunningEstimator.hxx.
void Simac::InstantTunningEstimator::doIt | ( | const std::vector< std::pair< double, double > > & | peaks | ) | [inline] |
Definition at line 65 of file InstantTunningEstimator.hxx.
std::pair<double,double> Simac::InstantTunningEstimator::instantTunning | ( | ) | const [inline] |
Definition at line 86 of file InstantTunningEstimator.hxx.
std::pair<double,double> Simac::InstantTunningEstimator::output | ( | ) | const [inline] |
Definition at line 80 of file InstantTunningEstimator.hxx.
Referenced by Simac::ChordExtractor::secondCandidate(), and Simac::ChordExtractor::spectrum().
void Simac::InstantTunningEstimator::setInertia | ( | double | inertia | ) | [inline] |
Definition at line 60 of file InstantTunningEstimator.hxx.