From 20c9f342c3db9041a5a62f9c3158e0ce0b1f2bcb Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sat, 3 Feb 2018 19:10:32 +0000 Subject: some controls --- gui/src/ofApp.cpp | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp index 1457b74..e6afd29 100644 --- a/gui/src/ofApp.cpp +++ b/gui/src/ofApp.cpp @@ -869,5 +869,90 @@ void ofApp::newMidiMessage(ofxMidiMessage& msg) { //fader laser_intensity=msg.value*2; } + + //=============================================== + offset=1; + + if (msg.channel==1&&msg.control==1+offset){ + //pot + } + if (msg.channel==1&&msg.control==65+offset){ + //top button + } + if (msg.channel==1&&msg.control==73+offset){ + //bottom button + } + if (msg.channel==1&&msg.control==81+offset){ + //fader + laser_R=msg.value*2; + } + + //=============================================== + offset=2; + + if (msg.channel==1&&msg.control==1+offset){ + //pot + } + if (msg.channel==1&&msg.control==65+offset){ + //top button + } + if (msg.channel==1&&msg.control==73+offset){ + //bottom button + } + if (msg.channel==1&&msg.control==81+offset){ + //fader + laser_G=msg.value*2; + } + + //=============================================== + offset=3; + + if (msg.channel==1&&msg.control==1+offset){ + //pot + } + if (msg.channel==1&&msg.control==65+offset){ + //top button + } + if (msg.channel==1&&msg.control==73+offset){ + //bottom button + } + if (msg.channel==1&&msg.control==81+offset){ + //fader + laser_B=msg.value*2; + } + + //=============================================== + offset=4; + + if (msg.channel==1&&msg.control==1+offset){ + //pot + } + if (msg.channel==1&&msg.control==65+offset){ + //top button + } + if (msg.channel==1&&msg.control==73+offset){ + //bottom button + } + if (msg.channel==1&&msg.control==81+offset){ + //fader + video_speed=((float)msg.value)/40.0f; + } + + //=============================================== + offset=5; + + if (msg.channel==1&&msg.control==1+offset){ + //pot + } + if (msg.channel==1&&msg.control==65+offset){ + //top button + } + if (msg.channel==1&&msg.control==73+offset){ + //bottom button + } + if (msg.channel==1&&msg.control==81+offset){ + //fader + segmenter_speed=(((float)msg.value)/64.0f)-1.0f; + } } -- cgit v1.2.3