$page_title = "Exhibit: Mathematica songs exhibit"; $page_description = "Exhibit on Mathematica songs Math 21b, Linear Algebra and Applications"; ${base} = "../../"; $robots = "all"; @list_of_files=`cd $global_base/exhibits/songs; ls *.txt`; $number_of_files=$#list_of_files; $number_of_files++; sub main_page { &main_page_start; &main_page_entries; &main_page_end; } sub main_page_start { print OUTPUT<<"EOF"

If you want to share your Mathematica song, send the Mathematica lines to Oliver (just copy paste the lines into the mail program). Songs are ordered by names alphabetically. The best song writer will get a CD containing all songs.
The best song will be announced in the review. Here is the best 1 line Mathematica composition among the submissions. The author Daniel Koll writes: "it is interesting that logarithms and exponentials give these nice cheap sci-fi sounds":
Manipulate[Sound[{Play[Sin[A Log[t]],{t,0,0.5}],Play[Sin[B*Exp[t]],{t,0,0.5}]}],{A,100,500},{B,1000,5000}]
EOF } sub byname { ($lastname{$a} cmp $lastname{$b}) } sub main_page_entries { for ($i=0; $i<$number_of_files; $i++) { chop($name=@list_of_files[($i % $number_of_files)]); $name =~ s/.txt//g; ($firstname,$lastname) = split('_',$name); if ($lastname=~ "1") { $multiple{$name}=2; } else { $multiple{$name}=1; } $lastname =~ s/1//g; $lastname =~ s/2//g; $lastname{$name} =$lastname; $firstname{$name}=$firstname; } $j=0; foreach $name (sort byname keys(%lastname) ){ $fullname = "$firstname{$name} $lastname{$name}"; $fullname =~ s/\b(\w)/\U$1/g; &table_entry; if ($j%2 == 1) { &table_break; } $j++; } } sub table_entry{ &table_entry1; if ($multiple{$name}==2) { &table_entry2; } &table_entry3; } sub table_entry1{ print OUTPUT<<"EOF" EOF } sub table_break{ print OUTPUT<<"EOF" EOF } sub main_page_end { print OUTPUT<<"EOF"
$fullname
[Source]
[Score]
[MIDI]
[MP3] EOF } sub table_entry2{ $name1 = $name; $name1 =~ s/1//g; print OUTPUT<<"EOF" ,[(2)] EOF } sub table_entry3{ print OUTPUT<<"EOF"


EOF } 1;