commit 5276b298b4aa58d70dc233a62c800d782807442e Author: tmont Date: Mon Jan 15 12:00:00 2007 +0000 initial import from old hard drive diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fede140 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +songs/a2600*.mid diff --git a/au/101.4.au b/au/101.4.au new file mode 100755 index 0000000..44cb68c Binary files /dev/null and b/au/101.4.au differ diff --git a/au/1014.2.au b/au/1014.2.au new file mode 100755 index 0000000..4ec7bd9 Binary files /dev/null and b/au/1014.2.au differ diff --git a/au/104.8.au b/au/104.8.au new file mode 100755 index 0000000..f736121 Binary files /dev/null and b/au/104.8.au differ diff --git a/au/1048.0.au b/au/1048.0.au new file mode 100755 index 0000000..1f69af2 Binary files /dev/null and b/au/1048.0.au differ diff --git a/au/110.3.au b/au/110.3.au new file mode 100755 index 0000000..08f7ccc Binary files /dev/null and b/au/110.3.au differ diff --git a/au/112.7.au b/au/112.7.au new file mode 100755 index 0000000..2436297 Binary files /dev/null and b/au/112.7.au differ diff --git a/au/1122.9.au b/au/1122.9.au new file mode 100755 index 0000000..db20c35 Binary files /dev/null and b/au/1122.9.au differ diff --git a/au/116.4.au b/au/116.4.au new file mode 100755 index 0000000..b8312b2 Binary files /dev/null and b/au/116.4.au differ diff --git a/au/1209.2.au b/au/1209.2.au new file mode 100755 index 0000000..1a18fa1 Binary files /dev/null and b/au/1209.2.au differ diff --git a/au/123.3.au b/au/123.3.au new file mode 100755 index 0000000..7306fd3 Binary files /dev/null and b/au/123.3.au differ diff --git a/au/126.8.au b/au/126.8.au new file mode 100755 index 0000000..18aa83f Binary files /dev/null and b/au/126.8.au differ diff --git a/au/131.0.au b/au/131.0.au new file mode 100755 index 0000000..43e890b Binary files /dev/null and b/au/131.0.au differ diff --git a/au/1310.0.au b/au/1310.0.au new file mode 100755 index 0000000..40e5cc3 Binary files /dev/null and b/au/1310.0.au differ diff --git a/au/139.7.au b/au/139.7.au new file mode 100755 index 0000000..c238333 Binary files /dev/null and b/au/139.7.au differ diff --git a/au/1429.1.au b/au/1429.1.au new file mode 100755 index 0000000..516f773 Binary files /dev/null and b/au/1429.1.au differ diff --git a/au/144.9.au b/au/144.9.au new file mode 100755 index 0000000..0a99231 Binary files /dev/null and b/au/144.9.au differ diff --git a/au/149.7.au b/au/149.7.au new file mode 100755 index 0000000..8db05d9 Binary files /dev/null and b/au/149.7.au differ diff --git a/au/1572.0.au b/au/1572.0.au new file mode 100755 index 0000000..80663d8 Binary files /dev/null and b/au/1572.0.au differ diff --git a/au/16.1.au b/au/16.1.au new file mode 100755 index 0000000..fd9b4e1 Binary files /dev/null and b/au/16.1.au differ diff --git a/au/16.9.au b/au/16.9.au new file mode 100755 index 0000000..e416a7e Binary files /dev/null and b/au/16.9.au differ diff --git a/au/161.2.au b/au/161.2.au new file mode 100755 index 0000000..d8c91d7 Binary files /dev/null and b/au/161.2.au differ diff --git a/au/163.8.au b/au/163.8.au new file mode 100755 index 0000000..d7ce109 Binary files /dev/null and b/au/163.8.au differ diff --git a/au/169.0.au b/au/169.0.au new file mode 100755 index 0000000..ae236bb Binary files /dev/null and b/au/169.0.au differ diff --git a/au/17.8.au b/au/17.8.au new file mode 100755 index 0000000..8cdc978 Binary files /dev/null and b/au/17.8.au differ diff --git a/au/174.7.au b/au/174.7.au new file mode 100755 index 0000000..43eb5d4 Binary files /dev/null and b/au/174.7.au differ diff --git a/au/1746.6.au b/au/1746.6.au new file mode 100755 index 0000000..eb753cc Binary files /dev/null and b/au/1746.6.au differ diff --git a/au/1746.7.au b/au/1746.7.au new file mode 100755 index 0000000..109851e Binary files /dev/null and b/au/1746.7.au differ diff --git a/au/18.8.au b/au/18.8.au new file mode 100755 index 0000000..599f1e3 Binary files /dev/null and b/au/18.8.au differ diff --git a/au/180.7.au b/au/180.7.au new file mode 100755 index 0000000..73cb269 Binary files /dev/null and b/au/180.7.au differ diff --git a/au/187.1.au b/au/187.1.au new file mode 100755 index 0000000..a6446af Binary files /dev/null and b/au/187.1.au differ diff --git a/au/19.9.au b/au/19.9.au new file mode 100755 index 0000000..0e9d4b6 Binary files /dev/null and b/au/19.9.au differ diff --git a/au/190.5.au b/au/190.5.au new file mode 100755 index 0000000..c392ec0 Binary files /dev/null and b/au/190.5.au differ diff --git a/au/194.1.au b/au/194.1.au new file mode 100755 index 0000000..360fccd Binary files /dev/null and b/au/194.1.au differ diff --git a/au/1965.0.au b/au/1965.0.au new file mode 100755 index 0000000..78eb2bf Binary files /dev/null and b/au/1965.0.au differ diff --git a/au/20.5.au b/au/20.5.au new file mode 100755 index 0000000..5031b73 Binary files /dev/null and b/au/20.5.au differ diff --git a/au/201.5.au b/au/201.5.au new file mode 100755 index 0000000..f41cadd Binary files /dev/null and b/au/201.5.au differ diff --git a/au/202.8.au b/au/202.8.au new file mode 100755 index 0000000..2255ad5 Binary files /dev/null and b/au/202.8.au differ diff --git a/au/209.6.au b/au/209.6.au new file mode 100755 index 0000000..f5a1666 Binary files /dev/null and b/au/209.6.au differ diff --git a/au/2096.0.au b/au/2096.0.au new file mode 100755 index 0000000..2bd71ed Binary files /dev/null and b/au/2096.0.au differ diff --git a/au/21.1.au b/au/21.1.au new file mode 100755 index 0000000..b51d5a5 Binary files /dev/null and b/au/21.1.au differ diff --git a/au/218.3.au b/au/218.3.au new file mode 100755 index 0000000..fe20a33 Binary files /dev/null and b/au/218.3.au differ diff --git a/au/22.5.au b/au/22.5.au new file mode 100755 index 0000000..340838a Binary files /dev/null and b/au/22.5.au differ diff --git a/au/2245.7.au b/au/2245.7.au new file mode 100755 index 0000000..bdb3b8c Binary files /dev/null and b/au/2245.7.au differ diff --git a/au/227.8.au b/au/227.8.au new file mode 100755 index 0000000..d6e8de5 Binary files /dev/null and b/au/227.8.au differ diff --git a/au/232.9.au b/au/232.9.au new file mode 100755 index 0000000..e8935fe Binary files /dev/null and b/au/232.9.au differ diff --git a/au/238.2.au b/au/238.2.au new file mode 100755 index 0000000..ebaddd0 Binary files /dev/null and b/au/238.2.au differ diff --git a/au/24.1.au b/au/24.1.au new file mode 100755 index 0000000..9d46fd0 Binary files /dev/null and b/au/24.1.au differ diff --git a/au/249.5.au b/au/249.5.au new file mode 100755 index 0000000..431d931 Binary files /dev/null and b/au/249.5.au differ diff --git a/au/253.5.au b/au/253.5.au new file mode 100755 index 0000000..319ccde Binary files /dev/null and b/au/253.5.au differ diff --git a/au/26.0.au b/au/26.0.au new file mode 100755 index 0000000..0bdef89 Binary files /dev/null and b/au/26.0.au differ diff --git a/au/262.0.au b/au/262.0.au new file mode 100755 index 0000000..6b11f79 Binary files /dev/null and b/au/262.0.au differ diff --git a/au/2620.0.au b/au/2620.0.au new file mode 100755 index 0000000..0530dbb Binary files /dev/null and b/au/2620.0.au differ diff --git a/au/275.8.au b/au/275.8.au new file mode 100755 index 0000000..343bbdf Binary files /dev/null and b/au/275.8.au differ diff --git a/au/28.2.au b/au/28.2.au new file mode 100755 index 0000000..65882bf Binary files /dev/null and b/au/28.2.au differ diff --git a/au/291.1.au b/au/291.1.au new file mode 100755 index 0000000..3f047a6 Binary files /dev/null and b/au/291.1.au differ diff --git a/au/299.4.au b/au/299.4.au new file mode 100755 index 0000000..a9afaf5 Binary files /dev/null and b/au/299.4.au differ diff --git a/au/30.7.au b/au/30.7.au new file mode 100755 index 0000000..202026a Binary files /dev/null and b/au/30.7.au differ diff --git a/au/30.8.au b/au/30.8.au new file mode 100755 index 0000000..4d26c8b Binary files /dev/null and b/au/30.8.au differ diff --git a/au/308.2.au b/au/308.2.au new file mode 100755 index 0000000..47656e9 Binary files /dev/null and b/au/308.2.au differ diff --git a/au/31.7.au b/au/31.7.au new file mode 100755 index 0000000..d682bbc Binary files /dev/null and b/au/31.7.au differ diff --git a/au/3144.0.au b/au/3144.0.au new file mode 100755 index 0000000..371a944 Binary files /dev/null and b/au/3144.0.au differ diff --git a/au/32.7.au b/au/32.7.au new file mode 100755 index 0000000..30b5163 Binary files /dev/null and b/au/32.7.au differ diff --git a/au/327.5.au b/au/327.5.au new file mode 100755 index 0000000..79ec411 Binary files /dev/null and b/au/327.5.au differ diff --git a/au/33.8.au b/au/33.8.au new file mode 100755 index 0000000..a6da0ad Binary files /dev/null and b/au/33.8.au differ diff --git a/au/338.1.au b/au/338.1.au new file mode 100755 index 0000000..006a7a9 Binary files /dev/null and b/au/338.1.au differ diff --git a/au/349.3.au b/au/349.3.au new file mode 100755 index 0000000..2968cde Binary files /dev/null and b/au/349.3.au differ diff --git a/au/35.0.au b/au/35.0.au new file mode 100755 index 0000000..85dfc70 Binary files /dev/null and b/au/35.0.au differ diff --git a/au/36.2.au b/au/36.2.au new file mode 100755 index 0000000..10d65df Binary files /dev/null and b/au/36.2.au differ diff --git a/au/37.6.au b/au/37.6.au new file mode 100755 index 0000000..5b1ff03 Binary files /dev/null and b/au/37.6.au differ diff --git a/au/374.3.au b/au/374.3.au new file mode 100755 index 0000000..81c0756 Binary files /dev/null and b/au/374.3.au differ diff --git a/au/39.0.au b/au/39.0.au new file mode 100755 index 0000000..731993a Binary files /dev/null and b/au/39.0.au differ diff --git a/au/3930.0.au b/au/3930.0.au new file mode 100755 index 0000000..d5ae4ea Binary files /dev/null and b/au/3930.0.au differ diff --git a/au/40.6.au b/au/40.6.au new file mode 100755 index 0000000..bfd1f89 Binary files /dev/null and b/au/40.6.au differ diff --git a/au/403.1.au b/au/403.1.au new file mode 100755 index 0000000..6afb478 Binary files /dev/null and b/au/403.1.au differ diff --git a/au/419.2.au b/au/419.2.au new file mode 100755 index 0000000..15ded77 Binary files /dev/null and b/au/419.2.au differ diff --git a/au/42.3.au b/au/42.3.au new file mode 100755 index 0000000..d53bbdb Binary files /dev/null and b/au/42.3.au differ diff --git a/au/436.7.au b/au/436.7.au new file mode 100755 index 0000000..139d581 Binary files /dev/null and b/au/436.7.au differ diff --git a/au/44.1.au b/au/44.1.au new file mode 100755 index 0000000..485e79d Binary files /dev/null and b/au/44.1.au differ diff --git a/au/46.1.au b/au/46.1.au new file mode 100755 index 0000000..8eef7ea Binary files /dev/null and b/au/46.1.au differ diff --git a/au/476.6.au b/au/476.6.au new file mode 100755 index 0000000..b94e44d Binary files /dev/null and b/au/476.6.au differ diff --git a/au/48.3.au b/au/48.3.au new file mode 100755 index 0000000..407e0eb Binary files /dev/null and b/au/48.3.au differ diff --git a/au/491.3.au b/au/491.3.au new file mode 100755 index 0000000..a6cd80c Binary files /dev/null and b/au/491.3.au differ diff --git a/au/50.7.au b/au/50.7.au new file mode 100755 index 0000000..21b5b64 Binary files /dev/null and b/au/50.7.au differ diff --git a/au/507.1.au b/au/507.1.au new file mode 100755 index 0000000..8074a62 Binary files /dev/null and b/au/507.1.au differ diff --git a/au/524.0.au b/au/524.0.au new file mode 100755 index 0000000..f7790ef Binary files /dev/null and b/au/524.0.au differ diff --git a/au/5240.0.au b/au/5240.0.au new file mode 100755 index 0000000..d02d65f Binary files /dev/null and b/au/5240.0.au differ diff --git a/au/53.4.au b/au/53.4.au new file mode 100755 index 0000000..d6ce660 Binary files /dev/null and b/au/53.4.au differ diff --git a/au/542.1.au b/au/542.1.au new file mode 100755 index 0000000..a64e3f8 Binary files /dev/null and b/au/542.1.au differ diff --git a/au/56.3.au b/au/56.3.au new file mode 100755 index 0000000..0dfe3a8 Binary files /dev/null and b/au/56.3.au differ diff --git a/au/561.4.au b/au/561.4.au new file mode 100755 index 0000000..5ef89c1 Binary files /dev/null and b/au/561.4.au differ diff --git a/au/582.2.au b/au/582.2.au new file mode 100755 index 0000000..4060bb9 Binary files /dev/null and b/au/582.2.au differ diff --git a/au/59.7.au b/au/59.7.au new file mode 100755 index 0000000..ce66736 Binary files /dev/null and b/au/59.7.au differ diff --git a/au/604.6.au b/au/604.6.au new file mode 100755 index 0000000..f9bb1cb Binary files /dev/null and b/au/604.6.au differ diff --git a/au/61.5.au b/au/61.5.au new file mode 100755 index 0000000..33d37ae Binary files /dev/null and b/au/61.5.au differ diff --git a/au/628.8.au b/au/628.8.au new file mode 100755 index 0000000..10c2110 Binary files /dev/null and b/au/628.8.au differ diff --git a/au/63.4.au b/au/63.4.au new file mode 100755 index 0000000..8875482 Binary files /dev/null and b/au/63.4.au differ diff --git a/au/65.5.au b/au/65.5.au new file mode 100755 index 0000000..6a03872 Binary files /dev/null and b/au/65.5.au differ diff --git a/au/655.0.au b/au/655.0.au new file mode 100755 index 0000000..fc86080 Binary files /dev/null and b/au/655.0.au differ diff --git a/au/67.6.au b/au/67.6.au new file mode 100755 index 0000000..e70768f Binary files /dev/null and b/au/67.6.au differ diff --git a/au/683.5.au b/au/683.5.au new file mode 100755 index 0000000..0a35307 Binary files /dev/null and b/au/683.5.au differ diff --git a/au/69.9.au b/au/69.9.au new file mode 100755 index 0000000..545e5c8 Binary files /dev/null and b/au/69.9.au differ diff --git a/au/698.7.au b/au/698.7.au new file mode 100755 index 0000000..95e9124 Binary files /dev/null and b/au/698.7.au differ diff --git a/au/714.5.au b/au/714.5.au new file mode 100755 index 0000000..d62506e Binary files /dev/null and b/au/714.5.au differ diff --git a/au/72.3.au b/au/72.3.au new file mode 100755 index 0000000..039fa8b Binary files /dev/null and b/au/72.3.au differ diff --git a/au/72.4.au b/au/72.4.au new file mode 100755 index 0000000..3175dd2 Binary files /dev/null and b/au/72.4.au differ diff --git a/au/74.9.au b/au/74.9.au new file mode 100755 index 0000000..a498e2d Binary files /dev/null and b/au/74.9.au differ diff --git a/au/748.6.au b/au/748.6.au new file mode 100755 index 0000000..1b5e93c Binary files /dev/null and b/au/748.6.au differ diff --git a/au/77.6.au b/au/77.6.au new file mode 100755 index 0000000..c515fa7 Binary files /dev/null and b/au/77.6.au differ diff --git a/au/78.0.au b/au/78.0.au new file mode 100755 index 0000000..e7df4bf Binary files /dev/null and b/au/78.0.au differ diff --git a/au/786.0.au b/au/786.0.au new file mode 100755 index 0000000..797e641 Binary files /dev/null and b/au/786.0.au differ diff --git a/au/7860.0.au b/au/7860.0.au new file mode 100755 index 0000000..adc59c8 Binary files /dev/null and b/au/7860.0.au differ diff --git a/au/80.6.au b/au/80.6.au new file mode 100755 index 0000000..f60140f Binary files /dev/null and b/au/80.6.au differ diff --git a/au/827.4.au b/au/827.4.au new file mode 100755 index 0000000..a0ca2d2 Binary files /dev/null and b/au/827.4.au differ diff --git a/au/83.8.au b/au/83.8.au new file mode 100755 index 0000000..54672ee Binary files /dev/null and b/au/83.8.au differ diff --git a/au/84.5.au b/au/84.5.au new file mode 100755 index 0000000..b0895a0 Binary files /dev/null and b/au/84.5.au differ diff --git a/au/87.3.au b/au/87.3.au new file mode 100755 index 0000000..99da69d Binary files /dev/null and b/au/87.3.au differ diff --git a/au/873.3.au b/au/873.3.au new file mode 100755 index 0000000..1243d82 Binary files /dev/null and b/au/873.3.au differ diff --git a/au/91.1.au b/au/91.1.au new file mode 100755 index 0000000..1b4acf1 Binary files /dev/null and b/au/91.1.au differ diff --git a/au/92.2.au b/au/92.2.au new file mode 100755 index 0000000..e1ccd3a Binary files /dev/null and b/au/92.2.au differ diff --git a/au/924.7.au b/au/924.7.au new file mode 100755 index 0000000..ce41b31 Binary files /dev/null and b/au/924.7.au differ diff --git a/au/95.3.au b/au/95.3.au new file mode 100755 index 0000000..8a997ad Binary files /dev/null and b/au/95.3.au differ diff --git a/au/982.5.au b/au/982.5.au new file mode 100755 index 0000000..9b7e83c Binary files /dev/null and b/au/982.5.au differ diff --git a/au/99.8.au b/au/99.8.au new file mode 100755 index 0000000..65fffd8 Binary files /dev/null and b/au/99.8.au differ diff --git a/bass_1.php b/bass_1.php new file mode 100755 index 0000000..81195bb --- /dev/null +++ b/bass_1.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && (strcmp($c1_data[$i-1][1],"3") < 0 || strcmp($c1_data[$i-1][1],"3") > 0)) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"3") == 0) //play a note (bass) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,147); //note on, channel 3 + array_push($bin_data,$note_array['bass'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,227); //pitch bend, channel 3 + array_push($bin_data,$note_array['bass'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['bass'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,131); //note off, channel 3 + array_push($bin_data,$note_array['bass'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to lead voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",195),1); //change voice, channel 3 +fwrite($filehandle,pack("I",81),1); //bass voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",179),1); //controller event, channel 3 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 3 DATA +?> \ No newline at end of file diff --git a/bass_2.php b/bass_2.php new file mode 100755 index 0000000..ace6344 --- /dev/null +++ b/bass_2.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && (strcmp($c2_data[$i-1][1],"3") < 0 || strcmp($c2_data[$i-1][1],"3") > 0)) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"3") == 0) //play a note (bass) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,151); //note on, channel 7 + array_push($bin_data,$note_array['bass'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,231); //pitch bend, channel 7 + array_push($bin_data,$note_array['bass'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['bass'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,135); //note off, channel 7 + array_push($bin_data,$note_array['bass'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to lead voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",199),1); //change voice, channel 7 +fwrite($filehandle,pack("I",81),1); //bass voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",183),1); //controller event, channel 7 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 3 DATA +?> \ No newline at end of file diff --git a/createmidi.php b/createmidi.php new file mode 100755 index 0000000..0665b53 --- /dev/null +++ b/createmidi.php @@ -0,0 +1,139 @@ + array(0=>false,1=>false,2=>false,3=>false), + 2 => array(0=>false,1=>false,2=>false,3=>false)); + + foreach ($c1_data as $i => $arr) + if ($arr[1] != "x") + $track_arr[1][$arr[1]] = true; + + foreach ($c2_data as $i => $arr) + if ($arr[1] != "x") + $track_arr[2][$arr[1]] = true; + + $numtracks = 1; + foreach ($track_arr as $var => $arr) + foreach ($arr as $val) + if ($val) + $numtracks++; + //----------------------------------------------// + + //HEADER + fwrite($filehandle,pack("I",77),1); + fwrite($filehandle,pack("I",84),1); + fwrite($filehandle,pack("I",104),1); + fwrite($filehandle,pack("I",100),1); + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",0),1); + + //Size of header + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",6),1); + + //MIDI file format + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",1),1); + + //# of tracks + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",$numtracks),1); //one for each voice for each channel, plus the default one to declare time signatures, etc. + + //Time division + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",240),1); + //END HEADER + + //TRACK 1 DATA + //Header + fwrite($filehandle,pack("I",77),1); + fwrite($filehandle,pack("I",84),1); + fwrite($filehandle,pack("I",114),1); + fwrite($filehandle,pack("I",107),1); + + //# of bytes in track data + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",19),1); + + //Tempo + $ms = round(60000000/$_POST['tempo']); + $ms = str_pad(dechex($ms),6,"0",STR_PAD_LEFT); + $byte1 = hexdec(substr($ms,0,2)); + $byte2 = hexdec(substr($ms,2,2)); + $byte3 = hexdec(substr($ms,4,2)); + + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",255),1); + fwrite($filehandle,pack("I",81),1); + fwrite($filehandle,pack("I",3),1); + fwrite($filehandle,pack("I",$byte1),1); //microseconds per beat (variable, depending on tempo) + fwrite($filehandle,pack("I",$byte2),1); //microseconds per beat + fwrite($filehandle,pack("I",$byte3),1); //microseconds per beat + + //Time signature + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",255),1); + fwrite($filehandle,pack("I",88),1); + fwrite($filehandle,pack("I",4),1); + fwrite($filehandle,pack("I",$_POST['timesig_num']),1); //numerator (variable) + fwrite($filehandle,pack("I",log($_POST['timesig_de'],2)),1); //denominator^2 (variable) + fwrite($filehandle,pack("I",24),1); //Metronome + fwrite($filehandle,pack("I",8),1); //32nd notes per beat + + //End track + fwrite($filehandle,pack("I",0),1); + fwrite($filehandle,pack("I",255),1); + fwrite($filehandle,pack("I",47),1); + fwrite($filehandle,pack("I",0),1); + //END TRACK 1 DATA + + /* Array Format + * $c1_data[note][0] = note name + * $c1_data[note][1] = distortion # + * $c1_data[note][2] = atari note index + * $c1_data[note][3] = note value (quarter, eighth, etc.) + */ + + if ($track_arr[1][0]) require("square_1.php"); + if ($track_arr[1][1]) require("lead_1.php"); + if ($track_arr[1][2]) require("saw_1.php"); + if ($track_arr[1][3]) require("bass_1.php"); + if ($track_arr[2][0]) require("square_2.php"); + if ($track_arr[2][1]) require("lead_2.php"); + if ($track_arr[2][2]) require("saw_2.php"); + if ($track_arr[2][3]) require("bass_2.php"); + + fclose($filehandle); + header("Content-type: audio/midi"); + header("Content-Disposition: attachment; filename=$filename"); + readfile("songs/$filename"); + } + else + { + echo ""; + } + } +?> \ No newline at end of file diff --git a/etc/ataripitch.txt b/etc/ataripitch.txt new file mode 100755 index 0000000..48687ec --- /dev/null +++ b/etc/ataripitch.txt @@ -0,0 +1,155 @@ +[0][0] = (0,2096.0,0) +[0][1] = (1,1048.0,0) +[0][2] = (2,698.7,0) +[0][3] = (3,524.0,0) +[0][4] = (4,419.2,0) +[0][5] = (5,349.3,0) +[0][6] = (6,299.4,0) +[0][7] = (7,262.0,0) +[0][8] = (8,232.9,0) +[0][9] = (9,209.6,0) +[0][10] = (10,190.5,0) +[0][11] = (11,174.7,0) +[0][12] = (12,161.2,0) +[0][13] = (13,149.7,0) +[0][14] = (14,139.7,0) +[0][15] = (15,131.0,0) +[0][16] = (16,123.3,0) +[0][17] = (17,116.4,0) +[0][18] = (18,110.3,0) +[0][19] = (19,104.8,0) +[0][20] = (20,99.8,0) +[0][21] = (21,95.3,0) +[0][22] = (22,91.1,0) +[0][23] = (23,87.3,0) +[0][24] = (24,83.8,0) +[0][25] = (25,80.6,0) +[0][26] = (26,77.6,0) +[0][27] = (27,74.9,0) +[0][28] = (28,72.3,0) +[0][29] = (29,69.9,0) +[0][30] = (30,67.6,0) +[0][31] = (31,65.5,0) +[1][0] = (0,67.6,1) +[1][1] = (1,33.8,1) +[1][2] = (2,22.5,1) +[1][3] = (3,16.9,1) +[2][1] = (1,7860.0,2) +[2][2] = (2,5240.0,2) +[2][3] = (3,3930.0,2) +[2][4] = (4,3144.0,2) +[2][5] = (5,2620.0,2) +[2][6] = (6,2245.7,2) +[2][7] = (7,1965.0,2) +[2][8] = (8,1746.7,2) +[2][9] = (9,1572.0,2) +[2][10] = (10,1429.1,2) +[2][11] = (11,1310.0,2) +[2][12] = (12,1209.2,2) +[2][13] = (13,1122.9,2) +[2][14] = (14,1048.0,2) +[2][15] = (15,982.5,2) +[2][16] = (16,924.7,2) +[2][17] = (17,873.3,2) +[2][18] = (18,827.4,2) +[2][19] = (19,786.0,2) +[2][20] = (20,748.6,2) +[2][21] = (21,714.5,2) +[2][22] = (22,683.5,2) +[2][23] = (23,655.0,2) +[2][24] = (24,628.8,2) +[2][25] = (25,604.6,2) +[2][26] = (26,582.2,2) +[2][27] = (27,561.4,2) +[2][28] = (28,542.1,2) +[2][29] = (29,524.0,2) +[2][30] = (30,507.1,2) +[2][31] = (31,491.3,2) +[3][0] = (0,1014.2,3) +[3][1] = (1,507.1,3) +[3][2] = (2,338.1,3) +[3][3] = (3,253.5,3) +[3][4] = (4,202.8,3) +[3][5] = (5,169.0,3) +[3][6] = (6,144.9,3) +[3][7] = (7,126.8,3) +[3][8] = (8,112.7,3) +[3][9] = (9,101.4,3) +[3][10] = (10,92.2,3) +[3][11] = (11,84.5,3) +[3][12] = (12,78.0,3) +[3][13] = (13,72.4,3) +[3][14] = (14,67.6,3) +[3][15] = (15,63.4,3) +[3][16] = (16,59.7,3) +[3][17] = (17,56.3,3) +[3][18] = (18,53.4,3) +[3][19] = (19,50.7,3) +[3][20] = (20,48.3,3) +[3][21] = (21,46.1,3) +[3][22] = (22,44.1,3) +[3][23] = (23,42.3,3) +[3][24] = (24,40.6,3) +[3][25] = (25,39.0,3) +[3][26] = (26,37.6,3) +[3][27] = (27,36.2,3) +[3][28] = (28,35.0,3) +[3][29] = (29,33.8,3) +[3][30] = (30,32.7,3) +[3][31] = (31,31.7,3) +[4][0] = (0,61.5,4) +[4][1] = (1,30.8,4) +[4][2] = (2,20.5,4) +[5][0] = (0,5240.0,5) +[5][1] = (1,2620.0,5) +[5][2] = (2,1746.6,5) +[5][3] = (3,1310.0,5) +[5][4] = (4,1048.0,5) +[5][5] = (5,873.3,5) +[5][6] = (6,748.6,5) +[5][7] = (7,655.0,5) +[5][8] = (8,582.2,5) +[5][9] = (9,524.0,5) +[5][10] = (10,476.6,5) +[5][11] = (11,436.7,5) +[5][12] = (12,403.1,5) +[5][13] = (13,374.3,5) +[5][14] = (14,349.3,5) +[5][15] = (15,327.5,5) +[5][16] = (16,308.2,5) +[5][17] = (17,291.1,5) +[5][18] = (18,275.8,5) +[5][19] = (19,262.0,5) +[5][20] = (20,249.5,5) +[5][21] = (21,238.2,5) +[5][22] = (22,227.8,5) +[5][23] = (23,218.3,5) +[5][24] = (24,209.6,5) +[5][25] = (25,201.5,5) +[5][26] = (26,194.1,5) +[5][27] = (27,187.1,5) +[5][28] = (28,180.7,5) +[5][29] = (29,174.7,5) +[5][30] = (30,169.0,5) +[5][31] = (31,163.8,5) +[6][0] = (0,338.1,6) +[6][1] = (1,169.0,6) +[6][2] = (2,112.7,6) +[6][3] = (3,84.5,6) +[6][4] = (4,67.6,6) +[6][5] = (5,56.3,6) +[6][6] = (6,48.3,6) +[6][7] = (7,42.3,6) +[6][8] = (8,37.6,6) +[6][9] = (9,33.8,6) +[6][10] = (10,30.7,6) +[6][11] = (11,28.2,6) +[6][12] = (12,26.0,6) +[6][13] = (13,24.1,6) +[6][14] = (14,22.5,6) +[6][15] = (15,21.1,6) +[6][16] = (16,19.9,6) +[6][17] = (17,18.8,6) +[6][18] = (18,17.8,6) +[6][19] = (19,16.9,6) +[6][20] = (20,16.1,6) \ No newline at end of file diff --git a/etc/freq.txt b/etc/freq.txt new file mode 100755 index 0000000..9315ea2 --- /dev/null +++ b/etc/freq.txt @@ -0,0 +1,155 @@ +2096.0 +1048.0 +698.7 +524.0 +419.2 +349.3 +299.4 +262.0 +232.9 +209.6 +190.5 +174.7 +161.2 +149.7 +139.7 +131.0 +123.3 +116.4 +110.3 +104.8 +99.8 +95.3 +91.1 +87.3 +83.8 +80.6 +77.6 +74.9 +72.3 +69.9 +67.6 +65.5 +67.6 +33.8 +22.5 +16.9 +7860.0 +5240.0 +3930.0 +3144.0 +2620.0 +2245.7 +1965.0 +1746.7 +1572.0 +1429.1 +1310.0 +1209.2 +1122.9 +1048.0 +982.5 +924.7 +873.3 +827.4 +786.0 +748.6 +714.5 +683.5 +655.0 +628.8 +604.6 +582.2 +561.4 +542.1 +524.0 +507.1 +491.3 +1014.2 +507.1 +338.1 +253.5 +202.8 +169.0 +144.9 +126.8 +112.7 +101.4 +92.2 +84.5 +78.0 +72.4 +67.6 +63.4 +59.7 +56.3 +53.4 +50.7 +48.3 +46.1 +44.1 +42.3 +40.6 +39.0 +37.6 +36.2 +35.0 +33.8 +32.7 +31.7 +61.5 +30.8 +20.5 +5240.0 +2620.0 +1746.6 +1310.0 +1048.0 +873.3 +748.6 +655.0 +582.2 +524.0 +476.6 +436.7 +403.1 +374.3 +349.3 +327.5 +308.2 +291.1 +275.8 +262.0 +249.5 +238.2 +227.8 +218.3 +209.6 +201.5 +194.1 +187.1 +180.7 +174.7 +169.0 +163.8 +338.1 +169.0 +112.7 +84.5 +67.6 +56.3 +48.3 +42.3 +37.6 +33.8 +30.7 +28.2 +26.0 +24.1 +22.5 +21.1 +19.9 +18.8 +17.8 +16.9 +16.1 \ No newline at end of file diff --git a/etc/image-trans.php b/etc/image-trans.php new file mode 100755 index 0000000..e4c9480 --- /dev/null +++ b/etc/image-trans.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/etc/parsefreq.java b/etc/parsefreq.java new file mode 100755 index 0000000..46d8ac4 --- /dev/null +++ b/etc/parsefreq.java @@ -0,0 +1,215 @@ +import java.io.*; + +public class parsefreq +{ + public parsefreq(){} + + public static void main (String [] args) + { + String freqFile = "ataripitch.txt"; + + try + { + BufferedReader reader = new BufferedReader(new FileReader(freqFile)); + + /******************************************************* + * read each frequency and distortion from freqFile * + * * + * 0 Saw MIDI note 85 (Lead 5 Charang) * + * 1 Engine MIDI note 85 * + * 2 Square MIDI note 80 (Lead 1 Square) * + * 3 Bass MIDI note 81 (Lead 2 Sawtooth) * + * 4 Noise MIDI note 85 * + * 5 Lead MIDI note 81 (Lead 2 Sawtooth) * + * 6 Buzz MIDI note 85 * + * * + ********************************************************/ + + String line; + while ((line = reader.readLine()) != null) + { + int bracket = line.indexOf("]"); + int d = Integer.parseInt(line.substring(1,bracket)); + int atariNoteIndex = Integer.parseInt(line.substring(bracket+2,line.indexOf("]",bracket+1))); + int midiVoice = 0; //indexed from 0 + String dist = ""; + switch (d) + { + case 0: midiVoice = 84; dist = "saw"; break; + case 1: midiVoice = 84; dist = "engine"; break; + case 2: midiVoice = 80; dist = "square"; break; + case 3: midiVoice = 81; dist = "bass"; break; + case 4: midiVoice = 84; dist = "noise"; break; + case 5: midiVoice = 80; dist = "lead"; break; + case 6: midiVoice = 84; dist = "buzz"; break; + } + + double freq = Double.parseDouble(line.substring(line.indexOf(",")+1,line.lastIndexOf(","))); + + //A440 = 69 + //middle C = 60 + + double unroundedNoteIndex = (12*Math.log(freq/13.75)*1.442695)+9; //= 12 * log_base_2(freq/13.75) + 9 + + int roundedNoteIndex = (int)Math.round(unroundedNoteIndex); + String noteName = ""; + switch(roundedNoteIndex%12) + { + case 0: noteName = "C"; break; + case 1: noteName = "C+"; break; + case 2: noteName = "D"; break; + case 3: noteName = "D+"; break; + case 4: noteName = "E"; break; + case 5: noteName = "F"; break; + case 6: noteName = "F+"; break; + case 7: noteName = "G"; break; + case 8: noteName = "G+"; break; + case 9: noteName = "A"; break; + case 10: noteName = "A+"; break; + case 11: noteName = "B"; break; + } + + int octave = roundedNoteIndex/12-1; + noteName += Integer.toString(octave); + + //total pitch bend is from 0-16383 + //values below 8192 bend flat, values above 8192 bend sharp + double valuesPerCent = 40.96; //= 8192/200 + //example: 75 cents sharp = 40.96(75) = 3072+8192 + + double errorInCents = Math.round(100.0*(unroundedNoteIndex-(double)roundedNoteIndex)); + int value = 8192+(int)(errorInCents*valuesPerCent); + + int bits_r = (value/8192)*64+((value%8192)/4096)*32+((value%4096)/2048)*16+((value%2048)/1024)*8+((value%1024)/512)*4+((value%512)/256)*2+((value%256)/128); + int bits_l = value%128; + //---------------------------------------// + + String midiFile = "midi/"+dist+"_"+atariNoteIndex+"_"+noteName+"_"+octave+"_"+freq+"_"+(int)errorInCents+"_"+roundedNoteIndex+"_"+bits_l+"_"+bits_r+".mid"; + + //write to new MIDI file + FileOutputStream outputStream = new FileOutputStream(midiFile); + + //----------HEADER-----------// + outputStream.write(77); //M + outputStream.write(84); //T + outputStream.write(104); //h + outputStream.write(100); //d + outputStream.write(0); // + outputStream.write(0); // + + //Size of header + outputStream.write(0); // + outputStream.write(6); //Size is 6 bytes + + //MIDI file format + outputStream.write(0); // + outputStream.write(1); //MIDI type 1 (multiple tracks) + + //# of tracks + outputStream.write(0); // + outputStream.write(2); //2 tracks + + //Time division + outputStream.write(00); // + outputStream.write(240); //240 ticks per beat + //-------END HEADER---------// + + //--------TRACK DATA--------// + //Header + outputStream.write(77); //M + outputStream.write(84); //T + outputStream.write(114); //r + outputStream.write(107); //k + + //# of bytes in track data + outputStream.write(0); // + outputStream.write(0); // + outputStream.write(0); // + outputStream.write(19); //19 bytes + + //Tempo + outputStream.write(0); //Delta time + outputStream.write(255); //Meta event + outputStream.write(81); //Set tempo + outputStream.write(3); //Length of data + outputStream.write(7); //Microseconds per beat (next 3 bytes) + outputStream.write(161); // + outputStream.write(32); // + + //Time signature + outputStream.write(0); //Delta time + outputStream.write(255); //Meta event + outputStream.write(88); //Set time signature + outputStream.write(4); //Length of data + outputStream.write(4); //Numerator + outputStream.write(2); //Denominator^2 + outputStream.write(24); //Metronome + outputStream.write(8); //32nd notes per beat + + //End track + outputStream.write(0); //Delta time + outputStream.write(255); //Meta event + outputStream.write(47); //End track + outputStream.write(0); //End track + //------END TRACK DATA-----// + + //--------TRACK DATA--------// + //Header + outputStream.write(77); //M + outputStream.write(84); //T + outputStream.write(114); //r + outputStream.write(107); //k + + //# of bytes in track data + outputStream.write(0); // + outputStream.write(0); // + outputStream.write(0); // + outputStream.write(23); //23 bytes (might be variable) + + //Change voice + outputStream.write(0); //Delta time + outputStream.write(192); //Top four bits: change voice; bottom fout bits: channel 0 + outputStream.write(midiVoice); //MIDI voice + + //Change volume + outputStream.write(0); //Delta time + outputStream.write(176); //Top four bits: controller event; bottom four bits: channel 0 + outputStream.write(7); //Change volume + outputStream.write(80); //Volume is set to 80 + + //Note on + outputStream.write(0); //Delta time + outputStream.write(144); //Top four bits: note on; bottom four bits: channel 0 + outputStream.write(roundedNoteIndex); //MIDI note value (0-127) + outputStream.write(100); //Velocity + + //Pitch bend + outputStream.write(0); //Delta time + outputStream.write(224); //Top four bits: pitch bend; bottom four bits: channel 0 + outputStream.write(bits_l); //pitch bend value + outputStream.write(bits_r); //pitch bend value + + //Tick delay + outputStream.write(120); //delay- eighth note (120 ticks) + + //Note off + outputStream.write(128); //Top four bits: note off; bottom four bits: channel 0 + outputStream.write(roundedNoteIndex); //MIDI note value (0-127) + outputStream.write(100); //Velocity + + //End track + outputStream.write(0); //Delta time + outputStream.write(255); //Meta event + outputStream.write(47); //End track + outputStream.write(0); //End track + //------END TRACK DATA-----// + + outputStream.close(); + } + } + catch (IOException e) + { + System.out.println(e.getMessage()); + } + } +} \ No newline at end of file diff --git a/etc/parsefreq.php b/etc/parsefreq.php new file mode 100755 index 0000000..3990dfe --- /dev/null +++ b/etc/parsefreq.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/etc/sound-modified.java b/etc/sound-modified.java new file mode 100755 index 0000000..1c7d659 --- /dev/null +++ b/etc/sound-modified.java @@ -0,0 +1,762 @@ +/*Modified by Tommy Montgomery (1/07) to read +in a file containing frequencies and create +.au files for each of the tones */ + +/*File AudioSynth01.java +Copyright 2003, R.G.Baldwin + +This program demonstrates the ability to create +synthetic audio data, and to play it back +immediately, or to store it in an AU file for +later playback. + +A GUI appears on the screen containing the +following components in the North position: + +Generate button +Play/File button +Elapsed time meter (JTextField) + +Several radio buttons appear in the Center +position of the GUI. Each radio button selects +a different format for synthetic audio data. + +The South position of the GUI contains the +following components: + +Listen radio button +File radio button +File Name text field + +Select a radio button from the Center and click +the Generate button. A short segment of +synthetic audio data will be generated and saved +in memory. The segment length is two seconds +for monaural data and one second for stereo data, +at 16000 samp/sec and 16 bits per sample. + +To listen to the audio data, select the Listen +radio button in the South position and click the +Play/File button. You can listen to the data +repeatedly if you so choose. In addition to +listening to the data, you can also save it in +an audio file. + +To save the audio data in an audio file of type +AU, enter a file name (without extension) in the +text field in the South position, select the +File radio button in the South position, and +click the Play/File button. + +You should be able to play the audio file back +with any standard media player that can handle +the AU file type, or with a program written in +Java, such as the program named AudioPlayer02 +that was discussed in an earlier lesson. + +Tested using SDK 1.4.0 under Win2000 +************************************************/ + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import javax.sound.sampled.*; +import java.io.*; +import java.nio.channels.*; +import java.nio.*; +import java.util.*; + +public class sound extends JFrame{ + + //The following are general instance variables + // used to create a SourceDataLine object. + AudioFormat audioFormat; + AudioInputStream audioInputStream; + SourceDataLine sourceDataLine; + + //The following are audio format parameters. + // They may be modified by the signal generator + // at runtime. Values allowed by Java + // SDK 1.4.1 are shown in comments. + float sampleRate = 16000.0F; + //Allowable 8000,11025,16000,22050,44100 + int sampleSizeInBits = 16; + //Allowable 8,16 + int channels = 1; + //Allowable 1,2 + boolean signed = true; + //Allowable true,false + boolean bigEndian = true; + //Allowable true,false + + //--------String used to denote the file to write to--------// + String writeFile = ""; + double frequency = 0.0; + + //A buffer to hold two seconds monaural and one + // second stereo data at 16000 samp/sec for + // 16-bit samples + byte audioData[] = new byte[16000*4]; + + //Following components appear in the North + // position of the GUI. + final JButton generateBtn = + new JButton("Generate"); + final JButton playOrFileBtn = + new JButton("Play/File"); + final JLabel elapsedTimeMeter = + new JLabel("0000"); + + //Following radio buttons select a synthetic + // data type. Add more buttons if you add + // more synthetic data types. They appear in + // the center position of the GUI. + final JRadioButton tones = + new JRadioButton("Tones",true); + final JRadioButton stereoPanning = + new JRadioButton("Stereo Panning"); + final JRadioButton stereoPingpong = + new JRadioButton("Stereo Pingpong"); + final JRadioButton fmSweep = + new JRadioButton("FM Sweep"); + final JRadioButton decayPulse = + new JRadioButton("Decay Pulse"); + final JRadioButton echoPulse = + new JRadioButton("Echo Pulse"); + final JRadioButton waWaPulse = + new JRadioButton("WaWa Pulse"); + + //Following components appear in the South + // position of the GUI. + final JRadioButton listen = + new JRadioButton("Listen",true); + final JRadioButton file = + new JRadioButton("File"); + final JTextField fileName = + new JTextField("junk",10); + + //-------------------------------------------// + public static void main( + String args[]){ + new sound(); + }//end main + //-------------------------------------------// + + public sound(){//constructor + //A panel for the North position. Note the + // etched border. + final JPanel controlButtonPanel = + new JPanel(); + controlButtonPanel.setBorder( + BorderFactory.createEtchedBorder()); + + //A panel and button group for the radio + // buttons in the Center position. + final JPanel synButtonPanel = new JPanel(); + final ButtonGroup synButtonGroup = + new ButtonGroup(); + //This panel is used for cosmetic purposes + // only, to cause the radio buttons to be + // centered horizontally in the Center + // position. + final JPanel centerPanel = new JPanel(); + + //A panel for the South position. Note the + // etched border. + final JPanel outputButtonPanel = + new JPanel(); + outputButtonPanel.setBorder( + BorderFactory.createEtchedBorder()); + final ButtonGroup outputButtonGroup = + new ButtonGroup(); + + //Disable the Play button initially to force + // the user to generate some data before + // trying to listen to it or write it to a + // file. + playOrFileBtn.setEnabled(false); + + //Register anonymous listeners on the + // Generate button and the Play/File button. + generateBtn.addActionListener( + new ActionListener(){ + public void actionPerformed( + ActionEvent e){ + //Don't allow Play during generation + playOrFileBtn.setEnabled(false); + //Generate synthetic data + + try + { + String readFile = "freq.txt"; + FileReader f = new FileReader(readFile); + BufferedReader reader = new BufferedReader(f); + + String line = reader.readLine(); + while (line != null) + { + writeFile = line; + frequency = Double.parseDouble(line); + System.out.println(line); + new SynGen().getSyntheticData(audioData); + line = reader.readLine(); + } + } + catch (IOException error) + { + System.out.println(error.getMessage()); + } + //Now it is OK for the user to listen + // to or file the synthetic audio data. + playOrFileBtn.setEnabled(true); + }//end actionPerformed + }//end ActionListener + );//end addActionListener() + + playOrFileBtn.addActionListener( + new ActionListener(){ + public void actionPerformed( + ActionEvent e){ + //Play or file the data synthetic data + playOrFileData(); + }//end actionPerformed + }//end ActionListener + );//end addActionListener() + + //Add two buttons and a text field to a + // physical group in the North of the GUI. + controlButtonPanel.add(generateBtn); + controlButtonPanel.add(playOrFileBtn); + controlButtonPanel.add(elapsedTimeMeter); + + //Add radio buttons to a mutually exclusive + // group in the Center of the GUI. Make + // additions here if you add new synthetic + // generator methods. + synButtonGroup.add(tones); + synButtonGroup.add(stereoPanning); + synButtonGroup.add(stereoPingpong); + synButtonGroup.add(fmSweep); + synButtonGroup.add(decayPulse); + synButtonGroup.add(echoPulse); + synButtonGroup.add(waWaPulse); + + //Add radio buttons to a physical group and + // center it in the Center of the GUI. Make + // additions here if you add new synthetic + // generator methods. + synButtonPanel.setLayout( + new GridLayout(0,1)); + synButtonPanel.add(tones); + synButtonPanel.add(stereoPanning); + synButtonPanel.add(stereoPingpong); + synButtonPanel.add(fmSweep); + synButtonPanel.add(decayPulse); + synButtonPanel.add(echoPulse); + synButtonPanel.add(waWaPulse); + + //Note that the centerPanel has center + // alignment by default. + centerPanel.add(synButtonPanel); + + //Add radio buttons to a mutually exclusive + // group in the South of the GUI. + outputButtonGroup.add(listen); + outputButtonGroup.add(file); + + //Add radio buttons to a physical group in + // the South of the GUI. + outputButtonPanel.add(listen); + outputButtonPanel.add(file); + outputButtonPanel.add(fileName); + + //Add the panels containing components to the + // content pane of the GUI in the appropriate + // positions. + getContentPane().add( + controlButtonPanel,BorderLayout.NORTH); + getContentPane().add(centerPanel, + BorderLayout.CENTER); + getContentPane().add(outputButtonPanel, + BorderLayout.SOUTH); + + //Finish the GUI. If you add more radio + // buttons in the center, you may need to + // modify the call to setSize to increase + // the vertical component of the GUI size. + setTitle("Copyright 2003, R.G.Baldwin"); + setDefaultCloseOperation(EXIT_ON_CLOSE); + setSize(250,275); + setVisible(true); + }//end constructor + //-------------------------------------------// + + //This method plays or files the synthetic + // audio data that has been generated and saved + // in an array in memory. + private void playOrFileData() { + try{ + //Get an input stream on the byte array + // containing the data + InputStream byteArrayInputStream = + new ByteArrayInputStream( + audioData); + + //Get the required audio format + audioFormat = new AudioFormat( + sampleRate, + sampleSizeInBits, + channels, + signed, + bigEndian); + + //Get an audio input stream from the + // ByteArrayInputStream + audioInputStream = new AudioInputStream( + byteArrayInputStream, + audioFormat, + audioData.length/audioFormat. + getFrameSize()); + + //Get info on the required data line + DataLine.Info dataLineInfo = + new DataLine.Info( + SourceDataLine.class, + audioFormat); + + //Get a SourceDataLine object + sourceDataLine = (SourceDataLine) + AudioSystem.getLine( + dataLineInfo); + //Decide whether to play the synthetic + // data immediately, or to write it into + // an audio file, based on the user + // selection of the radio buttons in the + // South of the GUI.. + + /* + + if(listen.isSelected()){ + //Create a thread to play back the data and + // start it running. It will run until all + // the data has been played back + new ListenThread().start(); + }else{*/ + //Disable buttons until existing data + // is written to the file. + generateBtn.setEnabled(false); + playOrFileBtn.setEnabled(false); + + //Write the data to an output file with + // the name provided by the text field + // in the South of the GUI. + try{ + AudioSystem.write( + audioInputStream, + AudioFileFormat.Type.AU, + new File(writeFile + + ".au")); + }catch (Exception e) { + e.printStackTrace(); + System.exit(0); + }//end catch + //Enable buttons for another operation + generateBtn.setEnabled(true); + playOrFileBtn.setEnabled(true); + //}//end else + }catch (Exception e) { + e.printStackTrace(); + System.exit(0); + }//end catch + }//end playOrFileData + //=============================================// + + //Inner class to play back the data that was + // saved. + class ListenThread extends Thread{ + //This is a working buffer used to transfer + // the data between the AudioInputStream and + // the SourceDataLine. The size is rather + // arbitrary. + byte playBuffer[] = new byte[16384]; + + public void run(){ + try{ + //Disable buttons while data is being + // played. + generateBtn.setEnabled(false); + playOrFileBtn.setEnabled(false); + + //Open and start the SourceDataLine + sourceDataLine.open(audioFormat); + sourceDataLine.start(); + + int cnt; + //Get beginning of elapsed time for + // playback + long startTime = new Date().getTime(); + + //Transfer the audio data to the speakers + while((cnt = audioInputStream.read( + playBuffer, 0, + playBuffer.length)) + != -1){ + //Keep looping until the input read + // method returns -1 for empty stream. + if(cnt > 0){ + //Write data to the internal buffer of + // the data line where it will be + // delivered to the speakers in real + // time + sourceDataLine.write( + playBuffer, 0, cnt); + }//end if + }//end while + + //Block and wait for internal buffer of the + // SourceDataLine to become empty. + sourceDataLine.drain(); + + + //Get and display the elapsed time for + // the previous playback. + int elapsedTime = + (int)(new Date().getTime() - startTime); + elapsedTimeMeter.setText("" + elapsedTime); + + //Finish with the SourceDataLine + sourceDataLine.stop(); + sourceDataLine.close(); + + //Re-enable buttons for another operation + generateBtn.setEnabled(true); + playOrFileBtn.setEnabled(true); + }catch (Exception e) { + e.printStackTrace(); + System.exit(0); + }//end catch + + }//end run + }//end inner class ListenThread + //=============================================// + + //Inner signal generator class. + + //An object of this class can be used to + // generate a variety of different synthetic + // audio signals. Each time the getSyntheticData + // method is called on an object of this class, + // the method will fill the incoming array with + // the samples for a synthetic signal. + class SynGen{ + //Note: Because this class uses a ByteBuffer + // asShortBuffer to handle the data, it can + // only be used to generate signed 16-bit + // data. + ByteBuffer byteBuffer; + ShortBuffer shortBuffer; + int byteLength; + + void getSyntheticData(byte[] synDataBuffer){ + //Prepare the ByteBuffer and the shortBuffer + // for use + byteBuffer = ByteBuffer.wrap(synDataBuffer); + shortBuffer = byteBuffer.asShortBuffer(); + + byteLength = synDataBuffer.length; + + //Decide which synthetic data generator + // method to invoke based on which radio + // button the user selected in the Center of + // the GUI. If you add more methods for + // other synthetic data types, you need to + // add corresponding radio buttons to the + // GUI and add statements here to test the + // new radio buttons. Make additions here + // if you add new synthetic generator + // methods. + + if(tones.isSelected()) tones(); + if(stereoPanning.isSelected()) stereoPanning(); + if(stereoPingpong.isSelected()) stereoPingpong(); + if(fmSweep.isSelected()) fmSweep(); + if(decayPulse.isSelected()) decayPulse(); + if(echoPulse.isSelected()) echoPulse(); + if(waWaPulse.isSelected()) waWaPulse(); + + }//end getSyntheticData method + //-------------------------------------------// + + //This method generates a monaural tone + // consisting of the sum of three sinusoids. + void tones(){ + + //-----------------// + //code to generate the tone and then write it to an .au file + channels = 1;//Java allows 1 or 2 + //Each channel requires two 8-bit bytes per + // 16-bit sample. + int bytesPerSamp = 2; + sampleRate = 16000.0F; + // Allowable 8000,11025,16000,22050,44100 + int sampLength = byteLength/bytesPerSamp; + sampLength = 5000; + for(int cnt = 0; cnt < sampLength; cnt++){ + double time = cnt/sampleRate; + //double freq = 440.0;//arbitrary frequency + double sinValue = Math.sin(2*Math.PI*frequency*time); + shortBuffer.put((short)(16000*sinValue)); + }//end for loop + playOrFileData(); + }//end method tones + //-------------------------------------------// + + //This method generates a stereo speaker sweep, + // starting with a relatively high frequency + // tone on the left speaker and moving across + // to a lower frequency tone on the right + // speaker. + void stereoPanning(){ + channels = 2;//Java allows 1 or 2 + int bytesPerSamp = 4;//Based on channels + sampleRate = 16000.0F; + // Allowable 8000,11025,16000,22050,44100 + int sampLength = byteLength/bytesPerSamp; + for(int cnt = 0; cnt < sampLength; cnt++){ + //Calculate time-varying gain for each + // speaker + double rightGain = 16000.0*cnt/sampLength; + double leftGain = 16000.0 - rightGain; + + double time = cnt/sampleRate; + double freq = 600;//An arbitrary frequency + //Generate data for left speaker + double sinValue = + Math.sin(2*Math.PI*(freq)*time); + shortBuffer.put( + (short)(leftGain*sinValue)); + //Generate data for right speaker + sinValue = + Math.sin(2*Math.PI*(freq*0.8)*time); + shortBuffer.put( + (short)(rightGain*sinValue)); + }//end for loop + }//end method stereoPanning + //-------------------------------------------// + + //This method uses stereo to switch a sound + // back and forth between the left and right + // speakers at a rate of about eight switches + // per second. On my system, this is a much + // better demonstration of the sound separation + // between the two speakers than is the + // demonstration produced by the stereoPanning + // method. Note also that because the sounds + // are at different frequencies, the sound + // produced is similar to that of U.S. + // emergency vehicles. + + void stereoPingpong(){ + channels = 2;//Java allows 1 or 2 + int bytesPerSamp = 4;//Based on channels + sampleRate = 16000.0F; + // Allowable 8000,11025,16000,22050,44100 + int sampLength = byteLength/bytesPerSamp; + double leftGain = 0.0; + double rightGain = 16000.0; + for(int cnt = 0; cnt < sampLength; cnt++){ + //Calculate time-varying gain for each + // speaker + if(cnt % (sampLength/8) == 0){ + //swap gain values + double temp = leftGain; + leftGain = rightGain; + rightGain = temp; + }//end if + + double time = cnt/sampleRate; + double freq = 600;//An arbitrary frequency + //Generate data for left speaker + double sinValue = + Math.sin(2*Math.PI*(freq)*time); + shortBuffer.put( + (short)(leftGain*sinValue)); + //Generate data for right speaker + sinValue = + Math.sin(2*Math.PI*(freq*0.8)*time); + shortBuffer.put( + (short)(rightGain*sinValue)); + }//end for loop + }//end stereoPingpong method + //-------------------------------------------// + + //This method generates a monaural linear + // frequency sweep from 100 Hz to 1000Hz. + void fmSweep(){ + channels = 1;//Java allows 1 or 2 + int bytesPerSamp = 2;//Based on channels + sampleRate = 16000.0F; + // Allowable 8000,11025,16000,22050,44100 + int sampLength = byteLength/bytesPerSamp; + double lowFreq = 100.0; + double highFreq = 1000.0; + + for(int cnt = 0; cnt < sampLength; cnt++){ + double time = cnt/sampleRate; + + double freq = lowFreq + + cnt*(highFreq-lowFreq)/sampLength; + double sinValue = + Math.sin(2*Math.PI*freq*time); + shortBuffer.put((short)(16000*sinValue)); + }//end for loop + }//end method fmSweep + //-------------------------------------------// + + //This method generates a monaural triple- + // frequency pulse that decays in a linear + // fashion with time. + void decayPulse(){ + channels = 1;//Java allows 1 or 2 + int bytesPerSamp = 2;//Based on channels + sampleRate = 16000.0F; + // Allowable 8000,11025,16000,22050,44100 + int sampLength = byteLength/bytesPerSamp; + for(int cnt = 0; cnt < sampLength; cnt++){ + //The value of scale controls the rate of + // decay - large scale, fast decay. + double scale = 2*cnt; + if(scale > sampLength) scale = sampLength; + double gain = + 16000*(sampLength-scale)/sampLength; + double time = cnt/sampleRate; + double freq = 499.0;//an arbitrary freq + double sinValue = + (Math.sin(2*Math.PI*freq*time) + + Math.sin(2*Math.PI*(freq/1.8)*time) + + Math.sin(2*Math.PI*(freq/1.5)*time))/3.0; + shortBuffer.put((short)(gain*sinValue)); + }//end for loop + }//end method decayPulse + //-------------------------------------------// + + //This method generates a monaural triple- + // frequency pulse that decays in a linear + // fashion with time. However, three echoes + // can be heard over time with the amplitude + // of the echoes also decreasing with time. + void echoPulse(){ + channels = 1;//Java allows 1 or 2 + int bytesPerSamp = 2;//Based on channels + sampleRate = 16000.0F; + // Allowable 8000,11025,16000,22050,44100 + int sampLength = byteLength/bytesPerSamp; + int cnt2 = -8000; + int cnt3 = -16000; + int cnt4 = -24000; + for(int cnt1 = 0; cnt1 < sampLength; + cnt1++,cnt2++,cnt3++,cnt4++){ + double val = echoPulseHelper( + cnt1,sampLength); + if(cnt2 > 0){ + val += 0.7 * echoPulseHelper( + cnt2,sampLength); + }//end if + if(cnt3 > 0){ + val += 0.49 * echoPulseHelper( + cnt3,sampLength); + }//end if + if(cnt4 > 0){ + val += 0.34 * echoPulseHelper( + cnt4,sampLength); + }//end if + + shortBuffer.put((short)val); + }//end for loop + }//end method echoPulse + //-------------------------------------------// + + double echoPulseHelper(int cnt,int sampLength){ + //The value of scale controls the rate of + // decay - large scale, fast decay. + double scale = 2*cnt; + if(scale > sampLength) scale = sampLength; + double gain = + 16000*(sampLength-scale)/sampLength; + double time = cnt/sampleRate; + double freq = 499.0;//an arbitrary freq + double sinValue = + (Math.sin(2*Math.PI*freq*time) + + Math.sin(2*Math.PI*(freq/1.8)*time) + + Math.sin(2*Math.PI*(freq/1.5)*time))/3.0; + return(short)(gain*sinValue); + }//end echoPulseHelper + + //-------------------------------------------// + + //This method generates a monaural triple- + // frequency pulse that decays in a linear + // fashion with time. However, three echoes + // can be heard over time with the amplitude + // of the echoes also decreasing with time. + //Note that this method is identical to the + // method named echoPulse, except that the + // algebraic sign was switched on the amplitude + // of two of the echoes before adding them to + // the composite synthetic signal. This + // resulted in a difference in the + // sound. + void waWaPulse(){ + channels = 1;//Java allows 1 or 2 + int bytesPerSamp = 2;//Based on channels + sampleRate = 16000.0F; + // Allowable 8000,11025,16000,22050,44100 + int sampLength = byteLength/bytesPerSamp; + int cnt2 = -8000; + int cnt3 = -16000; + int cnt4 = -24000; + for(int cnt1 = 0; cnt1 < sampLength; + cnt1++,cnt2++,cnt3++,cnt4++){ + double val = waWaPulseHelper( + cnt1,sampLength); + if(cnt2 > 0){ + val += -0.7 * waWaPulseHelper( + cnt2,sampLength); + }//end if + if(cnt3 > 0){ + val += 0.49 * waWaPulseHelper( + cnt3,sampLength); + }//end if + if(cnt4 > 0){ + val += -0.34 * waWaPulseHelper( + cnt4,sampLength); + }//end if + + shortBuffer.put((short)val); + }//end for loop + }//end method waWaPulse + //-------------------------------------------// + + double waWaPulseHelper(int cnt,int sampLength){ + //The value of scale controls the rate of + // decay - large scale, fast decay. + double scale = 2*cnt; + if(scale > sampLength) scale = sampLength; + double gain = + 16000*(sampLength-scale)/sampLength; + double time = cnt/sampleRate; + double freq = 499.0;//an arbitrary freq + double sinValue = + (Math.sin(2*Math.PI*freq*time) + + Math.sin(2*Math.PI*(freq/1.8)*time) + + Math.sin(2*Math.PI*(freq/1.5)*time))/3.0; + return(short)(gain*sinValue); + }//end waWaPulseHelper + + //-------------------------------------------// + }//end SynGen class + //=============================================// + +}//end outer class AudioSynth01.java + + diff --git a/functions.js b/functions.js new file mode 100755 index 0000000..2826851 --- /dev/null +++ b/functions.js @@ -0,0 +1,255 @@ +function playNote(id) //id format: distortion_atari note index +{ + activeKeyID = id; + var dist = activeKeyID.substring(0,activeKeyID.indexOf("_")); + var atariIndex = activeKeyID.substring(activeKeyID.indexOf("_")+1); + + if (atariIndex != "nil") + { + if (dist == "square") dist = 0; + else if (dist == "lead") dist = 1; + else if (dist == "saw") dist = 2; + else if (dist == "bass") dist = 3; + + document.getElementById('sound').src = "midi/"+noteArray[dist][atariIndex][0]; + writeNoteData(dist,atariIndex); + } +} + +function writeNoteData(dist,atariIndex) +{ + var nv = noteValue; + if (dotted) + { + nv = 2*noteValue/3; + nv = nv.toString().substring(0,nv.toString().indexOf(".")+3); + } + + if (channel == 1) + document.createMidiForm.c1_display.value += noteArray[dist][atariIndex][1]+" "+dist+" "+atariIndex+" "+nv+"\n"; + else if (channel == 2) + document.createMidiForm.c2_display.value += noteArray[dist][atariIndex][1]+" "+dist+" "+atariIndex+" "+nv+"\n"; + + updateBufferArray(); +} + +function writeRestData(restVal) +{ + if (dotted) + { + restVal = 2*restVal/3; + restVal = restVal.toString().substring(0,restVal.toString().indexOf(".")+3); + } + if (channel == 1) + document.createMidiForm.c1_display.value += "x x x "+restVal+"\n"; + else if (channel == 2) + document.createMidiForm.c2_display.value += "x x x "+restVal+"\n"; + + updateBufferArray(); +} + +function disableNils() +{ + var x = document.getElementsByTagName("button"); + for (i = 0; i < x.length; i++) + { + if (x[i].id.match(/nil/)) + { + x[i].disabled = "disabled"; + x[i].style.backgroundColor = "#CCCCCC"; + x[i].style.cursor = "default"; + } + } +} + +function selectNote(val) +{ + var x = document.getElementsByName("note-select"); + for (i = 0; i < x.length; i++) + { + if (Math.pow(2,i) == val) + { + x[i].disabled = "disabled"; + x[i].style.cursor = "default"; + } + else + { + x[i].disabled = ""; + x[i].style.cursor = "pointer"; + } + } + noteValue = val; +} + +function validateForm() +{ + var x = document.createMidiForm; + + if (isNaN(Number(x.tempo.value)) || isNaN(parseInt(x.tempo.value)) || x.tempo.value == "0") + { + x.tempo.value = ""; + alert("Invalid tempo"); + x.tempo.focus(); + } + else if (isNaN(Number(x.timesig_num.value)) || isNaN(parseInt(x.timesig_num.value)) || x.timesig_num.value == "0") + { + x.timesig_num.value = ""; + alert("Invalid time signature"); + x.timesig_num.focus(); + } +} + +function toggleColor() +{ + showColor = !showColor; + var x = document.getElementsByName('key'); + + if (showColor) + { + for (i = 0; i < x.length; i++) + { + var dist = x[i].id.substring(0,x[i].id.indexOf("_")); + var atariIndex = x[i].id.substring(x[i].id.indexOf("_")+1); + + if (atariIndex != "nil") + { + if (dist == "square") dist = 0; + else if (dist == "lead") dist = 1; + else if (dist == "saw") dist = 2; + else if (dist == "bass") dist = 3; + + x[i].style.backgroundColor = noteArray[dist][atariIndex][8]; + } + } + } + else + { + for (i = 0; i < x.length; i++) + { + var dist = x[i].id.substring(0,x[i].id.indexOf("_")); + var atariIndex = x[i].id.substring(x[i].id.indexOf("_")+1); + + if (atariIndex != "nil") + { + if (dist == "square") dist = 0; + else if (dist == "lead") dist = 1; + else if (dist == "saw") dist = 2; + else if (dist == "bass") dist = 3; + + if (x[i].className.match("wkey")) x[i].style.backgroundColor = "#FFFFFF"; + else x[i].style.backgroundColor = "#000000"; + } + } + } +} + +function showFloatingDiv(keyID,e) +{ + activeKeyID = keyID; + mouseX = e.clientX-50; + mouseY = e.clientY+10; + if (mouseX > screen.width-125) mouseX = screen.width-130; + else if (mouseX < 5) mouseX = 5; + var dist = activeKeyID.substring(0,activeKeyID.indexOf("_")); + var atariIndex = activeKeyID.substring(activeKeyID.indexOf("_")+1); + + if (dist == "square") dist = 0; + else if (dist == "lead") dist = 1; + else if (dist == "saw") dist = 2; + else if (dist == "bass") dist = 3; + + var x = document.getElementById('floatDiv'); + x.style.top = mouseY+"px"; + x.style.left = mouseX+"px"; + x.style.visibility = "visible"; + x.innerHTML = "X"; + x.innerHTML += ""+noteArray[dist][atariIndex][1]+"
Pitch: "+atariIndex+"
"; + x.innerHTML += "Freq: "+noteArray[dist][atariIndex][3]+" Hz
"; + if (noteArray[dist][atariIndex][4] > 0) + x.innerHTML += "Error: +"+noteArray[dist][atariIndex][4]+""; + else + x.innerHTML += "Error: "+noteArray[dist][atariIndex][4]+""; + + for (i = 0; i < 32; i++) + { + if (i != atariIndex) + if (noteArray[dist][atariIndex][1] == noteArray[dist][i][1]) //two pitches with same note name + { + x.innerHTML += "
Exchange"; + break; + } + } +} + +function exchange() +{ + var dist = activeKeyID.substring(0,activeKeyID.indexOf("_")); + var atariIndex = activeKeyID.substring(activeKeyID.indexOf("_")+1); + + if (dist == "square") dist = 0; + else if (dist == "lead") dist = 1; + else if (dist == "saw") dist = 2; + else if (dist == "bass") dist = 3; + + for (j = 0; j < 32; j++) + if (j != atariIndex && noteArray[dist][atariIndex][1] == noteArray[dist][j][1]) + { + document.getElementById(activeKeyID).id = dist+"_"+j; + activeKeyID = dist+"_"+j; + atariIndex = j; + break; + } + + //update floating div + var x = document.getElementById('floatDiv'); + x.style.top = mouseY+"px"; + x.style.left = mouseX+"px"; + x.style.visibility = "visible"; + x.innerHTML = "X"; + x.innerHTML += ""+noteArray[dist][atariIndex][1]+"
Pitch: "+atariIndex+"
"; + x.innerHTML += "Freq: "+noteArray[dist][atariIndex][3]+" Hz
"; + if (noteArray[dist][atariIndex][4] > 0) + x.innerHTML += "Error: +"+noteArray[dist][atariIndex][4]; + else + x.innerHTML += "Error: "+noteArray[dist][atariIndex][4]; + x.innerHTML += "
Exchange"; + + //change color, if necessary + if (showColor) + { + showColor = !showColor; + toggleColor(); + } +} + +function showFAQ() +{ + document.getElementById('faq').style.visibility = "visible"; + document.getElementById('faq').style.top = "50px"; + document.getElementById('faq').style.left = "50px"; + document.getElementById('faq').style.width = "910px"; + document.getElementById('faq').style.height = "500px"; +} + +function updateBufferArray() +{ + bufferArray[0][bufferCount] = document.getElementById('c1_display').value; + bufferArray[1][bufferCount] = document.getElementById('c2_display').value; + bufferCount++; +} + +function undoLastKeypress() +{ + if (bufferCount >= bufferMin) + { + document.getElementById('c1_display').value = bufferArray[0][bufferCount-2].toString(); + document.getElementById('c2_display').value = bufferArray[1][bufferCount-2].toString(); + bufferCount--; + } +} + +function hideFAQ() {document.getElementById('faq').style.visibility = "hidden";} +function clearChannelData(x) {document.getElementById("c"+x.toString()+"_display").value = "";} +function setDotted() {dotted = !dotted;} +function toggleChannel(c) {channel = c;} +function hideFloatingDiv() {document.getElementById('floatDiv').style.visibility = "hidden";} diff --git a/img/1.gif b/img/1.gif new file mode 100755 index 0000000..0dece52 Binary files /dev/null and b/img/1.gif differ diff --git a/img/1.png b/img/1.png new file mode 100755 index 0000000..f7ca2db Binary files /dev/null and b/img/1.png differ diff --git a/img/16.gif b/img/16.gif new file mode 100755 index 0000000..eb53727 Binary files /dev/null and b/img/16.gif differ diff --git a/img/16.png b/img/16.png new file mode 100755 index 0000000..9fa6b72 Binary files /dev/null and b/img/16.png differ diff --git a/img/2.gif b/img/2.gif new file mode 100755 index 0000000..20deafb Binary files /dev/null and b/img/2.gif differ diff --git a/img/2.png b/img/2.png new file mode 100755 index 0000000..73af03c Binary files /dev/null and b/img/2.png differ diff --git a/img/32.gif b/img/32.gif new file mode 100755 index 0000000..f289aab Binary files /dev/null and b/img/32.gif differ diff --git a/img/32.png b/img/32.png new file mode 100755 index 0000000..7712fc5 Binary files /dev/null and b/img/32.png differ diff --git a/img/4.gif b/img/4.gif new file mode 100755 index 0000000..8972e94 Binary files /dev/null and b/img/4.gif differ diff --git a/img/4.png b/img/4.png new file mode 100755 index 0000000..aace7e6 Binary files /dev/null and b/img/4.png differ diff --git a/img/64.gif b/img/64.gif new file mode 100755 index 0000000..6a03f65 Binary files /dev/null and b/img/64.gif differ diff --git a/img/64.png b/img/64.png new file mode 100755 index 0000000..890f8ac Binary files /dev/null and b/img/64.png differ diff --git a/img/8.gif b/img/8.gif new file mode 100755 index 0000000..c5fe50c Binary files /dev/null and b/img/8.gif differ diff --git a/img/8.png b/img/8.png new file mode 100755 index 0000000..1f80bec Binary files /dev/null and b/img/8.png differ diff --git a/img/r1.gif b/img/r1.gif new file mode 100755 index 0000000..3778a25 Binary files /dev/null and b/img/r1.gif differ diff --git a/img/r1.png b/img/r1.png new file mode 100755 index 0000000..58b87e8 Binary files /dev/null and b/img/r1.png differ diff --git a/img/r16.gif b/img/r16.gif new file mode 100755 index 0000000..a257705 Binary files /dev/null and b/img/r16.gif differ diff --git a/img/r16.png b/img/r16.png new file mode 100755 index 0000000..aa7b844 Binary files /dev/null and b/img/r16.png differ diff --git a/img/r2.gif b/img/r2.gif new file mode 100755 index 0000000..5356c33 Binary files /dev/null and b/img/r2.gif differ diff --git a/img/r2.png b/img/r2.png new file mode 100755 index 0000000..f2bbd4a Binary files /dev/null and b/img/r2.png differ diff --git a/img/r32.gif b/img/r32.gif new file mode 100755 index 0000000..e1e4527 Binary files /dev/null and b/img/r32.gif differ diff --git a/img/r32.png b/img/r32.png new file mode 100755 index 0000000..0deb2de Binary files /dev/null and b/img/r32.png differ diff --git a/img/r4.gif b/img/r4.gif new file mode 100755 index 0000000..658b247 Binary files /dev/null and b/img/r4.gif differ diff --git a/img/r4.png b/img/r4.png new file mode 100755 index 0000000..6f1147d Binary files /dev/null and b/img/r4.png differ diff --git a/img/r64.gif b/img/r64.gif new file mode 100755 index 0000000..0a32bd7 Binary files /dev/null and b/img/r64.gif differ diff --git a/img/r64.png b/img/r64.png new file mode 100755 index 0000000..4ab88d3 Binary files /dev/null and b/img/r64.png differ diff --git a/img/r8.gif b/img/r8.gif new file mode 100755 index 0000000..8d44ac5 Binary files /dev/null and b/img/r8.gif differ diff --git a/img/r8.png b/img/r8.png new file mode 100755 index 0000000..cfaaf1d Binary files /dev/null and b/img/r8.png differ diff --git a/index.php b/index.php new file mode 100755 index 0000000..64d9f4f --- /dev/null +++ b/index.php @@ -0,0 +1,448 @@ + $arr) + { + $total += 1/$arr[3]; + $newvalue1 .= $arr[0]." ".$arr[1]." ".$arr[2]." ".$arr[3]; + //echo $i." ".$total."
"; + if ($total >= $measureval) + { + $total -= $measureval; + //add a bar and a measure number to the display + $measure++; + $newvalue1 .= "-------$measure-------\n"; + } + } + //exit; + $measure = 1; + $total = 0; + + foreach ($c2_data as $i => $arr) + { + $total += 1/$arr[3]; + $newvalue2 .= $arr[0]." ".$arr[1]." ".$arr[2]." ".$arr[3]; + if ($total >= $measureval) + { + $total -= $measureval; + //add a bar and a measure number to the display + $measure++; + $newvalue2 .= "-------$measure-------\n"; + } + } + } + + $dir = opendir("midi"); + $note_array = array("square"=>array(),"lead"=>array(),"saw"=>array(),"bass"=>array()); + + while (($file = readdir($dir)) != null) + { + //format: distortion_atari note index_note name_octave_freq_error_MIDI note index_pitch bend left bits_pitch bend right bits + if (strpos($file,".mid")) + { + $info = explode("_",$file); + $info[2] = str_replace("+","#",$info[2]); + $info[count($info)-1] = substr($info[count($info)-1],0,strpos($info[count($info)-1],".mid")); + + if (!isset($note_array[$info[0]][$info[1]])) + $note_array[$info[0]][$info[1]] = array(); + + array_push($note_array[$info[0]][$info[1]],$file); + for ($i = 2; $i < count($info); $i++) + array_push($note_array[$info[0]][$info[1]],$info[$i]); + + + $red = str_pad(dechex(100+2*$note_array[$info[0]][$info[1]][4]),2,"0",STR_PAD_LEFT); + $green = str_pad(dechex(150),2,"0",STR_PAD_LEFT); + $blue = str_pad(dechex(100-2*$note_array[$info[0]][$info[1]][4]),2,"0",STR_PAD_LEFT); + $color = $red.$green.$blue; + $note_array[$info[0]][$info[1]][8] = $color; + } + } + + require ("createmidi.php"); +?> + + + Atari 2600 Music Utility + + + + + + + + + "nil","lead"=>"nil","saw"=>"nil","bass"=>"nil"); + foreach ($note_array as $dist => $a) + foreach ($a as $aIndex => $b) + if ($b[1] == $noteName) + { + $atariIndex[$dist] = $aIndex; + $color = "#".$b[8]; + } + + if ($noteName == "C4") + $class .= " C4"; + + echo "\t\n"; + echo "\t\n"; + echo "\t\n"; + echo "\t\n"; + } + + echo "\n\n\tSquare"; + echo "\n\tLead"; + echo "\n\tSaw"; + echo "\n\tBass\n\n"; + echo "\n\t
\n"; + + echo "\n\t"; + echo "\n\t\t"; + echo "\n\t"; + echo "\n\t"; + echo "\n\t\tFAQ"; + echo "\n\t"; + + //echo "\n\tDotted"; + ?> +






+






+






+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
Dotted
+
+ Tempo: + ' onblur='validateForm()'> + Time Signature: + ' onblur='validateForm()'> + /  +
Channel 1 + Channel 2
+ + + +
+ + + +
+
+ +
+ + +
+

Shut the FAQ up


+ How do I close this pink window? +
Click anywhere inside it.
+ Who? | What? | When? | Where? | Why? +
+ Tommy Montgomery | + Atari 2600 Music Composing Utility | + January, 2007 | + On the internet | + Why not +
+ How? +
+ An unholy union of PHP, Javascript and the HTML DOM. The MIDI files used to + play the sounds were created using Java because O didn't know PHP + could write to binary files at the time. +
+ Why is this useful? +
+ Writing music for the 2600 is difficult, because of the variations in + pitch. The frequencies don't conform to any sort of useful or intelligible + scale, so we have to approximate to get what we want. This utility makes + that process easier, by supplying a visual and aural cue of the + (musical) limitations of the 2600. +
+ Why are there four keyboards? +
+ The four keyboards correspond to the four "melodic" distortions (meaning + the ones that don't sound like noise). They are labeled for your + convenience. The grayed keys are notes whose frequencies are + unavailable in that distortion. Middle C is outlined in red. +
+ What about the other distortions? +
+ The primary reason I didn't include them is because there aren't any + MIDI voices that can approximate them. The secondary reason is because + this utility is for making music, not noise, which is + generally what the other distortions are used for; making noise is generally + much easier and doesn't need a fancy tool. +
+ How do I write songs? +
+ The Atari 2600 has two sound channels available (or so I've heard). The + two textareas at the bottom of the screen correspond to each channel. They are + labeled for your convenience. When you click on a key, you will hear its sound and the + data will be written to the channel's textarea (that data can also be typed in + manually). To listen to your song, press "Listen." The best way to learn how + to use this is to experiment. Use the "Format" and "Listen" buttons liberally. +
+ What does "Format" do? +
+ Pressing this button formats each channel's data into something more + comprehensible. It groups all the data into measures (this is dependent + on the time signature). +
+ How do I change the note value/channel/tempo/time signature? +
+ Find the labels and/or pictures and click something until it does what you want. +
+ How do I insert a rest in my song? +
+ See above. +
+ What does "Dotted" do? +
+ Checking this elongates the note by 50%. +
+ What do all the numbers in the textareas mean? +
+
    +
  • The first thing is the note name and octave (e.g. E3).
  • +
  • The second thing is the distortion (0 = square, 1 = + lead, 2 = saw, 3 = bass. Note that these do not + correspond to the distortion numbers in the text file linked to below).
  • +
  • The third thing is the pitch index, mentioned below.
  • +
  • The last thing is the note value (1 = whole note, 2 = + half note, 4 = quarter note, etc.).
  • +
+
+ I know stuff about some stuff. How do I look at this stuff? +
+ Right click on a key to view info about that note (doesn't work in Opera). Pitch is the + Atari 2600 pitch index (see here + for details); Freq is the note's frequency; Error is the + distance in cents from "perfect" pitch. If you don't know what that means, the closer + to 0 is better. Unless you're doing something weird and/or painful, you'll want + all the notes in your song to have approximately the same error. +
+ What does "Exchange" mean? +
+ Some notes have more than one frequency that approximates that note. Clicking on + "Exchange" toggles between the two. Such notes are generally in the lower half + of the keyboard. +
+ What does "Color Me Blind" do? +
+ Checking this color codes all the keys. Keys with the same color are in tune + with each other. Keys that are different colors probably shouldn't be used in + succession. +
+ Dude, seriously. Using the mouse is a bother. Are there any keyboard shortcuts? +
+ Glad you asked. If you hover the cursor over various objects on the page, you'll notice + a single character in square brackets in the tooltip for some of them (try one of the + note value buttons, for example). If you're using IE (and you should be if you like + sound), press ALT and that character to use the function. If you're + using Firefox, press SHIFT+ALT and that character. +
+
+ + + + + + + diff --git a/lead_1.php b/lead_1.php new file mode 100755 index 0000000..05cd675 --- /dev/null +++ b/lead_1.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && (strcmp($c1_data[$i-1][1],"1") < 0 || strcmp($c1_data[$i-1][1],"1") > 0)) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"1") == 0) //play a note (lead) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,145); //note on, channel 1 + array_push($bin_data,$note_array['lead'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,225); //pitch bend, channel 1 + array_push($bin_data,$note_array['lead'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['lead'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,129); //note off, channel 1 + array_push($bin_data,$note_array['lead'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to lead voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",193),1); //change voice, channel 1 +fwrite($filehandle,pack("I",80),1); //lead voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",177),1); //controller event, channel 1 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 3 DATA +?> \ No newline at end of file diff --git a/lead_2.php b/lead_2.php new file mode 100755 index 0000000..2327429 --- /dev/null +++ b/lead_2.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && (strcmp($c2_data[$i-1][1],"1") < 0 || strcmp($c2_data[$i-1][1],"1") > 0)) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"1") == 0) //play a note (lead) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,149); //note on, channel 5 + array_push($bin_data,$note_array['lead'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,229); //pitch bend, channel 5 + array_push($bin_data,$note_array['lead'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['lead'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,133); //note off, channel 5 + array_push($bin_data,$note_array['lead'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to lead voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",197),1); //change voice, channel 5 +fwrite($filehandle,pack("I",80),1); //lead voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",181),1); //controller event, channel 5 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 3 DATA +?> \ No newline at end of file diff --git a/midi/bass_0_B5_5_1014.2_46_83_92_78.mid b/midi/bass_0_B5_5_1014.2_46_83_92_78.mid new file mode 100755 index 0000000..c44d6d0 Binary files /dev/null and b/midi/bass_0_B5_5_1014.2_46_83_92_78.mid differ diff --git a/midi/bass_10_F+2_2_92.2_-6_42_11_62.mid b/midi/bass_10_F+2_2_92.2_-6_42_11_62.mid new file mode 100755 index 0000000..ad9ebfd Binary files /dev/null and b/midi/bass_10_F+2_2_92.2_-6_42_11_62.mid differ diff --git a/midi/bass_11_E2_2_84.5_43_40_97_77.mid b/midi/bass_11_E2_2_84.5_43_40_97_77.mid new file mode 100755 index 0000000..22eaa92 Binary files /dev/null and b/midi/bass_11_E2_2_84.5_43_40_97_77.mid differ diff --git a/midi/bass_12_D+2_2_78.0_5_39_76_65.mid b/midi/bass_12_D+2_2_78.0_5_39_76_65.mid new file mode 100755 index 0000000..8d27bea Binary files /dev/null and b/midi/bass_12_D+2_2_78.0_5_39_76_65.mid differ diff --git a/midi/bass_13_D2_2_72.4_-24_38_41_56.mid b/midi/bass_13_D2_2_72.4_-24_38_41_56.mid new file mode 100755 index 0000000..42b5dd5 Binary files /dev/null and b/midi/bass_13_D2_2_72.4_-24_38_41_56.mid differ diff --git a/midi/bass_14_C+2_2_67.6_-43_37_31_50.mid b/midi/bass_14_C+2_2_67.6_-43_37_31_50.mid new file mode 100755 index 0000000..45d3627 Binary files /dev/null and b/midi/bass_14_C+2_2_67.6_-43_37_31_50.mid differ diff --git a/midi/bass_15_B1_1_63.4_46_35_92_78.mid b/midi/bass_15_B1_1_63.4_46_35_92_78.mid new file mode 100755 index 0000000..e1397f2 Binary files /dev/null and b/midi/bass_15_B1_1_63.4_46_35_92_78.mid differ diff --git a/midi/bass_16_A+1_1_59.7_42_34_56_77.mid b/midi/bass_16_A+1_1_59.7_42_34_56_77.mid new file mode 100755 index 0000000..4879d9c Binary files /dev/null and b/midi/bass_16_A+1_1_59.7_42_34_56_77.mid differ diff --git a/midi/bass_17_A1_1_56.3_40_33_102_76.mid b/midi/bass_17_A1_1_56.3_40_33_102_76.mid new file mode 100755 index 0000000..19732b8 Binary files /dev/null and b/midi/bass_17_A1_1_56.3_40_33_102_76.mid differ diff --git a/midi/bass_18_G+1_1_53.4_49_32_87_79.mid b/midi/bass_18_G+1_1_53.4_49_32_87_79.mid new file mode 100755 index 0000000..e5cf649 Binary files /dev/null and b/midi/bass_18_G+1_1_53.4_49_32_87_79.mid differ diff --git a/midi/bass_19_G+1_1_50.7_-41_32_113_50.mid b/midi/bass_19_G+1_1_50.7_-41_32_113_50.mid new file mode 100755 index 0000000..e54af14 Binary files /dev/null and b/midi/bass_19_G+1_1_50.7_-41_32_113_50.mid differ diff --git a/midi/bass_1_B4_4_507.1_46_71_92_78.mid b/midi/bass_1_B4_4_507.1_46_71_92_78.mid new file mode 100755 index 0000000..abdcca3 Binary files /dev/null and b/midi/bass_1_B4_4_507.1_46_71_92_78.mid differ diff --git a/midi/bass_20_G1_1_48.3_-25_31_0_56.mid b/midi/bass_20_G1_1_48.3_-25_31_0_56.mid new file mode 100755 index 0000000..1afc24a Binary files /dev/null and b/midi/bass_20_G1_1_48.3_-25_31_0_56.mid differ diff --git a/midi/bass_21_F+1_1_46.1_-6_30_11_62.mid b/midi/bass_21_F+1_1_46.1_-6_30_11_62.mid new file mode 100755 index 0000000..b6e277c Binary files /dev/null and b/midi/bass_21_F+1_1_46.1_-6_30_11_62.mid differ diff --git a/midi/bass_22_F1_1_44.1_18_29_97_69.mid b/midi/bass_22_F1_1_44.1_18_29_97_69.mid new file mode 100755 index 0000000..ec277b2 Binary files /dev/null and b/midi/bass_22_F1_1_44.1_18_29_97_69.mid differ diff --git a/midi/bass_23_E1_1_42.3_45_28_51_78.mid b/midi/bass_23_E1_1_42.3_45_28_51_78.mid new file mode 100755 index 0000000..b8f89a4 Binary files /dev/null and b/midi/bass_23_E1_1_42.3_45_28_51_78.mid differ diff --git a/midi/bass_24_E1_1_40.6_-26_28_88_55.mid b/midi/bass_24_E1_1_40.6_-26_28_88_55.mid new file mode 100755 index 0000000..216a7a8 Binary files /dev/null and b/midi/bass_24_E1_1_40.6_-26_28_88_55.mid differ diff --git a/midi/bass_25_D+1_1_39.0_5_27_76_65.mid b/midi/bass_25_D+1_1_39.0_5_27_76_65.mid new file mode 100755 index 0000000..2d4b741 Binary files /dev/null and b/midi/bass_25_D+1_1_39.0_5_27_76_65.mid differ diff --git a/midi/bass_26_D1_1_37.6_42_26_56_77.mid b/midi/bass_26_D1_1_37.6_42_26_56_77.mid new file mode 100755 index 0000000..829c4e2 Binary files /dev/null and b/midi/bass_26_D1_1_37.6_42_26_56_77.mid differ diff --git a/midi/bass_27_D1_1_36.2_-24_26_41_56.mid b/midi/bass_27_D1_1_36.2_-24_26_41_56.mid new file mode 100755 index 0000000..317f059 Binary files /dev/null and b/midi/bass_27_D1_1_36.2_-24_26_41_56.mid differ diff --git a/midi/bass_28_C+1_1_35.0_18_25_97_69.mid b/midi/bass_28_C+1_1_35.0_18_25_97_69.mid new file mode 100755 index 0000000..d458aef Binary files /dev/null and b/midi/bass_28_C+1_1_35.0_18_25_97_69.mid differ diff --git a/midi/bass_29_C+1_1_33.8_-43_25_31_50.mid b/midi/bass_29_C+1_1_33.8_-43_25_31_50.mid new file mode 100755 index 0000000..ce19839 Binary files /dev/null and b/midi/bass_29_C+1_1_33.8_-43_25_31_50.mid differ diff --git a/midi/bass_2_E4_4_338.1_44_64_10_78.mid b/midi/bass_2_E4_4_338.1_44_64_10_78.mid new file mode 100755 index 0000000..a941fdc Binary files /dev/null and b/midi/bass_2_E4_4_338.1_44_64_10_78.mid differ diff --git a/midi/bass_30_C1_1_32.7_0_24_0_64.mid b/midi/bass_30_C1_1_32.7_0_24_0_64.mid new file mode 100755 index 0000000..7444044 Binary files /dev/null and b/midi/bass_30_C1_1_32.7_0_24_0_64.mid differ diff --git a/midi/bass_31_B0_0_31.7_46_23_92_78.mid b/midi/bass_31_B0_0_31.7_46_23_92_78.mid new file mode 100755 index 0000000..a886738 Binary files /dev/null and b/midi/bass_31_B0_0_31.7_46_23_92_78.mid differ diff --git a/midi/bass_3_B3_3_253.5_45_59_51_78.mid b/midi/bass_3_B3_3_253.5_45_59_51_78.mid new file mode 100755 index 0000000..75416b8 Binary files /dev/null and b/midi/bass_3_B3_3_253.5_45_59_51_78.mid differ diff --git a/midi/bass_4_G+3_3_202.8_-41_56_113_50.mid b/midi/bass_4_G+3_3_202.8_-41_56_113_50.mid new file mode 100755 index 0000000..3664a7c Binary files /dev/null and b/midi/bass_4_G+3_3_202.8_-41_56_113_50.mid differ diff --git a/midi/bass_5_E3_3_169.0_43_52_97_77.mid b/midi/bass_5_E3_3_169.0_43_52_97_77.mid new file mode 100755 index 0000000..b75d0d8 Binary files /dev/null and b/midi/bass_5_E3_3_169.0_43_52_97_77.mid differ diff --git a/midi/bass_6_D3_3_144.9_-23_50_82_56.mid b/midi/bass_6_D3_3_144.9_-23_50_82_56.mid new file mode 100755 index 0000000..e347ae6 Binary files /dev/null and b/midi/bass_6_D3_3_144.9_-23_50_82_56.mid differ diff --git a/midi/bass_7_B2_2_126.8_46_47_92_78.mid b/midi/bass_7_B2_2_126.8_46_47_92_78.mid new file mode 100755 index 0000000..c92ba1d Binary files /dev/null and b/midi/bass_7_B2_2_126.8_46_47_92_78.mid differ diff --git a/midi/bass_8_A2_2_112.7_42_45_56_77.mid b/midi/bass_8_A2_2_112.7_42_45_56_77.mid new file mode 100755 index 0000000..ce157e7 Binary files /dev/null and b/midi/bass_8_A2_2_112.7_42_45_56_77.mid differ diff --git a/midi/bass_9_G+2_2_101.4_-41_44_113_50.mid b/midi/bass_9_G+2_2_101.4_-41_44_113_50.mid new file mode 100755 index 0000000..c651e15 Binary files /dev/null and b/midi/bass_9_G+2_2_101.4_-41_44_113_50.mid differ diff --git a/midi/buzz_0_E4_4_338.1_44_64_10_78.mid b/midi/buzz_0_E4_4_338.1_44_64_10_78.mid new file mode 100755 index 0000000..e4ebd00 Binary files /dev/null and b/midi/buzz_0_E4_4_338.1_44_64_10_78.mid differ diff --git a/midi/buzz_10_B0_0_30.7_-9_23_16_61.mid b/midi/buzz_10_B0_0_30.7_-9_23_16_61.mid new file mode 100755 index 0000000..85e9448 Binary files /dev/null and b/midi/buzz_10_B0_0_30.7_-9_23_16_61.mid differ diff --git a/midi/buzz_11_A0_0_28.2_44_21_10_78.mid b/midi/buzz_11_A0_0_28.2_44_21_10_78.mid new file mode 100755 index 0000000..2183e51 Binary files /dev/null and b/midi/buzz_11_A0_0_28.2_44_21_10_78.mid differ diff --git a/midi/buzz_12_G+0_0_26.0_3_20_122_64.mid b/midi/buzz_12_G+0_0_26.0_3_20_122_64.mid new file mode 100755 index 0000000..d64df1f Binary files /dev/null and b/midi/buzz_12_G+0_0_26.0_3_20_122_64.mid differ diff --git a/midi/buzz_13_G0_0_24.1_-28_19_6_55.mid b/midi/buzz_13_G0_0_24.1_-28_19_6_55.mid new file mode 100755 index 0000000..8239146 Binary files /dev/null and b/midi/buzz_13_G0_0_24.1_-28_19_6_55.mid differ diff --git a/midi/buzz_14_F+0_0_22.5_-47_18_123_48.mid b/midi/buzz_14_F+0_0_22.5_-47_18_123_48.mid new file mode 100755 index 0000000..12b4df0 Binary files /dev/null and b/midi/buzz_14_F+0_0_22.5_-47_18_123_48.mid differ diff --git a/midi/buzz_15_E0_0_21.1_41_16_15_77.mid b/midi/buzz_15_E0_0_21.1_41_16_15_77.mid new file mode 100755 index 0000000..06a5835 Binary files /dev/null and b/midi/buzz_15_E0_0_21.1_41_16_15_77.mid differ diff --git a/midi/buzz_16_D+0_0_19.9_40_15_102_76.mid b/midi/buzz_16_D+0_0_19.9_40_15_102_76.mid new file mode 100755 index 0000000..b2ab41e Binary files /dev/null and b/midi/buzz_16_D+0_0_19.9_40_15_102_76.mid differ diff --git a/midi/buzz_17_D0_0_18.8_42_14_56_77.mid b/midi/buzz_17_D0_0_18.8_42_14_56_77.mid new file mode 100755 index 0000000..0c018c7 Binary files /dev/null and b/midi/buzz_17_D0_0_18.8_42_14_56_77.mid differ diff --git a/midi/buzz_18_C+0_0_17.8_47_13_5_79.mid b/midi/buzz_18_C+0_0_17.8_47_13_5_79.mid new file mode 100755 index 0000000..5d50690 Binary files /dev/null and b/midi/buzz_18_C+0_0_17.8_47_13_5_79.mid differ diff --git a/midi/buzz_19_C+0_0_16.9_-43_13_31_50.mid b/midi/buzz_19_C+0_0_16.9_-43_13_31_50.mid new file mode 100755 index 0000000..cd2de06 Binary files /dev/null and b/midi/buzz_19_C+0_0_16.9_-43_13_31_50.mid differ diff --git a/midi/buzz_1_E3_3_169.0_43_52_97_77.mid b/midi/buzz_1_E3_3_169.0_43_52_97_77.mid new file mode 100755 index 0000000..62c5392 Binary files /dev/null and b/midi/buzz_1_E3_3_169.0_43_52_97_77.mid differ diff --git a/midi/buzz_20_C0_0_16.1_-27_12_47_55.mid b/midi/buzz_20_C0_0_16.1_-27_12_47_55.mid new file mode 100755 index 0000000..91a59e8 Binary files /dev/null and b/midi/buzz_20_C0_0_16.1_-27_12_47_55.mid differ diff --git a/midi/buzz_2_A2_2_112.7_42_45_56_77.mid b/midi/buzz_2_A2_2_112.7_42_45_56_77.mid new file mode 100755 index 0000000..417ca2c Binary files /dev/null and b/midi/buzz_2_A2_2_112.7_42_45_56_77.mid differ diff --git a/midi/buzz_3_E2_2_84.5_43_40_97_77.mid b/midi/buzz_3_E2_2_84.5_43_40_97_77.mid new file mode 100755 index 0000000..3202233 Binary files /dev/null and b/midi/buzz_3_E2_2_84.5_43_40_97_77.mid differ diff --git a/midi/buzz_4_C+2_2_67.6_-43_37_31_50.mid b/midi/buzz_4_C+2_2_67.6_-43_37_31_50.mid new file mode 100755 index 0000000..ff10287 Binary files /dev/null and b/midi/buzz_4_C+2_2_67.6_-43_37_31_50.mid differ diff --git a/midi/buzz_5_A1_1_56.3_40_33_102_76.mid b/midi/buzz_5_A1_1_56.3_40_33_102_76.mid new file mode 100755 index 0000000..d0f7a12 Binary files /dev/null and b/midi/buzz_5_A1_1_56.3_40_33_102_76.mid differ diff --git a/midi/buzz_6_G1_1_48.3_-25_31_0_56.mid b/midi/buzz_6_G1_1_48.3_-25_31_0_56.mid new file mode 100755 index 0000000..f0d26b5 Binary files /dev/null and b/midi/buzz_6_G1_1_48.3_-25_31_0_56.mid differ diff --git a/midi/buzz_7_E1_1_42.3_45_28_51_78.mid b/midi/buzz_7_E1_1_42.3_45_28_51_78.mid new file mode 100755 index 0000000..5004f25 Binary files /dev/null and b/midi/buzz_7_E1_1_42.3_45_28_51_78.mid differ diff --git a/midi/buzz_8_D1_1_37.6_42_26_56_77.mid b/midi/buzz_8_D1_1_37.6_42_26_56_77.mid new file mode 100755 index 0000000..4d2b494 Binary files /dev/null and b/midi/buzz_8_D1_1_37.6_42_26_56_77.mid differ diff --git a/midi/buzz_9_C+1_1_33.8_-43_25_31_50.mid b/midi/buzz_9_C+1_1_33.8_-43_25_31_50.mid new file mode 100755 index 0000000..6f976d3 Binary files /dev/null and b/midi/buzz_9_C+1_1_33.8_-43_25_31_50.mid differ diff --git a/midi/engine_0_C+2_2_67.6_-43_37_31_50.mid b/midi/engine_0_C+2_2_67.6_-43_37_31_50.mid new file mode 100755 index 0000000..ff10287 Binary files /dev/null and b/midi/engine_0_C+2_2_67.6_-43_37_31_50.mid differ diff --git a/midi/engine_1_C+1_1_33.8_-43_25_31_50.mid b/midi/engine_1_C+1_1_33.8_-43_25_31_50.mid new file mode 100755 index 0000000..6f976d3 Binary files /dev/null and b/midi/engine_1_C+1_1_33.8_-43_25_31_50.mid differ diff --git a/midi/engine_2_F+0_0_22.5_-47_18_123_48.mid b/midi/engine_2_F+0_0_22.5_-47_18_123_48.mid new file mode 100755 index 0000000..12b4df0 Binary files /dev/null and b/midi/engine_2_F+0_0_22.5_-47_18_123_48.mid differ diff --git a/midi/engine_3_C+0_0_16.9_-43_13_31_50.mid b/midi/engine_3_C+0_0_16.9_-43_13_31_50.mid new file mode 100755 index 0000000..cd2de06 Binary files /dev/null and b/midi/engine_3_C+0_0_16.9_-43_13_31_50.mid differ diff --git a/midi/lead_0_E8_8_5240.0_-11_112_62_60.mid b/midi/lead_0_E8_8_5240.0_-11_112_62_60.mid new file mode 100755 index 0000000..bcb6a33 Binary files /dev/null and b/midi/lead_0_E8_8_5240.0_-11_112_62_60.mid differ diff --git a/midi/lead_10_A+4_4_476.6_38_70_20_76.mid b/midi/lead_10_A+4_4_476.6_38_70_20_76.mid new file mode 100755 index 0000000..6fdfd47 Binary files /dev/null and b/midi/lead_10_A+4_4_476.6_38_70_20_76.mid differ diff --git a/midi/lead_11_A4_4_436.7_-13_69_108_59.mid b/midi/lead_11_A4_4_436.7_-13_69_108_59.mid new file mode 100755 index 0000000..3996d6e Binary files /dev/null and b/midi/lead_11_A4_4_436.7_-13_69_108_59.mid differ diff --git a/midi/lead_12_G4_4_403.1_48_67_46_79.mid b/midi/lead_12_G4_4_403.1_48_67_46_79.mid new file mode 100755 index 0000000..027cc8b Binary files /dev/null and b/midi/lead_12_G4_4_403.1_48_67_46_79.mid differ diff --git a/midi/lead_13_F+4_4_374.3_20_66_51_70.mid b/midi/lead_13_F+4_4_374.3_20_66_51_70.mid new file mode 100755 index 0000000..81d2b2d Binary files /dev/null and b/midi/lead_13_F+4_4_374.3_20_66_51_70.mid differ diff --git a/midi/lead_14_F4_4_349.3_0_65_0_64.mid b/midi/lead_14_F4_4_349.3_0_65_0_64.mid new file mode 100755 index 0000000..4afc641 Binary files /dev/null and b/midi/lead_14_F4_4_349.3_0_65_0_64.mid differ diff --git a/midi/lead_15_E4_4_327.5_-11_64_62_60.mid b/midi/lead_15_E4_4_327.5_-11_64_62_60.mid new file mode 100755 index 0000000..c162de6 Binary files /dev/null and b/midi/lead_15_E4_4_327.5_-11_64_62_60.mid differ diff --git a/midi/lead_16_D+4_4_308.2_-16_63_113_58.mid b/midi/lead_16_D+4_4_308.2_-16_63_113_58.mid new file mode 100755 index 0000000..72c3ac0 Binary files /dev/null and b/midi/lead_16_D+4_4_308.2_-16_63_113_58.mid differ diff --git a/midi/lead_17_D4_4_291.1_-15_62_26_59.mid b/midi/lead_17_D4_4_291.1_-15_62_26_59.mid new file mode 100755 index 0000000..852ccbc Binary files /dev/null and b/midi/lead_17_D4_4_291.1_-15_62_26_59.mid differ diff --git a/midi/lead_18_C+4_4_275.8_-9_61_16_61.mid b/midi/lead_18_C+4_4_275.8_-9_61_16_61.mid new file mode 100755 index 0000000..7ed2972 Binary files /dev/null and b/midi/lead_18_C+4_4_275.8_-9_61_16_61.mid differ diff --git a/midi/lead_19_C4_4_262.0_2_60_81_64.mid b/midi/lead_19_C4_4_262.0_2_60_81_64.mid new file mode 100755 index 0000000..01a4968 Binary files /dev/null and b/midi/lead_19_C4_4_262.0_2_60_81_64.mid differ diff --git a/midi/lead_1_E7_7_2620.0_-11_100_62_60.mid b/midi/lead_1_E7_7_2620.0_-11_100_62_60.mid new file mode 100755 index 0000000..a6cd597 Binary files /dev/null and b/midi/lead_1_E7_7_2620.0_-11_100_62_60.mid differ diff --git a/midi/lead_20_B3_3_249.5_18_59_97_69.mid b/midi/lead_20_B3_3_249.5_18_59_97_69.mid new file mode 100755 index 0000000..2117c1a Binary files /dev/null and b/midi/lead_20_B3_3_249.5_18_59_97_69.mid differ diff --git a/midi/lead_21_A+3_3_238.2_38_58_20_76.mid b/midi/lead_21_A+3_3_238.2_38_58_20_76.mid new file mode 100755 index 0000000..5a44d36 Binary files /dev/null and b/midi/lead_21_A+3_3_238.2_38_58_20_76.mid differ diff --git a/midi/lead_22_A+3_3_227.8_-40_58_26_51.mid b/midi/lead_22_A+3_3_227.8_-40_58_26_51.mid new file mode 100755 index 0000000..c4da73e Binary files /dev/null and b/midi/lead_22_A+3_3_227.8_-40_58_26_51.mid differ diff --git a/midi/lead_23_A3_3_218.3_-13_57_108_59.mid b/midi/lead_23_A3_3_218.3_-13_57_108_59.mid new file mode 100755 index 0000000..dccd6fe Binary files /dev/null and b/midi/lead_23_A3_3_218.3_-13_57_108_59.mid differ diff --git a/midi/lead_24_G+3_3_209.6_16_56_15_69.mid b/midi/lead_24_G+3_3_209.6_16_56_15_69.mid new file mode 100755 index 0000000..adf2257 Binary files /dev/null and b/midi/lead_24_G+3_3_209.6_16_56_15_69.mid differ diff --git a/midi/lead_25_G3_3_201.5_48_55_46_79.mid b/midi/lead_25_G3_3_201.5_48_55_46_79.mid new file mode 100755 index 0000000..c4058bf Binary files /dev/null and b/midi/lead_25_G3_3_201.5_48_55_46_79.mid differ diff --git a/midi/lead_26_G3_3_194.1_-17_55_72_58.mid b/midi/lead_26_G3_3_194.1_-17_55_72_58.mid new file mode 100755 index 0000000..4c83c99 Binary files /dev/null and b/midi/lead_26_G3_3_194.1_-17_55_72_58.mid differ diff --git a/midi/lead_27_F+3_3_187.1_20_54_51_70.mid b/midi/lead_27_F+3_3_187.1_20_54_51_70.mid new file mode 100755 index 0000000..d3fe73a Binary files /dev/null and b/midi/lead_27_F+3_3_187.1_20_54_51_70.mid differ diff --git a/midi/lead_28_F+3_3_180.7_-41_54_113_50.mid b/midi/lead_28_F+3_3_180.7_-41_54_113_50.mid new file mode 100755 index 0000000..3af224e Binary files /dev/null and b/midi/lead_28_F+3_3_180.7_-41_54_113_50.mid differ diff --git a/midi/lead_29_F3_3_174.7_1_53_40_64.mid b/midi/lead_29_F3_3_174.7_1_53_40_64.mid new file mode 100755 index 0000000..c0c54e1 Binary files /dev/null and b/midi/lead_29_F3_3_174.7_1_53_40_64.mid differ diff --git a/midi/lead_2_A6_6_1746.6_-13_93_108_59.mid b/midi/lead_2_A6_6_1746.6_-13_93_108_59.mid new file mode 100755 index 0000000..5a1a23f Binary files /dev/null and b/midi/lead_2_A6_6_1746.6_-13_93_108_59.mid differ diff --git a/midi/lead_30_E3_3_169.0_43_52_97_77.mid b/midi/lead_30_E3_3_169.0_43_52_97_77.mid new file mode 100755 index 0000000..8715ce9 Binary files /dev/null and b/midi/lead_30_E3_3_169.0_43_52_97_77.mid differ diff --git a/midi/lead_31_E3_3_163.8_-11_52_62_60.mid b/midi/lead_31_E3_3_163.8_-11_52_62_60.mid new file mode 100755 index 0000000..e87b08b Binary files /dev/null and b/midi/lead_31_E3_3_163.8_-11_52_62_60.mid differ diff --git a/midi/lead_3_E6_6_1310.0_-11_88_62_60.mid b/midi/lead_3_E6_6_1310.0_-11_88_62_60.mid new file mode 100755 index 0000000..46bae13 Binary files /dev/null and b/midi/lead_3_E6_6_1310.0_-11_88_62_60.mid differ diff --git a/midi/lead_4_C6_6_1048.0_2_84_81_64.mid b/midi/lead_4_C6_6_1048.0_2_84_81_64.mid new file mode 100755 index 0000000..0be49c4 Binary files /dev/null and b/midi/lead_4_C6_6_1048.0_2_84_81_64.mid differ diff --git a/midi/lead_5_A5_5_873.3_-13_81_108_59.mid b/midi/lead_5_A5_5_873.3_-13_81_108_59.mid new file mode 100755 index 0000000..62b2944 Binary files /dev/null and b/midi/lead_5_A5_5_873.3_-13_81_108_59.mid differ diff --git a/midi/lead_6_F+5_5_748.6_20_78_51_70.mid b/midi/lead_6_F+5_5_748.6_20_78_51_70.mid new file mode 100755 index 0000000..f682aee Binary files /dev/null and b/midi/lead_6_F+5_5_748.6_20_78_51_70.mid differ diff --git a/midi/lead_7_E5_5_655.0_-11_76_62_60.mid b/midi/lead_7_E5_5_655.0_-11_76_62_60.mid new file mode 100755 index 0000000..5916240 Binary files /dev/null and b/midi/lead_7_E5_5_655.0_-11_76_62_60.mid differ diff --git a/midi/lead_8_D5_5_582.2_-15_74_26_59.mid b/midi/lead_8_D5_5_582.2_-15_74_26_59.mid new file mode 100755 index 0000000..3b1e99d Binary files /dev/null and b/midi/lead_8_D5_5_582.2_-15_74_26_59.mid differ diff --git a/midi/lead_9_C5_5_524.0_2_72_81_64.mid b/midi/lead_9_C5_5_524.0_2_72_81_64.mid new file mode 100755 index 0000000..69b76fb Binary files /dev/null and b/midi/lead_9_C5_5_524.0_2_72_81_64.mid differ diff --git a/midi/noise_0_B1_1_61.5_-7_35_98_61.mid b/midi/noise_0_B1_1_61.5_-7_35_98_61.mid new file mode 100755 index 0000000..19bfc9a Binary files /dev/null and b/midi/noise_0_B1_1_61.5_-7_35_98_61.mid differ diff --git a/midi/noise_1_B0_0_30.8_-4_23_93_62.mid b/midi/noise_1_B0_0_30.8_-4_23_93_62.mid new file mode 100755 index 0000000..941abd2 Binary files /dev/null and b/midi/noise_1_B0_0_30.8_-4_23_93_62.mid differ diff --git a/midi/noise_2_E0_0_20.5_-9_16_16_61.mid b/midi/noise_2_E0_0_20.5_-9_16_16_61.mid new file mode 100755 index 0000000..0db0952 Binary files /dev/null and b/midi/noise_2_E0_0_20.5_-9_16_16_61.mid differ diff --git a/midi/saw_0_C7_7_2096.0_2_96_81_64.mid b/midi/saw_0_C7_7_2096.0_2_96_81_64.mid new file mode 100755 index 0000000..d60f706 Binary files /dev/null and b/midi/saw_0_C7_7_2096.0_2_96_81_64.mid differ diff --git a/midi/saw_10_G3_3_190.5_-49_55_41_48.mid b/midi/saw_10_G3_3_190.5_-49_55_41_48.mid new file mode 100755 index 0000000..67ecd45 Binary files /dev/null and b/midi/saw_10_G3_3_190.5_-49_55_41_48.mid differ diff --git a/midi/saw_11_F3_3_174.7_1_53_40_64.mid b/midi/saw_11_F3_3_174.7_1_53_40_64.mid new file mode 100755 index 0000000..c04a4a4 Binary files /dev/null and b/midi/saw_11_F3_3_174.7_1_53_40_64.mid differ diff --git a/midi/saw_12_E3_3_161.2_-38_52_108_51.mid b/midi/saw_12_E3_3_161.2_-38_52_108_51.mid new file mode 100755 index 0000000..89aad14 Binary files /dev/null and b/midi/saw_12_E3_3_161.2_-38_52_108_51.mid differ diff --git a/midi/saw_13_D3_3_149.7_33_50_71_74.mid b/midi/saw_13_D3_3_149.7_33_50_71_74.mid new file mode 100755 index 0000000..0fd6fa5 Binary files /dev/null and b/midi/saw_13_D3_3_149.7_33_50_71_74.mid differ diff --git a/midi/saw_14_C+3_3_139.7_14_49_61_68.mid b/midi/saw_14_C+3_3_139.7_14_49_61_68.mid new file mode 100755 index 0000000..f55fb39 Binary files /dev/null and b/midi/saw_14_C+3_3_139.7_14_49_61_68.mid differ diff --git a/midi/saw_15_C3_3_131.0_2_48_81_64.mid b/midi/saw_15_C3_3_131.0_2_48_81_64.mid new file mode 100755 index 0000000..61815b4 Binary files /dev/null and b/midi/saw_15_C3_3_131.0_2_48_81_64.mid differ diff --git a/midi/saw_16_B2_2_123.3_-2_47_47_63.mid b/midi/saw_16_B2_2_123.3_-2_47_47_63.mid new file mode 100755 index 0000000..c7b2bbf Binary files /dev/null and b/midi/saw_16_B2_2_123.3_-2_47_47_63.mid differ diff --git a/midi/saw_17_A+2_2_116.4_-2_46_47_63.mid b/midi/saw_17_A+2_2_116.4_-2_46_47_63.mid new file mode 100755 index 0000000..d3aa421 Binary files /dev/null and b/midi/saw_17_A+2_2_116.4_-2_46_47_63.mid differ diff --git a/midi/saw_18_A2_2_110.3_5_45_76_65.mid b/midi/saw_18_A2_2_110.3_5_45_76_65.mid new file mode 100755 index 0000000..5ed8160 Binary files /dev/null and b/midi/saw_18_A2_2_110.3_5_45_76_65.mid differ diff --git a/midi/saw_19_G+2_2_104.8_16_44_15_69.mid b/midi/saw_19_G+2_2_104.8_16_44_15_69.mid new file mode 100755 index 0000000..087dfc8 Binary files /dev/null and b/midi/saw_19_G+2_2_104.8_16_44_15_69.mid differ diff --git a/midi/saw_1_C6_6_1048.0_2_84_81_64.mid b/midi/saw_1_C6_6_1048.0_2_84_81_64.mid new file mode 100755 index 0000000..e6a190e Binary files /dev/null and b/midi/saw_1_C6_6_1048.0_2_84_81_64.mid differ diff --git a/midi/saw_20_G2_2_99.8_32_43_30_74.mid b/midi/saw_20_G2_2_99.8_32_43_30_74.mid new file mode 100755 index 0000000..a419373 Binary files /dev/null and b/midi/saw_20_G2_2_99.8_32_43_30_74.mid differ diff --git a/midi/saw_21_G2_2_95.3_-48_43_82_48.mid b/midi/saw_21_G2_2_95.3_-48_43_82_48.mid new file mode 100755 index 0000000..ee29d6f Binary files /dev/null and b/midi/saw_21_G2_2_95.3_-48_43_82_48.mid differ diff --git a/midi/saw_22_F+2_2_91.1_-26_42_88_55.mid b/midi/saw_22_F+2_2_91.1_-26_42_88_55.mid new file mode 100755 index 0000000..3a3cc20 Binary files /dev/null and b/midi/saw_22_F+2_2_91.1_-26_42_88_55.mid differ diff --git a/midi/saw_23_F2_2_87.3_0_41_0_64.mid b/midi/saw_23_F2_2_87.3_0_41_0_64.mid new file mode 100755 index 0000000..ed7e268 Binary files /dev/null and b/midi/saw_23_F2_2_87.3_0_41_0_64.mid differ diff --git a/midi/saw_24_E2_2_83.8_29_40_35_73.mid b/midi/saw_24_E2_2_83.8_29_40_35_73.mid new file mode 100755 index 0000000..60d68b5 Binary files /dev/null and b/midi/saw_24_E2_2_83.8_29_40_35_73.mid differ diff --git a/midi/saw_25_E2_2_80.6_-38_40_108_51.mid b/midi/saw_25_E2_2_80.6_-38_40_108_51.mid new file mode 100755 index 0000000..3208e22 Binary files /dev/null and b/midi/saw_25_E2_2_80.6_-38_40_108_51.mid differ diff --git a/midi/saw_26_D+2_2_77.6_-4_39_93_62.mid b/midi/saw_26_D+2_2_77.6_-4_39_93_62.mid new file mode 100755 index 0000000..6dbc15e Binary files /dev/null and b/midi/saw_26_D+2_2_77.6_-4_39_93_62.mid differ diff --git a/midi/saw_27_D2_2_74.9_35_38_25_75.mid b/midi/saw_27_D2_2_74.9_35_38_25_75.mid new file mode 100755 index 0000000..09f638e Binary files /dev/null and b/midi/saw_27_D2_2_74.9_35_38_25_75.mid differ diff --git a/midi/saw_28_D2_2_72.3_-27_38_47_55.mid b/midi/saw_28_D2_2_72.3_-27_38_47_55.mid new file mode 100755 index 0000000..ffc3f0a Binary files /dev/null and b/midi/saw_28_D2_2_72.3_-27_38_47_55.mid differ diff --git a/midi/saw_29_C+2_2_69.9_15_37_102_68.mid b/midi/saw_29_C+2_2_69.9_15_37_102_68.mid new file mode 100755 index 0000000..b34ae67 Binary files /dev/null and b/midi/saw_29_C+2_2_69.9_15_37_102_68.mid differ diff --git a/midi/saw_2_F5_5_698.7_1_77_40_64.mid b/midi/saw_2_F5_5_698.7_1_77_40_64.mid new file mode 100755 index 0000000..09e804c Binary files /dev/null and b/midi/saw_2_F5_5_698.7_1_77_40_64.mid differ diff --git a/midi/saw_30_C+2_2_67.6_-43_37_31_50.mid b/midi/saw_30_C+2_2_67.6_-43_37_31_50.mid new file mode 100755 index 0000000..ff10287 Binary files /dev/null and b/midi/saw_30_C+2_2_67.6_-43_37_31_50.mid differ diff --git a/midi/saw_31_C2_2_65.5_2_36_81_64.mid b/midi/saw_31_C2_2_65.5_2_36_81_64.mid new file mode 100755 index 0000000..269275f Binary files /dev/null and b/midi/saw_31_C2_2_65.5_2_36_81_64.mid differ diff --git a/midi/saw_3_C5_5_524.0_2_72_81_64.mid b/midi/saw_3_C5_5_524.0_2_72_81_64.mid new file mode 100755 index 0000000..26f2ca8 Binary files /dev/null and b/midi/saw_3_C5_5_524.0_2_72_81_64.mid differ diff --git a/midi/saw_4_G+4_4_419.2_16_68_15_69.mid b/midi/saw_4_G+4_4_419.2_16_68_15_69.mid new file mode 100755 index 0000000..cefd0c9 Binary files /dev/null and b/midi/saw_4_G+4_4_419.2_16_68_15_69.mid differ diff --git a/midi/saw_5_F4_4_349.3_0_65_0_64.mid b/midi/saw_5_F4_4_349.3_0_65_0_64.mid new file mode 100755 index 0000000..5e73ddd Binary files /dev/null and b/midi/saw_5_F4_4_349.3_0_65_0_64.mid differ diff --git a/midi/saw_6_D4_4_299.4_33_62_71_74.mid b/midi/saw_6_D4_4_299.4_33_62_71_74.mid new file mode 100755 index 0000000..a6d48d0 Binary files /dev/null and b/midi/saw_6_D4_4_299.4_33_62_71_74.mid differ diff --git a/midi/saw_7_C4_4_262.0_2_60_81_64.mid b/midi/saw_7_C4_4_262.0_2_60_81_64.mid new file mode 100755 index 0000000..f3634a4 Binary files /dev/null and b/midi/saw_7_C4_4_262.0_2_60_81_64.mid differ diff --git a/midi/saw_8_A+3_3_232.9_-1_58_88_63.mid b/midi/saw_8_A+3_3_232.9_-1_58_88_63.mid new file mode 100755 index 0000000..24007d3 Binary files /dev/null and b/midi/saw_8_A+3_3_232.9_-1_58_88_63.mid differ diff --git a/midi/saw_9_G+3_3_209.6_16_56_15_69.mid b/midi/saw_9_G+3_3_209.6_16_56_15_69.mid new file mode 100755 index 0000000..3019df8 Binary files /dev/null and b/midi/saw_9_G+3_3_209.6_16_56_15_69.mid differ diff --git a/midi/square_10_F6_6_1429.1_39_89_61_76.mid b/midi/square_10_F6_6_1429.1_39_89_61_76.mid new file mode 100755 index 0000000..8560a70 Binary files /dev/null and b/midi/square_10_F6_6_1429.1_39_89_61_76.mid differ diff --git a/midi/square_11_E6_6_1310.0_-11_88_62_60.mid b/midi/square_11_E6_6_1310.0_-11_88_62_60.mid new file mode 100755 index 0000000..46bae13 Binary files /dev/null and b/midi/square_11_E6_6_1310.0_-11_88_62_60.mid differ diff --git a/midi/square_12_D+6_6_1209.2_-50_87_0_48.mid b/midi/square_12_D+6_6_1209.2_-50_87_0_48.mid new file mode 100755 index 0000000..fc1e035 Binary files /dev/null and b/midi/square_12_D+6_6_1209.2_-50_87_0_48.mid differ diff --git a/midi/square_13_C+6_6_1122.9_22_85_5_71.mid b/midi/square_13_C+6_6_1122.9_22_85_5_71.mid new file mode 100755 index 0000000..4634acb Binary files /dev/null and b/midi/square_13_C+6_6_1122.9_22_85_5_71.mid differ diff --git a/midi/square_14_C6_6_1048.0_2_84_81_64.mid b/midi/square_14_C6_6_1048.0_2_84_81_64.mid new file mode 100755 index 0000000..0be49c4 Binary files /dev/null and b/midi/square_14_C6_6_1048.0_2_84_81_64.mid differ diff --git a/midi/square_15_B5_5_982.5_-9_83_16_61.mid b/midi/square_15_B5_5_982.5_-9_83_16_61.mid new file mode 100755 index 0000000..bacbb14 Binary files /dev/null and b/midi/square_15_B5_5_982.5_-9_83_16_61.mid differ diff --git a/midi/square_16_A+5_5_924.7_-14_82_67_59.mid b/midi/square_16_A+5_5_924.7_-14_82_67_59.mid new file mode 100755 index 0000000..c5142a0 Binary files /dev/null and b/midi/square_16_A+5_5_924.7_-14_82_67_59.mid differ diff --git a/midi/square_17_A5_5_873.3_-13_81_108_59.mid b/midi/square_17_A5_5_873.3_-13_81_108_59.mid new file mode 100755 index 0000000..62b2944 Binary files /dev/null and b/midi/square_17_A5_5_873.3_-13_81_108_59.mid differ diff --git a/midi/square_18_G+5_5_827.4_-7_80_98_61.mid b/midi/square_18_G+5_5_827.4_-7_80_98_61.mid new file mode 100755 index 0000000..f928fd1 Binary files /dev/null and b/midi/square_18_G+5_5_827.4_-7_80_98_61.mid differ diff --git a/midi/square_19_G5_5_786.0_4_79_35_65.mid b/midi/square_19_G5_5_786.0_4_79_35_65.mid new file mode 100755 index 0000000..1fd0646 Binary files /dev/null and b/midi/square_19_G5_5_786.0_4_79_35_65.mid differ diff --git a/midi/square_1_B8_8_7860.0_-9_119_16_61.mid b/midi/square_1_B8_8_7860.0_-9_119_16_61.mid new file mode 100755 index 0000000..edae797 Binary files /dev/null and b/midi/square_1_B8_8_7860.0_-9_119_16_61.mid differ diff --git a/midi/square_20_F+5_5_748.6_20_78_51_70.mid b/midi/square_20_F+5_5_748.6_20_78_51_70.mid new file mode 100755 index 0000000..f682aee Binary files /dev/null and b/midi/square_20_F+5_5_748.6_20_78_51_70.mid differ diff --git a/midi/square_21_F5_5_714.5_39_77_61_76.mid b/midi/square_21_F5_5_714.5_39_77_61_76.mid new file mode 100755 index 0000000..c447cb3 Binary files /dev/null and b/midi/square_21_F5_5_714.5_39_77_61_76.mid differ diff --git a/midi/square_22_F5_5_683.5_-37_77_21_52.mid b/midi/square_22_F5_5_683.5_-37_77_21_52.mid new file mode 100755 index 0000000..43e108f Binary files /dev/null and b/midi/square_22_F5_5_683.5_-37_77_21_52.mid differ diff --git a/midi/square_23_E5_5_655.0_-11_76_62_60.mid b/midi/square_23_E5_5_655.0_-11_76_62_60.mid new file mode 100755 index 0000000..5916240 Binary files /dev/null and b/midi/square_23_E5_5_655.0_-11_76_62_60.mid differ diff --git a/midi/square_24_D+5_5_628.8_18_75_97_69.mid b/midi/square_24_D+5_5_628.8_18_75_97_69.mid new file mode 100755 index 0000000..15a50f7 Binary files /dev/null and b/midi/square_24_D+5_5_628.8_18_75_97_69.mid differ diff --git a/midi/square_25_D+5_5_604.6_-50_75_0_48.mid b/midi/square_25_D+5_5_604.6_-50_75_0_48.mid new file mode 100755 index 0000000..f63c874 Binary files /dev/null and b/midi/square_25_D+5_5_604.6_-50_75_0_48.mid differ diff --git a/midi/square_26_D5_5_582.2_-15_74_26_59.mid b/midi/square_26_D5_5_582.2_-15_74_26_59.mid new file mode 100755 index 0000000..3b1e99d Binary files /dev/null and b/midi/square_26_D5_5_582.2_-15_74_26_59.mid differ diff --git a/midi/square_27_C+5_5_561.4_22_73_5_71.mid b/midi/square_27_C+5_5_561.4_22_73_5_71.mid new file mode 100755 index 0000000..ec862d9 Binary files /dev/null and b/midi/square_27_C+5_5_561.4_22_73_5_71.mid differ diff --git a/midi/square_28_C+5_5_542.1_-39_73_67_51.mid b/midi/square_28_C+5_5_542.1_-39_73_67_51.mid new file mode 100755 index 0000000..9ee8d0d Binary files /dev/null and b/midi/square_28_C+5_5_542.1_-39_73_67_51.mid differ diff --git a/midi/square_29_C5_5_524.0_2_72_81_64.mid b/midi/square_29_C5_5_524.0_2_72_81_64.mid new file mode 100755 index 0000000..69b76fb Binary files /dev/null and b/midi/square_29_C5_5_524.0_2_72_81_64.mid differ diff --git a/midi/square_2_E8_8_5240.0_-11_112_62_60.mid b/midi/square_2_E8_8_5240.0_-11_112_62_60.mid new file mode 100755 index 0000000..bcb6a33 Binary files /dev/null and b/midi/square_2_E8_8_5240.0_-11_112_62_60.mid differ diff --git a/midi/square_30_B4_4_507.1_46_71_92_78.mid b/midi/square_30_B4_4_507.1_46_71_92_78.mid new file mode 100755 index 0000000..6b22ab3 Binary files /dev/null and b/midi/square_30_B4_4_507.1_46_71_92_78.mid differ diff --git a/midi/square_31_B4_4_491.3_-9_71_16_61.mid b/midi/square_31_B4_4_491.3_-9_71_16_61.mid new file mode 100755 index 0000000..6c4554f Binary files /dev/null and b/midi/square_31_B4_4_491.3_-9_71_16_61.mid differ diff --git a/midi/square_3_B7_7_3930.0_-9_107_16_61.mid b/midi/square_3_B7_7_3930.0_-9_107_16_61.mid new file mode 100755 index 0000000..0a11e17 Binary files /dev/null and b/midi/square_3_B7_7_3930.0_-9_107_16_61.mid differ diff --git a/midi/square_4_G7_7_3144.0_4_103_35_65.mid b/midi/square_4_G7_7_3144.0_4_103_35_65.mid new file mode 100755 index 0000000..5e67c7c Binary files /dev/null and b/midi/square_4_G7_7_3144.0_4_103_35_65.mid differ diff --git a/midi/square_5_E7_7_2620.0_-11_100_62_60.mid b/midi/square_5_E7_7_2620.0_-11_100_62_60.mid new file mode 100755 index 0000000..a6cd597 Binary files /dev/null and b/midi/square_5_E7_7_2620.0_-11_100_62_60.mid differ diff --git a/midi/square_6_C+7_7_2245.7_22_97_5_71.mid b/midi/square_6_C+7_7_2245.7_22_97_5_71.mid new file mode 100755 index 0000000..c3a3a90 Binary files /dev/null and b/midi/square_6_C+7_7_2245.7_22_97_5_71.mid differ diff --git a/midi/square_7_B6_6_1965.0_-9_95_16_61.mid b/midi/square_7_B6_6_1965.0_-9_95_16_61.mid new file mode 100755 index 0000000..8829e6e Binary files /dev/null and b/midi/square_7_B6_6_1965.0_-9_95_16_61.mid differ diff --git a/midi/square_8_A6_6_1746.7_-13_93_108_59.mid b/midi/square_8_A6_6_1746.7_-13_93_108_59.mid new file mode 100755 index 0000000..5a1a23f Binary files /dev/null and b/midi/square_8_A6_6_1746.7_-13_93_108_59.mid differ diff --git a/midi/square_9_G6_6_1572.0_4_91_35_65.mid b/midi/square_9_G6_6_1572.0_4_91_35_65.mid new file mode 100755 index 0000000..74d42ce Binary files /dev/null and b/midi/square_9_G6_6_1572.0_4_91_35_65.mid differ diff --git a/saw_1.php b/saw_1.php new file mode 100755 index 0000000..0940359 --- /dev/null +++ b/saw_1.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && (strcmp($c1_data[$i-1][1],"2") < 0 || strcmp($c1_data[$i-1][1],"2") > 0)) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"2") == 0) //play a note (saw) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,146); //note on, channel 2 + array_push($bin_data,$note_array['saw'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,226); //pitch bend, channel 2 + array_push($bin_data,$note_array['saw'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['saw'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,130); //note off, channel 2 + array_push($bin_data,$note_array['saw'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to lead voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",194),1); //change voice, channel 2 +fwrite($filehandle,pack("I",84),1); //saw voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",178),1); //controller event, channel 2 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 3 DATA +?> \ No newline at end of file diff --git a/saw_2.php b/saw_2.php new file mode 100755 index 0000000..f476a77 --- /dev/null +++ b/saw_2.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && (strcmp($c2_data[$i-1][1],"2") < 0 || strcmp($c2_data[$i-1][1],"2") > 0)) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"2") == 0) //play a note (saw) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,150); //note on, channel 6 + array_push($bin_data,$note_array['saw'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,230); //pitch bend, channel 6 + array_push($bin_data,$note_array['saw'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['saw'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,134); //note off, channel 6 + array_push($bin_data,$note_array['saw'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to lead voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",198),1); //change voice, channel 6 +fwrite($filehandle,pack("I",84),1); //saw voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",182),1); //controller event, channel 6 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 3 DATA +?> \ No newline at end of file diff --git a/songs/fun_with_modulation.mid b/songs/fun_with_modulation.mid new file mode 100755 index 0000000..3b6e935 Binary files /dev/null and b/songs/fun_with_modulation.mid differ diff --git a/songs/fwm-channel1.txt b/songs/fwm-channel1.txt new file mode 100755 index 0000000..2bf6dd6 --- /dev/null +++ b/songs/fwm-channel1.txt @@ -0,0 +1,624 @@ +-------1------- +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +G5 0 19 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A#5 0 16 16 +G5 0 19 16 +G5 0 19 16 +G5 0 19 16 +A5 0 17 16 +G5 0 19 16 +F5 0 22 16 +D5 0 26 16 +-------2------- +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +G5 0 19 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A#5 0 16 16 +G5 0 19 16 +G5 0 19 16 +G5 0 19 16 +A5 0 17 16 +G5 0 19 16 +F#5 0 20 16 +D5 0 26 16 +-------3------- +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +G5 0 19 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A#5 0 16 16 +G5 0 19 16 +G5 0 19 16 +G5 0 19 16 +A5 0 17 16 +G5 0 19 16 +F5 0 22 16 +D5 0 26 16 +-------4------- +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +G5 0 19 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A#5 0 16 16 +G5 0 19 16 +G5 0 19 16 +G5 0 19 16 +A5 0 17 16 +G5 0 19 16 +F#5 0 20 16 +D5 0 26 16 +-------5------- +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +G5 0 19 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A#5 0 16 16 +G5 0 19 16 +G5 0 19 16 +G5 0 19 16 +A5 0 17 16 +G5 0 19 16 +F5 0 22 16 +D5 0 26 16 +-------6------- +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +G5 0 19 16 +A5 0 17 16 +A5 0 17 16 +A5 0 17 16 +A#5 0 16 16 +G5 0 19 16 +G5 0 19 16 +G5 0 19 16 +A5 0 17 16 +G5 0 19 16 +F#5 0 20 16 +D5 0 26 16 +-------7------- +C5 0 29 16 +C5 0 29 16 +C5 0 29 16 +C5 0 29 16 +D#5 0 24 16 +C5 0 29 16 +C5 0 29 16 +C5 0 29 16 +D5 0 26 16 +C5 0 29 16 +C5 0 29 16 +C5 0 29 16 +F5 0 22 16 +C5 0 29 16 +G5 0 19 16 +D#5 0 24 16 +-------8------- +D5 0 26 16 +D5 0 26 16 +E5 0 23 16 +D5 0 26 16 +F#5 0 20 16 +D5 0 26 16 +G5 0 19 16 +D5 0 26 16 +A5 0 17 16 +D5 0 26 16 +A#5 0 16 16 +D5 0 26 16 +C6 0 14 21.33 +G5 0 19 21.33 +D#5 0 24 32 +D5 0 26 21.33 +E5 0 23 21.33 +F#5 0 20 32 +-------9------- +G5 0 19 16 +D5 0 26 16 +A#5 0 16 16 +G5 0 19 16 +F#5 0 20 16 +D5 0 26 16 +A5 0 17 16 +F#5 0 20 16 +G5 0 19 16 +D#5 0 25 16 +C6 0 14 16 +G5 0 19 16 +D5 0 26 16 +F5 0 22 16 +G#5 0 18 16 +B5 0 15 16 +-------10------- +C6 0 14 16 +G5 0 19 16 +D#5 0 25 16 +D5 0 26 16 +C5 0 29 16 +D5 0 26 16 +D#5 0 25 16 +G5 0 19 16 +G#5 0 18 16 +G5 0 19 16 +F5 0 22 16 +C5 0 29 16 +F5 0 22 16 +B4 0 31 16 +G#5 0 18 16 +D5 0 26 16 +-------11------- +F#5 0 20 16 +D#5 0 25 16 +A#5 0 16 16 +F#5 0 20 16 +F5 0 22 16 +D5 0 26 16 +A#5 0 16 16 +F5 0 22 16 +D#5 0 25 16 +B4 0 31 16 +G#5 0 18 16 +F#5 0 20 16 +G#5 0 18 16 +B4 0 31 16 +D5 0 26 16 +F5 0 22 16 +-------12------- +F#5 0 20 16 +C#5 0 28 16 +A5 0 17 16 +F#5 0 20 16 +C#6 0 13 16 +A5 0 17 16 +F#5 0 20 16 +C#5 0 28 16 +F5 0 22 16 +C#5 0 28 16 +G#5 0 18 16 +F5 0 22 16 +F#5 0 20 16 +D5 0 26 16 +A5 0 17 16 +F#5 0 20 16 +-------13------- +G5 0 19 16 +D5 0 26 16 +A#5 0 16 16 +G5 0 19 16 +F#5 0 20 16 +D5 0 26 16 +A5 0 17 16 +F#5 0 20 16 +G5 0 19 16 +D#5 0 25 16 +C6 0 14 16 +G5 0 19 16 +D5 0 26 16 +F5 0 22 16 +G#5 0 18 16 +B5 0 15 16 +-------14------- +C6 0 14 16 +G5 0 19 16 +D#5 0 25 16 +D5 0 26 16 +C5 0 29 16 +D5 0 26 16 +D#5 0 25 16 +G5 0 19 16 +G#5 0 18 16 +G5 0 19 16 +F5 0 22 16 +C5 0 29 16 +F5 0 22 16 +B4 0 31 16 +G#5 0 18 16 +D5 0 26 16 +-------15------- +F#5 0 20 16 +D#5 0 25 16 +A#5 0 16 16 +F#5 0 20 16 +F5 0 22 16 +D5 0 26 16 +A#5 0 16 16 +F5 0 22 16 +D#5 0 25 16 +B4 0 31 16 +G#5 0 18 16 +F#5 0 20 16 +G#5 0 18 16 +B4 0 31 16 +D5 0 26 16 +F5 0 22 16 +-------16------- +F#5 0 20 16 +C#5 0 28 16 +A5 0 17 16 +F#5 0 20 16 +C#6 0 13 16 +A5 0 17 16 +F#5 0 20 16 +C#5 0 28 16 +F5 0 22 16 +C#5 0 28 16 +G#5 0 18 16 +F5 0 22 16 +F#5 0 20 16 +D5 0 26 16 +A5 0 17 16 +F#5 0 20 16 +-------17------- +G5 0 19 16 +G#5 0 18 16 +G5 0 19 16 +F#5 0 20 16 +G5 0 19 16 +C5 0 29 16 +B4 0 31 16 +C5 0 29 16 +A5 0 17 16 +A#5 0 16 16 +A5 0 17 16 +G#5 0 18 16 +A5 0 17 16 +D5 0 26 16 +C#5 0 28 16 +D5 0 26 16 +-------18------- +A#5 0 16 16 +C6 0 14 16 +A#5 0 16 16 +A5 0 17 16 +A#5 0 16 16 +D#5 0 25 16 +D5 0 26 16 +D#5 0 25 16 +C6 0 14 16 +C#6 0 13 16 +C6 0 14 16 +A#5 0 16 16 +C6 0 14 16 +F5 0 22 16 +E5 0 23 16 +F5 0 22 16 +-------19------- +G5 0 19 16 +G#5 0 18 16 +G5 0 19 16 +F#5 0 20 16 +G5 0 19 16 +C5 0 29 16 +B4 0 31 16 +C5 0 29 16 +A5 0 17 16 +A#5 0 16 16 +A5 0 17 16 +G#5 0 18 16 +A5 0 17 16 +D5 0 26 16 +C#5 0 28 16 +D5 0 26 16 +-------20------- +A#5 0 16 16 +C6 0 14 16 +A#5 0 16 16 +A5 0 17 16 +A#5 0 16 16 +D#5 0 25 16 +D5 0 26 16 +D#5 0 25 16 +C6 0 14 16 +C#6 0 13 16 +C6 0 14 16 +A#5 0 16 16 +C6 0 14 16 +F5 0 22 16 +E5 0 23 16 +F5 0 22 16 +-------21------- +C5 0 29 16 +E5 0 23 16 +G5 0 19 16 +A#5 0 16 16 +C6 0 14 16 +A#5 0 16 16 +G5 0 19 16 +E5 0 23 16 +C5 0 29 16 +F5 0 22 16 +G#5 0 18 16 +C6 0 14 16 +C#6 0 13 16 +C6 0 14 16 +G#5 0 18 16 +F5 0 22 16 +-------22------- +B4 0 31 16 +D5 0 26 16 +F5 0 22 16 +G#5 0 18 16 +B5 0 15 16 +G#5 0 18 16 +F5 0 22 16 +D5 0 26 16 +C5 0 29 16 +D#5 0 25 16 +G5 0 19 16 +C6 0 14 16 +C#6 0 13 16 +G#5 0 18 16 +F5 0 22 16 +C#5 0 28 16 +-------23------- +C5 0 29 16 +E5 0 23 16 +G5 0 19 16 +A#5 0 16 16 +C6 0 14 16 +A#5 0 16 16 +G5 0 19 16 +E5 0 23 16 +C5 0 29 16 +F5 0 22 16 +G#5 0 18 16 +C6 0 14 16 +C#6 0 13 16 +C6 0 14 16 +G#5 0 18 16 +F5 0 22 16 +-------24------- +B4 0 31 16 +D5 0 26 16 +F5 0 22 16 +G#5 0 18 16 +B5 0 15 16 +G#5 0 18 16 +F5 0 22 16 +D5 0 26 16 +C5 0 29 16 +D#5 0 25 16 +G5 0 19 16 +C6 0 14 16 +C#6 0 13 16 +G#5 0 18 16 +F5 0 22 16 +C#5 0 28 16 +-------25------- +C5 0 29 21.33 +F4 1 14 21.33 +C5 0 29 32 +F5 0 22 21.33 +C5 0 29 21.33 +F5 0 22 32 +G#5 0 18 21.33 +F5 0 22 21.33 +G#5 0 18 32 +C6 0 14 21.33 +G#5 0 18 21.33 +C6 0 14 32 +A#5 0 16 21.33 +C#6 0 13 21.33 +A#5 0 16 32 +F5 0 22 21.33 +A#5 0 16 21.33 +F5 0 22 32 +C#5 0 28 21.33 +F5 0 22 21.33 +C#5 0 28 32 +C5 0 29 21.33 +C#5 0 28 21.33 +C5 0 29 32 +-------26------- +D5 0 26 21.33 +B4 0 31 21.33 +D5 0 26 32 +F5 0 22 21.33 +D5 0 26 21.33 +F5 0 22 32 +G5 0 19 21.33 +F5 0 22 21.33 +G5 0 19 32 +B5 0 15 21.33 +G5 0 19 21.33 +B5 0 15 32 +A#5 0 16 21.33 +C6 0 14 21.33 +A#5 0 16 32 +G#5 0 18 21.33 +A#5 0 16 21.33 +G#5 0 18 32 +D#5 0 25 21.33 +G#5 0 18 21.33 +D#5 0 25 32 +C5 0 29 21.33 +D#5 0 25 21.33 +C5 0 29 32 +-------27------- +C#5 0 28 21.33 +E4 1 15 21.33 +C#5 0 28 32 +E5 0 23 21.33 +C#5 0 28 21.33 +E5 0 23 32 +G#5 0 18 21.33 +E5 0 23 21.33 +G#5 0 18 32 +C#6 0 13 21.33 +G#5 0 18 21.33 +C#6 0 13 32 +A5 0 17 21.33 +C#6 0 13 21.33 +A5 0 17 32 +G#5 0 18 21.33 +A5 0 17 21.33 +G#5 0 18 32 +E5 0 23 21.33 +G#5 0 18 21.33 +E5 0 23 32 +C#5 0 28 21.33 +E5 0 23 21.33 +A4 1 11 32 +-------28------- +B4 0 31 21.33 +F#4 1 13 21.33 +B4 0 31 32 +E5 0 23 21.33 +B4 0 31 21.33 +E5 0 23 32 +F#5 0 20 21.33 +E5 0 23 21.33 +F#5 0 20 32 +B5 0 15 21.33 +F#5 0 20 21.33 +B5 0 15 32 +F#5 0 20 21.33 +B5 0 15 21.33 +F#5 0 20 32 +D#5 0 25 21.33 +F#5 0 20 21.33 +D#5 0 25 32 +B4 0 31 21.33 +D#5 0 25 21.33 +B4 0 31 32 +F#4 1 13 21.33 +B4 0 31 21.33 +F#4 1 13 32 +-------29------- +B4 0 31 21.33 +E4 1 15 21.33 +B4 0 31 32 +E5 0 23 21.33 +B4 0 31 21.33 +E5 0 23 32 +G5 0 19 21.33 +E5 0 23 21.33 +G5 0 19 32 +B5 0 15 21.33 +G5 0 19 21.33 +B5 0 15 32 +C6 0 14 21.33 +E6 0 11 21.33 +C6 0 14 32 +G5 0 19 21.33 +C6 0 14 21.33 +G5 0 19 32 +E5 0 23 21.33 +G5 0 19 21.33 +E5 0 23 32 +C5 0 29 21.33 +E5 0 23 21.33 +C5 0 29 32 +-------30------- +B4 0 31 21.33 +A4 1 11 21.33 +C5 0 29 32 +E5 0 23 21.33 +C5 0 29 21.33 +E5 0 23 32 +A5 0 17 21.33 +E5 0 23 21.33 +A5 0 17 32 +B5 0 15 21.33 +A5 0 17 21.33 +C6 0 14 32 +A5 0 17 21.33 +B5 0 15 21.33 +G#5 0 18 32 +E5 0 23 21.33 +G#5 0 18 21.33 +E5 0 23 32 +D5 0 26 21.33 +E5 0 23 21.33 +D5 0 26 32 +B4 0 31 21.33 +D5 0 26 21.33 +B4 0 31 32 +-------31------- +C5 0 29 21.33 +A4 1 11 21.33 +C5 0 29 32 +F5 0 22 21.33 +C5 0 29 21.33 +F5 0 22 32 +A5 0 17 21.33 +F5 0 22 21.33 +A5 0 17 32 +C6 0 14 21.33 +A5 0 17 21.33 +C6 0 14 32 +G5 0 19 21.33 +B5 0 15 21.33 +G5 0 19 32 +D5 0 26 21.33 +G5 0 19 21.33 +D5 0 26 32 +B4 0 31 21.33 +D5 0 26 21.33 +B4 0 31 32 +D5 0 26 21.33 +G5 0 19 21.33 +D5 0 26 32 +-------32------- +C5 0 29 21.33 +B4 0 31 21.33 +C5 0 29 32 +D#5 0 25 21.33 +C5 0 29 21.33 +D#5 0 25 32 +G5 0 19 21.33 +D#5 0 25 21.33 +G5 0 19 32 +C6 0 14 21.33 +G5 0 19 21.33 +C6 0 14 32 +A5 0 17 21.33 +C6 0 14 21.33 +A5 0 17 32 +F#5 0 20 21.33 +A5 0 17 21.33 +F#5 0 20 32 +D5 0 26 21.33 +F#5 0 20 21.33 +D5 0 26 32 +A4 1 11 21.33 +D5 0 26 21.33 +F#5 0 20 32 +-------33------- +G5 0 19 8 +A4 1 11 16 +D5 0 26 16 +G5 0 19 21.33 +D5 0 26 21.33 +G5 0 19 32 +A#5 0 16 21.33 +G5 0 19 21.33 +D5 0 26 32 +G5 0 19 8 +G6 0 9 8 +G5 0 19 4 +-------34------- diff --git a/songs/fwm-channel2.txt b/songs/fwm-channel2.txt new file mode 100755 index 0000000..c7c7a4c --- /dev/null +++ b/songs/fwm-channel2.txt @@ -0,0 +1,184 @@ +-------1------- +D3 3 6 1 +-------2------ +D2 3 13 1 +-------3------ +D3 3 6 1 +-------4------ +D2 3 13 1 +-------5------ +F3 1 29 1 +-------6------ +D3 3 6 1 +-------7------ +C4 1 19 2.66 +G3 1 26 2.66 +D#4 1 16 4 +-------8------ +D4 1 17 4 +D3 3 6 4 +x x x 16 +D3 3 6 5.33 +C4 1 19 8 +D3 3 6 8 +-------9------ +G3 1 26 4 +D3 3 6 4 +C4 1 19 4 +G3 1 26 4 +-------10------ +C4 1 19 4 +D#4 1 16 4 +F4 1 14 4 +D4 1 17 4 +-------11------ +D#4 1 16 4 +D4 1 17 4 +B3 1 20 4 +G3 1 26 4 +-------12------ +F#3 1 27 4 +F#4 1 13 4 +C#4 1 18 4 +D4 1 17 4 +-------13------ +G3 1 26 4 +D3 3 6 4 +C4 1 19 4 +G3 1 26 4 +-------14------ +C4 1 19 4 +D#4 1 16 4 +F4 1 14 4 +D4 1 17 4 +-------15------ +D#4 1 16 4 +D4 1 17 4 +B3 1 20 4 +G3 1 26 4 +-------16------ +F#3 1 27 4 +F#4 1 13 4 +C#4 1 18 4 +D4 1 17 4 +-------17------ +C4 1 19 4 +G3 1 26 4 +D4 1 17 4 +A3 1 23 4 +-------18------ +D#4 1 16 4 +A#3 1 22 4 +F4 1 14 4 +C#4 1 18 4 +-------19------ +C4 1 19 4 +G3 1 26 4 +D4 1 17 4 +A3 1 23 4 +-------20------ +D#4 1 16 4 +A#3 1 22 4 +F4 1 14 4 +C#4 1 18 4 +-------21------ +C4 1 19 4 +G3 1 26 4 +F3 1 29 4 +F4 1 14 4 +-------22------ +G3 1 26 4 +B3 1 20 4 +C4 1 19 4 +C#4 1 18 4 +-------23------ +C4 1 19 4 +G3 1 26 4 +F3 1 29 4 +F4 1 14 4 +-------24------ +G3 1 26 4 +B3 1 20 4 +C4 1 19 4 +C#4 1 18 4 +-------25------ +F3 1 29 8 +C4 1 19 8 +F4 1 14 8 +C4 1 19 8 +A#3 1 22 8 +C#4 1 18 8 +F4 1 14 8 +F3 1 29 8 +-------26------ +B3 1 20 8 +D4 1 17 8 +F4 1 14 8 +G3 1 26 8 +G#3 1 24 8 +C4 1 19 8 +D#4 1 16 8 +C4 1 19 8 +-------27------ +C#4 1 18 8 +G#3 1 24 8 +E4 1 15 8 +C#4 1 18 8 +A4 1 11 8 +E4 1 15 8 +C#4 1 18 8 +A3 1 23 8 +-------28------ +B3 1 20 8 +F#3 1 27 8 +F#4 1 13 8 +F#3 1 27 8 +B3 1 20 8 +F#3 1 27 8 +F#4 1 13 8 +F#3 1 27 8 +-------29------ +E3 1 31 8 +B3 1 20 8 +E4 1 15 8 +B3 1 20 8 +C4 1 19 8 +G3 1 26 8 +E4 1 15 8 +C4 1 19 8 +-------30------ +A3 1 23 8 +A4 1 11 8 +E4 1 15 8 +C4 1 19 8 +E3 1 31 8 +E4 1 15 8 +B3 1 20 8 +E3 1 31 8 +-------31------ +F3 1 29 8 +C4 1 19 8 +F4 1 14 8 +C4 1 19 8 +G3 1 26 8 +D4 1 17 8 +B3 1 20 8 +G3 1 26 8 +-------32------ +C4 1 19 8 +G3 1 26 8 +D#4 1 16 8 +C4 1 19 8 +D4 1 17 8 +A3 1 23 8 +D3 3 6 8 +D4 1 17 8 +-------33------ +G3 1 26 8 +A3 1 23 8 +A#3 1 22 8 +D4 1 17 8 +G3 1 26 8 +G5 0 19 8 +G3 1 26 4 +-------34------ diff --git a/songs/megaman/elecman-channel1.txt b/songs/megaman/elecman-channel1.txt new file mode 100755 index 0000000..0057a2c --- /dev/null +++ b/songs/megaman/elecman-channel1.txt @@ -0,0 +1,154 @@ +-------1------- +G#5 0 18 2.66 +F#5 0 20 2.66 +A5 0 17 2.66 +-------2------- +G#5 0 18 4 +x x x 8 +B6 0 7 16 +E6 0 11 16 +B5 0 15 16 +A5 0 17 16 +E6 0 11 8 +x x x 8 +-------3------- +G#5 0 18 2.66 +F#5 0 20 2.66 +A5 0 17 2.66 +-------4------- +G#5 0 18 4 +x x x 8 +B6 0 7 16 +E6 0 11 16 +B5 0 15 16 +A5 0 17 16 +C#6 0 13 8 +x x x 8 +-------5------- +G#5 0 18 2.66 +F#5 0 20 2.66 +A5 0 17 2.66 +-------6------- +G#5 0 18 2.66 +F#5 0 20 4 +E5 0 23 1 +-------7------- +E5 0 23 2.66 +-------8------- +D#5 0 24 4 +C#5 0 27 8 +B4 0 31 8 +B5 0 15 8 +x x x 4 +-------9------- +G#5 0 18 2.66 +F#5 0 20 2.66 +A5 0 17 2.66 +-------10------- +G#5 0 18 4 +x x x 8 +B6 0 7 16 +E6 0 11 16 +B5 0 15 16 +A5 0 17 16 +E6 0 11 8 +x x x 8 +-------11------- +G#5 0 18 2.66 +F#5 0 20 2.66 +A5 0 17 2.66 +-------12------- +G#5 0 18 4 +x x x 8 +B6 0 7 16 +E6 0 11 16 +B5 0 15 16 +A5 0 17 16 +C#6 0 13 8 +x x x 8 +-------13------- +G#5 0 18 2.66 +F#5 0 20 2.66 +A5 0 17 2.66 +-------14------- +G#5 0 18 2.66 +F#5 0 20 4 +E5 0 23 1 +-------15------- +E5 0 23 2.66 +-------16------- +D#5 0 24 4 +C#5 0 27 8 +B4 0 31 8 +B5 0 15 8 +x x x 4 +-------17------- +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +-------18------- +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +-------19------- +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +E5 0 23 8 +-------20------- +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +D5 0 26 8 +-------21------- +G5 0 19 8 +G5 0 19 8 +G5 0 19 8 +G5 0 19 8 +G5 0 19 8 +G5 0 19 8 +G5 0 19 8 +G5 0 19 8 +-------22------- +F5 0 22 8 +F5 0 22 8 +F5 0 22 8 +F5 0 22 8 +F5 0 22 8 +F5 0 22 8 +F5 0 22 8 +F5 0 22 8 +-------23------- +G5 0 19 2.66 +A5 0 17 2.66 +G5 0 19 4 +-------24------- +B5 0 15 16 +B5 0 15 16 +B5 0 15 8 +x x x 8 +B5 0 15 8 +x x x 8 +B5 0 15 16 +B5 0 15 16 +B5 0 15 8 +x x x 8 +-------25------- diff --git a/songs/megaman/elecman-channel2.txt b/songs/megaman/elecman-channel2.txt new file mode 100755 index 0000000..1da6d03 --- /dev/null +++ b/songs/megaman/elecman-channel2.txt @@ -0,0 +1,190 @@ +-------1------- +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +-------2------- +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +-------3------- +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +-------4------- +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +-------5------- +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +-------6------- +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +-------7------- +E3 1 31 8 +C4 1 19 8 +E3 1 31 8 +C4 1 19 8 +E3 1 31 8 +C4 1 19 8 +E3 1 31 8 +C4 1 19 8 +-------8------- +E3 1 31 8 +B3 1 20 8 +E3 1 31 8 +B3 1 20 8 +E3 1 31 8 +B3 1 20 8 +E3 1 31 8 +E4 1 15 8 +-------9------- +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +-------10------- +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +E3 1 31 8 +E4 1 15 8 +-------11------- +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +-------12------- +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +E3 1 31 8 +D4 1 17 8 +-------13------- +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +-------14------- +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +E3 1 31 8 +C#4 1 18 8 +-------15------- +E3 1 31 8 +C4 1 19 8 +E3 1 31 8 +C4 1 19 8 +E3 1 31 8 +C4 1 19 8 +E3 1 31 8 +C4 1 19 8 +-------16------- +E3 1 31 8 +B3 1 20 8 +E3 1 31 8 +B3 1 20 8 +E3 1 31 8 +B3 1 20 8 +E3 1 31 8 +E4 1 15 8 +-------17------- +E3 1 31 8 +A3 1 23 8 +B3 1 20 8 +E4 1 15 4 +D4 1 17 2 +-------18------- +C#4 1 18 8 +D4 1 17 8 +C#4 1 18 8 +B3 1 20 8 +A3 1 23 8 +B3 1 20 4 +-------19------- +E3 1 31 8 +A3 1 23 8 +B3 1 20 8 +E4 1 15 4 +D4 1 17 0.66 +-------20------- +x x x 8 +-------21------- +G3 1 26 8 +B3 1 20 8 +D4 1 17 8 +B4 0 31 2.66 +-------22------- +A4 1 11 2.66 +F4 1 14 2.66 +D4 1 17 4 +-------23------- +D#4 1 16 2.66 +F4 1 14 2.66 +D#4 1 16 4 +-------24------- +E4 1 15 16 +E4 1 15 16 +E4 1 15 8 +x x x 8 +E4 1 15 8 +x x x 8 +E4 1 15 16 +E4 1 15 16 +E4 1 15 8 +E3 1 31 8 +-------25------- diff --git a/songs/megaman/mm-elecman.jpeg b/songs/megaman/mm-elecman.jpeg new file mode 100755 index 0000000..cb75b88 Binary files /dev/null and b/songs/megaman/mm-elecman.jpeg differ diff --git a/songs/megaman/mm-elecman.mid b/songs/megaman/mm-elecman.mid new file mode 100755 index 0000000..0603bfe Binary files /dev/null and b/songs/megaman/mm-elecman.mid differ diff --git a/songs/megaman/mm-prestage.jpeg b/songs/megaman/mm-prestage.jpeg new file mode 100755 index 0000000..1de29dd Binary files /dev/null and b/songs/megaman/mm-prestage.jpeg differ diff --git a/songs/megaman/mm-prestage.mid b/songs/megaman/mm-prestage.mid new file mode 100755 index 0000000..c58a415 Binary files /dev/null and b/songs/megaman/mm-prestage.mid differ diff --git a/songs/megaman/mm-stageselect.jpeg b/songs/megaman/mm-stageselect.jpeg new file mode 100755 index 0000000..ec9fb30 Binary files /dev/null and b/songs/megaman/mm-stageselect.jpeg differ diff --git a/songs/megaman/mm-stageselect.mid b/songs/megaman/mm-stageselect.mid new file mode 100755 index 0000000..851036a Binary files /dev/null and b/songs/megaman/mm-stageselect.mid differ diff --git a/songs/megaman/prestage-channel1.txt b/songs/megaman/prestage-channel1.txt new file mode 100755 index 0000000..abefe8c --- /dev/null +++ b/songs/megaman/prestage-channel1.txt @@ -0,0 +1,35 @@ +-------1------- +D5 0 26 8 +D5 0 26 16 +C5 0 29 8 +D5 0 26 1.77 +B4 0 31 21.33 +C5 0 29 21.33 +D5 0 26 32 +-------2------- +E5 0 23 8 +E5 0 23 16 +D5 0 26 8 +E5 0 23 1.77 +C5 0 29 21.33 +D5 0 26 21.33 +E5 0 23 32 +-------3------- +F5 0 22 8 +F5 0 22 8 +x x x 4 +G#5 0 18 8 +G#5 0 18 8 +x x x 8 +D5 0 26 21.33 +E5 0 23 21.33 +G#5 0 18 32 +-------4------- +A5 0 17 8 +G5 0 19 8 +E5 0 23 16 +D5 0 26 16 +E5 0 23 16 +A5 0 17 2 +x x x 16 +-------5------- diff --git a/songs/megaman/prestage-channel2.txt b/songs/megaman/prestage-channel2.txt new file mode 100755 index 0000000..8e011cc --- /dev/null +++ b/songs/megaman/prestage-channel2.txt @@ -0,0 +1,20 @@ +-------1------- +D4 1 17 1.33 +D4 1 17 16 +C#4 1 18 8 +C4 1 19 1.33 +-------2------- +C4 1 19 16 +B3 1 20 8 +A#3 1 22 2 +-------3------- +A#3 1 22 21.33 +C4 1 19 21.33 +D4 1 17 32 +E4 1 15 2 +-------4------- +A3 1 23 16 +G3 1 26 16 +A3 1 23 1.33 +x x x 8 +-------5------- diff --git a/songs/megaman/stageselect-channel1.txt b/songs/megaman/stageselect-channel1.txt new file mode 100755 index 0000000..9181fe4 --- /dev/null +++ b/songs/megaman/stageselect-channel1.txt @@ -0,0 +1,69 @@ +-------1------- +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +A#5 0 16 16 +A#5 0 16 16 +A#5 0 16 16 +C#6 0 13 16 +C#6 0 13 16 +C#6 0 13 16 +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +A#5 0 16 16 +A#5 0 16 16 +C6 0 14 16 +C6 0 14 16 +-------2------- +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +A#5 0 16 16 +A#5 0 16 16 +A#5 0 16 16 +G#5 0 18 16 +G#5 0 18 16 +A#5 0 16 16 +A#5 0 16 16 +A#5 0 16 16 +G#5 0 18 16 +G#5 0 18 16 +G#5 0 18 16 +A#5 0 16 16 +A#5 0 16 16 +-------3------- +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +A#5 0 16 16 +A#5 0 16 16 +A#5 0 16 16 +C#6 0 13 16 +C#6 0 13 16 +C#6 0 13 16 +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +A#5 0 16 16 +A#5 0 16 16 +C6 0 14 16 +C6 0 14 16 +-------4------- +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +A#5 0 16 16 +A#5 0 16 16 +A#5 0 16 16 +G#5 0 18 16 +G#5 0 18 16 +A#5 0 16 16 +A#5 0 16 16 +A#5 0 16 16 +G#5 0 18 16 +G#5 0 18 16 +G#5 0 18 16 +A#5 0 16 16 +A#5 0 16 16 +-------5------- diff --git a/songs/megaman/stageselect-channel2.txt b/songs/megaman/stageselect-channel2.txt new file mode 100755 index 0000000..5e451dd --- /dev/null +++ b/songs/megaman/stageselect-channel2.txt @@ -0,0 +1,23 @@ +-------1------- +D#4 1 16 5.33 +D#4 1 16 1.33 +D#4 1 16 16 +-------2------- +C#4 1 18 5.33 +C#4 1 18 2 +C#4 1 18 16 +C#4 1 18 8 +B3 1 20 16 +C#4 1 18 16 +-------3------- +D#4 1 16 5.33 +D#4 1 16 1.33 +D#4 1 16 16 +-------4------- +C#4 1 18 5.33 +C#4 1 18 2 +C#4 1 18 16 +C#4 1 18 8 +A#3 1 22 16 +C#4 1 18 16 +-------5------- diff --git a/songs/rodtv-channel1.txt b/songs/rodtv-channel1.txt new file mode 100755 index 0000000..8f9db6c --- /dev/null +++ b/songs/rodtv-channel1.txt @@ -0,0 +1,193 @@ +-------1------- +x x x 1 +-------2------- +D#1 3 25 16 +D#1 3 25 16 +x x x 16 +D#1 3 25 16 +D#1 3 25 16 +x x x 16 +D#1 3 25 16 +D#1 3 25 16 +D#1 3 25 16 +x x x 16 +D#1 3 25 16 +D#1 3 25 16 +x x x 16 +D#1 3 25 16 +D#1 3 25 16 +D#1 3 25 16 +-------3------- +x x x 1 +-------4------- +D#1 3 25 16 +D#1 3 25 16 +x x x 16 +D#1 3 25 16 +F#1 3 21 16 +D#1 3 25 16 +x x x 16 +D#1 3 25 16 +F#1 3 21 16 +D#1 3 25 16 +D#2 3 12 16 +D#1 3 25 16 +F#1 3 21 16 +D#1 3 25 16 +D#2 3 12 16 +D#1 3 25 16 +-------5------- +C#6 0 13 32 +C#6 0 13 32 +F#1 3 22 16 +C#6 0 13 32 +C#6 0 13 32 +C#6 0 13 32 +C#6 0 13 32 +D#1 3 25 16 +C#6 0 13 32 +C#6 0 13 32 +D#1 3 25 16 +C#6 0 13 32 +C#6 0 13 32 +C#5 0 28 32 +C#5 0 28 32 +F#1 3 22 16 +C#5 0 28 32 +C#5 0 28 32 +C#5 0 28 32 +C#5 0 28 32 +D#1 3 25 16 +C#5 0 28 32 +C#5 0 28 32 +D#1 3 25 16 +C#5 0 28 32 +C#5 0 28 32 +-------6------- +C6 0 14 32 +C6 0 14 32 +F#1 3 22 16 +C6 0 14 32 +C6 0 14 32 +C6 0 14 32 +C6 0 14 32 +D#1 3 25 16 +C6 0 14 32 +C6 0 14 32 +D#1 3 25 16 +C6 0 14 32 +C6 0 14 32 +A#5 0 16 32 +A#5 0 16 32 +F#1 3 22 16 +A#5 0 16 32 +A#5 0 16 32 +A#5 0 16 32 +A#5 0 16 32 +D#1 3 25 16 +A#5 0 16 32 +A#5 0 16 32 +D#1 3 25 16 +A#5 0 16 32 +A#5 0 16 32 +-------7------- +C#6 0 13 32 +C#6 0 13 32 +F#1 3 22 16 +C#6 0 13 32 +C#6 0 13 32 +C#6 0 13 32 +C#6 0 13 32 +D#1 3 25 16 +C#6 0 13 32 +C#6 0 13 32 +D#1 3 25 16 +C#6 0 13 32 +C#6 0 13 32 +C#5 0 28 32 +C#5 0 28 32 +F#1 3 22 16 +C#5 0 28 32 +C#5 0 28 32 +C#5 0 28 32 +C#5 0 28 32 +D#1 3 25 16 +C#5 0 28 32 +C#5 0 28 32 +D#1 3 25 16 +C#5 0 28 32 +C#5 0 28 32 +-------8------- +C6 0 14 32 +C6 0 14 32 +F#1 3 22 16 +C6 0 14 32 +C6 0 14 32 +C6 0 14 32 +C6 0 14 32 +D#1 3 25 16 +C6 0 14 32 +C6 0 14 32 +D#1 3 25 16 +C6 0 14 32 +C6 0 14 32 +A#5 0 16 32 +A#5 0 16 32 +F#1 3 22 16 +A#5 0 16 32 +A#5 0 16 32 +A#5 0 16 32 +A#5 0 16 32 +D#1 3 25 16 +A#5 0 16 32 +A#5 0 16 32 +D#1 3 25 16 +A#5 0 16 32 +A#5 0 16 32 +-------9------- +F5 0 22 16 +D#5 0 25 16 +F5 0 22 2 +D#5 0 25 16 +D#5 0 25 5.33 +B5 0 15 8 +-------10------- +A5 0 17 5.33 +A#5 0 16 5.33 +C#6 0 13 8 +C6 0 14 4 +A#5 0 16 5.33 +C6 0 14 32 +A#5 0 16 32 +-------11------- +F5 0 22 1.33 +D#5 0 25 8 +F5 0 22 8 +-------12------- +F#5 0 20 5.33 +F5 0 22 5.33 +F#5 0 20 8 +G5 0 19 4 +A#5 0 16 4 +-------13------- +B4 0 31 2 +B5 0 15 2 +-------14------- +B5 0 15 5.33 +A#5 0 16 5.33 +C#6 0 13 8 +B5 0 15 5.33 +A#5 0 16 5.33 +C#6 0 13 8 +-------15------- +B5 0 15 2.66 +A#5 0 16 8 +D5 0 26 2 +-------16------- +D5 0 26 5.33 +F#5 0 20 5.33 +F5 0 22 8 +D#5 0 25 5.33 +C#5 0 28 5.33 +B4 0 31 8 +-------17------- diff --git a/songs/rodtv-channel2.txt b/songs/rodtv-channel2.txt new file mode 100755 index 0000000..fa84a5c --- /dev/null +++ b/songs/rodtv-channel2.txt @@ -0,0 +1,217 @@ +-------1------- +D#2 2 26 5.33 +F#2 2 22 5.33 +D#2 2 26 8 +A2 2 18 5.33 +G#2 2 19 5.33 +F#2 2 22 8 +-------2------- +D#2 2 26 5.33 +F#2 2 22 5.33 +C#3 2 14 8 +C3 2 15 5.33 +A2 2 18 5.33 +A#2 2 17 8 +-------3------- +D#2 2 26 5.33 +F#2 2 22 5.33 +D#2 2 26 8 +A2 2 18 5.33 +G#2 2 19 5.33 +F#2 2 22 8 +-------4------- +D#2 2 26 5.33 +F#2 2 22 5.33 +C#3 2 14 8 +C3 2 15 5.33 +A2 2 18 5.33 +A#2 2 17 8 +-------5------- +D#2 2 26 8 +D#1 3 25 16 +F#2 2 22 8 +D#1 3 25 16 +D#2 2 26 16 +F#1 3 21 16 +A2 2 18 8 +D#1 3 25 16 +G#2 2 19 8 +D#1 3 25 16 +F#2 2 22 16 +F#1 3 21 16 +-------6------- +D#2 2 26 8 +D#1 3 25 16 +F#2 2 22 8 +D#1 3 25 16 +C#3 2 14 16 +F#1 3 21 16 +C3 2 15 8 +G1 3 20 16 +A2 2 18 8 +D#1 3 25 16 +A#2 2 17 16 +F#1 3 21 16 +-------7------- +D#2 2 26 8 +D#1 3 25 16 +F#2 2 22 8 +D#1 3 25 16 +D#2 2 26 16 +F#1 3 21 16 +A2 2 18 8 +D#1 3 25 16 +G#2 2 19 8 +D#1 3 25 16 +F#2 2 22 16 +F#1 3 21 16 +-------8------- +D#2 2 26 8 +D#1 3 25 16 +F#2 2 22 8 +D#1 3 25 16 +C#3 2 14 16 +F#1 3 21 16 +C3 2 15 8 +G1 3 20 16 +A2 2 18 8 +D#1 3 25 16 +A#2 2 17 16 +F#1 3 21 16 +-------9------- +D#2 2 26 16 +D#1 3 25 16 +D#1 3 25 16 +F#2 2 22 16 +D#1 3 25 16 +F#1 3 21 16 +D#2 2 26 16 +F#1 3 21 16 +A2 2 18 16 +D#1 3 25 16 +D#1 3 25 16 +G#2 2 19 16 +F#1 3 21 16 +D#1 3 25 16 +F#2 2 22 16 +F#1 3 21 16 +-------10------- +D#2 2 26 16 +D#1 3 25 16 +D#1 3 25 16 +F#2 2 22 16 +F#1 3 21 16 +D#1 3 25 16 +C#3 2 14 16 +F#1 3 21 16 +C3 2 15 16 +G1 3 20 16 +D1 3 27 16 +A2 2 18 16 +D#1 3 25 16 +D#1 3 25 16 +A#2 2 17 16 +F#1 3 21 16 +-------11------- +D#2 2 26 16 +D#1 3 25 16 +D#1 3 25 16 +F#2 2 22 16 +D#1 3 25 16 +F#1 3 21 16 +D#2 2 26 16 +F#1 3 21 16 +A2 2 18 16 +D#1 3 25 16 +D#1 3 25 16 +G#2 2 19 16 +F#1 3 21 16 +D#1 3 25 16 +F#2 2 22 16 +F#1 3 21 16 +-------12------- +D#2 2 26 16 +D#1 3 25 16 +D#1 3 25 16 +F#2 2 22 16 +F#1 3 21 16 +D#1 3 25 16 +C#3 2 14 16 +F#1 3 21 16 +C3 2 15 16 +G1 3 20 16 +D1 3 27 16 +A2 2 18 16 +D#1 3 25 16 +D#1 3 25 16 +A#2 2 17 16 +F#1 3 21 16 +-------13------- +G#2 2 19 16 +F#1 3 21 16 +G#1 3 19 16 +B2 2 16 16 +G#1 3 19 16 +F#1 3 21 16 +G#2 2 19 16 +D#1 3 25 16 +C#3 2 14 16 +D#2 3 12 16 +D#1 3 25 16 +B2 2 16 16 +F#1 3 21 16 +G#1 3 19 16 +F#2 2 22 16 +F#1 3 21 16 +-------14------- +G#2 2 19 16 +F#1 3 21 16 +G#1 3 19 16 +B2 2 16 16 +D#2 3 12 16 +D#1 3 25 16 +G#3 2 19 16 +D#2 3 12 16 +E3 2 12 16 +C#2 3 14 16 +G#1 3 19 16 +C#3 2 14 16 +G#1 3 19 16 +F#1 3 21 16 +B2 2 16 16 +F#1 3 21 16 +-------15------- +G#2 2 19 16 +F#1 3 21 16 +G#1 3 19 16 +B2 2 16 16 +G#1 3 19 16 +F#1 3 21 16 +G#2 2 19 16 +D#1 3 25 16 +C#3 2 14 16 +D#2 3 12 16 +D#1 3 25 16 +B2 2 16 16 +F#1 3 21 16 +G#1 3 19 16 +F#2 2 22 16 +F#1 3 21 16 +-------16------- +G#2 2 19 16 +F#1 3 21 16 +G#1 3 19 16 +B2 2 16 16 +D#2 3 12 16 +D#1 3 25 16 +G#3 2 19 16 +D#2 3 12 16 +E3 2 12 16 +C#2 3 14 16 +G#1 3 19 16 +C#3 2 14 16 +G#1 3 19 16 +F#1 3 21 16 +B2 2 16 16 +F#1 3 21 16 +-------17------- diff --git a/songs/rodtv.mid b/songs/rodtv.mid new file mode 100755 index 0000000..282ead3 Binary files /dev/null and b/songs/rodtv.mid differ diff --git a/songs/test.mid b/songs/test.mid new file mode 100755 index 0000000..55a248f Binary files /dev/null and b/songs/test.mid differ diff --git a/songs/test2-channel1.txt b/songs/test2-channel1.txt new file mode 100755 index 0000000..53d4f6d --- /dev/null +++ b/songs/test2-channel1.txt @@ -0,0 +1,127 @@ +-------1------- +A4 1 11 16 +B4 0 31 16 +C5 0 29 16 +E5 0 23 16 +F5 0 22 16 +D5 0 26 16 +E5 0 23 16 +F5 0 22 16 +-------2------- +G#5 0 18 16 +B4 0 31 32 +D5 0 26 32 +E5 0 23 32 +G#5 0 18 32 +B5 0 15 32 +G#5 0 18 32 +A5 0 17 8 +G#5 0 18 8 +-------3------- +C6 0 14 16 +A5 0 17 16 +E5 0 23 16 +C6 0 14 5.33 +B4 0 31 32 +C5 0 29 32 +D5 0 26 32 +E5 0 23 32 +-------4------- +F5 0 22 32 +A5 0 17 32 +B5 0 15 16 +E5 0 23 16 +D5 0 26 16 +B5 0 15 5.33 +A4 1 11 32 +B4 0 31 32 +-------5------- +D5 0 26 5.33 +F5 0 22 5.33 +D5 0 26 8 +-------6------- +E5 0 23 5.33 +G#5 0 18 5.33 +C6 0 14 32 +B5 0 15 32 +A5 0 17 32 +G#5 0 18 32 +-------7------- +C6 0 14 16 +A5 0 17 16 +E5 0 23 16 +C6 0 14 16 +A5 0 17 16 +E5 0 23 16 +C5 0 29 16 +E5 0 23 16 +-------8------- +B5 0 15 16 +D5 0 26 32 +E5 0 23 32 +G#5 0 18 16 +E5 0 23 16 +A5 0 17 16 +E5 0 23 16 +B5 0 15 16 +E5 0 23 16 +-------9------- +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +C6 0 14 16 +B5 0 15 32 +C6 0 14 32 +B5 0 15 32 +A5 0 17 32 +-------10------- +B5 0 15 16 +B5 0 15 16 +B5 0 15 16 +E5 0 23 16 +E5 0 23 16 +E5 0 23 16 +E7 0 5 32 +B6 0 7 32 +E6 0 11 32 +B5 0 15 32 +-------11------- +C6 0 14 2 +-------12------- +A5 0 17 2 +-------13------- +E5 0 23 2 +-------14------- +C5 0 29 2 +-------15------- +B5 0 15 2 +-------16------- +G#5 0 18 2 +-------17------- +E5 0 23 2 +-------18------- +B4 0 31 2 +-------19------- +A5 0 17 2 +-------20------- +D5 0 26 2 +-------21------- +E5 0 23 2 +-------22------- +F5 0 22 8 +E5 0 23 8 +D5 0 26 8 +F5 0 22 8 +-------23------- +E5 0 23 4 +F#5 0 20 4 +-------24------- +G#5 0 18 2 +-------25------- +A5 0 17 5.33 +C6 0 14 5.33 +E6 0 11 8 +-------26------- +A6 0 8 4 diff --git a/songs/test2-channel2.txt b/songs/test2-channel2.txt new file mode 100755 index 0000000..8f25efd --- /dev/null +++ b/songs/test2-channel2.txt @@ -0,0 +1,246 @@ +-------1------- +A3 1 23 16 +E4 1 15 16 +A4 1 11 16 +C5 1 9 16 +D4 1 17 16 +E4 1 15 16 +F4 1 14 16 +A4 1 11 16 +-------2------ +B4 0 31 16 +E3 1 31 32 +A3 1 23 32 +B3 1 20 32 +D4 1 17 32 +E4 1 15 32 +B4 0 31 32 +C5 1 9 16 +A4 1 11 16 +E4 1 15 16 +E3 1 31 16 +-------3------ +A3 1 23 8 +G3 1 26 16 +A3 1 23 16 +E3 1 31 16 +G3 1 26 16 +A3 1 23 16 +B3 1 20 16 +-------4------ +F3 1 29 16 +E3 1 31 16 +D4 1 17 16 +E4 1 15 16 +E3 1 31 16 +D4 1 17 16 +E4 1 15 16 +D4 1 17 16 +-------5------ +D3 3 6 16 +E3 1 31 16 +F3 1 29 16 +D3 3 6 16 +E3 1 31 16 +F3 1 29 16 +E3 1 31 16 +D3 3 6 16 +-------6------ +E3 1 31 32 +A3 1 23 32 +B3 1 20 32 +D4 1 17 32 +E4 1 15 32 +D4 1 17 32 +E4 1 15 32 +D4 1 17 32 +B3 1 20 32 +E3 1 31 32 +E4 1 15 32 +D4 1 17 32 +B3 1 20 32 +E3 1 31 32 +E3 1 31 32 +B3 1 20 32 +-------7------ +A3 1 23 8 +G3 1 26 16 +A3 1 23 16 +E3 1 31 16 +G3 1 26 16 +A3 1 23 16 +B3 1 20 16 +-------8------ +E3 1 31 16 +D3 3 6 16 +F3 1 29 16 +E3 1 31 16 +D3 3 6 16 +F3 1 29 16 +E3 1 31 16 +E4 1 15 16 +-------9------ +A5 0 17 16 +F5 0 22 16 +E5 0 23 16 +A5 0 17 16 +F5 0 22 16 +E5 0 23 16 +E5 0 23 32 +F5 0 22 32 +E5 0 23 32 +D5 0 26 32 +-------10------ +G#5 0 18 16 +E5 0 23 16 +D5 0 26 16 +G#5 0 18 16 +F5 0 22 16 +E5 0 23 16 +E3 1 31 32 +B3 1 20 32 +E4 1 15 32 +B4 0 31 32 +-------11------ +C3 2 15 16 +B2 2 16 16 +A2 2 18 16 +F3 2 11 16 +C3 2 15 16 +B2 2 16 16 +A2 2 18 16 +F2 2 23 16 +-------12------ +A2 2 18 16 +F2 2 23 16 +C3 2 15 16 +A2 2 18 16 +B2 2 16 16 +F3 2 11 16 +C3 2 15 16 +B2 2 16 16 +-------13------ +E2 2 25 16 +D2 2 28 16 +B2 2 16 16 +D2 2 28 16 +E2 2 25 16 +C3 2 15 16 +B2 2 16 16 +D2 2 28 16 +-------14------ +E2 2 25 16 +F2 2 23 16 +A2 2 18 16 +B2 2 16 16 +C3 2 15 16 +E3 2 12 16 +F3 2 11 16 +C3 2 15 16 +-------15------ +E2 2 25 16 +F2 2 23 16 +B2 2 16 16 +C3 2 15 16 +B2 2 16 16 +F3 2 11 16 +E3 2 12 16 +C3 2 15 16 +-------16------ +B2 2 16 16 +C3 2 15 16 +B2 2 16 16 +E2 2 25 16 +F2 2 23 16 +C3 2 15 16 +B2 2 16 16 +F2 2 23 16 +-------17------ +E2 2 25 16 +E2 2 25 16 +F2 2 23 16 +E2 2 25 16 +B2 2 16 16 +E2 2 25 16 +F2 2 23 16 +E2 2 25 16 +-------18------ +C3 2 15 16 +E2 2 25 16 +F2 2 23 16 +E2 2 25 16 +E3 2 12 16 +E2 2 25 16 +F3 2 11 16 +E3 2 12 16 +-------19------ +D3 3 6 16 +E3 1 31 16 +F3 1 29 16 +A3 1 23 16 +D4 1 17 16 +E4 1 15 16 +F4 1 14 16 +A4 1 11 16 +-------20------ +F4 1 14 16 +E4 1 15 16 +D4 1 17 16 +F4 1 14 16 +E4 1 15 16 +D4 1 17 16 +A3 1 23 16 +F3 1 29 16 +-------21------ +D3 3 6 16 +E3 1 31 16 +F3 1 29 16 +E3 1 31 16 +F3 1 29 16 +A3 1 23 16 +D4 1 17 16 +A3 1 23 16 +-------22------ +D4 1 17 8 +E4 1 15 8 +F4 1 14 8 +D4 1 17 8 +-------23------ +E3 1 31 32 +A3 1 23 32 +B3 1 20 32 +E4 1 15 32 +B3 1 20 32 +E4 1 15 32 +A4 1 11 32 +B4 0 31 32 +E5 0 23 32 +B4 0 31 32 +A4 1 11 32 +E4 1 15 32 +B3 1 20 32 +A3 1 23 32 +E3 1 31 32 +E4 1 15 32 +-------24------ +E3 1 31 16 +F3 1 29 16 +B3 1 20 16 +C4 1 19 16 +E4 1 15 16 +F4 1 14 16 +B4 0 31 16 +C5 0 29 16 +-------25------ +x x x 16 +E5 0 23 16 +C5 0 29 16 +A4 1 11 16 +E4 1 15 16 +C4 1 19 16 +A3 1 23 32 +E5 0 23 32 +C5 0 29 32 +A4 1 11 32 +-------26------ +A2 2 18 4 diff --git a/songs/test2.mid b/songs/test2.mid new file mode 100755 index 0000000..8975d6f Binary files /dev/null and b/songs/test2.mid differ diff --git a/songs/test3-channel1.txt b/songs/test3-channel1.txt new file mode 100755 index 0000000..970bd1d --- /dev/null +++ b/songs/test3-channel1.txt @@ -0,0 +1,220 @@ +-------1------- +G#3 1 24 16 +F3 1 29 16 +x x x 2 +x x x 4 +-------2------- +x x x 2 +x x x 4 +x x x 8 +-------3------- +F4 1 24 32 +C4 1 19 32 +F3 1 29 16 +x x x 2 +x x x 4 +-------4------- +x x x 2 +x x x 4 +F4 1 24 32 +F#4 1 27 32 +A#4 1 21 32 +C#4 1 18 32 +-------5------- +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +D#4 1 16 16 +C5 1 9 16 +D#4 1 16 16 +F4 1 14 16 +G#3 1 24 16 +-------6------- +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +G#3 1 24 16 +F3 1 29 16 +D#4 1 16 16 +C5 1 9 16 +C#4 1 18 16 +D#4 1 16 16 +F4 1 14 16 +G#3 1 24 16 +-------7------- +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +D#4 1 16 16 +C5 1 9 16 +D#4 1 16 16 +F4 1 14 16 +G#3 1 24 16 +-------8------- +C4 1 19 16 +F3 1 29 16 +G#3 1 24 16 +C4 1 19 16 +F4 1 14 16 +C4 1 19 16 +D#4 1 16 16 +F4 1 14 16 +C5 1 9 16 +C6 0 14 16 +A#5 0 16 16 +G#5 0 18 16 +G5 0 19 16 +G#5 0 18 16 +-------9------- +G#5 0 18 8 +A#5 0 16 32 +G#5 0 18 32 +G5 0 19 16 +C6 0 14 16 +C3 2 15 16 +C3 2 15 16 +x x x 16 +C3 2 15 16 +C3 2 15 16 +x x x 16 +C3 2 15 16 +C#3 2 14 16 +C3 2 15 16 +-------10------- +G5 0 19 8 +G#5 0 18 32 +G5 0 19 32 +F5 0 22 16 +E5 0 23 16 +C3 2 15 16 +C3 2 15 16 +x x x 16 +C3 2 15 16 +C3 2 15 16 +x x x 16 +C3 2 15 16 +F3 2 11 16 +A#2 2 17 16 +-------11------- +A#5 0 16 8 +C6 0 14 32 +A#5 0 16 32 +G#5 0 18 16 +A#5 0 16 16 +C6 0 14 16 +C3 2 15 16 +x x x 16 +G#2 2 19 16 +A#2 2 17 16 +x x x 16 +A#2 2 17 16 +C3 2 15 16 +G#2 2 19 16 +-------12------- +F4 1 14 8 +F4 1 14 32 +C5 0 29 32 +G5 0 19 16 +G#5 0 18 10.66 +G5 0 19 10.66 +F5 0 22 16 +A#5 0 16 16 +G5 0 19 16 +E5 0 23 16 +C#5 0 28 16 +C5 0 29 16 +A#5 0 16 16 +-------13------- +C6 0 14 8 +C#6 0 13 32 +C6 0 14 32 +A#5 0 16 16 +C6 0 14 16 +C3 2 15 16 +C3 2 15 16 +x x x 16 +A#2 2 17 16 +C3 2 15 16 +x x x 16 +C3 2 15 16 +C#3 2 14 16 +C3 2 15 16 +-------14------- +C6 0 14 16 +A#5 0 16 16 +G#5 0 18 16 +G5 0 19 8 +C#5 0 28 32 +C5 0 29 32 +G#5 0 18 16 +G5 0 19 2.66 +C5 0 29 32 +E5 0 23 32 +-------15------- +G5 0 19 5.33 +G#5 0 18 5.33 +A#5 0 16 2.66 +G#5 0 18 16 +G5 0 19 16 +-------16------- +G#5 0 18 5.33 +A#5 0 16 5.33 +C6 0 14 2.66 +F4 1 14 32 +C5 0 29 32 +G5 0 19 32 +G#5 0 18 32 +-------17------- +A#5 0 16 5.33 +C6 0 14 5.33 +C#6 0 13 2.66 +C6 0 14 16 +A#5 0 16 16 +-------18------- +C6 0 14 2.66 +C5 0 29 2 +-------19------- +x x x 2 +x x x 4 +x x x 8 +-------20------- +G#3 1 24 16 +F3 1 29 16 +x x x 2 +x x x 4 +-------21------- +x x x 2 +x x x 4 +x x x 8 +-------22------- +C1 3 30 16 +F1 3 22 16 +F3 1 29 16 +C1 3 30 16 +F1 3 22 16 +F3 1 29 16 +C1 3 30 16 +F1 3 22 16 +G#3 1 24 16 +C1 3 30 16 +F1 3 22 16 +F1 3 22 16 +G3 1 26 16 +F#1 3 21 16 +-------23------- +F1 3 22 8 diff --git a/songs/test3-channel2.txt b/songs/test3-channel2.txt new file mode 100755 index 0000000..32aa58f --- /dev/null +++ b/songs/test3-channel2.txt @@ -0,0 +1,336 @@ +-------1------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +F2 2 23 16 +-------2------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +C2 2 31 16 +C#3 2 14 16 +C3 2 15 16 +A#2 2 17 16 +C3 2 15 16 +-------3------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +F2 2 23 16 +-------4------- +C3 2 15 16 +F2 2 23 16 +G#2 2 19 16 +C3 2 15 16 +F3 2 11 16 +G#3 2 9 16 +C4 2 7 16 +F4 2 5 16 +G#4 2 4 16 +F4 2 5 16 +F3 2 11 16 +C#3 2 14 16 +A#2 2 17 16 +F#2 2 22 16 +-------5------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +F2 2 23 16 +-------6------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +C2 2 31 16 +C#3 2 14 16 +C3 2 15 16 +A#2 2 17 16 +C3 2 15 16 +-------7------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +F2 2 23 16 +-------8------- +C3 2 15 16 +F2 2 23 16 +G#2 2 19 16 +C3 2 15 16 +F3 2 11 16 +G#3 2 9 16 +C4 2 7 16 +F4 2 5 16 +G#4 2 4 16 +F4 2 5 16 +F3 2 11 16 +C#3 2 14 16 +A#2 2 17 16 +F#2 2 22 16 +-------9------- +C5 0 29 8 +G5 0 19 32 +F5 0 22 32 +E5 0 23 16 +C5 0 29 16 +F2 2 23 16 +F2 2 23 16 +x x x 16 +F2 2 23 16 +F2 2 23 16 +x x x 16 +F2 2 23 16 +F#2 2 22 16 +F2 2 23 16 +-------10------- +E5 0 23 8 +F5 0 22 32 +E5 0 23 32 +C#5 0 28 16 +C5 0 29 16 +C2 2 31 16 +C2 2 31 16 +x x x 16 +C2 2 31 16 +C2 2 31 16 +x x x 16 +C2 2 31 16 +A#2 2 17 16 +D#2 2 26 16 +-------11------- +G5 0 19 8 +G#5 0 18 32 +G5 0 19 32 +C5 0 29 16 +G5 0 19 16 +G#5 0 18 16 +D#2 2 26 16 +x x x 16 +D#2 2 26 16 +D#2 2 26 16 +x x x 16 +D#2 2 26 16 +F2 2 23 16 +C#2 2 30 16 +-------12------- +C4 1 19 8 +C4 1 19 32 +F4 1 14 32 +C5 1 9 16 +F3 1 29 32 +C4 1 19 32 +F4 1 14 32 +C4 1 19 32 +F3 1 29 32 +F4 1 14 32 +C4 1 19 32 +F4 1 14 32 +E3 1 31 16 +G3 1 26 16 +A#3 1 22 16 +C#4 1 18 16 +C4 1 19 16 +G5 0 19 16 +-------13------- +G5 0 19 8 +A#5 0 16 32 +G#5 0 18 32 +G5 0 19 16 +E5 0 23 16 +F2 2 23 16 +F2 2 23 16 +x x x 16 +F2 2 23 16 +F2 2 23 16 +x x x 16 +F2 2 23 16 +F2 2 23 16 +F2 2 23 16 +-------14------- +E5 0 23 16 +D5 0 26 16 +C5 0 29 16 +B4 0 31 8 +F4 1 14 32 +E4 1 15 32 +E5 0 23 16 +C5 0 29 16 +C2 2 31 16 +C3 2 15 16 +A#2 2 17 16 +C2 2 31 16 +A#2 2 17 16 +G#2 2 19 16 +-------15------- +D#1 3 25 16 +D#2 3 12 16 +A#2 2 17 16 +D#4 1 16 16 +D#2 2 26 16 +G3 1 26 16 +D#1 3 25 16 +D#2 3 12 16 +D#4 1 16 16 +D#1 3 25 16 +A#2 2 17 16 +D#2 3 12 16 +D#2 2 26 16 +D#4 1 16 16 +-------16------- +F1 3 22 16 +F2 2 23 16 +C2 2 31 16 +F1 3 22 16 +G#3 1 24 16 +F3 1 29 16 +A#2 2 17 16 +C3 2 15 16 +F1 3 22 16 +F2 2 23 16 +F1 3 22 16 +F4 1 14 16 +F3 1 29 16 +F2 2 23 16 +-------17------- +C#1 3 28 16 +F2 2 23 16 +A#2 2 17 16 +C#4 1 18 16 +C4 1 19 16 +C#1 3 28 16 +A#2 2 17 16 +F1 3 22 16 +C3 2 15 16 +A#2 2 17 16 +C#4 1 18 16 +C4 1 19 16 +F3 2 11 16 +F4 1 14 16 +-------18------- +C1 3 30 16 +C2 2 31 16 +C4 1 19 16 +C3 2 15 16 +C1 3 30 16 +C5 1 9 16 +C4 1 19 16 +C4 2 7 16 +C1 3 30 16 +E4 1 15 16 +C#4 1 18 16 +C1 3 30 16 +A#3 2 8 16 +C4 2 7 16 +-------19------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +F2 2 23 16 +-------20------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +C2 2 31 16 +C#3 2 14 16 +C3 2 15 16 +A#2 2 17 16 +C3 2 15 16 +-------21------- +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +D#2 2 26 16 +F2 2 23 16 +C2 2 31 16 +G#2 2 19 16 +F2 2 23 16 +D#2 2 26 16 +F2 2 23 16 +-------22------- +C3 2 15 16 +F2 2 23 16 +G#2 2 19 16 +C3 2 15 16 +F3 2 11 16 +G#3 2 9 16 +C4 2 7 16 +F4 2 5 16 +G#4 2 4 16 +F4 2 5 16 +F3 2 11 16 +C#3 2 14 16 +A#2 2 17 16 +F#2 2 22 16 +-------23------- +F2 2 23 8 diff --git a/songs/test3.mid b/songs/test3.mid new file mode 100755 index 0000000..37b6d77 Binary files /dev/null and b/songs/test3.mid differ diff --git a/sound/Bass/Bass_b1.wav b/sound/Bass/Bass_b1.wav new file mode 100755 index 0000000..3c631c1 Binary files /dev/null and b/sound/Bass/Bass_b1.wav differ diff --git a/sound/Bass/Bass_b2.wav b/sound/Bass/Bass_b2.wav new file mode 100755 index 0000000..109be0e Binary files /dev/null and b/sound/Bass/Bass_b2.wav differ diff --git a/sound/Bass/Bass_b3.wav b/sound/Bass/Bass_b3.wav new file mode 100755 index 0000000..ed2f590 Binary files /dev/null and b/sound/Bass/Bass_b3.wav differ diff --git a/sound/Bass/Bass_b4.wav b/sound/Bass/Bass_b4.wav new file mode 100755 index 0000000..0e9ffe2 Binary files /dev/null and b/sound/Bass/Bass_b4.wav differ diff --git a/sound/Bass/Bass_b5.wav b/sound/Bass/Bass_b5.wav new file mode 100755 index 0000000..b7847ec Binary files /dev/null and b/sound/Bass/Bass_b5.wav differ diff --git a/sound/Bass/Bass_e1.wav b/sound/Bass/Bass_e1.wav new file mode 100755 index 0000000..807aff4 Binary files /dev/null and b/sound/Bass/Bass_e1.wav differ diff --git a/sound/Bass/Bass_e3.wav b/sound/Bass/Bass_e3.wav new file mode 100755 index 0000000..f8431e7 Binary files /dev/null and b/sound/Bass/Bass_e3.wav differ diff --git a/sound/Bass/Bass_e4.wav b/sound/Bass/Bass_e4.wav new file mode 100755 index 0000000..f5d95c8 Binary files /dev/null and b/sound/Bass/Bass_e4.wav differ diff --git a/sound/Buzz/Buzz_High.wav b/sound/Buzz/Buzz_High.wav new file mode 100755 index 0000000..caf78ab Binary files /dev/null and b/sound/Buzz/Buzz_High.wav differ diff --git a/sound/Buzz/Buzz_Low.wav b/sound/Buzz/Buzz_Low.wav new file mode 100755 index 0000000..a619414 Binary files /dev/null and b/sound/Buzz/Buzz_Low.wav differ diff --git a/sound/Lead/Lead_a3.wav b/sound/Lead/Lead_a3.wav new file mode 100755 index 0000000..9fdb02d Binary files /dev/null and b/sound/Lead/Lead_a3.wav differ diff --git a/sound/Lead/Lead_a4.wav b/sound/Lead/Lead_a4.wav new file mode 100755 index 0000000..2d106a6 Binary files /dev/null and b/sound/Lead/Lead_a4.wav differ diff --git a/sound/Lead/Lead_a5.wav b/sound/Lead/Lead_a5.wav new file mode 100755 index 0000000..32bb27b Binary files /dev/null and b/sound/Lead/Lead_a5.wav differ diff --git a/sound/Lead/Lead_a6.wav b/sound/Lead/Lead_a6.wav new file mode 100755 index 0000000..7b1e22d Binary files /dev/null and b/sound/Lead/Lead_a6.wav differ diff --git a/sound/Lead/Lead_e3.wav b/sound/Lead/Lead_e3.wav new file mode 100755 index 0000000..7d6a2d1 Binary files /dev/null and b/sound/Lead/Lead_e3.wav differ diff --git a/sound/Lead/Lead_e4.wav b/sound/Lead/Lead_e4.wav new file mode 100755 index 0000000..fdf3133 Binary files /dev/null and b/sound/Lead/Lead_e4.wav differ diff --git a/sound/Lead/Lead_e5.wav b/sound/Lead/Lead_e5.wav new file mode 100755 index 0000000..eb696a5 Binary files /dev/null and b/sound/Lead/Lead_e5.wav differ diff --git a/sound/Lead/Lead_e6.wav b/sound/Lead/Lead_e6.wav new file mode 100755 index 0000000..1e7eb01 Binary files /dev/null and b/sound/Lead/Lead_e6.wav differ diff --git a/sound/Lead/Lead_e7.wav b/sound/Lead/Lead_e7.wav new file mode 100755 index 0000000..3f53d7b Binary files /dev/null and b/sound/Lead/Lead_e7.wav differ diff --git a/sound/Lead/Lead_e8.wav b/sound/Lead/Lead_e8.wav new file mode 100755 index 0000000..7806ccd Binary files /dev/null and b/sound/Lead/Lead_e8.wav differ diff --git a/sound/LowBass/Low_Bass.wav b/sound/LowBass/Low_Bass.wav new file mode 100755 index 0000000..0ecf726 Binary files /dev/null and b/sound/LowBass/Low_Bass.wav differ diff --git a/sound/Noise/Noise_High.wav b/sound/Noise/Noise_High.wav new file mode 100755 index 0000000..0a867fa Binary files /dev/null and b/sound/Noise/Noise_High.wav differ diff --git a/sound/Noise/Noise_Low.wav b/sound/Noise/Noise_Low.wav new file mode 100755 index 0000000..8ac89ad Binary files /dev/null and b/sound/Noise/Noise_Low.wav differ diff --git a/sound/Pittfall/Pitfall_B4.wav b/sound/Pittfall/Pitfall_B4.wav new file mode 100755 index 0000000..43b7f04 Binary files /dev/null and b/sound/Pittfall/Pitfall_B4.wav differ diff --git a/sound/Pittfall/Pitfall_B5.wav b/sound/Pittfall/Pitfall_B5.wav new file mode 100755 index 0000000..916f17d Binary files /dev/null and b/sound/Pittfall/Pitfall_B5.wav differ diff --git a/sound/Pittfall/Pitfall_b1.wav b/sound/Pittfall/Pitfall_b1.wav new file mode 100755 index 0000000..f1ac8f6 Binary files /dev/null and b/sound/Pittfall/Pitfall_b1.wav differ diff --git a/sound/Pittfall/Pitfall_b2.wav b/sound/Pittfall/Pitfall_b2.wav new file mode 100755 index 0000000..6b4cdce Binary files /dev/null and b/sound/Pittfall/Pitfall_b2.wav differ diff --git a/sound/Pittfall/Pitfall_b3.wav b/sound/Pittfall/Pitfall_b3.wav new file mode 100755 index 0000000..8840e96 Binary files /dev/null and b/sound/Pittfall/Pitfall_b3.wav differ diff --git a/sound/Pittfall/Pitfall_e1.wav b/sound/Pittfall/Pitfall_e1.wav new file mode 100755 index 0000000..aec9189 Binary files /dev/null and b/sound/Pittfall/Pitfall_e1.wav differ diff --git a/sound/Pittfall/Pitfall_e3.wav b/sound/Pittfall/Pitfall_e3.wav new file mode 100755 index 0000000..6317680 Binary files /dev/null and b/sound/Pittfall/Pitfall_e3.wav differ diff --git a/sound/Pittfall/Pitfall_e4.wav b/sound/Pittfall/Pitfall_e4.wav new file mode 100755 index 0000000..66c314b Binary files /dev/null and b/sound/Pittfall/Pitfall_e4.wav differ diff --git a/sound/Saw/Saw_C2.wav b/sound/Saw/Saw_C2.wav new file mode 100755 index 0000000..3707997 Binary files /dev/null and b/sound/Saw/Saw_C2.wav differ diff --git a/sound/Saw/Saw_C3.wav b/sound/Saw/Saw_C3.wav new file mode 100755 index 0000000..973c103 Binary files /dev/null and b/sound/Saw/Saw_C3.wav differ diff --git a/sound/Saw/Saw_C4.wav b/sound/Saw/Saw_C4.wav new file mode 100755 index 0000000..307385b Binary files /dev/null and b/sound/Saw/Saw_C4.wav differ diff --git a/sound/Saw/Saw_C5.wav b/sound/Saw/Saw_C5.wav new file mode 100755 index 0000000..d58b265 Binary files /dev/null and b/sound/Saw/Saw_C5.wav differ diff --git a/sound/Saw/Saw_C6.wav b/sound/Saw/Saw_C6.wav new file mode 100755 index 0000000..c6115de Binary files /dev/null and b/sound/Saw/Saw_C6.wav differ diff --git a/sound/Saw/Saw_C7.wav b/sound/Saw/Saw_C7.wav new file mode 100755 index 0000000..7b83241 Binary files /dev/null and b/sound/Saw/Saw_C7.wav differ diff --git a/sound/Saw/Saw_F2.wav b/sound/Saw/Saw_F2.wav new file mode 100755 index 0000000..700f8be Binary files /dev/null and b/sound/Saw/Saw_F2.wav differ diff --git a/sound/Saw/Saw_F3.wav b/sound/Saw/Saw_F3.wav new file mode 100755 index 0000000..4d0af8d Binary files /dev/null and b/sound/Saw/Saw_F3.wav differ diff --git a/sound/Saw/Saw_F4.wav b/sound/Saw/Saw_F4.wav new file mode 100755 index 0000000..e428620 Binary files /dev/null and b/sound/Saw/Saw_F4.wav differ diff --git a/sound/Saw/Saw_F5.wav b/sound/Saw/Saw_F5.wav new file mode 100755 index 0000000..f3c1686 Binary files /dev/null and b/sound/Saw/Saw_F5.wav differ diff --git a/sound/Square/Sq_b4.wav b/sound/Square/Sq_b4.wav new file mode 100755 index 0000000..44ed042 Binary files /dev/null and b/sound/Square/Sq_b4.wav differ diff --git a/sound/Square/Sq_b5.wav b/sound/Square/Sq_b5.wav new file mode 100755 index 0000000..ca8f10b Binary files /dev/null and b/sound/Square/Sq_b5.wav differ diff --git a/sound/Square/Sq_b6.wav b/sound/Square/Sq_b6.wav new file mode 100755 index 0000000..7408bc5 Binary files /dev/null and b/sound/Square/Sq_b6.wav differ diff --git a/sound/Square/Sq_b7.wav b/sound/Square/Sq_b7.wav new file mode 100755 index 0000000..d6426a3 Binary files /dev/null and b/sound/Square/Sq_b7.wav differ diff --git a/sound/Square/Sq_b8.wav b/sound/Square/Sq_b8.wav new file mode 100755 index 0000000..ac40c76 Binary files /dev/null and b/sound/Square/Sq_b8.wav differ diff --git a/sound/Square/Sq_e5.wav b/sound/Square/Sq_e5.wav new file mode 100755 index 0000000..8e5c387 Binary files /dev/null and b/sound/Square/Sq_e5.wav differ diff --git a/sound/Square/Sq_e6.wav b/sound/Square/Sq_e6.wav new file mode 100755 index 0000000..7f8d5aa Binary files /dev/null and b/sound/Square/Sq_e6.wav differ diff --git a/sound/Square/Sq_e7.wav b/sound/Square/Sq_e7.wav new file mode 100755 index 0000000..9df8e82 Binary files /dev/null and b/sound/Square/Sq_e7.wav differ diff --git a/sound/Square/Sq_e8.wav b/sound/Square/Sq_e8.wav new file mode 100755 index 0000000..3f49b25 Binary files /dev/null and b/sound/Square/Sq_e8.wav differ diff --git a/square_1.php b/square_1.php new file mode 100755 index 0000000..530d5d9 --- /dev/null +++ b/square_1.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && strcmp($c1_data[$i-1][1],"0") > 0) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"0") == 0) //play a note (square) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,144); //note on, channel 0 + array_push($bin_data,$note_array['square'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,224); //pitch bend, channel 0 + array_push($bin_data,$note_array['square'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['square'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,128); //note off, channel 0 + array_push($bin_data,$note_array['square'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to square voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",192),1); //change voice, channel 0 +fwrite($filehandle,pack("I",80),1); //square voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",176),1); //controller event, channel 0 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 2 DATA +?> \ No newline at end of file diff --git a/square_2.php b/square_2.php new file mode 100755 index 0000000..3b89475 --- /dev/null +++ b/square_2.php @@ -0,0 +1,113 @@ + $arr) +{ + //tick delay---------------------------------// + $b_arr = array(0); + + //only if previous note was a rest or another voice + if ($i > 0 && strcmp($c2_data[$i-1][1],"0") > 0) + { + $b_ticks = strrev(decbin($ticksSinceLastNote)); + $b_arr = str_split($b_ticks,7); + + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + } + //--------------------------------------------// + + $ticksSinceLastNote += (1/$arr[3])*960; + + if (strcmp($arr[1],"0") == 0) //play a note (square) + { + //note on event + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,148); //note on, channel 4 + array_push($bin_data,$note_array['square'][$arr[2]][5]); //MIDI note index + array_push($bin_data,100); //velocity + + //pitch bend + array_push($bin_data,0); //delta time (immediate bend) + array_push($bin_data,228); //pitch bend, channel 4 + array_push($bin_data,$note_array['square'][$arr[2]][6]); //left bits + array_push($bin_data,$note_array['square'][$arr[2]][7]); //right bits + + //tick delay for note off + $b_ticks = strrev(decbin((1/$arr[3])*960)); + + $b_arr = str_split($b_ticks,7); + for ($j = 0; $j < count($b_arr); $j++) + { + if (strlen($b_arr[$j]) < 7) + $b_arr[$j] = str_pad($b_arr[$j],7,"0",STR_PAD_RIGHT); + + if ($j > 0) + $b_arr[$j][7] = "1"; + $b_arr[$j] = strrev($b_arr[$j]); + } + + //note off + for ($j = count($b_arr)-1; $j >= 0; $j--) //tick delay + array_push($bin_data,bindec($b_arr[$j])); + + array_push($bin_data,132); //note off, channel 4 + array_push($bin_data,$note_array['square'][$arr[2]][5]); + array_push($bin_data,100); //velocity of release + + $ticksSinceLastNote = 0; + } +} + +//Header +fwrite($filehandle,pack("I",77),1); +fwrite($filehandle,pack("I",84),1); +fwrite($filehandle,pack("I",114),1); +fwrite($filehandle,pack("I",107),1); + +//# of bytes in track data +$numbytes = count($bin_data)+11; //the seven lines of changing voice and volume, plus the track end bytes +$h = str_pad(dechex($numbytes),8,"0",STR_PAD_LEFT); + +$byte4 = hexdec(substr($h,6,2)); +$byte3 = hexdec(substr($h,4,2)); +$byte2 = hexdec(substr($h,2,2)); +$byte1 = hexdec(substr($h,0,2)); + +fwrite($filehandle,pack("I",$byte1),1); +fwrite($filehandle,pack("I",$byte2),1); +fwrite($filehandle,pack("I",$byte3),1); +fwrite($filehandle,pack("I",$byte4),1); + +//change to square voice +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",196),1); //change voice, channel 4 +fwrite($filehandle,pack("I",80),1); //square voice + +//change volume +fwrite($filehandle,pack("I",0),1); //delta time +fwrite($filehandle,pack("I",180),1); //controller event, channel 4 +fwrite($filehandle,pack("I",7),1); //change volume +fwrite($filehandle,pack("I",80),1); //volume level + +foreach ($bin_data as $val) + fwrite($filehandle,pack("I",$val),1); + +//End track +fwrite($filehandle,pack("I",0),1); +fwrite($filehandle,pack("I",255),1); +fwrite($filehandle,pack("I",47),1); +fwrite($filehandle,pack("I",0),1); +//END TRACK 2 DATA +?> \ No newline at end of file diff --git a/style.css b/style.css new file mode 100755 index 0000000..7312a16 --- /dev/null +++ b/style.css @@ -0,0 +1,44 @@ +body {background-color: #E0CECE; font-family: "Times New Roman";} +h1,h2,h3,h4,h5 {text-align: center; font-family: Georgia; color: #330000;} +.wkey {background-color: #FFFFFF; z-index: 1; cursor: pointer;} +.bkey {background-color: #000000; z-index: 2; cursor: pointer;} +.C4 {border: 2px solid #FF0000;} +.note-select,.rest-select {cursor: pointer; padding: 0px;} +li {list-style-position: outside;} +small,code {font-family: monospace; color: #CC3333;} +a:link,a:visited {color: #669966; font-family: Georgia; text-decoration: none; font-weight: bold;} +a:hover,a:active {color: #3399FF; font-family: Georgia; padding-left: 1px; font-weight: bold;} + +div.faq +{ + background-color: #F0C8D8; + border: 2px ridge #000000; + position: absolute; + width:0px; + height:0px; + padding: 2px; + padding-left: 5px; + z-index: 200; + visibility: hidden; + overflow: auto; + opacity: .98; + filter: alpha(opacity=98); +} +.faq_q {color: #006600; font-family: Verdana; text-indent: 2px; font-size: 10pt; font-weight: bold;} +.faq_a {color: #000066; font-family: Verdana; font-size: 8pt; font-weight: bold;} + +div.floater +{ + position: absolute; + top: 0px; + left: 0px; + border: 1px solid #000000; + background-color: #CEE0CE; + width: 105px; + z-index: 100; + visibility: hidden; + display: inline; + font-family: Verdana; + font-size: 8pt; + padding: 2px; +}