Simac::CircularPeakTunner Class Reference

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>

List of all members.

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 PeakListoutput () const

Static Public Member Functions

static double tunningShift (double reference, double tunning)
static double tune (double peakPosition, double shift)

Detailed Description

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.

Todo:
be more explicit on the meaning of reference tunning.

Definition at line 41 of file CircularPeakTunner.hxx.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

unsigned Simac::CircularPeakTunner::chromagramToSemitone ( double  tunning,
double  peakPosition 
) [inline]
Todo:
Migrate this function tests to one bin per semitone Given a tunning (in chromogram bins) and a peak position, it returns the semitone pitch index being the zero semitone the one containing the reference tunning.
Parameters:
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().


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.3