comparison testApp.h @ 47:0d3a993405e4

trying rto stop duplictae symbols
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 01 May 2013 16:47:11 +0100
parents 1e266647840d
children 43958fd481aa
comparison
equal deleted inserted replaced
46:1e266647840d 47:0d3a993405e4
3 #include "ofMain.h" 3 #include "ofMain.h"
4 #include "ofxiPhone.h" 4 #include "ofxiPhone.h"
5 #include "ofxiPhoneExtras.h" 5 #include "ofxiPhoneExtras.h"
6 #include "ofxiPhoneExternalDisplay.h" 6 #include "ofxiPhoneExternalDisplay.h"
7 #include "ofxOsc.h" 7 #include "ofxOsc.h"
8 #include "ofxMidi.h" 8 #import "ofxMidi.h"
9 9
10 #include "grid.h" 10 #include "grid.h"
11 #include "2dvector.h" 11 #include "2dvector.h"
12 #include "ofxUI.h"
13 #include "eventLogger.h" 12 #include "eventLogger.h"
14 #include "AppCore.h" 13 #include "AppCore.h"
15 14
16 #include "presetManager.h" 15 #include "presetManager.h"
17 #include "eventLogger.h" 16 #include "eventLogger.h"
26 #import "HelpViewController.h" 25 #import "HelpViewController.h"
27 #import "TopButtonViewController.h" 26 #import "TopButtonViewController.h"
28 #import "SliderViewController.h" 27 #import "SliderViewController.h"
29 #import "usernameAlertViewController.h" 28 #import "usernameAlertViewController.h"
30 #import "TimedSessionController.h" 29 #import "TimedSessionController.h"
30
31 #define OSC_HOST "169.254.1.1" 31 #define OSC_HOST "169.254.1.1"
32 #define OSC_PORT 12345 32 #define OSC_PORT 12345
33 33
34 #define SLIDER_GUI_WIDTH 256 34 #define SLIDER_GUI_WIDTH 256
35 #define SLIDER_HEIGHT 256 35 #define SLIDER_HEIGHT 256
36 #define NUM_PARAMS 10 36 #define NUM_PARAMS 10
37 37
38 typedef enum {SLIDERS,ZOOMER,BOTH,INTRO,QUESTIONNAIRE, HELP}interfaceType; 38
39 39
40 class testApp : public ofxiPhoneApp , public ofxiPhoneExternalDisplay, public ofxMidiListener, public ofxMidiConnectionListener { 40 class testApp : public ofxiPhoneApp , public ofxiPhoneExternalDisplay, public ofxMidiListener, public ofxMidiConnectionListener {
41 41
42 42
43 public: 43 public:
44 typedef enum {SLIDERS,ZOOMER,BOTH,INTRO,QUESTIONNAIRE, HELP}interfaceType;
44 bool sendMIDIAndOSC; 45 bool sendMIDIAndOSC;
45 int midiChannel; 46 int midiChannel;
46 int midiOffset; 47 int midiOffset;
47 bool animatingGrid; 48 bool animatingGrid;
48 bool allowAnimation; 49 bool allowAnimation;
69 bool xLocked, yLocked; 70 bool xLocked, yLocked;
70 unsigned int lastMoveTime; 71 unsigned int lastMoveTime;
71 72
72 TwoVector moveVel; // velocity at which we were moving the grid 73 TwoVector moveVel; // velocity at which we were moving the grid
73 74
74 vector <ofxUISlider *> sliders;
75
76 double slowFactor; 75 double slowFactor;
77 double zoomVel; // do the same 76 double zoomVel; // do the same
78 double prevZoom, prevZoom2; 77 double prevZoom, prevZoom2;
79 TwoVector move, prevMove, prevMove2; 78 TwoVector move, prevMove, prevMove2;
80 79
146 void bottomGuiEvent(); 145 void bottomGuiEvent();
147 void setupTopGui(); 146 void setupTopGui();
148 void topGuiEvent(); 147 void topGuiEvent();
149 148
150 // stardard GUI - knbs and sliders - hides zoomer 149 // stardard GUI - knbs and sliders - hides zoomer
151 void sliderGUIEvent(ofxUIEventArgs &e); 150
152 void setupSliderGui();
153 ofxUICanvas *sliderGUI;
154 151
155 void sliderMoved(int which, float value); 152 void sliderMoved(int which, float value);
156 void setAllGUISliders(vector<int> vals); 153 void setAllGUISliders(vector<int> vals);
157 void randomise(); 154 void randomise();
158 155
159 // zoom gui - the swap view button and save preset button 156 // zoom gui - the swap view button and save preset button
160 void zoomGUIEvent(ofxUIEventArgs &e); 157
161 void setupZoomGui();
162 158
163 159
164 void sendParametersToPD(); 160 void sendParametersToPD();
165 void sendOscShape(int ctrlin); 161 void sendOscShape(int ctrlin);
166 void sendFiltShape(int ctrlin); 162 void sendFiltShape(int ctrlin);
176 void sendRevAmt(int ctrlin); 172 void sendRevAmt(int ctrlin);
177 void sendFiltEnvModAmt(int ctrlin); 173 void sendFiltEnvModAmt(int ctrlin);
178 174
179 void sendMidiParams(); 175 void sendMidiParams();
180 void sendMidiParam(int which); 176 void sendMidiParam(int which);
181 ofxUICanvas *zoomGUI;
182 177
183 // audio callbacks 178 // audio callbacks
184 void audioReceived(float * input, int bufferSize, int nChannels); 179 void audioReceived(float * input, int bufferSize, int nChannels);
185 void audioRequested(float * output, int bufferSize, int nChannels); 180 void audioRequested(float * output, int bufferSize, int nChannels);
186 181