& beforetext &>
More tunes may follow as I get the time to enter them, someday. <& aftertext &> %#That's the end of the HTML, everything else is Perl. %# ********************************************* %# shared %# ********************************************* <%shared> my %keypos = ( 'A,,' => 0, 'A,' => 12, 'A' => 24, 'A#,,'=> 1, 'A#,'=> 13, 'A#' => 25, 'Bb,,'=> 1, 'Bb,'=> 13, 'Bb' => 25, 'B,,' => 2, 'B,' => 14, 'B' => 26, 'C,' => 3, 'C' => 15, 'c' => 27, 'C#,' => 4, 'C#' => 16, 'c#' => 28, 'Db,' => 4, 'Db' => 16, 'db' => 28, 'D,' => 5, 'D' => 17, 'd' => 29, 'D#,' => 6, 'D#' => 18, 'd#' => 30, 'Eb,' => 6, 'Eb' => 18, 'eb' => 30, 'E,' => 7, 'E' => 19, 'e' => 31, 'F,' => 8, 'F' => 20, 'f' => 32, 'F#,' => 9, 'F#' => 21, 'f#' => 33, 'Gb,' => 9, 'Gb' => 21, 'gb' => 33, 'G,' => 10, 'G' => 22, 'g' => 34, 'G#,' => 11, 'G#' => 23, 'g#' => 35, 'Ab,' => 11, 'Ab' => 23, 'ab' => 36, ); my %keys_at_pos; foreach my $key (keys %keypos){ unshift @{$keys_at_pos{$keypos{$key}}}, $key; } %shared> %# ********************************************* %# end shared %# ********************************************* %# ********************************************* %# dorow METHOD %# ********************************************* <%method dorow> <%args> $id $key $title $notes=>'' %args> <%init> #this should be in a config file somewhere my @outputs = ( #display name, directory, filename extension for url [qw(abc abc html)], [qw(pdf pdf pdf)], [qw(jpg jpg jpg)], [qw(midi midi mid)], ['See&Hear',qw(seeandhear html)], # [qw(postscript ps ps)], ); my $basedir = Apache->request->dir_config('basedir'); %init>