Mercurial > hg > soniczoomios
diff testApp.h @ 39:df7c08faf541
MIDI, small improvements.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Thu, 11 Apr 2013 16:56:21 +0100 |
parents | 0dfe9e0c01aa |
children | 3d627dce8bf0 |
line wrap: on
line diff
--- a/testApp.h Wed Apr 10 18:57:05 2013 +0100 +++ b/testApp.h Thu Apr 11 16:56:21 2013 +0100 @@ -5,6 +5,8 @@ #include "ofxiPhoneExtras.h" #include "ofxiPhoneExternalDisplay.h" #include "ofxOsc.h" +#include "ofxMidi.h" + #include "grid.h" #include "2dvector.h" #include "ofxUI.h" @@ -29,16 +31,19 @@ #define OSC_HOST "169.254.1.1" #define OSC_PORT 12345 -#define SLIDER_GUI_WIDTH 720 +#define SLIDER_GUI_WIDTH 256 #define SLIDER_HEIGHT 256 #define NUM_PARAMS 10 typedef enum {SLIDERS,ZOOMER,BOTH,INTRO,QUESTIONNAIRE, HELP}interfaceType; -class testApp : public ofxiPhoneApp , public ofxiPhoneExternalDisplay{ +class testApp : public ofxiPhoneApp , public ofxiPhoneExternalDisplay, public ofxMidiListener, public ofxMidiConnectionListener { public: + bool sendMIDIAndOSC; + int midiChannel; + int midiOffset; interfaceType whichInterfaceShowing; BottomTabViewController *bottomTabViewController; @@ -119,6 +124,8 @@ void showIntro(); void introHidden(bool OK); void interfaceSelected(int which); + void freeUseMode(); + void seqStartStop(bool go); void showHelp(); void helpHidden(); @@ -153,7 +160,8 @@ void sendFiltFreq(int ctrlin); void sendEnvShape(int ctrlin); void sendModFreq(int ctrlin); - + void sendMidiParams(); + void sendMidiParam(int which); ofxUICanvas *zoomGUI; // audio callbacks @@ -162,6 +170,28 @@ AppCore core; + // message + void addMessage(string msg); + + // midi message callback + void newMidiMessage(ofxMidiMessage& msg); + + // midi device (dis)connection event callbacks + void midiInputAdded(string name, bool isNetwork); + void midiInputRemoved(string name, bool isNetwork); + + void midiOutputAdded(string nam, bool isNetwork); + void midiOutputRemoved(string name, bool isNetwork); + + vector<ofxMidiIn*> inputs; + vector<ofxMidiOut*> outputs; + + deque<string> messages; + int maxMessages; + + int note, ctl; + vector<unsigned char> bytes; + }; // should be off split into