diff options
| author | Tim Redfern <tim@getdrop.com> | 2018-05-24 22:02:36 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2018-05-24 22:02:36 +0100 |
| commit | 404ae5da503cb6856b73b2638abb8785f6c47f6d (patch) | |
| tree | ebdb680f31229d5932a5516a5573fb5dc9a4943d /gistanalysis/src/ofApp.cpp | |
| parent | 5d13e1e25db4bc1627873485d1164e641f6ef19f (diff) | |
can draw dots
Diffstat (limited to 'gistanalysis/src/ofApp.cpp')
| -rw-r--r-- | gistanalysis/src/ofApp.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gistanalysis/src/ofApp.cpp b/gistanalysis/src/ofApp.cpp index ab5f374..59e7bdd 100644 --- a/gistanalysis/src/ofApp.cpp +++ b/gistanalysis/src/ofApp.cpp @@ -17,9 +17,7 @@ void ofApp::setup(){ bufferSize = 512; sampleRate = 44100; - - - + useMic = 1; isPaused = 0; @@ -49,6 +47,7 @@ void ofApp::setup(){ gui.setup("panel"); // most of the time you don't need a name but don't forget to call setup + gui.add(joined.set("joined",true)); gui.add(numPlots.set("num plots", 50, 1, 256)); gui.add(scalePlot.set( "scale plot", 0.1f, 0.0f, 1.0f )); gui.add(decayPlot.set( "decay", 0.9f, 0.0f, 1.0f )); @@ -71,7 +70,7 @@ void ofApp::setup(){ ofAddListener(GistEvent::ON,this,&ofApp::onNoteOn); ofAddListener(GistEvent::OFF,this,&ofApp::onNoteOff); - + noteOnRadius = 0; @@ -278,11 +277,14 @@ void ofApp::drawOutput(ofEventArgs & args){ } */ + + plotter.set_joined(joined); + ofMatrix4x4 _xform; _xform.makeTranslationMatrix(xform->x,xform->y,0); - auto lines=plotter.output(_xform,scalePlot,decayPlot); - laser.draw(lines,30); + vector <colourPolyline> lines=plotter.output(_xform,scalePlot,decayPlot); + int num=laser.draw(lines,30); ofTranslate(0,ofGetHeight()/2); @@ -290,7 +292,7 @@ void ofApp::drawOutput(ofEventArgs & args){ line->draw(); } - ofSetWindowTitle(ofToString(ofGetFrameRate())+" fps, "+ofToString(plotter.numpoints())+" pts"); + ofSetWindowTitle(ofToString(ofGetFrameRate())+" fps, "+ofToString(num)+" pts"); } //-------------------------------------------------------------- |
