  * Read the next line in the pattern from the current file position.
  */
 void readLine() {
-  // Reset note data on each channel.
-  for (byte i = 0; i < 9; i ++) {
-    channelNote[i] = 0x0000;
-  }
-
-  // If the previous line was the last line of the pattern then we're done.
-  if (endOfPattern) {
-    return;
-  }
-
-  // If the next line number does not match our current line then it's empty
-  // so there's nothing to do for us here.
-  byte lineNumber = radFile.read();
-  if ((lineNumber & 0x3F) != line) {
-    radFile.seekSet(radFile.curPosition() - 1);
-    return;
-  }
-
-  // Set end of pattern marker if this is the last line in the pattern.
-  endOfPattern = lineNumber & 0x80;
-
-  // Read note and effect data for each channel.
-  bool isLastChannel = false;
-  do {
-    byte channelNumber = radFile.read();
-    isLastChannel = channelNumber & 0x80;
-    channelNumber = channelNumber & 0x0F;
-
-    channelNote[channelNumber]  = radFile.read() << 8;
-    channelNote[channelNumber] += radFile.read();
-    if (channelNote[channelNumber] & 0x000F) {
-      efftectParameter[channelNumber] = radFile.read();
-    } else {
-      efftectParameter[channelNumber] = 0x00;
-    }
-  } while(!isLastChannel);
+	// Reset note data on each channel.
+	for (byte i = 0; i < 9; i ++) {
+		channelNote[i] = 0x0000;
+	}
+
+	// If the previous line was the last line of the pattern then we're done.
+	if (endOfPattern) {
+		return;
+	}
+
+	// If the next line number does not match our current line then it's empty
+	// so there's nothing to do for us here.
+	byte lineNumber = radFile.read();
+	if ((lineNumber & 0x3F) != line) {
+		radFile.seekSet(radFile.curPosition() - 1);
+		return;
+	}
+
+	// Set end of pattern marker if this is the last line in the pattern.
+	endOfPattern = lineNumber & 0x80;
+
+	// Read note and effect data for each channel.
+	bool isLastChannel = false;
+	do {
+		byte channelNumber = radFile.read();
+		isLastChannel = channelNumber & 0x80;
+		channelNumber = channelNumber & 0x0F;
+
+		channelNote[channelNumber]  = radFile.read() << 8;
+		channelNote[channelNumber] += radFile.read();
+		if (channelNote[channelNumber] & 0x000F) {
+			efftectParameter[channelNumber] = radFile.read();
+		} else {
+			efftectParameter[channelNumber] = 0x00;
+		}
+	} while(!isLastChannel);
 }
 
 

 * 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();
  }
}



 * Play a note on the given channel.
 */
void playNote(byte channel, byte octave, byte note) {
	opl2.setKeyOn(channel, false);
	opl2.setBlock(channel, octave + (note / 12));
	opl2.setFNumber(channel, pgm_read_word_near(noteFrequencies + (note % 12)));
	opl2.setKeyOn(channel, true);
}


