       music_pos[0]      = 0;
       music_pos[1]      = 0;
     }
+    
   }
 }

  }


  if (Serial.available())
  {
    // Check the start of the transmission
    byte opcode = 0;
    byte dat[4] = { 0, 0, 0, 0 };  // Some bytes to store temporary data in
    Serial.readBytes(&opcode, 1);
    Serial.print(opcode);

    // Check to see if it's the opening of a music transfer
    if (opcode == OP_MUSIC)
    {
      buzzer[0].stop();
      buzzer[1].stop();

      
      Serial.print(F("Music Transfer initiated"));
      // Immediately following the opening OPcode should be a short detailing
      // how many notes there are
      Serial.readBytes(dat, 2);
      if (*(unsigned short*)&dat[0] == 9) Serial.print("Y");
      else Serial.print("N");

      // If no data was read then skip again to the start of the loop
      //if (*(unsigned short*)&dat[0] == 0) return;

      
      music_length[0] = *(unsigned short*)&dat[0];
      Serial.readBytes((byte*)&Music[0][0], 9*2);


      // After loading all the music, reset the buzzers and internal cursors


  // Creates a Serial connection
  Serial.begin(9600);
}


