comparison dsp/keydetection/GetKeyMode.cpp @ 58:d72fcd34d9a7

* Fixes to problems shown up by vamp-plugin-tester. Still not all plugins pass all tests, though
author cannam
date Mon, 23 Mar 2009 16:28:53 +0000
parents 38bf09927942
children dcb555b90924
comparison
equal deleted inserted replaced
57:d241e7701c0c 58:d72fcd34d9a7
50 m_DecimationFactor = 8; 50 m_DecimationFactor = 8;
51 51
52 // Chromagram configuration parameters 52 // Chromagram configuration parameters
53 m_ChromaConfig.normalise = MathUtilities::NormaliseUnitMax; 53 m_ChromaConfig.normalise = MathUtilities::NormaliseUnitMax;
54 m_ChromaConfig.FS = lrint(sampleRate/(double)m_DecimationFactor); 54 m_ChromaConfig.FS = lrint(sampleRate/(double)m_DecimationFactor);
55 if (m_ChromaConfig.FS < 1) m_ChromaConfig.FS = 1;
55 56
56 // Set C (= MIDI #12) as our base : 57 // Set C (= MIDI #12) as our base :
57 // This implies that key = 1 => Cmaj, key = 12 => Bmaj, key = 13 => Cmin, etc. 58 // This implies that key = 1 => Cmaj, key = 12 => Bmaj, key = 13 => Cmin, etc.
58 m_ChromaConfig.min = Pitch::getFrequencyForPitch 59 m_ChromaConfig.min = Pitch::getFrequencyForPitch
59 (48, 0, tuningFrequency); 60 (48, 0, tuningFrequency);