Chris Arndt / Mbed OS STM32F103_USBMIDI_Switchbox

Dependencies:   PinDetect USBDevice_STM32F103 mbed-STM32F103C8T6

Revision:
9:d5fa853818dd
Parent:
8:75c5ec68765e
Child:
11:ff22140b5119
--- a/midiswitch.cpp	Fri Aug 04 05:22:22 2017 +0200
+++ b/midiswitch.cpp	Fri Aug 04 05:55:36 2017 +0200
@@ -48,13 +48,13 @@
         case 0x90:  // Note on
             msg.data[1] = msg.data[1] | (cfg.channel & 0x0F);
             msg.data[3] = value;
-            msg.data[2] = cfg.data1;
+            msg.data[2] = cfg.data1 & 0x0F;
             break;
         case 0xA0:  // Poly pressure
         case 0xB0:  // Control change
         case 0xE0:  // PitchBend
             msg.data[1] = msg.data[1] | (cfg.channel & 0x0F);
-            msg.data[2] = cfg.data1;
+            msg.data[2] = cfg.data1 & 0x0F;
             msg.data[3] = value;
             break;
         default: