diff options
| author | Tim Redfern <tim@getdrop.com> | 2018-06-02 10:39:32 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2018-06-02 10:39:32 +0100 |
| commit | a730ef3ebd758b610b2fc5bad5d645040584f14f (patch) | |
| tree | e20e50187d645a226d5615feaf46dacfb5fb395f | |
| parent | 86475494161cde9a2eddcedb3fe7baa9b48f96d4 (diff) | |
passades show
| -rw-r--r-- | gistanalysis/notes | 2 | ||||
| -rw-r--r-- | gui/bin/data/settings.xml | 52 | ||||
| -rw-r--r-- | gui/src/AudioPlotter.cpp | 12 | ||||
| -rw-r--r-- | gui/src/AudioPlotter.h | 1 | ||||
| -rw-r--r-- | gui/src/ofApp.cpp | 5 |
5 files changed, 44 insertions, 28 deletions
diff --git a/gistanalysis/notes b/gistanalysis/notes index ada11e9..af9084a 100644 --- a/gistanalysis/notes +++ b/gistanalysis/notes @@ -106,5 +106,7 @@ midi hookup to chaos seems to be a bug when closing while the mic is live +mirror +set more sensible limits for points and plots diff --git a/gui/bin/data/settings.xml b/gui/bin/data/settings.xml index 3332e37..7fe2fc2 100644 --- a/gui/bin/data/settings.xml +++ b/gui/bin/data/settings.xml @@ -1,32 +1,32 @@ -<?xml version="1.0"?> +<?xml version="1.0" ?> <WARP> - <p0> - <X>0.000000000</X> - <Y>0.000000000</Y> - </p0> - <p1> - <X>1200.000000000</X> - <Y>0.000000000</Y> - </p1> - <p2> - <X>1200.000000000</X> - <Y>900.000000000</Y> - </p2> - <p3> - <X>0.000000000</X> - <Y>900.000000000</Y> - </p3> + <p0> + <X>0.367187500</X> + <Y>899.445312500</Y> + </p0> + <p1> + <X>1199.296875000</X> + <Y>897.746093750</Y> + </p1> + <p2> + <X>1199.996093750</X> + <Y>1.593750000</Y> + </p2> + <p3> + <X>-4.125000000</X> + <Y>1.101562500</Y> + </p3> </WARP> <POSITION> - <X>0.000000000</X> - <Y>0.000000000</Y> + <X>43.828575134</X> + <Y>817.771545410</Y> </POSITION> -<SCALE>1.000000000</SCALE> +<SCALE>2.177917004</SCALE> <laser> - <power>0</power> - <intensity>30</intensity> - <points>30000</points> - <subdivide>15</subdivide> - <blank_points>8</blank_points> - <max_angle>15</max_angle> + <power>0</power> + <intensity>30</intensity> + <points>30000</points> + <subdivide>15</subdivide> + <blank_points>8</blank_points> + <max_angle>15</max_angle> </laser> diff --git a/gui/src/AudioPlotter.cpp b/gui/src/AudioPlotter.cpp index 22eb757..a4ea5f3 100644 --- a/gui/src/AudioPlotter.cpp +++ b/gui/src/AudioPlotter.cpp @@ -21,6 +21,12 @@ vector <colourPolyline> Audioplotter::output(float plotscale,float plotdecay){ x.scale(((ofVec2f)scale).x,((ofVec2f)scale).y,1.0f); x.translate((ofGetWidth()/2),(ofGetHeight()/2),0); + + + ofMatrix4x4 flip = ofMatrix4x4::newIdentityMatrix(); + flip.translate((-ofGetWidth()/2),(-ofGetHeight()/2),0); + flip.scale(-1.0f,1.0f,1.0f); + flip.translate((ofGetWidth()/2),(ofGetHeight()/2),0); //destructive or non? float fadefactor=plotdecay<0.0f?1.0f-(1.0f/history_size):plotdecay; @@ -41,8 +47,14 @@ vector <colourPolyline> Audioplotter::output(float plotscale,float plotdecay){ //ofLog() << "set colour to "<<col; newdata.push_back(line); outdata.push_back(line); + } data[i]=newdata; + if (mirror){ + for (int j=0;j<data[i].size();j++){ + outdata.push_back(lineTransformer::polyLineTransform(flip,data[i][j])); + } + } } return outdata; } diff --git a/gui/src/AudioPlotter.h b/gui/src/AudioPlotter.h index 1a5aa4e..9cd37ae 100644 --- a/gui/src/AudioPlotter.h +++ b/gui/src/AudioPlotter.h @@ -29,6 +29,7 @@ public: ofParameter<bool> random; ofParameter<bool> joined; ofParameter<bool> bars; + ofParameter<bool> mirror; ofParameter<int> width; ofParameter<int> history_size; ofParameter<int> num_points; diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp index 367fdd2..7d14996 100644 --- a/gui/src/ofApp.cpp +++ b/gui/src/ofApp.cpp @@ -113,9 +113,10 @@ void ofApp::setup(){ audiogui.add(plotter.random.set("random",true)); audiogui.add(plotter.joined.set("joined",true)); audiogui.add(plotter.bars.set("bars",true)); + audiogui.add(plotter.mirror.set("mirror",false)); audiogui.add(plotter.width.set("point width", 2, 1, 256)); - audiogui.add(plotter.num_points.set("num points", 50, 1, 512)); - audiogui.add(plotter.history_size.set("num plots", 5, 1, 100)); + audiogui.add(plotter.num_points.set("num points", 50, 1, 64)); + audiogui.add(plotter.history_size.set("num plots", 5, 1, 64)); audiogui.add(plotter.translate.set("translate",ofVec2f(0,0),ofVec2f(-50,-50),ofVec2f(50,50))); audiogui.add(plotter.rotate.set("rotate",0.0f,-10.0f,10.0f)); audiogui.add(plotter.scale.set("scale",ofVec2f(1.0f,1.0f),ofVec2f(0.5f,0.5f),ofVec2f(2.0f,2.0f))); |
