rebecca@13: #ifndef _TEST_APP rebecca@13: #define _TEST_APP rebecca@13: rebecca@13: // uncomment this for OF 007 compatibility rebecca@13: //#define OFX_OPENNI_BETA rebecca@13: rebecca@13: #include "ofMain.h" rebecca@13: #include "ofxOpenNI.h" andrew@31: #include "ofxOsc.h" andrew@49: #define NUMBER_OF_USERS 3 andrew@48: andrew@38: #define STOPPORT 12343 andrew@45: #define STOPHOST "localhost" andrew@45: andrew@45: #define HERESY_PORT 12346 andrew@49: #define HERESY_HOST "localhost"//JOE's address?? andrew@49: andrew@49: #define MOPHO_PORT 12342 andrew@48: andrew@48: //#define HOST "169.254.51.147"//Was Tim's ADDRESS - not used any more - use Joe's heresy_host below andrew@48: //#define PORT 12344 rebecca@13: rebecca@13: class testApp : public ofBaseApp{ rebecca@13: rebecca@13: public: rebecca@13: void setup(); rebecca@13: void update(); rebecca@13: void draw(); rebecca@13: andrew@31: void getCoordinates(int userID); andrew@31: void sendDataViaOSC(int userID); andrew@32: rebecca@13: void keyPressed (int key); rebecca@13: void keyReleased(int key); rebecca@13: void mouseMoved(int x, int y ); rebecca@13: void mouseDragged(int x, int y, int button); rebecca@13: void mousePressed(int x, int y, int button); rebecca@13: void mouseReleased(int x, int y, int button); rebecca@13: void windowResized(int w, int h); andrew@44: void bezierFunctionStuff(int i); andrew@44: void drawAcidSmiley(int userID); rebecca@13: ofxOpenNIContext context; rebecca@13: ofxDepthGenerator depth; rebecca@13: ofxUserGenerator user; rebecca@13: ofxImageGenerator image; rebecca@13: //ofImage Davy; andrew@38: void sendStopMessageForUser(int userID); andrew@45: void sendInformationToHeresy(int userID); andrew@45: void sendNoteMessageToHeresy(int noteNumber, int onOrOff, int velocity, int channel); andrew@31: andrew@31: ofImage anubis; andrew@48: ofImage secondUserImage, thirdUserImage; rebecca@13: bool drawIt; andrew@38: andrew@38: float maxTorsoValues[3]; andrew@48: float leftMaximum[3]; andrew@48: float rightMaximum[3]; andrew@48: andrew@48: int ControlChangeData[NUMBER_OF_USERS][4];//userId, leftX, leftR, rightX, right Y andrew@48: void sendControlChangeDataToMax(int userID); andrew@49: void sendControlChangeDataToAbleton(int userID); andrew@49: andrew@38: void checkTorsoMaxima(int id); andrew@44: int typeOfFaceToUse[NUMBER_OF_USERS]; andrew@44: double lastRecordedTime[NUMBER_OF_USERS];//x,y,and z of the head andrew@32: float torso[6][3];//x,y,and z of the head andrew@31: bool userPresent[6]; andrew@45: bool notePlayingArray[NUMBER_OF_USERS][16]; andrew@45: int pitchPlaying[NUMBER_OF_USERS]; andrew@31: andrew@45: bool nowPlaying[NUMBER_OF_USERS][16]; andrew@45: bool lastPlaying[NUMBER_OF_USERS][16]; andrew@45: andrew@45: float rightHandPosition[NUMBER_OF_USERS][3]; andrew@45: float leftHandPosition[NUMBER_OF_USERS][3]; andrew@45: double minMaxValues[NUMBER_OF_USERS][2]; andrew@17: ofTrueTypeFont franklinBook; andrew@17: string outputString; andrew@49: ofxOscSender sender, stopSender, heresySender, mophoSender; andrew@31: andrew@48: string userInfoString[3]; andrew@48: andrew@49: bool checkSameUserAs(int userID, int checkID); andrew@49: bool checkingSameUser[NUMBER_OF_USERS]; andrew@49: rebecca@13: }; rebecca@13: #endif