Mercurial > hg > qm-vamp-plugins
comparison plugins/SimilarityPlugin.cpp @ 53:3f8b9ae44f92
* remove some debug output
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 30 Jan 2008 14:33:44 +0000 |
parents | 4fe04e706839 |
children | ee9d180a5ad6 |
comparison
equal
deleted
inserted
replaced
52:4fe04e706839 | 53:3f8b9ae44f92 |
---|---|
166 config.logpower = 1; | 166 config.logpower = 1; |
167 m_mfcc = new MFCC(config); | 167 m_mfcc = new MFCC(config); |
168 m_fftSize = m_mfcc->getfftlength(); | 168 m_fftSize = m_mfcc->getfftlength(); |
169 m_rhythmClipFrameSize = m_fftSize / 4; | 169 m_rhythmClipFrameSize = m_fftSize / 4; |
170 | 170 |
171 std::cerr << "MFCC FS = " << config.FS << ", FFT size = " << m_fftSize<< std::endl; | 171 // std::cerr << "MFCC FS = " << config.FS << ", FFT size = " << m_fftSize<< std::endl; |
172 | 172 |
173 } else if (m_type == TypeChroma) { | 173 } else if (m_type == TypeChroma) { |
174 | 174 |
175 m_featureColumnSize = 12; | 175 m_featureColumnSize = 12; |
176 | 176 |
184 // we normalise the mean at the end instead | 184 // we normalise the mean at the end instead |
185 config.normalise = MathUtilities::NormaliseNone; | 185 config.normalise = MathUtilities::NormaliseNone; |
186 m_chromagram = new Chromagram(config); | 186 m_chromagram = new Chromagram(config); |
187 m_fftSize = m_chromagram->getFrameSize(); | 187 m_fftSize = m_chromagram->getFrameSize(); |
188 | 188 |
189 std::cerr << "fftsize = " << m_fftSize << std::endl; | 189 // std::cerr << "fftsize = " << m_fftSize << std::endl; |
190 | 190 |
191 m_rhythmClipFrameSize = m_fftSize / 16; | 191 m_rhythmClipFrameSize = m_fftSize / 16; |
192 while (m_rhythmClipFrameSize < 512) m_rhythmClipFrameSize *= 2; | 192 while (m_rhythmClipFrameSize < 512) m_rhythmClipFrameSize *= 2; |
193 std::cerr << "m_rhythmClipFrameSize = " << m_rhythmClipFrameSize << std::endl; | 193 // std::cerr << "m_rhythmClipFrameSize = " << m_rhythmClipFrameSize << std::endl; |
194 | 194 |
195 std::cerr << "min = "<< config.min << ", max = " << config.max << std::endl; | 195 // std::cerr << "min = "<< config.min << ", max = " << config.max << std::endl; |
196 | 196 |
197 } else { | 197 } else { |
198 | 198 |
199 std::cerr << "SimilarityPlugin::initialise: internal error: unknown type " << m_type << std::endl; | 199 std::cerr << "SimilarityPlugin::initialise: internal error: unknown type " << m_type << std::endl; |
200 return false; | 200 return false; |
578 if (current - m_rhythmClipDuration < m_rhythmClipOrigin) { | 578 if (current - m_rhythmClipDuration < m_rhythmClipOrigin) { |
579 needRhythmFrame = true; | 579 needRhythmFrame = true; |
580 m_rhythmValues[c].pop_front(); | 580 m_rhythmValues[c].pop_front(); |
581 } | 581 } |
582 | 582 |
583 if (needRhythmFrame) { | 583 // if (needRhythmFrame) { |
584 std::cerr << "at current = " <<current << " (frame = " << m_frameNo << "), have " << m_rhythmValues[c].size() << ", need rhythm = " << needRhythmFrame << std::endl; | 584 // std::cerr << "at current = " <<current << " (frame = " << m_frameNo << "), have " << m_rhythmValues[c].size() << ", need rhythm = " << needRhythmFrame << std::endl; |
585 } | 585 // } |
586 | 586 |
587 } | 587 } |
588 | 588 |
589 if (needRhythmFrame) { | 589 if (needRhythmFrame) { |
590 | 590 |
604 } | 604 } |
605 } | 605 } |
606 } | 606 } |
607 | 607 |
608 if (!needTimbre() && !someRhythmFrameNeeded && ((m_frameNo % 2) == 0)) { | 608 if (!needTimbre() && !someRhythmFrameNeeded && ((m_frameNo % 2) == 0)) { |
609 std::cerr << "done!" << std::endl; | 609 // std::cerr << "done!" << std::endl; |
610 m_done = true; | 610 m_done = true; |
611 } | 611 } |
612 | 612 |
613 if (m_decimator) delete[] decbuf; | 613 if (m_decimator) delete[] decbuf; |
614 delete[] dblbuf; | 614 delete[] dblbuf; |