Mercurial > hg > pyin
comparison MonoNote.h @ 0:99bac62ee2da
added PYIN sources, should be compileable
author | matthiasm |
---|---|
date | Wed, 27 Nov 2013 11:59:49 +0000 |
parents | |
children | 5945b8905d1f |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:99bac62ee2da |
---|---|
1 #ifndef _MONONOTE_H_ | |
2 #define _MONONOTE_H_ | |
3 | |
4 #include "MonoNoteHMM.h" | |
5 #include "MonoNoteParameters.h" | |
6 | |
7 #include <iostream> | |
8 #include <vector> | |
9 #include <exception> | |
10 | |
11 using std::vector; | |
12 using std::pair; | |
13 | |
14 class MonoNote { | |
15 public: | |
16 MonoNote(); | |
17 virtual ~MonoNote(); | |
18 | |
19 struct FrameOutput { | |
20 size_t frameNumber; | |
21 double pitch; | |
22 size_t noteState; // unvoiced, attack, stable, release, inter | |
23 FrameOutput() : frameNumber(0), pitch(-1.0), noteState(0) { } | |
24 FrameOutput(size_t _frameNumber, double _pitch, size_t _noteState) : | |
25 frameNumber(_frameNumber), pitch(_pitch), noteState(_noteState) { } | |
26 }; | |
27 // pitchProb is a frame-wise vector carrying a vector of pitch-probability pairs | |
28 const vector<FrameOutput> process(const vector<vector<pair<double, double> > > pitchProb); | |
29 private: | |
30 MonoNoteHMM hmm; | |
31 }; | |
32 | |
33 #endif |