$value){ //For debugging purposes
// echo “$key => $value
“;
//}
$instrument = $values[‘instrument’];
$level = $values[‘level’];
$mode = $values[‘mode’];
$lesson_name = str_replace(“+”, ” “, $values[‘lesson_name’]);
/////////////////////////////////////////////
// Direction stuff
/////////////////////////////////////////////
$direction = $values[‘direction’];
$direction_text = $direction;
if(strcasecmp($direction, ‘up’) == 0) $direction_text = ‘upwards’;
if(strcasecmp($direction, ‘down’) == 0) $direction_text = ‘downwards’;
if(strcasecmp($direction, ‘chord’) == 0) $direction_text = ‘as chords’;
$instructions = “”;
if(strcmp($mode, ‘sound_instrument’) == 0) $instructions = “play them on your instrument.”;
if(strcmp($mode, ‘sound_theory’) == 0) $instructions = ‘name them.’;
if(strcmp($mode, ‘sound_notation’) == 0) $instructions = ‘write them using music notation.’;
echo “In this lesson, you will hear $lesson_name played $direction_text, then $instructions”;
echo “
Here are some examples:
“;
require_once(‘files/EarTrainer/live/php/gui_tools.php’);
echo getEarExamples($lesson_name, $direction);
?>