Mercurial > hg > qm-dsp
changeset 345:04d134031a15
Comments
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 03 Oct 2013 13:03:31 +0100 |
parents | 5eb9c2387108 |
children | 58ba20857a5e |
files | dsp/onsets/DetectionFunction.cpp tests/TestPhaseVocoder.cpp |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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