This processing takes an array of circular peaks with position at pitch units [0,12) and corrects them to be tunned given a tunning center and a reference tune. More...
#include <CircularPeakTunner.hxx>
Public Types | |
typedef std::vector< std::pair < double, double > > | PeakList |
typedef std::vector< std::pair < double, double > > | PitchProfile |
Public Member Functions | |
CircularPeakTunner (double referenceTunning) | |
~CircularPeakTunner () | |
unsigned | chromagramToSemitone (double tunning, double peakPosition) |
void | doIt (double center, const PeakList &peaks) |
const PeakList & | output () const |
Static Public Member Functions | |
static double | tunningShift (double reference, double tunning) |
static double | tune (double peakPosition, double shift) |
This processing takes an array of circular peaks with position at pitch units [0,12) and corrects them to be tunned given a tunning center and a reference tune.
The tunning center is the detected tunning center within a single semitone [0,1). The reference tunning is the reference we take for pitch 0.
Definition at line 41 of file CircularPeakTunner.hxx.
typedef std::vector<std::pair<double, double> > Simac::CircularPeakTunner::PeakList |
Definition at line 44 of file CircularPeakTunner.hxx.
typedef std::vector<std::pair<double, double> > Simac::CircularPeakTunner::PitchProfile |
Definition at line 45 of file CircularPeakTunner.hxx.
Simac::CircularPeakTunner::CircularPeakTunner | ( | double | referenceTunning | ) | [inline] |
Definition at line 52 of file CircularPeakTunner.hxx.
Simac::CircularPeakTunner::~CircularPeakTunner | ( | ) | [inline] |
Definition at line 57 of file CircularPeakTunner.hxx.
unsigned Simac::CircularPeakTunner::chromagramToSemitone | ( | double | tunning, | |
double | peakPosition | |||
) | [inline] |
tunning | is a [0,3) number that indicates the detected center of a semitone inside a chromogram semitone triplet. |
Definition at line 68 of file CircularPeakTunner.hxx.
References tune(), and tunningShift().
void Simac::CircularPeakTunner::doIt | ( | double | center, | |
const PeakList & | peaks | |||
) | [inline] |
Definition at line 94 of file CircularPeakTunner.hxx.
References tune(), and tunningShift().
const PeakList& Simac::CircularPeakTunner::output | ( | ) | const [inline] |
Definition at line 106 of file CircularPeakTunner.hxx.
static double Simac::CircularPeakTunner::tune | ( | double | peakPosition, | |
double | shift | |||
) | [inline, static] |
Definition at line 86 of file CircularPeakTunner.hxx.
Referenced by chromagramToSemitone(), and doIt().
static double Simac::CircularPeakTunner::tunningShift | ( | double | reference, | |
double | tunning | |||
) | [inline, static] |
Definition at line 82 of file CircularPeakTunner.hxx.
Referenced by chromagramToSemitone(), and doIt().