array(array(1,1),array(pow(2,(1/$step)),1)), 'title'=>$step.' tone equal temperament', 'errors'=>0 ); } function parseScale($type,$scale) { $tempscale=array( 'steps'=>array(array(1,1)), 'title'=>'Scale import error', 'errors'=>1 ); switch($type) { case 'scala': $tempscale = parseScala($scale); break; case 'root2': $tempscale = parseRoot2($scale); break; } if ($tempscale['errors']>0) die('Sorry I encountered the following error(s) while parsing your scale:'."\n\n
".$tempscale['errorstring']); return $tempscale; } ?>