# HG changeset patch # User Chris Cannam # Date 1559827606 -3600 # Node ID 2adcd94c207985d88b5a46940b33a50c7ab91567 # Parent 3f0a96460c33a7c0b4f035f5fd656581fd05a205 Update test diff -r 3f0a96460c33 -r 2adcd94c2079 tests/TestGetKeyMode.cpp --- a/tests/TestGetKeyMode.cpp Thu Jun 06 14:20:53 2019 +0100 +++ b/tests/TestGetKeyMode.cpp Thu Jun 06 14:26:46 2019 +0100 @@ -70,16 +70,13 @@ for (int midiPitch = 48; midiPitch < 96; ++midiPitch) { - GetKeyMode gkm(sampleRate, concertA, 10, 10); + GetKeyMode::Config config(sampleRate, concertA); + GetKeyMode gkm(config); int blockSize = gkm.getBlockSize(); int hopSize = gkm.getHopSize(); double frequency = concertA * pow(2.0, (midiPitch - 69.0) / 12.0); -/* - cout << "midiPitch = " << midiPitch - << ", name = " << midiPitchName(midiPitch) - << ", frequency = " << frequency << endl; -*/ + int blocks = 4; int totalLength = blockSize * blocks; vector signal = generateSinusoid(frequency, sampleRate, @@ -103,9 +100,6 @@ if (minor) tonic -= 12; BOOST_CHECK_EQUAL(tonic, 1 + (midiPitch % 12)); - -// string name = keyName(tonic, minor); -// cout << "key value = " << key << ", name = " << name << endl; } }