annotate MonoNote.h @ 0:99bac62ee2da

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