<ul>
<li><a href="sample_files/beethoven1.mid">beethoven1.mid</a></li>
<li><a href="sample_files/beethoven2.mid">beethoven2.mid</a></li>
<li><a href="sample_files/peter_wolf.mid">peter_wolf.mid</a></li>
<li><a href="sample_files/suite1.mid">suite1.mid</a></li>
<li><a href="sample_files/flute.mid">flute.mid</a></li>
</ul>
<?php 
if (@$file) {
    /****************************************************************************
    	MIDI CLASS CODE
    	****************************************************************************/
    require './classes/midi_rttl.class.php';
    $fn = $_FILES['mid_upload']['name'];
    $bn = strtok($fn, '.');
    $midi = new MidiRttl();
    // TEST
    $midi->defaultDur = 8;
    $midi->defaultScale = 7;
    $midi->importMid($file);
    ?>
<hr />
RTTL converted from: <?php 
    echo $fn;
    ?>
<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<div>
<textarea name="rttl" style="width:90%" cols="60" rows="2"><?php 
    $loop = isset($_POST['loop']);
    $visible = isset($_POST['visible']);
} else {
    $player = 'default';
    $autostart = true;
    $loop = false;
    $visible = true;
}
$inst = isset($_POST['inst']) ? $_POST['inst'] : 0;
$rttl = isset($_POST['rttl']) ? $_POST['rttl'] : 'Beethoven:d=4,o=5,b=250:e6,d#6,e6,d#6,e6,b,d6,c6,2a.,c,e,a,2b.,e,a,b,2c.6,e,e6,d#6,e6,d#6,e6,b,d6,c6,2a.,c,e,a,2b.,e,c6,b,1a';
$plug = isset($_POST['plug']) ? $_POST['plug'] : 'qt';
/****************************************************************************
MIDI CLASS CODE
****************************************************************************/
require './classes/midi_rttl.class.php';
$midi = new MidiRttl();
$instruments = $midi->getInstrumentList();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Rttl2Midi</title>
<link rel="stylesheet" type="text/css" href="css/midi.css" />
</head>
<body>
<form action="<?php 
echo $PHP_SELF;
?>
" method="post">