Mercurial > hg > pyin
view MonoNote.h @ 5:af9d62ddab4c
improved note tracking
author | matthiasm |
---|---|
date | Wed, 27 Nov 2013 17:22:39 +0000 |
parents | 99bac62ee2da |
children | 5945b8905d1f |
line wrap: on
line source
#ifndef _MONONOTE_H_ #define _MONONOTE_H_ #include "MonoNoteHMM.h" #include "MonoNoteParameters.h" #include <iostream> #include <vector> #include <exception> using std::vector; using std::pair; class MonoNote { public: MonoNote(); virtual ~MonoNote(); struct FrameOutput { size_t frameNumber; double pitch; size_t noteState; // unvoiced, attack, stable, release, inter FrameOutput() : frameNumber(0), pitch(-1.0), noteState(0) { } FrameOutput(size_t _frameNumber, double _pitch, size_t _noteState) : frameNumber(_frameNumber), pitch(_pitch), noteState(_noteState) { } }; // pitchProb is a frame-wise vector carrying a vector of pitch-probability pairs const vector<FrameOutput> process(const vector<vector<pair<double, double> > > pitchProb); private: MonoNoteHMM hmm; }; #endif