Remove blocking delay() toneMelody function?
Define  global vars befor setup()

unsigned long timeStamp = 0; 
bool pauseOn = false;


and use it

void speelMelodie(int melodie) {

  if (melodie == 1) {

    for (int thisNote = 0; thisNote &lt; 8; thisNote++) {

      int noteDuration = 1000 / noteDurations1[thisNote];
      if (millis() - timeStamp &lt; noteDuration &amp;&amp; pauseOn == false) {
         tone(speaker, melody1[thisNote], noteDuration);
      } else { // reset value and change pauseOn to true
        pauseOn = true;
        timeStamp = millis();
      }
      int pauseBetweenNotes = noteDuration * 1.30;

      //delay(pauseBetweenNotes); // &lt;-- this one has to be changed
      if (millis() - timeStamp &lt; pauseBetweenNotes &amp;&amp; pauseOn == true) {
          noTone(speaker);
      } else {
         pauseOn = false;
         timeStamp = millis();
      }
    }
  }
}


We need the state variable pauseOn to differentiate between the two states play note or silence. The code compiles, but you have to finetune in your program.A final tip Tutorials using delay() other than 


for debuging or 
in setup for initializing hardware 


are of very low quality 
-> Its like a blind person talking about color composition.