 
     for (int thisNote = 0; thisNote < 68; thisNote++) {
         buttonState=digitalRead(9); 
-        if (buttonState ==LOW ) {goto start;}
+        if (buttonState ==LOW ) return MODE0;
         digitalWrite(5,HIGH);
         digitalWrite(6,HIGH);
         digitalWrite(7,HIGH);

        int pause = duration * 1.5; //音符の間で時間をあける
        delay(pause);
    }
    goto music1;

    music2:
    delay(500);
    buttonState=1;
    digitalWrite(0, LOW);

        else{tone(8, 5100,100);}
        delay(1000);
    }
    return MODE0;
}

int music1(){
    delay(500);
    buttonState=1;
    for (int thisNote = 0; thisNote < 82; thisNote++) { 
       buttonState=digitalRead(9); 
       if (buttonState ==LOW ) return MODE2;
       if(thisNote == 0){
            digitalWrite(5,LOW);
            digitalWrite(6,LOW);
