From: Paul Brossier Date: Fri, 30 Oct 2015 15:58:08 +0000 (+0100) Subject: example_aubioDemo/: update pitch only if not null X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=8f943e7eb29bae438f7e27b4c1e884744043f092;p=ofxAubio.git example_aubioDemo/: update pitch only if not null --- diff --git a/example_aubioDemo/src/ofApp.cpp b/example_aubioDemo/src/ofApp.cpp index 16b7ba4..5b80bb6 100644 --- a/example_aubioDemo/src/ofApp.cpp +++ b/example_aubioDemo/src/ofApp.cpp @@ -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