matthiasm@0: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@9: matthiasm@0: /* Chris@9: pYIN - A fundamental frequency estimator for monophonic audio Chris@9: Centre for Digital Music, Queen Mary, University of London. Chris@9: Chris@9: This program is free software; you can redistribute it and/or Chris@9: modify it under the terms of the GNU General Public License as Chris@9: published by the Free Software Foundation; either version 2 of the Chris@9: License, or (at your option) any later version. See the file Chris@9: COPYING included with this distribution for more information. matthiasm@0: */ matthiasm@0: matthiasm@0: #ifndef _MONOPITCHHMM_H_ matthiasm@0: #define _MONOPITCHHMM_H_ matthiasm@0: matthiasm@0: #include "SparseHMM.h" matthiasm@0: matthiasm@0: #include matthiasm@0: matthiasm@0: #include matthiasm@0: #include matthiasm@0: matthiasm@0: using std::vector; matthiasm@0: matthiasm@0: class MonoPitchHMM : public SparseHMM matthiasm@0: { matthiasm@0: public: mail@132: MonoPitchHMM(int fixedLag); Chris@156: std::vector calculateObsProb(const vector > &); Chris@156: float nearestFreq(int state, const vector > &pitchProb); matthiasm@0: void build(); matthiasm@0: double m_minFreq; // 82.40689f/2 Chris@138: int m_nBPS; Chris@138: int m_nPitch; Chris@138: int m_transitionWidth; matthiasm@0: double m_selfTrans; matthiasm@0: double m_yinTrust; matthiasm@0: vector m_freqs; matthiasm@0: }; matthiasm@0: matthiasm@0: #endif