Mercurial > hg > qm-dsp
comparison dsp/keydetection/GetKeyMode.cpp @ 283:5e125f030287
* Fixes to problems shown up by vamp-plugin-tester.
Still not all plugins pass all tests, though
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 23 Mar 2009 16:28:53 +0000 |
parents | 330c2e11f8a9 |
children | dcb555b90924 |
comparison
equal
deleted
inserted
replaced
282:2703b3437aee | 283:5e125f030287 |
---|---|
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); |