example_aubioDemo/: update pitch only if not null
authorPaul Brossier <piem@piem.org>
Fri, 30 Oct 2015 15:58:08 +0000 (16:58 +0100)
committerPaul Brossier <piem@piem.org>
Fri, 30 Oct 2015 15:58:08 +0000 (16:58 +0100)
example_aubioDemo/src/ofApp.cpp

index 16b7ba4..5b80bb6 100644 (file)
@@ -100,7 +100,7 @@ void ofApp::draw(){
 
     // update pitch info
     pitchConfidence = pitch.pitchConfidence;
-    if (pitchConfidence > 0.7) midiPitch = pitch.latestPitch;
+    if (pitch.latestPitch) midiPitch = pitch.latestPitch;
     bpm = beat.bpm;
 
     // draw