-/* Code for laser GuZheng
+/* Code for laser guzheng
  * Copyright (C) 2016 Jason Lu
  * 
  * Licensed under the MIT License
+ * This code has NO WARRANTY! You are
+ * responsible for anything that happens
  */ 
 
 // Port I/O defines
 #define THRESHOLD 700
 #define LASTPORT 7
 #define INSTRUMENTBUTTON 8
+#define NOTEBUTTON 9
 
 // MIDI property defines
 #define VOLUME 0x7F

  // Main loop
  // LASTPORT+1 ports, from 0 to LASTPORT
  for (int i = 0; i <= LASTPORT; i++) {
    r0 = bitRead(i,0);    // use this with arduino 0013 (and newer versions)     
    r1 = bitRead(i,1);    // use this with arduino 0013 (and newer versions)     
    r2 = bitRead(i,2);    // use this with arduino 0013 (and newer versions) 
    digitalWrite(2, r0);
    digitalWrite(3, r1);
    digitalWrite(4, r2);
    if(digitalRead(INSTRUMENTBUTTON) == HIGH) {
      // Make sure that this is the first time that the button
      // has been pressed
      if (instrumentButtonState == 0) {
        // Send MIDI command to change instrument
        Serial.write(CHANGEINSTRUMENT);
        // Max number of instruments, so wrap around
        if (currentInstrument >= (NUMINSTRUMENTS - 1)) {
          currentInstrument = 0;
        } else {
          // Increment current instrument
          currentInstrument++;
        }
        // Write the current instrument
        Serial.write(instrumentArray[currentInstrument]);
        // Set the button state so this won't fire when holding down

      // Button is no longer pressed, so reset the button state.
      instrumentButtonState = 0;
    }
    // Detect if note button has been pressed
    if(digitalRead(NOTEBUTTON) == HIGH) {
      // Make sure that this is the first time that the button
      // has been pressed
      if (noteButtonState == 0) {
        // Swap the current note set
        // TODO: FIgure out a better way to do this
        if (noteSet == 1) {
          noteSet = 2;
        } else {
