Mercurial > hg > silvet
comparison src/Silvet.cpp @ 154:c6b6d6ea1c3d
Processing parameters. Main difference is use of atomHopFactor of 0.3 instead of 0.25
author | Chris Cannam |
---|---|
date | Fri, 16 May 2014 10:12:55 +0100 |
parents | 74f14efe032f |
children | e1ebbae52cff |
comparison
equal
deleted
inserted
replaced
153:5899ebc40fcd | 154:c6b6d6ea1c3d |
---|---|
323 m_resampler = new Resampler(m_inputSampleRate, processingSampleRate); | 323 m_resampler = new Resampler(m_inputSampleRate, processingSampleRate); |
324 } else { | 324 } else { |
325 m_resampler = 0; | 325 m_resampler = 0; |
326 } | 326 } |
327 | 327 |
328 m_cq = new CQSpectrogram | 328 CQParameters params(processingSampleRate, |
329 (processingSampleRate, 27.5, processingSampleRate / 3, processingBPO, | 329 27.5, |
330 CQSpectrogram::InterpolateLinear); | 330 processingSampleRate / 3, |
331 processingBPO); | |
332 | |
333 params.q = 1.0; // MIREX code uses 0.8, but for some reason that | |
334 // makes our implementation much, much slower | |
335 params.atomHopFactor = 0.3; | |
336 params.threshold = 0.0005; | |
337 params.window = CQParameters::Hann; | |
338 | |
339 m_cq = new CQSpectrogram(params, CQSpectrogram::InterpolateLinear); | |
331 | 340 |
332 for (int i = 0; i < (int)m_postFilter.size(); ++i) { | 341 for (int i = 0; i < (int)m_postFilter.size(); ++i) { |
333 delete m_postFilter[i]; | 342 delete m_postFilter[i]; |
334 } | 343 } |
335 m_postFilter.clear(); | 344 m_postFilter.clear(); |
547 | 556 |
548 int polyphony = 5; | 557 int polyphony = 5; |
549 | 558 |
550 //!!! make this a parameter (was 4.8, try adjusting, compare levels against matlab code) | 559 //!!! make this a parameter (was 4.8, try adjusting, compare levels against matlab code) |
551 double threshold = 6; | 560 double threshold = 6; |
561 // double threshold = 4.8; | |
552 | 562 |
553 typedef std::multimap<double, int> ValueIndexMap; | 563 typedef std::multimap<double, int> ValueIndexMap; |
554 | 564 |
555 ValueIndexMap strengths; | 565 ValueIndexMap strengths; |
556 for (int j = 0; j < processingNotes; ++j) { | 566 for (int j = 0; j < processingNotes; ++j) { |