comparison src/EM.cpp @ 150:d2bc51cc7f57

Some comments on things to try next...
author Chris Cannam
date Wed, 14 May 2014 18:09:06 +0100
parents f25b8e7de0ed
children fc06b6f33021
comparison
equal deleted inserted replaced
149:315986140a70 150:d2bc51cc7f57
37 m_noteCount(SILVET_TEMPLATE_NOTE_COUNT), 37 m_noteCount(SILVET_TEMPLATE_NOTE_COUNT),
38 m_shiftCount(useShifts ? SILVET_TEMPLATE_MAX_SHIFT * 2 + 1 : 1), 38 m_shiftCount(useShifts ? SILVET_TEMPLATE_MAX_SHIFT * 2 + 1 : 1),
39 m_binCount(SILVET_TEMPLATE_HEIGHT), 39 m_binCount(SILVET_TEMPLATE_HEIGHT),
40 m_sourceCount(SILVET_TEMPLATE_COUNT), 40 m_sourceCount(SILVET_TEMPLATE_COUNT),
41 m_pitchSparsity(1.1), 41 m_pitchSparsity(1.1),
42 //!!! note: slightly less source sparsity might help; also
43 //!!! consider a modest shift sparsity e.g. 1.1
42 m_sourceSparsity(1.3), 44 m_sourceSparsity(1.3),
43 m_lowestPitch(silvet_templates_lowest_note), 45 m_lowestPitch(silvet_templates_lowest_note),
44 m_highestPitch(silvet_templates_highest_note) 46 m_highestPitch(silvet_templates_highest_note)
45 { 47 {
46 m_pitches = allocate<double>(m_noteCount); 48 m_pitches = allocate<double>(m_noteCount);
178 v_add_with_gain(m_estimate, w, factor, m_binCount); 180 v_add_with_gain(m_estimate, w, factor, m_binCount);
179 } 181 }
180 } 182 }
181 } 183 }
182 184
185 //!!! try normalising so as to sum to unity and then taking L2
186 //!!! norm of the two (for measure of how close they are)
187
183 for (int i = 0; i < m_binCount; ++i) { 188 for (int i = 0; i < m_binCount; ++i) {
184 m_q[i] = column[i] / m_estimate[i]; 189 m_q[i] = column[i] / m_estimate[i];
185 } 190 }
186 } 191 }
187 192