  * Slide the pitch of a channel by a given F-number amount and return the new block + F-number.
  */
 unsigned int pitchAdjust(byte channel, short amount) {
-  byte block = opl2.getBlock(channel);
-  short fNumber = opl2.getFNumber(channel);
-  fNumber = max(0x000, min(fNumber + amount, 0x3FF));
-
-  // Drop one octave (if possible) when the F-number drops below octave minimum.
-  if (fNumber < FNUMBER_MIN) {
-    if (block > 0) {
-      block --;
-      fNumber = FNUMBER_MAX - (FNUMBER_MIN - fNumber);
-    }
-
-  // Increase one octave (if possible) when the F-number reaches above octave maximum.
-  } else if (fNumber > FNUMBER_MAX) {
-    if (block < 7) {
-      block ++;
-      fNumber = FNUMBER_MIN + (fNumber - FNUMBER_MAX);
-    }
-  }
-
-  // Set new octave and frequency and return combind octave + F-number value.
-  opl2.setBlock(channel, block);
-  opl2.setFNumber(channel, fNumber);
-  return (block << 12) + fNumber;
+	byte block = opl2.getBlock(channel);
+	short fNumber = opl2.getFNumber(channel);
+	fNumber = max(0x000, min(fNumber + amount, 0x3FF));
+
+	// Drop one octave (if possible) when the F-number drops below octave minimum.
+	if (fNumber < FNUMBER_MIN) {
+		if (block > 0) {
+			block --;
+			fNumber = FNUMBER_MAX - (FNUMBER_MIN - fNumber);
+		}
+
+	// Increase one octave (if possible) when the F-number reaches above octave maximum.
+	} else if (fNumber > FNUMBER_MAX) {
+		if (block < 7) {
+			block ++;
+			fNumber = FNUMBER_MIN + (fNumber - FNUMBER_MAX);
+		}
+	}
+
+	// Set new octave and frequency and return combind octave + F-number value.
+	opl2.setBlock(channel, block);
+	opl2.setFNumber(channel, fNumber);
+	return (block << 12) + fNumber;
 }
 
 

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



 * destination pitch is reached.
 */
void pitchAdjustToNote(byte channel) {
	if (pitchSlideDest[channel] == 0x0000) return;

	unsigned int slidePos = opl2.getBlock(channel) << 12;
	slidePos += opl2.getFNumber(channel);

	// Slide pitch up and compensate any overshoot.
	if (slidePos < pitchSlideDest[channel]) {
		slidePos = pitchAdjust(channel, pitchSlideSpeed[channel]);
		if (slidePos >= pitchSlideDest[channel]) {
			opl2.setBlock  (channel, (pitchSlideDest[channel] & 0xF000) >> 12);
			opl2.setFNumber(channel,  pitchSlideDest[channel] & 0x0FFF);
			pitchSlideDest[channel] = 0x0000;
		}

	// Slide pitch down and compensate for any undershoot.
	} else if (slidePos > pitchSlideDest[channel]) {
		slidePos = pitchAdjust(channel, -pitchSlideSpeed[channel]);
		if (slidePos <= pitchSlideDest[channel]) {
			opl2.setBlock  (channel, (pitchSlideDest[channel] & 0xF000) >> 12);
			opl2.setFNumber(channel,  pitchSlideDest[channel] & 0x0FFF);
			pitchSlideDest[channel] = 0x0000;
		}
	}
}


