From c04e7f6f335bbcf275aa72afd86e5a3e36ec77bb Mon Sep 17 00:00:00 2001 From: jvoigts <jvoigts@mit.edu> Date: Sun, 16 Jun 2013 19:21:04 -0400 Subject: [PATCH] slightly modified phasedetecor behaviour Skip this commit to avoid changing current behaviour --- Source/Processors/PhaseDetector.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Source/Processors/PhaseDetector.cpp b/Source/Processors/PhaseDetector.cpp index 0cf973e0b..2a2e149b0 100644 --- a/Source/Processors/PhaseDetector.cpp +++ b/Source/Processors/PhaseDetector.cpp @@ -149,9 +149,13 @@ void PhaseDetector::process(AudioSampleBuffer& buffer, numPeakIntervals++; + + //std::cout << "GOT EVENT." << std::endl; + // entering falling phase (just reached peak or trough) - if (true) - addEvent(events, TTL, i, 1, 3); + //if (true) + addEvent(events, TTL, i, 1, 3); + peakIntervals[numPeakIntervals % NUM_INTERVALS] = nSamplesSinceLastPeak; @@ -168,10 +172,10 @@ void PhaseDetector::process(AudioSampleBuffer& buffer, // either rising or falling nSamplesSinceLastPeak++; - // if (nSamplesSinceLastPeak == 100) - // { - // addEvent(events, TTL, i, 0, 3); - // } + if (nSamplesSinceLastPeak == 500) + { + addEvent(events, TTL, i, 0, 3); + } } -- GitLab