diff options
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/AudioPlotter.cpp | 5 | ||||
| -rw-r--r-- | gui/src/chaoslib.h | 8 | ||||
| -rw-r--r-- | gui/src/ofApp.cpp | 24 |
3 files changed, 28 insertions, 9 deletions
diff --git a/gui/src/AudioPlotter.cpp b/gui/src/AudioPlotter.cpp index 7c775fa..3c43a5d 100644 --- a/gui/src/AudioPlotter.cpp +++ b/gui/src/AudioPlotter.cpp @@ -39,8 +39,11 @@ vector <colourPolyline> Audioplotter::output(float plotscale,float plotdecay){ line.setColour((line.getColourAt(0)*fadefactor)+(((ofColor)endColour)*(1.0f-fadefactor))); if (usechaos) { + colourPolyline chaosline=compute_chaos(line); //,fadefactor); - line.mix(chaosline,chaosamount); + ofLog() << "computing chaos at "<<chaosamount<<" in: "<<line.size()<<" out: "<<chaosline.size()<<" point 0:"<<line[0].x<<","<<line[0].y; + line.mix(chaosline,chaosamount); //chaos + } diff --git a/gui/src/chaoslib.h b/gui/src/chaoslib.h index 159b22b..e4a08ae 100644 --- a/gui/src/chaoslib.h +++ b/gui/src/chaoslib.h @@ -120,14 +120,14 @@ class chaosPanel : public ofxPanel { } bool keyPressed(ofKeyEventArgs & args){ if (isSelected){ - //ofLog()<<"KEY> "<<args.key; + //ofLog()<<"chaos KEY> "<<args.key; switch(args.key){ - case 3812:{ + case 3680:{ //812:{ chaosloader.previous(); update_sliders(); break; } - case 3814:{ + case 3681:{ //814:{ chaosloader.next(); update_sliders(); break; @@ -174,7 +174,7 @@ class chaosPanel : public ofxPanel { } } } - colourPolyline compute_chaos(colourPolyline& poly){ + colourPolyline compute_chaos(const colourPolyline& poly){ float chaosscale=1.0f; colourPolyline tempPoly; for (int i=0;i<poly.size();i++){ diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp index 2b7a9e1..1683057 100644 --- a/gui/src/ofApp.cpp +++ b/gui/src/ofApp.cpp @@ -3,9 +3,18 @@ const ofPoint outputWindowSize=ofPoint(1200,900); const float guiScale=560.0f/4096.0f; - - -string sourcenames[6 ]={ +const char keysDescription[]="\ +` toggle position interface\n\ +q source <\n\ +p source >\n\ +w toggle frame\n\ +d default settings\n\ +s save settings\n\ +rshift next plugin\n\ +lshift prev plugin"; + + +string sourcenames[6]={ "TEST", // "NDI", "Player", @@ -490,6 +499,8 @@ void ofApp::draw(){ ofSetColor(255); ofNoFill(); + ofDrawBitmapString(keysDescription, ofGetWidth()-200, ofGetHeight()-150); + if (bShowPositionInterface){ glPushMatrix(); @@ -832,6 +843,11 @@ void ofApp::drawOutput(ofEventArgs & args){ 0.0f,1.0f,0.0f,0.0f, 0.0f,0.0f,1.0f,0.0f, 0.0f,0.0f,0.0f,1.0f); + // added Sept 29 2022 trying to resurrect this + // does SOMETHING and the num of points remains correct + plotter.usechaos=chaosgui.active; + plotter.chaosamount=chaosgui.amount; + // polyOutput=plotter.output(scalePlot,decayPlot); break; } @@ -999,7 +1015,7 @@ void ofApp::outputKeyPressed(ofKeyEventArgs &args){ keyPressed(args); -} +} void ofApp::keyPressed(ofKeyEventArgs &args){ if (args.key==OF_KEY_COMMAND){ |
