 
 
 void sendMidiNote() {
-  if(midiNoteToSend!=-1) {
-    if(midiNoteSendStart > 100) {
+  if (midiNoteToSend != -1) {
+    if (midiNoteSendStart > 100) {
       usbMIDI.sendNoteOff(midiNoteToSend, 0, midiChannel);
       midiNoteToSend = -1;
       startedMidiNoteSending = false;
-    } else if(!startedMidiNoteSending) {
+    } else if (!startedMidiNoteSending) {
       usbMIDI.sendNoteOn(midiNoteToSend, 99, midiChannel);
       startedMidiNoteSending = true;
-    }    
+    }
   }
 }
 

void RealTimeSystem(byte realtimebyte) {
  if (realtimebyte == CLOCK) {
    counter++;
    if (counter == 24) {
      counter = 0;
      digitalWrite(bpmLed, HIGH);
    }
    if (counter == 6) {
      digitalWrite(bpmLed, LOW);
    }
  }

byte midiNoteToSend = -1;
elapsedMillis midiNoteSendStart = 0;
boolean startedMidiNoteSending = false;

boolean playing = false;

void OnNoteOn(byte channel, byte note, byte velocity) {
  digitalWrite(ledPin, HIGH);
