           }
           startStamp = bufMidi[i];
           break;
-       case MIDI:
-          if (i%4 != 0) 
-					{
-            sprintf(debugBuf, " %02X", bufMidi[i]);
-            Serial.print(debugBuf);
-           	outBuf[(i%4)] = bufMidi[i];
-          }
-          else 
-					{
-            Serial.print(" - ");
-            Midi.SendData(outBuf,2);
-            memset(outBuf, 0, sizeof(outBuf));
-          }
-          if ( i == (bytesRead-2)) 
-					{ 
-						prsState = STRT; 
-					}
-         break;
-				 
-       case RUN:
-	       if (i < 4 && i%4 != 0) 
-				 {
-	       		outBuf[(i%4)] = bufMidi[i];
-	          if (i%4 == 3) {  Midi.SendData(outBuf,3); };
-	       }
-	       else if (i%2 == 0)
-	       {
-	          outBuf[0] = midStat;
-	          outBuf[1] = bufMidi[i];
-	          outBuf[2] = bufMidi[i+1];
-	          Midi.SendData(outBuf,3);
-
-	       }
-	        if ( i == (bytesRead-2)) 
-					{ 
-						prsState = STRT; 
-					}
-				
-       break;
-       
-       case SYSEX: 
-         if (i == (bytesRead-2) && bufMidi[i] == 0xF7) // End reached, move pointer back and overwrite timestamp with SysEx End
-         {
-           outBufMidi[outBufMidPtr-1] = bufMidi[i];
-           Midi.SendData(outBufMidi, 3);
-           prsState = STRT;  
-           
-           
-           Serial.print("Dumping SYSEX BLOB: ");
-           for (int i = 0; i < outBufMidPtr; i++) 
-					 {
-           	 sprintf(debugBuf, " %02X", outBufMidi[i]);
-             Serial.print(debugBuf); }
-             Serial.println(); 
-         	 }
-         else 
-				 {
-           outBufMidi[outBufMidPtr] = bufMidi[i];
-           outBufMidPtr++;
-         }
-        break;
     }
     
 }

  if ( charHandle == txCharacteristic.getHandle() )
  {
    ble.readCharacteristicValue(txCharacteristic.getHandle(), buf, &bytesRead);
   	parseBLEtoMIDI(buf, bytesRead);
  }
}


for (int i = 0; i < bytesRead-1; i++) {
    switch (prsState)
    {
    
       case MIDI:
          if (i%4 != 0) 
	  {
            sprintf(debugBuf, "MIDI: %02X", bufMidi[i]);
            Serial.print(debugBuf);
           	outBuf[(i%4)] = bufMidi[i];
          }
          else 
	  {
            Serial.print(" - ");
            Midi.SendData(outBuf,2);
            memset(outBuf, 0, sizeof(outBuf));
          }
          if ( i == (bytesRead-2)) 
	  { 
	    prsState = STRT; 
	  }
         break;
				 
       case RUN:
	       if (i < 4 && i%4 != 0) 
		{
	       		outBuf[(i%4)] = bufMidi[i];
	          if (i%4 == 3) {  Midi.SendData(outBuf,3); };
	       }
	       else if (i%2 == 0)
	       {
	          outBuf[0] = midStat;
	          outBuf[1] = bufMidi[i];
	          outBuf[2] = bufMidi[i+1];
	          Midi.SendData(outBuf,3);

	       }
	       if ( i == (bytesRead-2)) 
	       { 
	          prsState = STRT; 
	       }
				
       break;
       
       case SYSEX: 
         if (bufMidi[i] == 0xF7) // End reached, move pointer back and overwrite timestamp with SysEx End
         {
           outBufMidi[outBufMidPtr] = bufMidi[i];
           Midi.SendSysEx(outBufMidi, outBufMidPtr+1, 0);
           prsState = STRT;  
           outBufMidPtr = 0;

         }
         else 
	 {			 
           outBufMidi[outBufMidPtr] = bufMidi[i];
           outBufMidPtr++;
         }
        break;
          case STRT:
          default:
        if (bufMidi[i+1] == 0xF0) // looking 1 byte ahead to skip timestamp
          {
            memset(&outBufMidi[0], 0, sizeof(outBufMidi)); // Empty SysEx Buffer
