diff options
| author | Tim Redfern <tim@getdrop.com> | 2018-05-29 23:38:41 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2018-05-29 23:38:41 +0100 |
| commit | 347ff04d88cb01fb10eb26513031c03665e0068c (patch) | |
| tree | 67eaf2706c1fb1177b33a7129a0b259661ce5ab5 /gistanalysis/src/ofApp.cpp | |
| parent | efd0d6840649caf02f7b242a505bcae3bc7aa986 (diff) | |
some chaos
Diffstat (limited to 'gistanalysis/src/ofApp.cpp')
| -rw-r--r-- | gistanalysis/src/ofApp.cpp | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/gistanalysis/src/ofApp.cpp b/gistanalysis/src/ofApp.cpp index cf3240c..bc3ec34 100644 --- a/gistanalysis/src/ofApp.cpp +++ b/gistanalysis/src/ofApp.cpp @@ -45,22 +45,29 @@ void ofApp::setup(){ mfccPlots.push_back(graph); } - - gui.setup("panel"); // most of the time you don't need a name but don't forget to call setup + plotter.setup(5,true); + + gui.setup("transform"); // most of the time you don't need a name but don't forget to call setup gui.add(fft.set("fft",false)); - gui.add(joined.set("joined",true)); - gui.add(bars.set("bars",true)); - gui.add(capWidth.set("point width", 2, 1, 256)); - gui.add(numPoints.set("num points", 50, 1, 256)); - gui.add(numPlots.set("num plots", 5, 1, 100)); + gui.add(plotter.joined.set("joined",true)); + gui.add(plotter.bars.set("bars",true)); + gui.add(plotter.width.set("point width", 2, 1, 256)); + gui.add(plotter.num_points.set("num points", 50, 1, 256)); + gui.add(plotter.history_size.set("num plots", 5, 1, 100)); gui.add(scalePlot.set("scale plot", 0.1f, 0.0f, 1.0f )); gui.add(decayPlot.set("decay", 0.9f, 0.0f, 1.0f )); gui.add(xform.set("xform",ofVec2f(0,0),ofVec2f(-50,-50),ofVec2f(50,50))); gui.add(rotate.set("rotate", 0.0f, -30.0f, 30.0f )); gui.add(scale.set("scale",ofVec2f(1.0f,1.0f),ofVec2f(0.5f,0.5f),ofVec2f(2.0f,2.0f))); - gui.add(startColour.set("start",ofColor(255,255,255))); - gui.add(endColour.set("end",ofColor(0,0,0))); - + gui.add(plotter.startColour.set("start",ofColor(255,255,255))); + gui.add(plotter.endColour.set("end",ofColor(0,0,0))); + + + + chaosgui.setup("chaos","",230,10); // most of the time you don't need a name but don't forget to call setup + chaosgui.add(plotter.usechaos.set("use",false)); + chaosgui.add(plotter.chaosamount.set("amount", 0.5f, 0.0f, 1.0f)); + /* //add special crest graph ofxHistoryPlot*crest = addGraph("CREST_AVG",1.0,ofColor(ofRandom(100)+150,ofRandom(100)+150,ofRandom(100)+150)); @@ -88,7 +95,7 @@ void ofApp::setup(){ loadSong("passades/1 The Ninth Set-sector1:sector2pt.1.aiff"); //loadSong("assets/sounds/Coltrane_acc_VUIMM.wav"); - plotter=Audioplotter(5,true); + laser.set_pts(MAX_POINTS); laser.set_intensity(LASER_INTENSITY); @@ -124,12 +131,7 @@ void ofApp::updateOutput(ofEventArgs& e){ processAudio(&output[0], bufferSize, 2); fftSmoothed = player.getFFT(); - plotter.set_joined(joined); - plotter.set_size(numPlots); - plotter.set_width(capWidth); - plotter.set_bars(bars); - plotter.set_colours(startColour.get(),endColour.get()); - plotter.addpoints(fft?fftSmoothed:centre,numPoints); + plotter.addpoints(fft?fftSmoothed:centre); } } @@ -192,6 +194,7 @@ void ofApp::updateOutput(ofEventArgs& e){ void ofApp::draw(){ ofBackground(0); gui.draw(); + chaosgui.draw(); } //-------------------------------------------------------------- void ofApp::drawOutput(ofEventArgs & args){ |
