From c10665e02e49da2d8f7e1a1eada151f17f507a21 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sat, 7 Jul 2018 14:13:32 +0100 Subject: drawing gui for plugins --- gui/src/AudioPlotter.h | 8 ++++---- gui/src/ofApp.h | 24 ------------------------ 2 files changed, 4 insertions(+), 28 deletions(-) (limited to 'gui') diff --git a/gui/src/AudioPlotter.h b/gui/src/AudioPlotter.h index 7ea4bf8..66a0cde 100644 --- a/gui/src/AudioPlotter.h +++ b/gui/src/AudioPlotter.h @@ -13,13 +13,13 @@ class AChaosplugin{ name=_name; plugin->setup(); load_defaults(); - ofLog()<<"constructor "<iv){ - ofLog()<<"iv: "<().set(ofToString(i),i,0,i*5)); + for (int i=0;iiv.size();i++){ + if (plugin->param_labels.size()>i&&plugin->param_labels[i].size()){ + params.push_back(ofParameter ().set(plugin->param_labels[i],i,0,i*5)); + } } } }; diff --git a/gui/src/ofApp.h b/gui/src/ofApp.h index ddc54d7..f7e8b51 100644 --- a/gui/src/ofApp.h +++ b/gui/src/ofApp.h @@ -112,30 +112,6 @@ class chaosPanel : public ofxPanel { 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 - //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()<