diff options
Diffstat (limited to 'gistanalysis/src/ofApp.cpp')
| -rw-r--r-- | gistanalysis/src/ofApp.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gistanalysis/src/ofApp.cpp b/gistanalysis/src/ofApp.cpp index 1ee92d1..cf3240c 100644 --- a/gistanalysis/src/ofApp.cpp +++ b/gistanalysis/src/ofApp.cpp @@ -49,6 +49,8 @@ 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(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(scalePlot.set("scale plot", 0.1f, 0.0f, 1.0f )); @@ -56,7 +58,8 @@ void ofApp::setup(){ 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))); /* //add special crest graph @@ -123,6 +126,9 @@ void ofApp::updateOutput(ofEventArgs& e){ 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); } } @@ -152,6 +158,8 @@ void ofApp::updateOutput(ofEventArgs& e){ if (mfccSmoothed[f] < mfcc[i] || damping >.999f){ mfccSmoothed[f] = mfcc[i]; } + + // let the smoothed value sink to zero: mfccSmoothed[i] *= damping; f++; @@ -289,7 +297,7 @@ void ofApp::drawOutput(ofEventArgs & args){ ofMatrix4x4 t; t.makeTranslationMatrix(xform->x,xform->y,0); ofMatrix4x4 r; - r.makeRotationMatrix(rotate,ofVec3f(0,1,0)); + r.makeRotationMatrix(rotate,ofVec3f(0,1,07)); ofMatrix4x4 s; r.makeScaleMatrix(scale->x,scale->y,1.0f); |
