summaryrefslogtreecommitdiff
path: root/gui/src/ofApp.h
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/ofApp.h')
-rw-r--r--gui/src/ofApp.h107
1 files changed, 20 insertions, 87 deletions
diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h
index 128dd05..3d9a646 100644
--- a/gui/src/ofApp.h
+++ b/gui/src/ofApp.h
@@ -1,4 +1,4 @@
- #pragma once
+#pragma once
#include "ofMain.h"
@@ -26,6 +26,25 @@
#include "ofxHistoryPlot.h"
#include "Audioplotter.h"
+/*
+doing the show
+
+projection mapping * drawing
+draw shapes into the space and save them in sets
+use them to draw lines, expand and contract outline
+use them to mask geometric and random drawn styles
+have some kind of audioreactivity
+an interface flexible enough to enable making a show on the fly
+
+plugin architecture for vector generators and effects
+
+polylines in
+polylines out
+masking
+audio
+
+*/
+
enum Source{
TEST,
// NDI,
@@ -37,93 +56,7 @@ enum Source{
};
-class chaosPanel : public ofxPanel {
- public:
- chaosPanel(){
- ofRegisterKeyEvents(this, defaultEventsPriority);
- }
- bool isSelected;
- ofParameter<bool> active;
- ofParameter<float> amount;
- ofParameter<float> scale; //?per plugin??
- bool mouseMoved(ofMouseEventArgs & args){
- if (args.x>getPosition().x&&
- args.x-getPosition().x<getWidth()&&
- args.y>getPosition().y&&
- args.y-getPosition().y<getHeight()){
- if (!isSelected){
- isSelected=true;
- setBorderColor(ofColor(255,128,0));
- //ofLog()<<"IN> "<<args.x<<","<<args.y;
- }
- }
- else {
- if (isSelected){
- isSelected=false;
- setBorderColor(ofColor(0,0,0));
- //ofLog()<<"OUT> "<<args.x<<","<<args.y;
- }
- }
- }
- bool keyPressed(ofKeyEventArgs & args){
- if (isSelected){
- //ofLog()<<"KEY> "<<args.key;
- switch(args.key){
- case 3812:{
- chaosloader.previous();
- update_sliders();
- break;
- }
- case 3814:{
- chaosloader.next();
- update_sliders();
- break;
- }
- }
- }
- }
- bool keyReleased(ofKeyEventArgs & args){
- //required in order to call ofRegisterKeyEvents
- }
- //this is a bit tangled
- /*
- audioplotter stores drawings that it extracts from audio
- chaosloader manages a set of plugins that affect polylines
- audio plotter calls chaosloader a set of lines and it affects them
- chaosloader should own it's own params (use,scale,amount)
- should expose compute(vector polyline)
-
- so we could have
-
- audio source
- <>
- transformer
- <>
- chaos
- <>
- drawing
-
- */
-
- int shown=0;
-
- void update_sliders(){
- clear();
- add(plugin_label.setup(chaosloader.name));
- add(active.set("use",false));
- add(amount.set("amount", 0.0f, -0.1f, 0.1f));
-
- for (auto p:chaosloader.get().params){
- add(p);
- }
- ofLog()<<"loaded "<<chaosloader.get().params.size()<<" params";
- }
-private:
- Chaos chaosloader;
- ofxLabel plugin_label;
- ofParameter<string> plugin_name;
-};
class ofApp: public ofBaseApp, public ofxMidiListener {