Mercurial > hg > aubio-onset-detector
diff aubioOnsetDetectorOFvisualiser/src/testApp.cpp @ 5:eba88b84b5ca
added external, some code changes
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Mon, 22 Oct 2012 20:25:14 +0100 |
parents | fb106f14e0a4 |
children |
line wrap: on
line diff
--- a/aubioOnsetDetectorOFvisualiser/src/testApp.cpp Thu Oct 18 17:12:05 2012 +0100 +++ b/aubioOnsetDetectorOFvisualiser/src/testApp.cpp Mon Oct 22 20:25:14 2012 +0100 @@ -17,7 +17,6 @@ ofBackground( 30, 30, 130 ); - outputGraphics = false; maximumDetectionFunction = 20; @@ -51,8 +50,7 @@ //-------------------------------------------------------------- void testApp::update(){ -maxValue *= 0.995; - // hide old messages + maxValue *= 0.995; // check for waiting messages while( receiver.hasWaitingMessages() ) @@ -61,9 +59,6 @@ ofxOscMessage m; receiver.getNextMessage( &m ); - // unrecognized message: display on the bottom of the screen - // string msg_string; - // msg_string = m.getAddress(); if (m.getAddress() == "/aubioData" ){ if( m.getArgType( 0 ) == OFXOSC_TYPE_FLOAT ){ @@ -291,7 +286,7 @@ int Xindex = (onsetIndex-Xvalue) ; int previousIndex = (Xindex-1); - //below - Paule's processed onsets + //below - Paul's processed onsets ofSetColor(55,100,255); ofLine((int) (width*(amplitudeNumber - Xvalue - 1)), screenHeight - (scale_factor*(onsetFunction[previousIndex]- minimumValue)), @@ -302,10 +297,10 @@ ofCircle(width*(amplitudeNumber - Xvalue), screenHeight - (scale_factor*(onsetFunction[Xindex]- minimumValue)) , 3); } -//specDiffOnsets + //specDiffOnsets ofSetColor(55,100,55); - Xindex = (rawOnsetIndex-Xvalue) ; - previousIndex = (Xindex-1); + Xindex = (rawOnsetIndex-Xvalue); + previousIndex = (Xindex-1); ofLine((int) (width*(amplitudeNumber - Xvalue - 1)), screenHeight - (scale_factor*(rawOnsetFunction[previousIndex]- minimumValue)), (int) (width*(amplitudeNumber - Xvalue)), screenHeight - (scale_factor*(rawOnsetFunction[Xindex]- minimumValue)) ); @@ -320,10 +315,10 @@ - if (rawOnsetRecorded[Xindex] == true){ - ofSetColor(255,100,0); - ofCircle(width*(amplitudeNumber - Xvalue), screenHeight - (scale_factor*(rawOnsetFunction[Xindex]- minimumValue)) , 3); - } + if (rawOnsetRecorded[Xindex] == true){ + ofSetColor(255,100,0); + ofCircle(width*(amplitudeNumber - Xvalue), screenHeight - (scale_factor*(rawOnsetFunction[Xindex]- minimumValue)) , 3); + } //median onsets in red if (medianOnsetRecorded[Xindex] == true){ @@ -331,13 +326,6 @@ ofCircle(width*(amplitudeNumber - Xvalue), screenHeight - (scale_factor*(medianOnsetFunction[Xindex]- minimumValue)) , 3); } - - /* - if (medianOnsetRecorded[Xindex] == true){ - ofSetColor(255,0,0); - ofCircle(width*(amplitudeNumber - Xvalue), screenHeight - (scale_factor*(medianOnsetFunction[Xindex]- minimumValue)) , 3); - } - */ ofSetColor(255,100,0); }//end for Xvalue (across the recent observations of osc data)