From b6175368e175147f4580ed75aeca51f1233e7988 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Fri, 30 Dec 2016 12:52:58 +0000 Subject: [PATCH] re #144, ported changes to git head Ifdefed the new changes because I don't think they'll work correctly if not all clips have bindings, see discussion here: https://github.com/openAVproductions/openAV-Luppp/pull/144/commits/75e1012c0daf0e15bde9d74762fbb65c45b79e91#r94225008 --- src/controller/genericmidi.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/controller/genericmidi.cxx b/src/controller/genericmidi.cxx index 9033643..784ab9e 100644 --- a/src/controller/genericmidi.cxx +++ b/src/controller/genericmidi.cxx @@ -603,6 +603,8 @@ void GenericMIDI::launchScene( int scene ) Binding* b = actionToMidi.at(i); if ( b->action == GRID_LAUNCH_SCENE ) { + unsigned char data[3]; +#if 1 for( int i = 0; i < 5; i++ ) { if ( i != scene ) { unsigned char data[3]; @@ -612,7 +614,13 @@ void GenericMIDI::launchScene( int scene ) writeMidi( data ); } } - unsigned char data[3]; +#else + data[0] = b->status; + data[1] = b->data; + data[2] = (b->scene == scene) * 127; + writeMidi( data ); +#endif + data[0] = b->status; data[1] = b->data + scene; data[2] = 127;