From 138e1b84ee55246bd70e1ca21155de16690ea86d Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 20 Jun 2013 13:40:43 +0100 Subject: looking good --- 06_performance/addons.make | 3 +- 06_performance/config.mak | 4 +-- 06_performance/src/main.cpp | 4 +-- 06_performance/src/oni.cpp | 2 +- 06_performance/src/testApp.cpp | 71 +++++++++++++++++++++++++++++++++++++++--- 06_performance/src/testApp.h | 9 ++++++ 6 files changed, 82 insertions(+), 11 deletions(-) diff --git a/06_performance/addons.make b/06_performance/addons.make index b301b3a..40e65eb 100755 --- a/06_performance/addons.make +++ b/06_performance/addons.make @@ -1,4 +1,5 @@ +ofxOpenNI ofxXmlSettings ofxMidi -ofxOpenNI +ofxOsc diff --git a/06_performance/config.mak b/06_performance/config.mak index caf7203..cb19ecf 100755 --- a/06_performance/config.mak +++ b/06_performance/config.mak @@ -10,7 +10,7 @@ OF_ROOT = ../../../../../ # for example search paths like: # USER_CFLAGS = -I src/objects -#USER_CFLAGS = -I $(OF_ROOT)/addons/ofxOpenNI/include/openni -I $(OF_ROOT)/addons/ofxOpenNI/include/nite -I $(OF_ROOT)/addons/ofxOpenNI/src +USER_CFLAGS = -I $(OF_ROOT)/addons/ofxOpenNI/include/openni -I $(OF_ROOT)/addons/ofxOpenNI/include/nite -I $(OF_ROOT)/addons/ofxOpenNI/src # USER_LDFLAGS allows to pass custom flags to the linker @@ -18,7 +18,7 @@ OF_ROOT = ../../../../../ # USER_LDFLAGS = libs/libawesomelib.a #USER_LDFLAGS = -lOpenNI -#USER_LDFLAGS = -L bin/data/openni/lib -L ../../../data/openni/lib/libusb-1.0.0.dylib -lOpenNI +USER_LDFLAGS = -L bin/data/openni/lib -L ../../../data/openni/lib/libusb-1.0.0.dylib -lOpenNI EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj" diff --git a/06_performance/src/main.cpp b/06_performance/src/main.cpp index 20767a2..d85180c 100644 --- a/06_performance/src/main.cpp +++ b/06_performance/src/main.cpp @@ -4,8 +4,8 @@ //======================================================================== int main( ){ - //ofSetupOpenGL(4080,768, OF_WINDOW); // <-------- setup the GL context - ofSetupOpenGL(1224,232, OF_WINDOW); // <-------- setup the GL context + ofSetupOpenGL(4080,768, OF_WINDOW); // <-------- setup the GL context + //ofSetupOpenGL(1224,232, OF_WINDOW); // <-------- setup the GL context diff --git a/06_performance/src/oni.cpp b/06_performance/src/oni.cpp index 550d56e..0cd5efc 100644 --- a/06_performance/src/oni.cpp +++ b/06_performance/src/oni.cpp @@ -134,7 +134,7 @@ void oniManager::init(const char* filename){ void oniManager::startPlayer(int newplayer){ if (players.size()>newplayer){ if (playing>-1) players[playing].stop(); - usleep(100000); + usleep(500000); playing=newplayer; players[playing].play(); } diff --git a/06_performance/src/testApp.cpp b/06_performance/src/testApp.cpp index ac1391b..6bc31a7 100644 --- a/06_performance/src/testApp.cpp +++ b/06_performance/src/testApp.cpp @@ -17,11 +17,11 @@ void testApp::setup(){ midiIn.listPorts(); - midiIn.openPort(1); //this was 1 on linux + midiIn.openPort(0); //this was 1 on linux, 0 on OSX midiIn.addListener(this); midiOut.listPorts(); - midiOut.openPort(1); //this was 1 on linux + midiOut.openPort(0); //this was 1 on linux, 0 on OSX // 0 output channeLs, // 2 input channels @@ -34,7 +34,7 @@ void testApp::setup(){ left = new float[BUFFER_SIZE]; right = new float[BUFFER_SIZE]; - soundStream.setDeviceID(0); + //soundStream.setDeviceID(0); soundStream.setup(this, 0, 2, 44100, BUFFER_SIZE, 4); ofSetHexColor(0x666666); @@ -68,7 +68,8 @@ void testApp::setup(){ I_movieSource=0; I_moviePlaying=0; - renderImage.allocate(ofGetWidth(),ofGetHeight(),GL_RGB); + //renderImage.allocate(ofGetWidth(),ofGetHeight(),GL_RGB); + renderImage.allocate(4080,768,GL_RGB); maskShader.load("composite"); //testImage.loadImage("mask.png"); @@ -142,10 +143,30 @@ void testApp::setup(){ setMidiState(); + receiver.setup(OSCPORT); + target.setPosition(0,0,0); camera.setPosition(0,0,-700); camera.lookAt(target,ofVec3f(0,1,0)); narrator.init("TRSS_nesbitt_recordings.xml"); + + if( !XML.loadFile("videos.xml") ){ + printf("unable to load videos, check data/ folder\n"); + }else{ + if(XML.pushTag("TRSS")) { + int num=XML.getNumTags("video"); + if(num) { + int i; + for (i=0;i='1'&key<='9'){ + int clip=key-'1'; + cerr<<"playing video clip "<clip) videoclips[clip].play(); + } + if(key == 't'){ + for (int i=0;i videoclips; + + ofxOscReceiver receiver; }; #endif + -- cgit v1.2.3