diff options
Diffstat (limited to 'sunkenEngine/src/ofApp.cpp')
| -rw-r--r-- | sunkenEngine/src/ofApp.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sunkenEngine/src/ofApp.cpp b/sunkenEngine/src/ofApp.cpp index 899af9f..2c3b2f3 100644 --- a/sunkenEngine/src/ofApp.cpp +++ b/sunkenEngine/src/ofApp.cpp @@ -7,7 +7,7 @@ void ofApp::setup(){ int midiPort=0; midiChannel=0; - if( !XML.loadFile("settings_parlour_onscreen.xml") ){ + if( !XML.loadFile("settings_parlour.xml") ){ //_onscreen printf("unable to load settings.xml check data/ folder\n"); }else{ printf("settings loaded!\n"); @@ -99,7 +99,7 @@ void ofApp::setupGui(){ parameters.add(transparentBlack.set("transparent black", false)); parameters.add(resetDrawscale.set("reset draw scale",false)); parameters.add(resetFBscale.set("reset FB scale",false)); - parameters.add(fadeScale.set("fade scale",0,0,2.0f)); + parameters.add(fadeScale.set("fade scale",0,0,255)); parameters.add(fadeBackground.set("decay background",255,0,255)); parameters.add(decayTime.set("decay time",0,0,10.0f)); parameters.add(oscScale.set("scale size LFO", false)); @@ -181,6 +181,7 @@ void ofApp::dragGui(ofDragInfo & dragInfo){ //-------------------------------------------------------------- void ofApp::keyPressed(int key){ + cerr<<"key: "<<key<<endl; switch(key){ case ' ': fullscreenoutput=!fullscreenoutput; @@ -302,7 +303,7 @@ void ofApp::toggleFPS(){ void ofApp::newMidiMessage(ofxMidiMessage& eventArgs){ if ((midiChannel==0)||(eventArgs.channel==midiChannel)) { - nmidiMessage(eventArgs.status,eventArgs.bytes[0],eventArgs.bytes[1]); + nmidiMessage(eventArgs.status,eventArgs.bytes[2],eventArgs.bytes[1]); } } @@ -321,7 +322,7 @@ void ofApp::newMidiMessage(ofxMidiMessage& eventArgs){ //printf("%d %d %d %d %d\n",eventArgs.port,eventArgs.channel,eventArgs.status,eventArgs.byteOne,eventArgs.byteTwo); void ofApp::nmidiMessage(int event,int data1, int data2) { - //printf("midi: %i %i\n",event,data1); + //printf("midi: %i %i %i\n",event,data1,data2); bool noteOn; //this old thing! int i; switch(event) { @@ -345,14 +346,16 @@ void ofApp::nmidiMessage(int event,int data1, int data2) { if (noteRandomiseColours) { makeColours(); // } - randOffs=ofRandom(100.0f); - break; + randOffs=ofRandom(100.0f); + break; case 176: //control change channel 0 //for (int i=0;i<numLayers;i++){ // if (layers[i]->mix==eventArgs.byteOne) layers[i]->setMixAmt(((float)eventArgs.byteTwo)/127.0f); //} - if (debug) printf("cc: %i %i\n",data1,data2); - if (data1>=START_CONTROLLER) controllers[data1-START_CONTROLLER]=data2; + //maybe the CC are coming in <127? + //if (debug) + //printf("cc: %i %i\n",data1,data2); + if (data2>=START_CONTROLLER&&data2<(NUM_CONTROLLERS-START_CONTROLLER)) controllers[data2-START_CONTROLLER]=data1; } } |
