# HG changeset patch # User Chris Cannam # Date 1380801811 -3600 # Node ID b0e98fcfacd7757bb294b8d05b11e32e8c339424 # Parent 2020c73dc9971d3ae73a506e5755352471409dc7 Comments diff -r 2020c73dc997 -r b0e98fcfacd7 dsp/onsets/DetectionFunction.cpp --- a/dsp/onsets/DetectionFunction.cpp Thu Oct 03 12:58:36 2013 +0100 +++ b/dsp/onsets/DetectionFunction.cpp Thu Oct 03 13:03:31 2013 +0100 @@ -160,6 +160,10 @@ break; case DF_PHASEDEV: + // Using the instantaneous phases here actually provides the + // same results (for these calculations) as if we had used + // unwrapped phases, but without the possible accumulation of + // phase error over time retVal = phaseDev( m_halfLength, m_thetaAngle); break; diff -r 2020c73dc997 -r b0e98fcfacd7 tests/TestPhaseVocoder.cpp --- a/tests/TestPhaseVocoder.cpp Thu Oct 03 12:58:36 2013 +0100 +++ b/tests/TestPhaseVocoder.cpp Thu Oct 03 13:03:31 2013 +0100 @@ -146,8 +146,6 @@ double magExpected1[] = { 999, 0, 4, 4, 0, 0, 999 }; COMPARE_ARRAY(mag, magExpected1); - //!!! I don't know why [2] here is -M_PI and not M_PI; and I definitely don't know why [4] here is M_PI. Check these with care - // Derivation of unwrapped values: // // * Bin 0 (DC) always has phase 0 and expected phase 0