   // Do something here with your data!
   display.clearDisplay();
   display.setCursor(0, 0);
-  display.println("MIDI CC");
-  display.display();
-}
-
+  display.println(pitch);
+  display.display();
+}
+
+/**
+   MIDI note off
+*/
+void HandleNoteOff(byte channel, byte pitch, byte velocity)
+{
+  // Do something here with your data!
+}
 
 /**
    MIDI SysEx
 */
-void handleSysEx(byte * sysEx, unsigned buffSize) {
-  //header f0 00 00 66 05 00
-  //
-
-  if (sysEx[5] == 0x12) {
-    handleScribble(sysEx, buffSize);
-  }
-
+void handleSysEx(byte * sysEx, unsigned buffSize) {  
+/*
+  //Opening communication
+  if (sysEx[5] == 0x00) {
+    display.clearDisplay();
+    display.setCursor(0, 0);
+    display.setTextSize(1);
+    display.println("Connection Query...");
+    display.display();
+    //                                        <HDR>                | Host query
+    byte sysExConnectionQuery[18] = { 0xF0, 0x00, 0x00, 0x66, 0x00, 0x01, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x01, 0x01, 0x01, 0x01, 0xF7 };
+    sysExConnectionQuery[4] = sysEx[4];
+    MIDI.sendSysEx(18, sysExConnectionQuery, false);
+
+    delay(500);
+
+  }
+  if (sysEx[5] == 0x02) {
+    //skip protocol verifications...
+    //display.clearDisplay();
+    //display.setCursor(0, 0);
+    display.println("Confirmed");
+    display.display();
+    //                                        <HDR>                | Host confirm
+    byte sysExConnectionConfirm[] = { 0xf0, 0x00, 0x00, 0x66, 0x14, 0x03, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xF7 };
+    MIDI.sendSysEx(14, sysExConnectionConfirm, false);
+  }
+*/
+  //if(sysEx[0] == 0xF0){
+    if (sysEx[5] == 0x12) {
+      handleScribble(sysEx, buffSize);
+    }
+  
+    refreshLCD();
+  //}
 }
 
 

  display.clearDisplay();
  display.drawPixel(10, 10, WHITE);
  display.display();
}

/**

//MIDI buffer
static byte *lastSysEx;

static bool overload = false;


// Define the channel structure
struct channel {
  byte* trackName;
  byte displayLine1[7];
  byte displayLine2[7];
  byte offsetl1;
  byte offsetl2;
  byte* assign;
  byte* faderLevel;
  int leftPan;
  int rightPan;
};

// define all displays
static struct channel oledDisplays[7];
static int currentDisp = 0;

/**
   Board Setup
*/
void setup() {
  MIDI.begin();
  MIDI.turnThruOff();
  MIDI.setHandleSystemExclusive(handleSysEx);
