Mercurial > hg > pyin
view MonoNoteHMM.h @ 4:3cf34d0effed
Ensure that parameters are initialised with their default values; avoid crashing on empty input (both flagged by vamp-plugin-tester)
author | Chris Cannam |
---|---|
date | Thu, 28 Nov 2013 13:08:57 +0000 |
parents | 99bac62ee2da |
children | 5945b8905d1f |
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* This file is Copyright (c) 2012 Matthias Mauch */ #ifndef _MONONOTEHMM_H_ #define _MONONOTEHMM_H_ #include "MonoNoteParameters.h" #include "SparseHMM.h" #include <boost/math/distributions.hpp> #include <vector> #include <cstdio> using std::vector; class MonoNoteHMM : public SparseHMM { public: MonoNoteHMM(); const std::vector<double> calculateObsProb(const vector<pair<double, double> >); double getMidiPitch(size_t index); double getFrequency(size_t index); void build(); MonoNoteParameters par; vector<boost::math::normal> pitchDistr; }; #endif