  * Initialize the OPL2 board and load the first line of the first order.
  */
 void initPlayer() {
-  opl2.begin();
-  opl2.setWaveFormSelect(true);
-  opl2.setPercussion(false);
-  speed = initialSpeed;
-
-  order = -1;
-  line = 0;
-  tick = 0;
-  nextOrder();
-  readLine();
+	opl2.begin();
+	opl2.setWaveFormSelect(true);
+	opl2.setPercussion(false);
+	speed = initialSpeed;
+
+	order = -1;
+	line = 0;
+	tick = 0;
+	nextOrder();
+	readLine();
 }
 
 



void setup() {
  SD.begin(7);

  // Load one of the included RAD files.
  loadRadFile("adlibsp.rad");
  // loadRadFile("shoot.rad");
  // loadRadFile("action.rad");

  initPlayer();
}


void loop() {
  unsigned long time = millis();

  if (order < songLength) {
    playMusic();
  }

  // Calculate delay based on song speed and time spent in player routine.
  int timeSpent = millis() - time;
  int wait = max(0, (hasSlowTimer ? 55 : 20) - timeSpent);
  delay(wait);
}



 * reached we may loop back to the beginning if loopSong is true.
 */
void nextOrder(byte startLine = 0) {
	// Increment order and read patternIndex, may loop song when we've reached the end.
	order ++;
	if (order >= songLength && loopSong) {
		order = 0;
	}
	radFile.seekSet(orderListOffset + order);
	byte patternIndex = radFile.read();

	// If bit 7 is set then we're looking at an order jump.
	if (patternIndex & 0x80) {
		order = patternIndex & 0x7F;
		radFile.seekSet(orderListOffset + order);
		patternIndex = radFile.read();
	}

	// Set file offset to the start of the next order and skip lines until we're
	// at the requested startLine.
	radFile.seekSet(patternOffsets[patternIndex]);
	endOfPattern = false;
	for (line = 0; line < startLine; line ++) {
		readLine();
	}
}


