diff options
Diffstat (limited to 'gui/src/ofApp.cpp')
| -rw-r--r-- | gui/src/ofApp.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp index 5869074..5c148be 100644 --- a/gui/src/ofApp.cpp +++ b/gui/src/ofApp.cpp @@ -314,6 +314,7 @@ void ofApp::newMidiMessage(ofxMidiMessage& msg) { } + //-------------------------------------------------------------- void ofApp::guiKeyPressed(ofKeyEventArgs &args){ @@ -337,7 +338,12 @@ void ofApp::guiKeyPressed(ofKeyEventArgs &args){ sets[1].decayFactor=sets[0].decayFactor; printf("Decayfactor: %f \n",sets[0].decayFactor); } - + if(args.key == 'a'){ + bool add=!sets[0].additive;; + sets[0].additive=add; + sets[1].additive=add; + printf("Additive: %s \n",add?"true":"false"); + } if(args.key >='1' && args.key <= '9'){ //sets[0].decayFactor = 1.0f + ( // pow(4.0f,-((args.key-'1')+1.7f)) @@ -359,11 +365,22 @@ void ofApp::keyPressed(ofKeyEventArgs &args){ outputFS=!outputFS; ofSetFullscreen(outputFS); } + if(args.key == 'a'){ + bool add=!sets[0].additive;; + sets[0].additive=add; + sets[1].additive=add; + printf("Additive: %s \n",add?"true":"false"); + } if(args.key >='1' && args.key <= '9'){ + //sets[0].decayFactor = 1.0f + ( + // pow(4.0f,-((args.key-'1')+1.7f)) + // * (sets[0].decayFactor<1.0f?-1:1) + // ); sets[0].decayFactor = 1.0f + ( - pow(4.0f,-((args.key-'1')+1.7f)) + pow(4.0f,-(3+((args.key-'1')*0.1)+1.7f)) * (sets[0].decayFactor<1.0f?-1:1) ); + //temp fine adjust with keys sets[1].decayFactor=sets[0].decayFactor; printf("Keydiff: %f Decayfactor: %f \n",((args.key-'1')+1.0f),sets[0].decayFactor); } |
