   gLastState = state;
   }
 }
+int changeOctave(){
+  buttonState = digitalRead(buttonPin);
+  if (buttonState == HIGH) {
+    return 7;
+  } 
+  else {
+    return 6;
+  }
+}
+
 
 void setup(){
   //Setup encoders' pins
+  pinMode (buttonPin, INPUT);
   pinMode (outputA,INPUT);
   pinMode (outputB,INPUT);
   pinMode (outputC,INPUT);

        counterT ++;
      }
    else {
      counterP --;
    }
    Serial.print("PositionT: ");
    Serial.println(counterT);

void loop(){
  // put your main code here, to run repeatedly: 
  eRead(outputE, outputF);
  _key = keyStep[(int)((double) counterG/20*7)];
  _octave = changeOctave();
  eRead(outputA, outputB);
  _note = _key+stepArr[(int)((double) counterS/40*7)]+_octave;
  //counterP = encoderRead(outputC, outputD, cLastState);
  //counterG = eRead(outputE, outputF, eLastState);
  playNote(_note, 0);
}
