 }
 
 /**
- * Method to shift the registers to a matrix column
- * @param pColumn the column you wish to shift to.
- * @return void
- */
-void shiftToColumn(int pColumn){
+   Method to shift the registers to a matrix column
+   @param pColumn the column you wish to shift to.
+   @return void
+*/
+void shiftToColumn(int pColumn) {
   digitalWrite(latchPin, LOW);
-  if(pColumn <8){
+  if (pColumn < 8) {
     shiftOut(dataPin, outClkPin, MSBFIRST, mask[pColumn]);
     shiftOut(dataPin, outClkPin, MSBFIRST, blank);
     shiftOut(dataPin, outClkPin, MSBFIRST, mask[pColumn]);
-  }else{
-    shiftOut(dataPin, outClkPin, MSBFIRST, mask[pColumn%8]);
-    shiftOut(dataPin, outClkPin, MSBFIRST, mask[pColumn%8]);
+  } else {
+    shiftOut(dataPin, outClkPin, MSBFIRST, mask[pColumn % 8]);
+    shiftOut(dataPin, outClkPin, MSBFIRST, mask[pColumn % 8]);
     shiftOut(dataPin, outClkPin, MSBFIRST, blank);
   }
   digitalWrite(latchPin, HIGH);

}

/**
 * Main loop method
 * @param none
 * @return void
 */
void loop() {
  /**for(int i=0; i<8; i++){
    Serial.print("Y");

}

/**
   Method to update the velocity of a note
   @param pPos the position of the note in the array.
   @param pMode 0 to turn off the note, 1 to update.
*/
void updateVelocity(int pPos, byte pMode) {
  if (pMode == 0) {
    noteTime[pPos] = 0;
  } else {
    getVelocity(pPos);
  }
}

/**
   Method that  updates the velocity of a note.
   @param pPos the position of the note in the array.
*/
byte getVelocity(int pPos) {
  if (noteTime[pPos] == 0) {
    noteTime[pPos] = millis();
    /* Serial.println("Time");
      Serial.println(noteTime[pPos], DEC);
      Serial.println("Velocity");
      Serial.println(127, DEC);
      Serial.println("Pos");
      Serial.println(pPos, DEC);
      delay(10);*/
    return 127;
  } else {
    int tempVelocity = map(abs(millis() - noteTime[pPos]), 0, sensitivity, 127, 10);
    noteTime[pPos] = millis();
    if (tempVelocity < 10) {
      tempVelocity = 10;
    }
    else {
      if (tempVelocity > 127) {
        tempVelocity = 127;
      }
    }
    /*Serial.println("Velocity 2");
      Serial.print(tempVelocity, DEC);
      Serial.print(" ");
      Serial.println("Time 2");
      Serial.println(abs(millis()-noteTime[pPos]), DEC);
      Serial.println("Pos 2");
      Serial.println(pPos, DEC);
      delay(10);*/
    return tempVelocity;
  }
}

/**
   Method to scan the values of all the inputs of the shiftregisters
*/
void scanRows() {
  digitalWrite(loadPin, LOW); //On Low the parallel data is collected
  delayMicroseconds(5);
  digitalWrite(loadPin, HIGH); //On HIGH is read ready
  delayMicroseconds(5);
  digitalWrite(inEnPin, LOW); //Active Low
  shiftIn(inReadPin, inClkPin);
