From b720d6d730a0d23425ca4c3ef7c156e1c7760ea1 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 4 Jul 2018 09:29:52 +0100 Subject: plugin architecture --- gui/src/ofApp.h | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 60 insertions(+), 4 deletions(-) (limited to 'gui/src/ofApp.h') diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h index 4d766e9..ddc54d7 100644 --- a/gui/src/ofApp.h +++ b/gui/src/ofApp.h @@ -43,6 +43,9 @@ class chaosPanel : public ofxPanel { ofRegisterKeyEvents(this, defaultEventsPriority); } bool isSelected; + ofParameter active; + ofParameter amount; + ofParameter scale; //?per plugin?? bool mouseMoved(ofMouseEventArgs & args){ if (args.x>getPosition().x&& args.x-getPosition().x + transformer + <> + chaos + <> + drawing + + */ + + int shown=0; + void update_sliders(){ - //delete sliders + clear(); + add(plugin_label.setup(chaosloader.name)); + add(active.set("use",false)); + add(amount.set("amount", 0.0f, -0.1f, 0.1f)); + add(scale.set("scale", 100.0f, 1.0f, 1000.0f)); + //delete variable sliders, is this even possible? + //get number of params - //create sliders with stored values, names + //create sliders with stored values + //how to ignore the nx & ny params? I think nx & ny can be moved to the end + //I think nx & ny (or value) can be removed and use ov[0] & ov[1] / ov[0] + //add(plotter.chaos_a.set("a", 0.85f, 0.0f, 10.0f)); + //add(plotter.chaos_b.set("b", 0.9f, 0.0f, 10.0f)); + //add(plotter.chaos_k.set("k", 0.4f, 0.0f, 10.0f)); + //add(plotter.chaos_p.set("p", 7.7f, 0.0f, 10.0f)); + + //can the float sliders be dynamically generated? + //get the number of parameters in the selected plugin - iv.size() + //create the parameters when the object is initialised + //when switching to the plugin, add sliders for the parameters + //if we reorder the params will the plugns function the same? + + int size=chaosloader.get().params.size(); + + if (shown!=size) { + ofLog()< plugin_name; }; @@ -185,8 +242,7 @@ class ofApp: public ofBaseApp, public ofxMidiListener { //======== chaos gui chaosPanel chaosgui; - ofxLabel plugin_label; - ofParameter plugin_name; + // best architecture for the chaos plugin? // how to use it on an arbitrary set of data -- cgit v1.2.3