Wednesday, October 22, 2008

All 12 Major Scales -- created with PHP

All 12 major scales, created with PHP



include('chord_variables.php');
include('output_fns.php');
do_html_header('All 12 Major Scales');
$piano_chord_type = 'major';
$current_root_name = "C";

$scale_degree_name[1] = "root";
$scale_degree_name[2] = "second";
$scale_degree_name[3] = "third";
$scale_degree_name[4] = "fourth";
$scale_degree_name[5] = "fifth";
$scale_degree_name[6] = "sixth";
$scale_degree_name[7] = "seventh";
$scale_degree_name[8] = "octave";

$adjustment["major"] = array(0,2,4,5,7,9,11,12);
$adjustment["minor"] = array(0,2,3,5,7,8,10,12);
$adjustment["minor 7th"] = array(0,2,3,5,7,8,10,12);
$adjustment["major 7th"] = array(0,2,4,5,7,9,11,12);
$adjustment["dominant 7th"] = array(0,2,4,5,7,9,10,12);
$adjustment["diminished 7th"] = array(0,2,3,5,6,8,11,12);

$scale_name["major"] = 'major';
$scale_name["minor"] = 'minor';
$scale_name["minor 7th"] = 'minor';
$scale_name["major 7th"] = 'major';
$scale_name["dominant 7th"] = 'mixolydian';
$scale_name["diminished 7th"] = '';


$temparray = $adjustment[$piano_chord_type];


if ($piano_chord_type != "diminished 7th"){

echo '
';

for ($scale=1; $scale<13; $scale++){
$current_root_number = $scale + 11;
$current_root_name = $Roots[$scale];
init_default_names();
changeKeyNames($Roots[$scale]);



// MAKE ROW OF 8 COLUMNS


// MAKE ROW OF 8 COLUMNS

for ($i=1; $i<9; $i++){


include('show_scale_v2.php');



}

// END ROW OF 8 COLUMNS

echo "
";


} // end if



} // end if
echo '
';
?>

No comments: