From a2c919f85c366e02cdc71f0fb46f4ebd4e4afebe Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 29 Sep 2022 21:12:40 +0100 Subject: revert to working single plugin chaos --- passadesgui/src/AudioPlotter.h | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 passadesgui/src/AudioPlotter.h (limited to 'passadesgui/src/AudioPlotter.h') diff --git a/passadesgui/src/AudioPlotter.h b/passadesgui/src/AudioPlotter.h new file mode 100644 index 0000000..9cd37ae --- /dev/null +++ b/passadesgui/src/AudioPlotter.h @@ -0,0 +1,57 @@ +#include "ofMain.h" +#include "ofxAChaoslib.h" + +#include "lineTransformer.h" + +class Audioplotter{ + //store and draw a numbr of audio samples + //how best to handle transforms - maybe pass in a transform to be added to 2nd and subsequent + //how best to handle length of history data - fixed number that can be set, or line budget? +public: + Audioplotter(int _size=1,bool _joined=true,bool _bars=false,int _width=2){ + setup(_size,_joined,_bars,_width); + } + void setup(int _size=1,bool _joined=true,bool _bars=false,int _width=2){ + history_size=_size; + joined=_joined; + bars=_bars; + width=_width; + startColour=ofColor(255,255,255); + endColour=ofColor(0,0,0); + attractor.setup(); + } + colourPolyline compute_chaos(colourPolyline& poly,float colourFade=1.0f); + vector output(float scale=1.0f,float decay=-1.0f); + void addpoints(vector &audio); + void blankframe(); + int numpoints(); + + ofParameter random; + ofParameter joined; + ofParameter bars; + ofParameter mirror; + ofParameter width; + ofParameter history_size; + ofParameter num_points; + +//feedback transformation + ofParameter translate; + ofParameter rotate; + ofParameter scale; + + ofParameter startColour; + ofParameter endColour; + + ofParameter usechaos; + ofParameter chaosamount; + ofParameter chaosscale; + ofParameter chaos_a; + ofParameter chaos_b; + ofParameter chaos_k; + ofParameter chaos_p; + +private: + vector < vector> data; + AChaosIkeda attractor; + +}; \ No newline at end of file -- cgit v1.2.3