Mercurial > hg > pyin
comparison MonoPitchHMM.cpp @ 65:16129c3b1cf5 tony
more severe cut-down on probability if quiet
author | matthiasm |
---|---|
date | Wed, 02 Apr 2014 17:35:37 +0100 |
parents | b39d6745c596 |
children | 7ef7f6e90966 |
comparison
equal
deleted
inserted
replaced
60:60eb8771d340 | 65:16129c3b1cf5 |
---|---|
20 | 20 |
21 using std::vector; | 21 using std::vector; |
22 using std::pair; | 22 using std::pair; |
23 | 23 |
24 MonoPitchHMM::MonoPitchHMM() : | 24 MonoPitchHMM::MonoPitchHMM() : |
25 m_minFreq(77.782), // e flat 2 | 25 m_minFreq(61.735), // b 1 |
26 // m_minFreq(110), | 26 // m_minFreq(110), |
27 m_nBPS(5), | 27 m_nBPS(5), |
28 m_nPitch(0), | 28 m_nPitch(0), |
29 m_transitionWidth(0), | 29 m_transitionWidth(0), |
30 m_selfTrans(0.99), | 30 m_selfTrans(0.99), |
31 m_yinTrust(.5), | 31 m_yinTrust(.5), |
32 m_freqs(0) | 32 m_freqs(0) |
33 { | 33 { |
34 m_transitionWidth = 9*(m_nBPS/2) + 1; | 34 m_transitionWidth = 9*(m_nBPS/2) + 1; |
35 m_nPitch = 64 * m_nBPS; | 35 m_nPitch = 69 * m_nBPS; |
36 m_freqs = vector<double>(2*m_nPitch); | 36 m_freqs = vector<double>(2*m_nPitch); |
37 for (size_t iPitch = 0; iPitch < m_nPitch; ++iPitch) | 37 for (size_t iPitch = 0; iPitch < m_nPitch; ++iPitch) |
38 { | 38 { |
39 m_freqs[iPitch] = m_minFreq * std::pow(2, iPitch * 1.0 / (12 * m_nBPS)); | 39 m_freqs[iPitch] = m_minFreq * std::pow(2, iPitch * 1.0 / (12 * m_nBPS)); |
40 m_freqs[iPitch+m_nPitch] = -m_freqs[iPitch]; | 40 m_freqs[iPitch+m_nPitch] = -m_freqs[iPitch]; |