Simac::CircularPeakTunner Class Reference

#include <CircularPeakTunner.hxx>

List of all members.


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.


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)

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().

static double Simac::CircularPeakTunner::tunningShift ( double  reference,
double  tunning 
) [inline, static]

Definition at line 82 of file CircularPeakTunner.hxx.

Referenced by chromagramToSemitone(), and doIt().

static double Simac::CircularPeakTunner::tune ( double  peakPosition,
double  shift 
) [inline, static]

Definition at line 86 of file CircularPeakTunner.hxx.

Referenced by chromagramToSemitone(), and doIt().

void Simac::CircularPeakTunner::doIt ( double  center,
const PeakList peaks 
) [inline]

Definition at line 94 of file CircularPeakTunner.hxx.

References tune(), and tunningShift().

Referenced by Simac::ChordExtractor::doIt().

const PeakList& Simac::CircularPeakTunner::output (  )  const [inline]

Definition at line 106 of file CircularPeakTunner.hxx.

Referenced by Simac::ChordExtractor::doIt().


The documentation for this class was generated from the following file:

Generated on Tue Aug 12 22:33:51 2008 for CLAM by  doxygen 1.5.5