 {
   // Initialize serial at 115200 baud
   Serial.begin(115200);
+  pinMode(2,OUTPUT);
+  pinMode(3,OUTPUT);
+  pinMode(4,OUTPUT);
   // Wait 1 second for ttymidi to come up
   delay(1000);
 }

void loop()
{
  // Main loop
  // 8 ports, from 0 to 7
  for (int i = 0; i <= LASTPORT; i++) {
    if(digitalRead(BUTTONPORT) == HIGH) {
      // Make sure that this is the first time that the button
      // has been pressed

#define note2 0x3E
#define note1 0x3C

int r0 = 0;      //value of select pin at the 4051 (s0)
int r1 = 0;      //value of select pin at the 4051 (s1)
int r2 = 0;      //value of select pin at the 4051 (s2)

int buttonState = 0;
int currentInstrument = 0;

